@justifi/webcomponents 5.4.2 → 5.4.3

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 (147) hide show
  1. package/dist/cjs/{SubAccount-06f9030b.js → SubAccount-2a302ead.js} +1 -0
  2. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +1 -1
  3. package/dist/cjs/billing-form_3.cjs.entry.js +1 -1
  4. package/dist/cjs/{check-pkg-version-15023e22.js → check-pkg-version-64d3381a.js} +1 -1
  5. package/dist/cjs/{checkout.service-ab658f38.js → checkout.service-0a7835dc.js} +1 -1
  6. package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
  7. package/dist/cjs/{dispute.service-1494b42c.js → dispute.service-6efc7d7f.js} +1 -1
  8. package/dist/cjs/{get-payout-csv-4240b172.js → get-payout-csv-7607c71e.js} +1 -1
  9. package/dist/cjs/{get-subaccounts-fa8dc254.js → get-subaccounts-ae5b35a8.js} +1 -1
  10. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +1 -1
  11. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +1 -1
  12. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-business-form.cjs.entry.js +3 -3
  14. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  15. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
  16. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +5 -5
  17. package/dist/cjs/justifi-dispute-management.cjs.entry.js +4 -4
  18. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +4 -4
  19. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -7
  21. package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
  22. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  23. package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
  24. package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
  25. package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-refund-payment.cjs.entry.js +26 -29
  27. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  28. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
  29. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
  30. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-terminals-list.cjs.entry.js +5 -5
  32. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +3 -3
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/cjs/{package-868b01af.js → package-99f9fc82.js} +1 -1
  35. package/dist/cjs/{payment.service-97bef4f8.js → payment.service-537e049d.js} +1 -1
  36. package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
  37. package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
  38. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +2 -2
  39. package/dist/cjs/{terminal-orders-table-050e673f.js → terminal-orders-table-3b247193.js} +2 -0
  40. package/dist/cjs/{terminal.service-0aac977d.js → terminal.service-ab62c344.js} +1 -1
  41. package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
  42. package/dist/cjs/webcomponents.cjs.js +1 -1
  43. package/dist/collection/api/TerminalOrder.js +1 -0
  44. package/dist/collection/components/order-terminals/order-terminals.js +23 -3
  45. package/dist/collection/components/refund-payment/refund-payment.js +97 -52
  46. package/dist/collection/components/terminal-orders-list/terminal-orders-table.js +2 -0
  47. package/dist/docs.json +116 -43
  48. package/dist/esm/{SubAccount-837658ae.js → SubAccount-7520271c.js} +1 -0
  49. package/dist/esm/bank-account-document-form-inputs_4.entry.js +1 -1
  50. package/dist/esm/billing-form_3.entry.js +1 -1
  51. package/dist/esm/{check-pkg-version-a8dd8455.js → check-pkg-version-bbd75fa0.js} +1 -1
  52. package/dist/esm/{checkout.service-87cd501d.js → checkout.service-e38e477f.js} +1 -1
  53. package/dist/esm/checkouts-list-core.entry.js +1 -1
  54. package/dist/esm/{dispute.service-1f79929b.js → dispute.service-7ba6d5a4.js} +1 -1
  55. package/dist/esm/{get-payout-csv-6139c5fc.js → get-payout-csv-fa34f40b.js} +1 -1
  56. package/dist/esm/{get-subaccounts-c4b2b829.js → get-subaccounts-3c6b9e84.js} +1 -1
  57. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -1
  58. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +1 -1
  59. package/dist/esm/justifi-business-details.entry.js +2 -2
  60. package/dist/esm/justifi-business-form.entry.js +3 -3
  61. package/dist/esm/justifi-checkout.entry.js +4 -4
  62. package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
  63. package/dist/esm/justifi-checkouts-list.entry.js +5 -5
  64. package/dist/esm/justifi-dispute-management.entry.js +4 -4
  65. package/dist/esm/justifi-dispute-notification_3.entry.js +4 -4
  66. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  67. package/dist/esm/justifi-order-terminals.entry.js +9 -7
  68. package/dist/esm/justifi-payment-details.entry.js +4 -4
  69. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  70. package/dist/esm/justifi-payments-list.entry.js +4 -4
  71. package/dist/esm/justifi-payout-details.entry.js +4 -4
  72. package/dist/esm/justifi-payouts-list.entry.js +5 -5
  73. package/dist/esm/justifi-refund-payment.entry.js +26 -29
  74. package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
  75. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
  76. package/dist/esm/justifi-terminal-orders-list.entry.js +4 -4
  77. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  78. package/dist/esm/justifi-terminals-list.entry.js +5 -5
  79. package/dist/esm/justifi-tokenize-payment-method.entry.js +3 -3
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/{package-f0bb46fd.js → package-01997353.js} +1 -1
  82. package/dist/esm/{payment.service-bc99d372.js → payment.service-af5bd8be.js} +1 -1
  83. package/dist/esm/payments-list-core.entry.js +1 -1
  84. package/dist/esm/payouts-list-core.entry.js +1 -1
  85. package/dist/esm/terminal-orders-list-core.entry.js +2 -2
  86. package/dist/esm/{terminal-orders-table-65d59323.js → terminal-orders-table-93e84d25.js} +2 -0
  87. package/dist/esm/{terminal.service-a8a968ac.js → terminal.service-d173566d.js} +1 -1
  88. package/dist/esm/terminals-list-core.entry.js +1 -1
  89. package/dist/esm/webcomponents.js +1 -1
  90. package/dist/module/SubAccount.js +1 -0
  91. package/dist/module/justifi-order-terminals.js +6 -3
  92. package/dist/module/justifi-refund-payment.js +31 -31
  93. package/dist/module/package.js +1 -1
  94. package/dist/module/terminal-orders-list-core2.js +2 -0
  95. package/dist/types/api/TerminalOrder.d.ts +2 -0
  96. package/dist/types/components/order-terminals/order-terminals.d.ts +2 -0
  97. package/dist/types/components/refund-payment/refund-payment.d.ts +9 -36
  98. package/dist/types/components/terminal-orders-list/terminal-orders-table.d.ts +2 -0
  99. package/dist/types/components.d.ts +11 -35
  100. package/dist/webcomponents/{p-74711d79.entry.js → p-07fbeff3.entry.js} +1 -1
  101. package/dist/webcomponents/{p-5bd1c32c.entry.js → p-0fa216eb.entry.js} +1 -1
  102. package/dist/webcomponents/{p-d86add24.entry.js → p-0fc1d3bb.entry.js} +1 -1
  103. package/dist/webcomponents/{p-60ec062a.entry.js → p-1134e1d3.entry.js} +1 -1
  104. package/dist/webcomponents/p-1c38ec65.entry.js +1 -0
  105. package/dist/webcomponents/{p-b5c7cb4c.entry.js → p-1ce63001.entry.js} +1 -1
  106. package/dist/webcomponents/{p-913e28d6.entry.js → p-290fa30d.entry.js} +1 -1
  107. package/dist/webcomponents/{p-0d7d61ac.js → p-2a9d7f6b.js} +1 -1
  108. package/dist/webcomponents/{p-9c4e3bac.js → p-3188f72a.js} +1 -1
  109. package/dist/webcomponents/{p-a589b3a1.entry.js → p-3cc7527a.entry.js} +1 -1
  110. package/dist/webcomponents/{p-ebd814ab.entry.js → p-3cf317d3.entry.js} +1 -1
  111. package/dist/webcomponents/{p-c438d1c8.entry.js → p-4598482c.entry.js} +1 -1
  112. package/dist/webcomponents/{p-96783edf.js → p-536fb8e2.js} +1 -1
  113. package/dist/webcomponents/{p-9e49cf17.js → p-54556fc6.js} +1 -1
  114. package/dist/webcomponents/{p-8c70396c.entry.js → p-645db2cb.entry.js} +1 -1
  115. package/dist/webcomponents/{p-14cfb25e.entry.js → p-65cb72e4.entry.js} +1 -1
  116. package/dist/webcomponents/{p-b299b597.entry.js → p-6a5eab1f.entry.js} +1 -1
  117. package/dist/webcomponents/p-7b793901.entry.js +1 -0
  118. package/dist/webcomponents/{p-e309516a.entry.js → p-7c333590.entry.js} +1 -1
  119. package/dist/webcomponents/p-81a6c3e2.entry.js +1 -0
  120. package/dist/webcomponents/{p-ac9f2e2b.js → p-87a4fb5b.js} +1 -1
  121. package/dist/webcomponents/{p-b99817a0.js → p-88a37837.js} +1 -1
  122. package/dist/webcomponents/{p-187d456b.entry.js → p-8a6a06e6.entry.js} +1 -1
  123. package/dist/webcomponents/{p-190ee091.entry.js → p-8d4a0192.entry.js} +1 -1
  124. package/dist/webcomponents/{p-72e71b3c.js → p-9a9732e1.js} +1 -1
  125. package/dist/webcomponents/p-9fecad5a.js +1 -0
  126. package/dist/webcomponents/{p-a2d30370.entry.js → p-a07e021f.entry.js} +1 -1
  127. package/dist/webcomponents/p-a6976c9c.entry.js +1 -0
  128. package/dist/webcomponents/{p-90b82e40.entry.js → p-a8c69f51.entry.js} +1 -1
  129. package/dist/webcomponents/{p-150e80db.entry.js → p-ab3a8004.entry.js} +1 -1
  130. package/dist/webcomponents/{p-746894be.entry.js → p-b082f07a.entry.js} +1 -1
  131. package/dist/webcomponents/{p-2819e94a.entry.js → p-b218af87.entry.js} +1 -1
  132. package/dist/webcomponents/{p-c00ef77b.entry.js → p-b979fcb0.entry.js} +1 -1
  133. package/dist/webcomponents/{p-45fda0bc.entry.js → p-caa29469.entry.js} +1 -1
  134. package/dist/webcomponents/{p-6a594a9f.js → p-cbad44b7.js} +1 -1
  135. package/dist/webcomponents/{p-5c5c1e82.entry.js → p-dd2938d3.entry.js} +1 -1
  136. package/dist/webcomponents/{p-431670c6.entry.js → p-e3855f51.entry.js} +1 -1
  137. package/dist/webcomponents/{p-1da00a0c.entry.js → p-e73be1b9.entry.js} +1 -1
  138. package/dist/webcomponents/p-e817d131.entry.js +1 -0
  139. package/dist/webcomponents/{p-3da2652e.js → p-f4aeb100.js} +1 -1
  140. package/dist/webcomponents/webcomponents.esm.js +1 -1
  141. package/package.json +1 -1
  142. package/dist/webcomponents/p-507d8aa4.entry.js +0 -1
  143. package/dist/webcomponents/p-b26fb429.js +0 -1
  144. package/dist/webcomponents/p-c7313123.entry.js +0 -1
  145. package/dist/webcomponents/p-cf9e893a.entry.js +0 -1
  146. package/dist/webcomponents/p-dcff8139.entry.js +0 -1
  147. package/dist/webcomponents/p-f0a56d96.entry.js +0 -1
@@ -2,14 +2,14 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
2
2
  import { c as create$3, a as create$6, F as FormController } from './form.js';
3
3
  import { f as formatCurrency } from './utils2.js';
4
4
  import { A as Api } from './Api.js';
5
- import './ComponentError.js';
5
+ import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
6
6
  import './Checkout.js';
7
7
  import './Pagination.js';
8
8
  import './Payment.js';
9
9
  import './SubAccount.js';
10
10
  import './Document.js';
11
+ import { B as Button } from './button.js';
11
12
  import { S as StyledHost } from './styled-host.js';
12
- import { H as Header1 } from './header-1.js';
13
13
  import './details.js';
14
14
  import { d as defineCustomElement$7 } from './custom-popper2.js';
15
15
  import { d as defineCustomElement$6 } from './form-control-help-text3.js';
@@ -55,14 +55,17 @@ const RefundPayment = /*@__PURE__*/ proxyCustomElement(class RefundPayment exten
55
55
  super();
56
56
  this.__registerHost();
57
57
  this.__attachShadow();
58
- this.submitted = createEvent(this, "submitted", 7);
58
+ this.errorEvent = createEvent(this, "error-event", 7);
59
+ this.submitEvent = createEvent(this, "submit-event", 7);
59
60
  this.authToken = undefined;
60
61
  this.paymentId = undefined;
62
+ this.hideSubmitButton = false;
63
+ this.apiOrigin = "https://wc-proxy.justifi.ai";
61
64
  this.paymentAmountRefundable = 0;
62
- this.withButton = undefined;
65
+ this.errorMessage = null;
63
66
  this.errors = {};
64
67
  this.values = {};
65
- this.isSubmitting = false;
68
+ this.isLoading = false;
66
69
  }
67
70
  componentWillLoad() {
68
71
  this.formController = new FormController(RefundPaymentSchema(this.paymentAmountRefundable.toString()));
@@ -76,58 +79,55 @@ const RefundPayment = /*@__PURE__*/ proxyCustomElement(class RefundPayment exten
76
79
  this.values = Object.assign({}, values);
77
80
  });
78
81
  }
79
- /**
80
- * Handles the form submission.
81
- * Prevents the default form action, validates the form, and emits the 'submitted' event.
82
- */
83
82
  async handleSubmit(event) {
84
83
  event.preventDefault();
85
84
  this.formController.validateAndSubmit(this.submitRefund);
86
85
  }
87
- /**
88
- * Submits the refund request to the API.
89
- */
90
86
  async submitRefund(values) {
91
- this.isSubmitting = true;
87
+ this.isLoading = true;
88
+ let refundResponse;
92
89
  try {
93
- const response = await this.api.post(`payments/${this.paymentId}/refunds`, values);
94
- this.submitted.emit(response);
90
+ refundResponse = await this.api.post(`payments/${this.paymentId}/refunds`, values);
95
91
  }
96
92
  catch (error) {
97
93
  console.error('Error submitting refund:', error);
98
- this.submitted.emit(error);
94
+ this.errorEvent.emit(error);
99
95
  }
100
96
  finally {
101
- this.isSubmitting = false;
97
+ this.submitEvent.emit({ response: refundResponse });
98
+ this.isLoading = false;
102
99
  }
103
100
  }
104
- /**
105
- * Handles input changes, updating the refundFields state.
106
- */
107
101
  handleInput(field, value) {
108
102
  this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [field]: value }));
109
103
  }
110
- /**
111
- * Initializes the API with the given authentication token.
112
- * Logs a warning if the auth token is missing.
113
- */
114
104
  initializeApi() {
115
- if (!this.authToken) {
116
- console.warn('Warning: Missing auth-token.');
105
+ if (this.paymentId && this.authToken) {
106
+ this.api = Api({ authToken: this.authToken, apiOrigin: "https://wc-proxy.justifi.ai" });
107
+ }
108
+ else {
109
+ this.errorMessage = 'Payment ID and Auth Token are required';
110
+ this.errorEvent.emit({
111
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
112
+ message: this.errorMessage,
113
+ severity: ComponentErrorSeverity.ERROR,
114
+ });
117
115
  }
118
- this.api = Api({ authToken: this.authToken, apiOrigin: "https://wc-proxy.justifi.ai" });
119
116
  }
120
117
  render() {
121
- return (h(StyledHost, { key: 'f9aa3650a61fce55ce094e48cb23cc62caf4c434' }, h(Header1, { key: 'def40858b3cf9188362848703e6425cc1273b1ee', text: "Refund Payment", class: "fs-5 fw-bold pb-3" }), h("form", { key: '20fcdff2467713eb3502959d0186de900a400207', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: '5e838c432e5e0fafdfd153de327548a2d2d7f388', class: "form-group" }, h("form-control-monetary", { key: '151d529e7422073da4244f9bc81166f6a54ad9b0', name: "amount", label: "Refund Amount", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount, defaultValue: this.paymentAmountRefundable.toString() })), h("div", { key: '7d69e721b5f346d854f8b1914199c56fb062694d', class: "form-group" }, h("form-control-select", { key: '791d41bf86e856a7694afb0db20607ba792459b9', label: "Reason for refund (optional)", options: refundReasonOptions, name: "reason", defaultValue: '' })), h("div", { key: 'b8a67a5d091ad11a410d157cf6706023b3af139c', class: "form-group" }, h("form-control-textarea", { key: 'eee0ab29c728a64435c2836361eb2c2645fce1ea', name: "description", label: "Note (optional)", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.description, maxLength: 250 })), this.withButton && (h("div", { key: '3504774504825ffdace54ebf41f496aa58395648', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '27179c019afbec3d136c959657e6e6cbec892a27', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, `Refund ${formatCurrency(+this.values.amount)}`))))));
118
+ return (h(StyledHost, { key: 'ea0429d62ea383b6525251150978bb0ebfb2704e' }, h("form", { key: '8f2e00b871ee896ba82311d8975574e5a2cbf6e3' }, h("div", { key: 'fa6476367e4a8b7fd7cdfff906671ef597b453de', class: "row gy-3" }, h("div", { key: '72a48181200d6116ceb4bb511bdd33c8c8197742', class: "form-group" }, h("form-control-monetary", { key: 'f6a3b3a7d8d8c733cb032db96878ad64ff712356', name: "amount", label: "Refund Amount", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount, defaultValue: this.paymentAmountRefundable.toString() })), h("div", { key: '47e6dc07510e192caf00ce959348a2a9472f48f8', class: "form-group" }, h("form-control-select", { key: '9f9b761eea9964c7f6ac1dd907a4fee8cd63c906', label: "Reason for refund (optional)", options: refundReasonOptions, name: "reason", defaultValue: '' })), h("div", { key: 'daa4bf44ec311e0554ea28f97a0932673d542a31', class: "form-group" }, h("form-control-textarea", { key: 'a03d055e6462b9a23e714ca58a942a6da0365919', name: "description", label: "Note (optional)", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.description, maxLength: 250 })), h("div", { key: 'b744d28ff0a2d6aa37b1ebe2b7ea6d9b3edbbc39', class: "form-group d-flex flex-row-reverse" }, h(Button, { key: '3f62881a5fa333277478d35a7c19a8c4ca8bb929', variant: "primary", type: "submit", onClick: e => this.handleSubmit(e), isLoading: this.isLoading, hidden: this.hideSubmitButton }, `Refund ${formatCurrency(+this.values.amount)}`))))));
122
119
  }
123
120
  }, [1, "justifi-refund-payment", {
124
121
  "authToken": [1, "auth-token"],
125
122
  "paymentId": [1, "payment-id"],
126
- "paymentAmountRefundable": [2, "payment-amount-refundable"],
127
- "withButton": [4, "with-button"],
123
+ "hideSubmitButton": [4, "hide-submit-button"],
124
+ "apiOrigin": [1, "api-origin"],
125
+ "paymentAmountRefundable": [32],
126
+ "errorMessage": [32],
128
127
  "errors": [32],
129
128
  "values": [32],
130
- "isSubmitting": [32]
129
+ "isLoading": [32],
130
+ "submitRefund": [64]
131
131
  }]);
132
132
  function defineCustomElement$1() {
133
133
  if (typeof customElements === "undefined") {
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "5.4.2";
2
+ const version = "5.4.3";
3
3
  const description = "JustiFi Web Components";
4
4
  const collection = "dist/collection/collection-manifest.json";
5
5
  const main = "dist/index.cjs.js";
@@ -41,6 +41,7 @@ const terminalOrdersTableColumns = {
41
41
  updated_at: () => (h("th", { part: tableHeadCell, scope: "col", title: "The date and time the order was last updated" }, "Updated At")),
42
42
  order_status: () => (h("th", { part: tableHeadCell, scope: "col", title: "The current status of the order" }, "Order Status")),
43
43
  business_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The business ID associated with the order" }, "Business ID")),
44
+ company_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The business name associated with the order" }, "Business Name")),
44
45
  provider: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider associated with the order" }, "Provider")),
45
46
  order_type: () => (h("th", { part: tableHeadCell, scope: "col", title: "The type of order" }, "Order Type")),
46
47
  quantity: () => (h("th", { part: tableHeadCell, scope: "col", title: "The number of terminals associated with the order" }, "Order Quantity")),
@@ -54,6 +55,7 @@ const terminalOrdersTableCells = {
54
55
  h("div", { class: "fw-bold" }, convertToLocal(terminalOrder.updated_at, { showTime: true })))),
55
56
  order_status: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, MapTerminalOrderStatusToBadge(terminalOrder.order_status))),
56
57
  business_id: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.business_id)),
58
+ company_name: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.company_name)),
57
59
  provider: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.provider)),
58
60
  order_type: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.order_type)),
59
61
  quantity: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.terminals.length)),
@@ -27,6 +27,7 @@ interface TerminalOrderItem {
27
27
  export interface ITerminalOrder {
28
28
  id?: string;
29
29
  business_id?: string;
30
+ company_name?: string;
30
31
  sub_account_id?: string;
31
32
  provider?: TerminalProviders;
32
33
  order_type?: TerminalOrderType;
@@ -38,6 +39,7 @@ export interface ITerminalOrder {
38
39
  export declare class TerminalOrder {
39
40
  id: string;
40
41
  business_id: string;
42
+ company_name: string;
41
43
  sub_account_id: string;
42
44
  provider: TerminalProviders;
43
45
  order_type: TerminalOrderType;
@@ -10,6 +10,7 @@ export declare class OrderTerminals {
10
10
  accountId: string;
11
11
  shipping: boolean;
12
12
  apiOrigin?: string;
13
+ submitButtonText: string;
13
14
  loading: {
14
15
  business: boolean;
15
16
  terminals: boolean;
@@ -25,6 +26,7 @@ export declare class OrderTerminals {
25
26
  orderLimit: number;
26
27
  order: TerminalOrder;
27
28
  totalQuantity: number;
29
+ addressHeader: string;
28
30
  analytics: JustifiAnalytics;
29
31
  errorEvent: EventEmitter<ComponentErrorEvent>;
30
32
  submitted: EventEmitter<any>;
@@ -1,51 +1,24 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { RefundPaymentFields } from './refund-payment-schema';
2
+ import { ComponentErrorEvent, ComponentSubmitEvent } from '../../api';
3
3
  export declare class RefundPayment {
4
- /**
5
- * Authentication token required to authorize the refund transaction.
6
- */
7
4
  authToken: string;
8
- /**
9
- * The unique identifier for the payment to be refunded.
10
- */
11
5
  paymentId: string;
12
- /**
13
- * The amount of the payment to be refunded. This should be equal to the Payment `amount_refundable` property.
14
- */
15
- paymentAmountRefundable?: number;
16
- /**
17
- * Flag to control the visibility of the submit button.
18
- */
19
- withButton?: boolean;
6
+ hideSubmitButton?: boolean;
7
+ apiOrigin?: string;
8
+ paymentAmountRefundable: number;
9
+ errorMessage: string;
20
10
  errors: any;
21
11
  values: any;
22
- isSubmitting: boolean;
23
- /**
24
- * Event emitted when the refund form is successfully submitted.
25
- * The submitted refund fields are passed as the event detail.
26
- */
27
- submitted: EventEmitter<RefundPaymentFields>;
12
+ isLoading: boolean;
13
+ errorEvent: EventEmitter<ComponentErrorEvent>;
14
+ submitEvent: EventEmitter<ComponentSubmitEvent>;
28
15
  private formController;
29
16
  private api;
30
17
  componentWillLoad(): void;
31
18
  componentDidLoad(): void;
32
- /**
33
- * Handles the form submission.
34
- * Prevents the default form action, validates the form, and emits the 'submitted' event.
35
- */
36
19
  handleSubmit(event: Event): Promise<void>;
37
- /**
38
- * Submits the refund request to the API.
39
- */
40
- private submitRefund;
41
- /**
42
- * Handles input changes, updating the refundFields state.
43
- */
20
+ submitRefund(values: any): Promise<void>;
44
21
  private handleInput;
45
- /**
46
- * Initializes the API with the given authentication token.
47
- * Logs a warning if the auth token is missing.
48
- */
49
22
  private initializeApi;
50
23
  render(): any;
51
24
  }
@@ -5,6 +5,7 @@ export declare const terminalOrdersTableColumns: {
5
5
  updated_at: () => any;
6
6
  order_status: () => any;
7
7
  business_id: () => any;
8
+ company_name: () => any;
8
9
  provider: () => any;
9
10
  order_type: () => any;
10
11
  quantity: () => any;
@@ -14,6 +15,7 @@ export declare const terminalOrdersTableCells: {
14
15
  updated_at: (terminalOrder: TerminalOrder, index: number) => any;
15
16
  order_status: (terminalOrder: TerminalOrder, index: number) => any;
16
17
  business_id: (terminalOrder: TerminalOrder, index: number) => any;
18
+ company_name: (terminalOrder: TerminalOrder, index: number) => any;
17
19
  provider: (terminalOrder: TerminalOrder, index: number) => any;
18
20
  order_type: (terminalOrder: TerminalOrder, index: number) => any;
19
21
  quantity: (terminalOrder: TerminalOrder, index: number) => any;
@@ -19,7 +19,6 @@ import { ILoadedEventResponse as ILoadedEventResponse1 } from "./api/Checkout";
19
19
  import { Dispute, IDispute } from "./api/Dispute";
20
20
  import { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
21
21
  import { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
22
- import { RefundPaymentFields } from "./components/refund-payment/refund-payment-schema";
23
22
  import { Identity } from "./api/Identity";
24
23
  import { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
25
24
  export { IAdditionalQuestions, IAddress, IBusiness } from "./api/Business";
@@ -36,7 +35,6 @@ export { ILoadedEventResponse as ILoadedEventResponse1 } from "./api/Checkout";
36
35
  export { Dispute, IDispute } from "./api/Dispute";
37
36
  export { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
38
37
  export { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
39
- export { RefundPaymentFields } from "./components/refund-payment/refund-payment-schema";
40
38
  export { Identity } from "./api/Identity";
41
39
  export { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
42
40
  export namespace Components {
@@ -493,6 +491,7 @@ export namespace Components {
493
491
  "authToken": string;
494
492
  "businessId": string;
495
493
  "shipping": boolean;
494
+ "submitButtonText": string;
496
495
  }
497
496
  interface JustifiOwnerForm {
498
497
  "allowOptionalFields"?: boolean;
@@ -591,22 +590,11 @@ export namespace Components {
591
590
  "validateAndSubmit": (onSuccess: (formData: any, documentList: DisputeEvidenceDocument[], formStep: DisputeResponseFormStep) => void) => Promise<void>;
592
591
  }
593
592
  interface JustifiRefundPayment {
594
- /**
595
- * Authentication token required to authorize the refund transaction.
596
- */
593
+ "apiOrigin"?: string;
597
594
  "authToken": string;
598
- /**
599
- * The amount of the payment to be refunded. This should be equal to the Payment `amount_refundable` property.
600
- */
601
- "paymentAmountRefundable"?: number;
602
- /**
603
- * The unique identifier for the payment to be refunded.
604
- */
595
+ "hideSubmitButton"?: boolean;
605
596
  "paymentId": string;
606
- /**
607
- * Flag to control the visibility of the submit button.
608
- */
609
- "withButton"?: boolean;
597
+ "submitRefund": (values: any) => Promise<void>;
610
598
  }
611
599
  interface JustifiRefundPolicy {
612
600
  "disputeResponse": any;
@@ -2143,7 +2131,8 @@ declare global {
2143
2131
  new (): HTMLJustifiProductOrServiceElement;
2144
2132
  };
2145
2133
  interface HTMLJustifiRefundPaymentElementEventMap {
2146
- "submitted": RefundPaymentFields;
2134
+ "error-event": ComponentErrorEvent1;
2135
+ "submit-event": ComponentSubmitEvent1;
2147
2136
  }
2148
2137
  interface HTMLJustifiRefundPaymentElement extends Components.JustifiRefundPayment, HTMLStencilElement {
2149
2138
  addEventListener<K extends keyof HTMLJustifiRefundPaymentElementEventMap>(type: K, listener: (this: HTMLJustifiRefundPaymentElement, ev: JustifiRefundPaymentCustomEvent<HTMLJustifiRefundPaymentElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -3123,6 +3112,7 @@ declare namespace LocalJSX {
3123
3112
  "onError-event"?: (event: JustifiOrderTerminalsCustomEvent<ComponentErrorEvent1>) => void;
3124
3113
  "onSubmit-event"?: (event: JustifiOrderTerminalsCustomEvent<any>) => void;
3125
3114
  "shipping"?: boolean;
3115
+ "submitButtonText"?: string;
3126
3116
  }
3127
3117
  interface JustifiOwnerForm {
3128
3118
  "allowOptionalFields"?: boolean;
@@ -3224,26 +3214,12 @@ declare namespace LocalJSX {
3224
3214
  "documentErrors"?: any;
3225
3215
  }
3226
3216
  interface JustifiRefundPayment {
3227
- /**
3228
- * Authentication token required to authorize the refund transaction.
3229
- */
3217
+ "apiOrigin"?: string;
3230
3218
  "authToken"?: string;
3231
- /**
3232
- * Event emitted when the refund form is successfully submitted. The submitted refund fields are passed as the event detail.
3233
- */
3234
- "onSubmitted"?: (event: JustifiRefundPaymentCustomEvent<RefundPaymentFields>) => void;
3235
- /**
3236
- * The amount of the payment to be refunded. This should be equal to the Payment `amount_refundable` property.
3237
- */
3238
- "paymentAmountRefundable"?: number;
3239
- /**
3240
- * The unique identifier for the payment to be refunded.
3241
- */
3219
+ "hideSubmitButton"?: boolean;
3220
+ "onError-event"?: (event: JustifiRefundPaymentCustomEvent<ComponentErrorEvent1>) => void;
3221
+ "onSubmit-event"?: (event: JustifiRefundPaymentCustomEvent<ComponentSubmitEvent1>) => void;
3242
3222
  "paymentId"?: string;
3243
- /**
3244
- * Flag to control the visibility of the submit button.
3245
- */
3246
- "withButton"?: boolean;
3247
3223
  }
3248
3224
  interface JustifiRefundPolicy {
3249
3225
  "disputeResponse"?: any;
@@ -1 +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-9c4e3bac.js";import{T as c}from"./p-ac9f2e2b.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{d as n}from"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{g as p,a as h}from"./p-87f8c596.js";import{m,S as d}from"./p-6a594a9f.js";import{S as f}from"./p-bfe9748b.js";import{d as u}from"./p-953e9dba.js";import"./p-b99817a0.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-c8b78136.js";import"./p-bf195b35.js";const l=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:c})=>{var m,d;try{const f=await s.fetchTerminals(i,t,o,e);if(f.error)return c({error:p(f.error),code:h(null===(d=f.error)||void 0===d?void 0:d.code),severity:r.ERROR});{const i=Object.assign({},f.page_info);a({terminals:(null===(m=f.data)||void 0===m?void 0:m.map((i=>new n(i))))||[],pagingInfo:i})}}catch(i){const t=h(null==i?void 0:i.code);return c({error:i.message||i,code:t,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c,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=m({accountId:this.accountId,authToken:this.authToken,service:new d,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{l as justifi_terminals_list}
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-3188f72a.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,S as d}from"./p-cbad44b7.js";import{S as f}from"./p-bfe9748b.js";import{d as u}from"./p-953e9dba.js";import"./p-88a37837.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 m,d;try{const f=await s.fetchTerminals(i,t,o,e);if(f.error)return n({error:p(f.error),code:h(null===(d=f.error)||void 0===d?void 0:d.code),severity:r.ERROR});{const i=Object.assign({},f.page_info);a({terminals:(null===(m=f.data)||void 0===m?void 0:m.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=m({accountId:this.accountId,authToken:this.authToken,service:new d,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}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import{p as a}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{V as i,W as r}from"./p-bf195b35.js";import{T as c,a as h,b as o,c as d,d as p}from"./p-58ee6ce9.js";import{p as b,a as n}from"./p-701a13ca.js";import{o as f,g as m}from"./p-dec18cc4.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-a5579f53.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const l=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.payments.find((t=>t.id===s));this.clickEvent.emit({name:c.row,data:e})},this.getPayments=void 0,this.columns=void 0,this.payments=[],this.paymentsTable=void 0,this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.paymentsTable=new h(this.payments,this.columns,b,n),this.getPayments&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:s})=>{this.payments=t,this.paging=s,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get paymentParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"7650bc8c64b4b727048b748bb899b534159c2ecd"},e("div",{key:"ebf919d213a280adea8852c33c53314db3d73279",class:"table-wrapper"},e("table",{key:"618a5113b68901bef3df0aed342e8cc6e76f672d",class:"table table-hover",part:i},e("thead",{key:"4978a6a0572f228ce0b67aed63c0123f3c13251a",class:"table-head sticky-top"},e("tr",{key:"875633307c439d239ed9ff6c9eae5f414729b4fc",class:"table-light text-nowrap"},this.paymentsTable.columnData.map((t=>t)))),e("tbody",{key:"030a7ab7d92337fa4ee74d206e4a48c79f6eae4d",class:"table-body"},e(o,{key:"6b3a71f087ac93c2b6487043d1624518b01d7370",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),e(d,{key:"51a90cd22acfdf55b0c351e6b7f2b1b7e1f156d0",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),e(p,{key:"47367183f197a6eafe761ac478a435bba5f9f6d6",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"2ca665dbc33b954145cedba2d75e98a3d45ff85f",class:"sticky-bottom"},e("tr",{key:"a7ecd6b390fdb960c589e2c463d354afe7b29100",class:"table-light align-middle"},e("td",{key:"74f32baddb41ff3ca04b2199b1a5d75189fb406e",part:r,colSpan:this.paymentsTable.columnData.length},e("pagination-menu",{key:"123f359c4a1948ee0189e49b163520d5858936ec",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{l as payments_list_core}
1
+ import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import{p as a}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{V as i,W as r}from"./p-bf195b35.js";import{T as c,a as h,b as o,c as d,d as p}from"./p-58ee6ce9.js";import{p as b,a as n}from"./p-701a13ca.js";import{o as f,g as m}from"./p-dec18cc4.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-a5579f53.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const l=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.payments.find((t=>t.id===s));this.clickEvent.emit({name:c.row,data:e})},this.getPayments=void 0,this.columns=void 0,this.payments=[],this.paymentsTable=void 0,this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.paymentsTable=new h(this.payments,this.columns,b,n),this.getPayments&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:s})=>{this.payments=t,this.paging=s,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e})},final:()=>{this.loading=!1}})}get paymentParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"7650bc8c64b4b727048b748bb899b534159c2ecd"},e("div",{key:"ebf919d213a280adea8852c33c53314db3d73279",class:"table-wrapper"},e("table",{key:"618a5113b68901bef3df0aed342e8cc6e76f672d",class:"table table-hover",part:i},e("thead",{key:"4978a6a0572f228ce0b67aed63c0123f3c13251a",class:"table-head sticky-top"},e("tr",{key:"875633307c439d239ed9ff6c9eae5f414729b4fc",class:"table-light text-nowrap"},this.paymentsTable.columnData.map((t=>t)))),e("tbody",{key:"030a7ab7d92337fa4ee74d206e4a48c79f6eae4d",class:"table-body"},e(o,{key:"6b3a71f087ac93c2b6487043d1624518b01d7370",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),e(d,{key:"51a90cd22acfdf55b0c351e6b7f2b1b7e1f156d0",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),e(p,{key:"47367183f197a6eafe761ac478a435bba5f9f6d6",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"2ca665dbc33b954145cedba2d75e98a3d45ff85f",class:"sticky-bottom"},e("tr",{key:"a7ecd6b390fdb960c589e2c463d354afe7b29100",class:"table-light align-middle"},e("td",{key:"74f32baddb41ff3ca04b2199b1a5d75189fb406e",part:r,colSpan:this.paymentsTable.columnData.length},e("pagination-menu",{key:"123f359c4a1948ee0189e49b163520d5858936ec",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{l as payments_list_core}
@@ -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-9c4e3bac.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-0d7d61ac.js";import"./p-61f0a2ce.js";import"./p-bf195b35.js";import"./p-b99817a0.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-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 +1 @@
1
- import{r as t,c as i,h as s}from"./p-2783e363.js";import{A as e}from"./p-5f6b4bc9.js";import{a as r,C as o}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{g as a,a as n}from"./p-87f8c596.js";import{c,J as d}from"./p-9c4e3bac.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-b99817a0.js";class h{async fetchQuote(t,i){return e({authToken:t,apiOrigin:"https://wc-proxy.justifi.ai"}).post("insurance/quotes",i)}async toggleCoverage(t,i,s){const r=`insurance/quotes/${i}/toggle`;return e({authToken:t,apiOrigin:"https://wc-proxy.justifi.ai"}).post(r,s)}}const p=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.checkoutId=void 0,this.primaryIdentityFirstName=void 0,this.primaryIdentityLastName=void 0,this.primaryIdentityState=void 0,this.primaryIdentityPostalCode=void 0,this.primaryIdentityCountry=void 0,this.primaryIdentityEmailAddress=void 0,this.policyAttributesInsurableAmount=void 0,this.policyAttributesStartDate=void 0,this.policyAttributesEndDate=void 0,this.coveredIdentityFirstName=void 0,this.coveredIdentityLastName=void 0,this.getQuote=void 0,this.toggleCoverage=void 0,this.quote=void 0}async validate(){return this.seasonInterruptionCoreRef.validate()}componentWillLoad(){c(),this.analytics=new d(this),this.initializeServiceMethods()}disconnectedCallback(){this.analytics&&this.analytics.cleanup()}initializeServiceMethods(){this.authToken?(this.getQuote=(({authToken:t,service:i})=>async({payload:s,onSuccess:e,onError:o})=>{var c;try{const d=await i.fetchQuote(t,s);if(d.error)return o({error:a(d.error),code:n(null===(c=d.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:d.data})}catch(t){const i=n(null==t?void 0:t.code);return o({error:t.message||t,code:i,severity:r.ERROR})}})({authToken:this.authToken,service:new h}),this.toggleCoverage=(({authToken:t,service:i})=>async({quoteId:s,payload:e,onSuccess:o,onError:c})=>{var d;try{const h=await i.toggleCoverage(t,s,e);if(h.error)return c({error:a(h.error),code:n(null===(d=h.error)||void 0===d?void 0:d.code),severity:r.ERROR});o({quote:h.data})}catch(t){const i=n(null==t?void 0:t.code);return c({error:t.message||t,code:i,severity:r.ERROR})}})({authToken:this.authToken,service:new h})):this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR})}render(){return s("justifi-season-interruption-insurance-core",{key:"e1826234d0f2daf33b983a76f36bd652454c77fa",ref:t=>this.seasonInterruptionCoreRef=t,"checkout-id":this.checkoutId,getQuote:this.getQuote,toggleCoverage:this.toggleCoverage,"primary-identity-first-name":this.primaryIdentityFirstName,"primary-identity-last-name":this.primaryIdentityLastName,"primary-identity-state":this.primaryIdentityState,"primary-identity-postal-code":this.primaryIdentityPostalCode,"primary-identity-country":this.primaryIdentityCountry,"primary-identity-email-address":this.primaryIdentityEmailAddress,"policy-attributes-insurable-amount":this.policyAttributesInsurableAmount,"policy-attributes-start-date":this.policyAttributesStartDate,"policy-attributes-end-date":this.policyAttributesEndDate,"covered-identity-first-name":this.coveredIdentityFirstName,"covered-identity-last-name":this.coveredIdentityLastName})}};export{p as justifi_season_interruption_insurance}
1
+ import{r as t,c as i,h as s}from"./p-2783e363.js";import{A as e}from"./p-5f6b4bc9.js";import{a as r,C as o}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{g as a,a as n}from"./p-87f8c596.js";import{c,J as d}from"./p-3188f72a.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-88a37837.js";class h{async fetchQuote(t,i){return e({authToken:t,apiOrigin:"https://wc-proxy.justifi.ai"}).post("insurance/quotes",i)}async toggleCoverage(t,i,s){const r=`insurance/quotes/${i}/toggle`;return e({authToken:t,apiOrigin:"https://wc-proxy.justifi.ai"}).post(r,s)}}const p=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.checkoutId=void 0,this.primaryIdentityFirstName=void 0,this.primaryIdentityLastName=void 0,this.primaryIdentityState=void 0,this.primaryIdentityPostalCode=void 0,this.primaryIdentityCountry=void 0,this.primaryIdentityEmailAddress=void 0,this.policyAttributesInsurableAmount=void 0,this.policyAttributesStartDate=void 0,this.policyAttributesEndDate=void 0,this.coveredIdentityFirstName=void 0,this.coveredIdentityLastName=void 0,this.getQuote=void 0,this.toggleCoverage=void 0,this.quote=void 0}async validate(){return this.seasonInterruptionCoreRef.validate()}componentWillLoad(){c(),this.analytics=new d(this),this.initializeServiceMethods()}disconnectedCallback(){this.analytics&&this.analytics.cleanup()}initializeServiceMethods(){this.authToken?(this.getQuote=(({authToken:t,service:i})=>async({payload:s,onSuccess:e,onError:o})=>{var c;try{const d=await i.fetchQuote(t,s);if(d.error)return o({error:a(d.error),code:n(null===(c=d.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:d.data})}catch(t){const i=n(null==t?void 0:t.code);return o({error:t.message||t,code:i,severity:r.ERROR})}})({authToken:this.authToken,service:new h}),this.toggleCoverage=(({authToken:t,service:i})=>async({quoteId:s,payload:e,onSuccess:o,onError:c})=>{var d;try{const h=await i.toggleCoverage(t,s,e);if(h.error)return c({error:a(h.error),code:n(null===(d=h.error)||void 0===d?void 0:d.code),severity:r.ERROR});o({quote:h.data})}catch(t){const i=n(null==t?void 0:t.code);return c({error:t.message||t,code:i,severity:r.ERROR})}})({authToken:this.authToken,service:new h})):this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR})}render(){return s("justifi-season-interruption-insurance-core",{key:"e1826234d0f2daf33b983a76f36bd652454c77fa",ref:t=>this.seasonInterruptionCoreRef=t,"checkout-id":this.checkoutId,getQuote:this.getQuote,toggleCoverage:this.toggleCoverage,"primary-identity-first-name":this.primaryIdentityFirstName,"primary-identity-last-name":this.primaryIdentityLastName,"primary-identity-state":this.primaryIdentityState,"primary-identity-postal-code":this.primaryIdentityPostalCode,"primary-identity-country":this.primaryIdentityCountry,"primary-identity-email-address":this.primaryIdentityEmailAddress,"policy-attributes-insurable-amount":this.policyAttributesInsurableAmount,"policy-attributes-start-date":this.policyAttributesStartDate,"policy-attributes-end-date":this.policyAttributesEndDate,"covered-identity-first-name":this.coveredIdentityFirstName,"covered-identity-last-name":this.coveredIdentityLastName})}};export{p as justifi_season_interruption_insurance}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e}from"./p-2783e363.js";import{a as s,C as o}from"./p-9dd8685c.js";import{g as r,a}from"./p-87f8c596.js";import{C as c}from"./p-54556fc6.js";import{c as h,J as d}from"./p-3188f72a.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-f8fccf44.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 n=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.loadedEvent=i(this,"loaded",7),this.authToken=void 0,this.checkoutId=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin="https://components.justifi.ai",this.getCheckout=void 0,this.complete=void 0,this.errorMessage=""}componentWillLoad(){h(),this.analytics=new d(this),this.initializeGetCheckout()}disconnectedCallback(){this.analytics.cleanup()}initializeGetCheckout(){this.authToken&&this.checkoutId?(this.getCheckout=(({authToken:t,checkoutId:i,service:e})=>async({onSuccess:o,onError:c})=>{var h;try{const d=await e.fetchCheckout(t,i);if(d.error)return c({error:r(d.error),code:a(null===(h=d.error)||void 0===h?void 0:h.code),severity:s.ERROR});o({checkout:d.data})}catch(t){const i=a(null==t?void 0:t.code);return c({error:t.message||t,code:i,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new c}),this.complete=(({authToken:t,checkoutId:i,service:e})=>async({payment:o,onSuccess:c,onError:h})=>{var d;try{const n=await e.complete(t,i,o);if(n.error)return h({error:r(n.error),code:a(null===(d=n.error)||void 0===d?void 0:d.code),severity:s.ERROR});c(n)}catch(t){const i=a(null==t?void 0:t.code);return h({error:t.message||t,code:i,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new c})):this.errorEvent.emit({message:"auth-token and checkout-id are required",errorCode:o.MISSING_PROPS,severity:s.ERROR})}propChanged(){this.initializeGetCheckout()}async fillBillingForm(t){this.checkoutCoreRef.fillBillingForm(t)}render(){return e("justifi-checkout-core",{key:"4c752a401d34aae940f947600aa81961be1d6d8e",getCheckout:this.getCheckout,authToken:this.authToken,complete:this.complete,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,disableBnpl:this.disableBnpl,disablePaymentMethodGroup:this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,iframeOrigin:this.iframeOrigin,ref:t=>{t&&(this.checkoutCoreRef=t)}},e("div",{key:"a67422cd23e1895f192abb352d328ea9874566e8",slot:"insurance"},e("slot",{key:"937902933052abb1dae89271bc85ddd93b86a904",name:"insurance"})))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{n as justifi_checkout}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-2783e363.js";import{m as o,P as r}from"./p-72e71b3c.js";import{a as e,C as a}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{P as p}from"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{g as h,a as c}from"./p-87f8c596.js";import{E as d}from"./p-12074378.js";import{c as n,J as m}from"./p-9c4e3bac.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-bf195b35.js";import"./p-b99817a0.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.payoutId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.getPayout=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){n(),this.analytics=new m(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:r})=>{var a;try{const d=await i.fetchPayout(t,s);d.error?r({error:h(d.error),code:c(null===(a=d.error)||void 0===a?void 0:a.code),severity:e.ERROR}):o(new p(d.data))}catch(t){r({error:h(t),code:c(null==t?void 0:t.code),severity:e.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new r}),this.getPayoutCSV=o({authToken:this.authToken,service:new r,apiOrigin:this.apiOrigin})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:e.ERROR}))}render(){return this.errorMessage?d(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
1
+ import{r as t,c as s,h as i}from"./p-2783e363.js";import{m as o,P as r}from"./p-9a9732e1.js";import{a as e,C as a}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{P as p}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as h,a as c}from"./p-87f8c596.js";import{E as n}from"./p-12074378.js";import{c as d,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 u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.payoutId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.getPayout=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){d(),this.analytics=new m(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:r})=>{var a;try{const n=await i.fetchPayout(t,s);n.error?r({error:h(n.error),code:c(null===(a=n.error)||void 0===a?void 0:a.code),severity:e.ERROR}):o(new p(n.data))}catch(t){r({error:h(t),code:c(null==t?void 0:t.code),severity:e.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new r}),this.getPayoutCSV=o({authToken:this.authToken,service:new r,apiOrigin:this.apiOrigin})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:e.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
@@ -1 +1 @@
1
- import{r as a,h as e}from"./p-2783e363.js";import{l as t}from"./p-c6be72b0.js";import{f as s,p as i,c as r}from"./p-f4739d31.js";import{R as d,S as l,T as c,U as f}from"./p-bf195b35.js";import{S as o}from"./p-bfe9748b.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{I as p}from"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";const n=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{s[a]=e},this.terminalId=void 0,this.terminalOrderId=void 0,this.terminalStatus=void 0}componentWillLoad(){this.debouncedSetParamsOnChange=t.exports.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([a,e])=>{e&&(i[a]=e)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:p.connected},{label:"Disconnected",value:p.disconnected},{label:"Unknown",value:p.unknown},{label:"Pending Configuration",value:p.pending_configuration}]}render(){const a=Object.assign({},s);return e(o,{key:"390b8788e785bc81711a1b0f68203fce5a348c4c"},e("table-filters-menu",{key:"ab37f284aad5b828c2a3d0ce78e5c49fe86c8ec7",params:a,clearParams:r,part:d},e("div",{key:"9f06d2199885d1cb8d9a4310fc94366717ca092c",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"146fb3fa0a146c8011e1fc609f885ec3de0af8bf",class:"p-2"},e("form-control-text",{key:"f9d33f3facd5af88761033256e9bcdee772d187b",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:l})),e("div",{key:"59b8af61f98c01e0cd04299780817b9a497d33bc",class:"p-2"},e("form-control-text",{key:"80c6ed5f37f4429aac0451f1b2c76fd99c52d246",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:c})),e("div",{key:"4452ff9cbeb157408fdd8569af5792d32f0d1aa9",class:"p-2"},e("form-control-select",{key:"52406f154a9d5f7a01831047eedf09b909d1bc0d",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:f})))))}};export{n as justifi_terminals_list_filters}
1
+ import{r as a,h as e}from"./p-2783e363.js";import{l as t}from"./p-c6be72b0.js";import{f as s,p as i,c as r}from"./p-f4739d31.js";import{R as d,S as l,T as c,U as f}from"./p-bf195b35.js";import{S as o}from"./p-bfe9748b.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{I as p}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";const b=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{s[a]=e},this.terminalId=void 0,this.terminalOrderId=void 0,this.terminalStatus=void 0}componentWillLoad(){this.debouncedSetParamsOnChange=t.exports.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([a,e])=>{e&&(i[a]=e)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:p.connected},{label:"Disconnected",value:p.disconnected},{label:"Unknown",value:p.unknown},{label:"Pending Configuration",value:p.pending_configuration}]}render(){const a=Object.assign({},s);return e(o,{key:"390b8788e785bc81711a1b0f68203fce5a348c4c"},e("table-filters-menu",{key:"ab37f284aad5b828c2a3d0ce78e5c49fe86c8ec7",params:a,clearParams:r,part:d},e("div",{key:"9f06d2199885d1cb8d9a4310fc94366717ca092c",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"146fb3fa0a146c8011e1fc609f885ec3de0af8bf",class:"p-2"},e("form-control-text",{key:"f9d33f3facd5af88761033256e9bcdee772d187b",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:l})),e("div",{key:"59b8af61f98c01e0cd04299780817b9a497d33bc",class:"p-2"},e("form-control-text",{key:"80c6ed5f37f4429aac0451f1b2c76fd99c52d246",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:c})),e("div",{key:"4452ff9cbeb157408fdd8569af5792d32f0d1aa9",class:"p-2"},e("form-control-select",{key:"52406f154a9d5f7a01831047eedf09b909d1bc0d",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:f})))))}};export{b as justifi_terminals_list_filters}
@@ -1 +1 @@
1
- import{f as t}from"./p-f8fccf44.js";var i,s,h,n,e,a,o,c,d;!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(i||(i={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(s||(s={}));class r{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration"}(h||(h={})),function(t){t.verifone="verifone"}(n||(n={}));class u{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(e||(e={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed"}(a||(a={}));class l{constructor(t){this.id=t.id,this.business_id=t.business_id,this.sub_account_id=t.sub_account_id,this.provider=t.provider||n.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(o||(o={}));class f{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(c||(c={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(d||(d={}));class m{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}export{h as I,r as P,m as S,f as T,l as a,e as b,a as c,u as d}
1
+ import{f as t}from"./p-f8fccf44.js";var i,s,h,n,e,a,o,c,d;!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(i||(i={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(s||(s={}));class r{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration"}(h||(h={})),function(t){t.verifone="verifone"}(n||(n={}));class u{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(e||(e={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed"}(a||(a={}));class l{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||n.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(o||(o={}));class f{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(c||(c={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(d||(d={}));class m{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}export{h as I,r as P,m as S,f as T,l as a,e as b,a as c,u as d}
@@ -1 +1 @@
1
- import{p as t}from"./p-b99817a0.js";import{A as s}from"./p-5f6b4bc9.js";class i{async record(t){return s({apiOrigin:"https://wc-proxy.justifi.ai"}).post("analytics",t)}}class e{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("storybook")||(this.service=new i,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:s.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}const a=async()=>{const s=t.version,i=t.name,e=await(async t=>{const s=await fetch("https://registry.npmjs.org/"+t+"/latest");return(await s.json()).version})(i),a=e.replace(/-rc.*/,""),n=s.split("."),o=e.split(".");n[0]!==o[0]&&console.warn(`The package ${i} is out of date. The latest version is ${a}. Please update.`)};export{e as J,a as c}
1
+ import{p as t}from"./p-88a37837.js";import{A as s}from"./p-5f6b4bc9.js";class i{async record(t){return s({apiOrigin:"https://wc-proxy.justifi.ai"}).post("analytics",t)}}class e{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("storybook")||(this.service=new i,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:s.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}const a=async()=>{const s=t.version,i=t.name,e=await(async t=>{const s=await fetch("https://registry.npmjs.org/"+t+"/latest");return(await s.json()).version})(i),a=e.replace(/-rc.*/,""),n=s.split("."),o=e.split(".");n[0]!==o[0]&&console.warn(`The package ${i} is out of date. The latest version is ${a}. Please update.`)};export{e as J,a as c}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e}from"./p-2783e363.js";import{C as a,a as i}from"./p-9dd8685c.js";import"./p-1366a019.js";import{p as r}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{V as o,W as h}from"./p-bf195b35.js";import{T as c,a as d,b as p,c as n,d as b}from"./p-58ee6ce9.js";import{p as f,a as m}from"./p-ae7edce5.js";import{o as u,g as l}from"./p-ab45511e.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-927cb6df.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const y=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:c.row,data:a})},this.getPayouts=void 0,this.getSubAccounts=void 0,this.getPayoutCSV=void 0,this.columns=void 0,this.payouts=[],this.payoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=r,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new d(this.payouts,this.columns,f,m(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),u("set",(()=>{this.pagingParams={}})),u("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=l();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"ff5859c3d61ab7b2d532541c383c2478b9efc391"},e("div",{key:"cb50816020bfd324fae4f5f0d1a151ab04600b64",class:"table-wrapper",part:"table-wrapper"},e("table",{key:"69cf5b76a95dd9396b97c6dd54aab8c067522102",class:"table table-hover",part:o},e("thead",{key:"086161ba08d930efaf431571fa7670ad74a1ec88",class:"table-head sticky-top",part:"table-head"},e("tr",{key:"659d524600aec47afa5dc75cce808da945408536",class:"table-light text-nowrap",part:"table-head-row"},this.payoutsTable.columnData.map((t=>t)))),e("tbody",{key:"bf665357df28983b110565b8556f1cf1a022f164",class:"table-body"},e(p,{key:"c789d5b153a377ca1d2e0244e4480fe118ffa2d2",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"80ab61d7e68e50ad88ad5a7f8e11464418006a59",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(b,{key:"195c41c6e0a91d09ca0440002e2883fe49626c07",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"d9094830c7572cfbbfe0a17d55d9ad0daffd319f",class:"sticky-bottom"},e("tr",{key:"658d6a380abc8085f5ec26b1423e0b9487b962d6",class:"table-light align-middle"},e("td",{key:"962ddd1a6873a7206126e145d6772bacd4197cbf",part:h,colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"28c37545fe9fdce46302a9cc6d370d95e7d03d7b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{y as payouts_list_core}
1
+ import{r as t,c as s,h as e}from"./p-2783e363.js";import{C as a,a as i}from"./p-9dd8685c.js";import"./p-1366a019.js";import{p as r}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{V as o,W as h}from"./p-bf195b35.js";import{T as c,a as d,b as p,c as n,d as b}from"./p-58ee6ce9.js";import{p as f,a as m}from"./p-ae7edce5.js";import{o as u,g as l}from"./p-ab45511e.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-927cb6df.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const y=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:c.row,data:a})},this.getPayouts=void 0,this.getSubAccounts=void 0,this.getPayoutCSV=void 0,this.columns=void 0,this.payouts=[],this.payoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=r,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new d(this.payouts,this.columns,f,m(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),u("set",(()=>{this.pagingParams={}})),u("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=l();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"ff5859c3d61ab7b2d532541c383c2478b9efc391"},e("div",{key:"cb50816020bfd324fae4f5f0d1a151ab04600b64",class:"table-wrapper",part:"table-wrapper"},e("table",{key:"69cf5b76a95dd9396b97c6dd54aab8c067522102",class:"table table-hover",part:o},e("thead",{key:"086161ba08d930efaf431571fa7670ad74a1ec88",class:"table-head sticky-top",part:"table-head"},e("tr",{key:"659d524600aec47afa5dc75cce808da945408536",class:"table-light text-nowrap",part:"table-head-row"},this.payoutsTable.columnData.map((t=>t)))),e("tbody",{key:"bf665357df28983b110565b8556f1cf1a022f164",class:"table-body"},e(p,{key:"c789d5b153a377ca1d2e0244e4480fe118ffa2d2",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"80ab61d7e68e50ad88ad5a7f8e11464418006a59",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(b,{key:"195c41c6e0a91d09ca0440002e2883fe49626c07",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"d9094830c7572cfbbfe0a17d55d9ad0daffd319f",class:"sticky-bottom"},e("tr",{key:"658d6a380abc8085f5ec26b1423e0b9487b962d6",class:"table-light align-middle"},e("td",{key:"962ddd1a6873a7206126e145d6772bacd4197cbf",part:h,colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"28c37545fe9fdce46302a9cc6d370d95e7d03d7b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{y as payouts_list_core}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import{p as a}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";import{V as i,W as c}from"./p-bf195b35.js";import{T as r,a as h,b as o,c as n,d}from"./p-58ee6ce9.js";import{c as p,a as b}from"./p-ca6cdfe6.js";import{o as f,g as m}from"./p-092515e0.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const u=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:r.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:r.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:r.row,data:e})},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.checkouts=[],this.checkoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new h(this.checkouts,this.columns,p,b),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"f94305b4a7c89d0d675e336eaac39c23328c9d98"},e("div",{key:"a43bbfee75303e2f88f6338933b0680e024d03fc",class:"table-wrapper"},e("table",{key:"d689db93b4d812c64eb074b0322e5ffc9087ec9f",class:"table table-hover",part:i},e("thead",{key:"57f3a2e2f14af58787f9a68cbc12caf28834eea1",class:"table-head sticky-top"},e("tr",{key:"7918b371db5dc1cd959e58a7be212faacc6e8f2c",class:"table-light text-nowrap"},this.checkoutsTable.columnData.map((t=>t)))),e("tbody",{key:"7ad39d5e2e91956d5c8bb7626e050ec5403c5aac",class:"table-body"},e(o,{key:"327b6dc83a4937cae7e356185613006630b40884",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"559bf67b3fb6b959b0114a6e50a8b3ac00d518ac",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"f5e277558e63cdb335b52aaa162d7818850ca421",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"7f34a1d78f45d33f95a2c23904ac0741124b9316",class:"sticky-bottom"},e("tr",{key:"4f91985c1ae00640ef3d29b20e9cb28240f36c21",class:"table-light align-middle"},e("td",{key:"75d32d3c6ca4882d8e50e44a13a4081bac4c9515",part:c,colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"81ec71b698e4ae3739440c7439125124f68086e0",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{u as checkouts_list_core}
1
+ import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import{p as a}from"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{V as i,W as c}from"./p-bf195b35.js";import{T as r,a as h,b as o,c as n,d}from"./p-58ee6ce9.js";import{c as p,a as b}from"./p-ca6cdfe6.js";import{o as f,g as m}from"./p-092515e0.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-142bfae3.js";import"./p-c8b78136.js";import"./p-f20b6ce1.js";const u=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:r.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:r.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:r.row,data:e})},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.checkouts=[],this.checkoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new h(this.checkouts,this.columns,p,b),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"f94305b4a7c89d0d675e336eaac39c23328c9d98"},e("div",{key:"a43bbfee75303e2f88f6338933b0680e024d03fc",class:"table-wrapper"},e("table",{key:"d689db93b4d812c64eb074b0322e5ffc9087ec9f",class:"table table-hover",part:i},e("thead",{key:"57f3a2e2f14af58787f9a68cbc12caf28834eea1",class:"table-head sticky-top"},e("tr",{key:"7918b371db5dc1cd959e58a7be212faacc6e8f2c",class:"table-light text-nowrap"},this.checkoutsTable.columnData.map((t=>t)))),e("tbody",{key:"7ad39d5e2e91956d5c8bb7626e050ec5403c5aac",class:"table-body"},e(o,{key:"327b6dc83a4937cae7e356185613006630b40884",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"559bf67b3fb6b959b0114a6e50a8b3ac00d518ac",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"f5e277558e63cdb335b52aaa162d7818850ca421",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"7f34a1d78f45d33f95a2c23904ac0741124b9316",class:"sticky-bottom"},e("tr",{key:"4f91985c1ae00640ef3d29b20e9cb28240f36c21",class:"table-light align-middle"},e("td",{key:"75d32d3c6ca4882d8e50e44a13a4081bac4c9515",part:c,colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"81ec71b698e4ae3739440c7439125124f68086e0",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{u as checkouts_list_core}
@@ -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-9c4e3bac.js";import{a as p}from"./p-abdbcd8e.js";import{g as n,a as c}from"./p-87f8c596.js";import{D as h}from"./p-3da2652e.js";import"./p-b99817a0.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-f8fccf44.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.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 h;try{const d=await s.fetchDispute(t,i,r);if(d.error)return a({error:n(d.error),code:c(null===(h=d.error)||void 0===h?void 0:h.code),severity:e.ERROR});{const t=Object.assign({},d.page_info);o({dispute:new p(d.data),pagingInfo:t})}}catch(t){const i=c(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 h,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-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 +1 @@
1
- import{A as t}from"./p-5f6b4bc9.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";class p{async fetchPayments(p,s,a,i="https://wc-proxy.justifi.ai"){return t({authToken:s,apiOrigin:i}).get(`account/${p}/payments`,a)}async fetchPayment(p,s){const a=`payments/${p}`;return t({authToken:s,apiOrigin:"https://wc-proxy.justifi.ai"}).get(a)}}export{p as P}
1
+ import{A as t}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";class p{async fetchPayments(p,s,a,i="https://wc-proxy.justifi.ai"){return t({authToken:s,apiOrigin:i}).get(`account/${p}/payments`,a)}async fetchPayment(p,s){const a=`payments/${p}`;return t({authToken:s,apiOrigin:"https://wc-proxy.justifi.ai"}).get(a)}}export{p as P}
@@ -1 +1 @@
1
- import{A as t}from"./p-5f6b4bc9.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-0d7d61ac.js";import"./p-61f0a2ce.js";class c{async fetchCheckout(c,o){const p=`checkouts/${o}`;return t({authToken:c,apiOrigin:"https://wc-proxy.justifi.ai"}).get(p)}async fetchCheckouts(c,o,p,s){s||(s="https://wc-proxy.justifi.ai");const i={Account:c};return t({authToken:o,apiOrigin:s}).get("checkouts",p,null,i)}async complete(c,o,p){const s=`checkouts/${o}/complete`,i={payment_mode:p.payment_mode};return p.payment_token&&(i.payment_token=p.payment_token),t({authToken:c,apiOrigin:"https://wc-proxy.justifi.ai"}).post(s,i)}}export{c as C}
1
+ import{A as t}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";class c{async fetchCheckout(c,o){const p=`checkouts/${o}`;return t({authToken:c,apiOrigin:"https://wc-proxy.justifi.ai"}).get(p)}async fetchCheckouts(c,o,p,s){s||(s="https://wc-proxy.justifi.ai");const i={Account:c};return t({authToken:o,apiOrigin:s}).get("checkouts",p,null,i)}async complete(c,o,p){const s=`checkouts/${o}/complete`,i={payment_mode:p.payment_mode};return p.payment_token&&(i.payment_token=p.payment_token),t({authToken:c,apiOrigin:"https://wc-proxy.justifi.ai"}).post(s,i)}}export{c as C}