@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
@@ -16,11 +16,13 @@ import { makeOrderTerminals } from "../../actions/terminal/order-terminals";
16
16
  import { formatPhoneNumber } from "../../utils/utils";
17
17
  export class OrderTerminals {
18
18
  constructor() {
19
+ this.addressHeader = this.shipping ? "Shipping Address:" : "Business Address:";
19
20
  this.businessId = undefined;
20
21
  this.authToken = undefined;
21
22
  this.accountId = undefined;
22
23
  this.shipping = false;
23
24
  this.apiOrigin = PROXY_API_ORIGIN;
25
+ this.submitButtonText = 'Submit Order';
24
26
  this.loading = {
25
27
  business: true,
26
28
  terminals: true,
@@ -119,7 +121,7 @@ export class OrderTerminals {
119
121
  renderBusinessDetails() {
120
122
  var _a, _b, _c, _d, _e, _f, _g, _h;
121
123
  if (!this.loading.business && this.business) {
122
- return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), this.shipping && (h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Shipping Address:"), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code))))));
124
+ return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), h("div", { class: "col-6" }, h("h5", { part: heading5 }, this.addressHeader), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code)))));
123
125
  }
124
126
  }
125
127
  renderTerminals() {
@@ -128,10 +130,10 @@ export class OrderTerminals {
128
130
  }
129
131
  }
130
132
  renderOrderSection() {
131
- return (h("div", { class: "mt-3" }, h("div", { class: "text-end" }, "Order limit: ", this.orderLimit), h("div", { class: "d-flex justify-content-end mt-3" }, h("button", { class: "btn btn-primary submit-btn", onClick: this.submitOrder.bind(this), disabled: this.order.totalQuantity === 0 || this.submitting, part: buttonPrimary }, this.submitting ? 'Submitting...' : 'Submit Order'))));
133
+ return (h("div", { class: "mt-3" }, h("div", { class: "text-end" }, "Order limit: ", this.orderLimit), h("div", { class: "d-flex justify-content-end mt-3" }, h("button", { class: "btn btn-primary submit-btn", onClick: this.submitOrder.bind(this), disabled: this.order.totalQuantity === 0 || this.submitting, part: buttonPrimary }, this.submitting ? 'Submitting...' : this.submitButtonText))));
132
134
  }
133
135
  render() {
134
- return (h(StyledHost, { key: 'ff0a0b45e2c76f106df29422c3ba3391de7fc267' }, h("div", { key: 'daad918582cad630ba6081288aafc6df9391236b', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
136
+ return (h(StyledHost, { key: 'e41920bc976c976932d5abdbb2da088a0e35a9f3' }, h("div", { key: '5237d2dcb456ee143f75b5562cf655ed695ab0e8', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
135
137
  }
136
138
  static get is() { return "justifi-order-terminals"; }
137
139
  static get encapsulation() { return "shadow"; }
@@ -223,6 +225,24 @@ export class OrderTerminals {
223
225
  "attribute": "api-origin",
224
226
  "reflect": false,
225
227
  "defaultValue": "PROXY_API_ORIGIN"
228
+ },
229
+ "submitButtonText": {
230
+ "type": "string",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "string",
234
+ "resolved": "string",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": false,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": ""
242
+ },
243
+ "attribute": "submit-button-text",
244
+ "reflect": false,
245
+ "defaultValue": "'Submit Order'"
226
246
  }
227
247
  };
228
248
  }
@@ -1,19 +1,21 @@
1
1
  import { h, } from "@stencil/core";
2
2
  import RefundPaymentSchema from "./refund-payment-schema";
3
- import { Api } from "../../api";
3
+ import { Api, ComponentErrorCodes, ComponentErrorSeverity } from "../../api";
4
4
  import { FormController } from "../../ui-components/form/form";
5
- import { Header1, StyledHost } from "../../ui-components";
5
+ import { Button, StyledHost } from "../../ui-components";
6
6
  import { formatCurrency } from "../../utils/utils";
7
7
  import refundReasonOptions from "./refund-reason-options";
8
8
  export class RefundPayment {
9
9
  constructor() {
10
10
  this.authToken = undefined;
11
11
  this.paymentId = undefined;
12
+ this.hideSubmitButton = false;
13
+ this.apiOrigin = PROXY_API_ORIGIN;
12
14
  this.paymentAmountRefundable = 0;
13
- this.withButton = undefined;
15
+ this.errorMessage = null;
14
16
  this.errors = {};
15
17
  this.values = {};
16
- this.isSubmitting = false;
18
+ this.isLoading = false;
17
19
  }
18
20
  componentWillLoad() {
19
21
  this.formController = new FormController(RefundPaymentSchema(this.paymentAmountRefundable.toString()));
@@ -27,49 +29,43 @@ export class RefundPayment {
27
29
  this.values = Object.assign({}, values);
28
30
  });
29
31
  }
30
- /**
31
- * Handles the form submission.
32
- * Prevents the default form action, validates the form, and emits the 'submitted' event.
33
- */
34
32
  async handleSubmit(event) {
35
33
  event.preventDefault();
36
34
  this.formController.validateAndSubmit(this.submitRefund);
37
35
  }
38
- /**
39
- * Submits the refund request to the API.
40
- */
41
36
  async submitRefund(values) {
42
- this.isSubmitting = true;
37
+ this.isLoading = true;
38
+ let refundResponse;
43
39
  try {
44
- const response = await this.api.post(`payments/${this.paymentId}/refunds`, values);
45
- this.submitted.emit(response);
40
+ refundResponse = await this.api.post(`payments/${this.paymentId}/refunds`, values);
46
41
  }
47
42
  catch (error) {
48
43
  console.error('Error submitting refund:', error);
49
- this.submitted.emit(error);
44
+ this.errorEvent.emit(error);
50
45
  }
51
46
  finally {
52
- this.isSubmitting = false;
47
+ this.submitEvent.emit({ response: refundResponse });
48
+ this.isLoading = false;
53
49
  }
54
50
  }
55
- /**
56
- * Handles input changes, updating the refundFields state.
57
- */
58
51
  handleInput(field, value) {
59
52
  this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [field]: value }));
60
53
  }
61
- /**
62
- * Initializes the API with the given authentication token.
63
- * Logs a warning if the auth token is missing.
64
- */
65
54
  initializeApi() {
66
- if (!this.authToken) {
67
- console.warn('Warning: Missing auth-token.');
55
+ if (this.paymentId && this.authToken) {
56
+ this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
57
+ }
58
+ else {
59
+ this.errorMessage = 'Payment ID and Auth Token are required';
60
+ this.errorEvent.emit({
61
+ errorCode: ComponentErrorCodes.MISSING_PROPS,
62
+ message: this.errorMessage,
63
+ severity: ComponentErrorSeverity.ERROR,
64
+ });
68
65
  }
69
- this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
70
66
  }
71
67
  render() {
72
- 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)}`))))));
68
+ 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)}`))))));
73
69
  }
74
70
  static get is() { return "justifi-refund-payment"; }
75
71
  static get encapsulation() { return "shadow"; }
@@ -87,7 +83,7 @@ export class RefundPayment {
87
83
  "optional": false,
88
84
  "docs": {
89
85
  "tags": [],
90
- "text": "Authentication token required to authorize the refund transaction."
86
+ "text": ""
91
87
  },
92
88
  "attribute": "auth-token",
93
89
  "reflect": false
@@ -104,77 +100,126 @@ export class RefundPayment {
104
100
  "optional": false,
105
101
  "docs": {
106
102
  "tags": [],
107
- "text": "The unique identifier for the payment to be refunded."
103
+ "text": ""
108
104
  },
109
105
  "attribute": "payment-id",
110
106
  "reflect": false
111
107
  },
112
- "paymentAmountRefundable": {
113
- "type": "number",
108
+ "hideSubmitButton": {
109
+ "type": "boolean",
114
110
  "mutable": false,
115
111
  "complexType": {
116
- "original": "number",
117
- "resolved": "number",
112
+ "original": "boolean",
113
+ "resolved": "boolean",
118
114
  "references": {}
119
115
  },
120
116
  "required": false,
121
117
  "optional": true,
122
118
  "docs": {
123
119
  "tags": [],
124
- "text": "The amount of the payment to be refunded. This should be equal to the Payment `amount_refundable` property."
120
+ "text": ""
125
121
  },
126
- "attribute": "payment-amount-refundable",
122
+ "attribute": "hide-submit-button",
127
123
  "reflect": false,
128
- "defaultValue": "0"
124
+ "defaultValue": "false"
129
125
  },
130
- "withButton": {
131
- "type": "boolean",
126
+ "apiOrigin": {
127
+ "type": "string",
132
128
  "mutable": false,
133
129
  "complexType": {
134
- "original": "boolean",
135
- "resolved": "boolean",
130
+ "original": "string",
131
+ "resolved": "string",
136
132
  "references": {}
137
133
  },
138
134
  "required": false,
139
135
  "optional": true,
140
136
  "docs": {
141
137
  "tags": [],
142
- "text": "Flag to control the visibility of the submit button."
138
+ "text": ""
143
139
  },
144
- "attribute": "with-button",
145
- "reflect": false
140
+ "attribute": "api-origin",
141
+ "reflect": false,
142
+ "defaultValue": "PROXY_API_ORIGIN"
146
143
  }
147
144
  };
148
145
  }
149
146
  static get states() {
150
147
  return {
148
+ "paymentAmountRefundable": {},
149
+ "errorMessage": {},
151
150
  "errors": {},
152
151
  "values": {},
153
- "isSubmitting": {}
152
+ "isLoading": {}
154
153
  };
155
154
  }
156
155
  static get events() {
157
156
  return [{
158
- "method": "submitted",
159
- "name": "submitted",
157
+ "method": "errorEvent",
158
+ "name": "error-event",
159
+ "bubbles": true,
160
+ "cancelable": true,
161
+ "composed": true,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": ""
165
+ },
166
+ "complexType": {
167
+ "original": "ComponentErrorEvent",
168
+ "resolved": "ComponentErrorEvent",
169
+ "references": {
170
+ "ComponentErrorEvent": {
171
+ "location": "import",
172
+ "path": "../../api",
173
+ "id": "src/api/index.ts::ComponentErrorEvent"
174
+ }
175
+ }
176
+ }
177
+ }, {
178
+ "method": "submitEvent",
179
+ "name": "submit-event",
160
180
  "bubbles": true,
161
181
  "cancelable": true,
162
182
  "composed": true,
163
183
  "docs": {
164
184
  "tags": [],
165
- "text": "Event emitted when the refund form is successfully submitted.\nThe submitted refund fields are passed as the event detail."
185
+ "text": ""
166
186
  },
167
187
  "complexType": {
168
- "original": "RefundPaymentFields",
169
- "resolved": "RefundPaymentFields",
188
+ "original": "ComponentSubmitEvent",
189
+ "resolved": "ComponentSubmitEvent",
170
190
  "references": {
171
- "RefundPaymentFields": {
191
+ "ComponentSubmitEvent": {
172
192
  "location": "import",
173
- "path": "./refund-payment-schema",
174
- "id": "src/components/refund-payment/refund-payment-schema.ts::RefundPaymentFields"
193
+ "path": "../../api",
194
+ "id": "src/api/index.ts::ComponentSubmitEvent"
175
195
  }
176
196
  }
177
197
  }
178
198
  }];
179
199
  }
200
+ static get methods() {
201
+ return {
202
+ "submitRefund": {
203
+ "complexType": {
204
+ "signature": "(values: any) => Promise<void>",
205
+ "parameters": [{
206
+ "name": "values",
207
+ "type": "any",
208
+ "docs": ""
209
+ }],
210
+ "references": {
211
+ "Promise": {
212
+ "location": "global",
213
+ "id": "global::Promise"
214
+ }
215
+ },
216
+ "return": "Promise<void>"
217
+ },
218
+ "docs": {
219
+ "text": "",
220
+ "tags": []
221
+ }
222
+ }
223
+ };
224
+ }
180
225
  }
@@ -8,6 +8,7 @@ export const terminalOrdersTableColumns = {
8
8
  updated_at: () => (h("th", { part: tableHeadCell, scope: "col", title: "The date and time the order was last updated" }, "Updated At")),
9
9
  order_status: () => (h("th", { part: tableHeadCell, scope: "col", title: "The current status of the order" }, "Order Status")),
10
10
  business_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The business ID associated with the order" }, "Business ID")),
11
+ company_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The business name associated with the order" }, "Business Name")),
11
12
  provider: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider associated with the order" }, "Provider")),
12
13
  order_type: () => (h("th", { part: tableHeadCell, scope: "col", title: "The type of order" }, "Order Type")),
13
14
  quantity: () => (h("th", { part: tableHeadCell, scope: "col", title: "The number of terminals associated with the order" }, "Order Quantity")),
@@ -17,6 +18,7 @@ export const terminalOrdersTableCells = {
17
18
  updated_at: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, h("div", { class: "fw-bold" }, convertToLocal(terminalOrder.updated_at, { showDisplayDate: true })), h("div", { class: "fw-bold" }, convertToLocal(terminalOrder.updated_at, { showTime: true })))),
18
19
  order_status: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, MapTerminalOrderStatusToBadge(terminalOrder.order_status))),
19
20
  business_id: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.business_id)),
21
+ company_name: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.company_name)),
20
22
  provider: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.provider)),
21
23
  order_type: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.order_type)),
22
24
  quantity: (terminalOrder, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminalOrder.terminals.length)),
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-03-18T23:06:44",
2
+ "timestamp": "2025-03-25T18:35:01",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.19.2",
@@ -11861,6 +11861,28 @@
11861
11861
  ],
11862
11862
  "optional": false,
11863
11863
  "required": false
11864
+ },
11865
+ {
11866
+ "name": "submitButtonText",
11867
+ "type": "string",
11868
+ "complexType": {
11869
+ "original": "string",
11870
+ "resolved": "string",
11871
+ "references": {}
11872
+ },
11873
+ "mutable": false,
11874
+ "attr": "submit-button-text",
11875
+ "reflectToAttr": false,
11876
+ "docs": "",
11877
+ "docsTags": [],
11878
+ "default": "'Submit Order'",
11879
+ "values": [
11880
+ {
11881
+ "type": "string"
11882
+ }
11883
+ ],
11884
+ "optional": false,
11885
+ "required": false
11864
11886
  }
11865
11887
  ],
11866
11888
  "methods": [],
@@ -14560,6 +14582,28 @@
14560
14582
  "docsTags": [],
14561
14583
  "usage": {},
14562
14584
  "props": [
14585
+ {
14586
+ "name": "apiOrigin",
14587
+ "type": "string",
14588
+ "complexType": {
14589
+ "original": "string",
14590
+ "resolved": "string",
14591
+ "references": {}
14592
+ },
14593
+ "mutable": false,
14594
+ "attr": "api-origin",
14595
+ "reflectToAttr": false,
14596
+ "docs": "",
14597
+ "docsTags": [],
14598
+ "default": "PROXY_API_ORIGIN",
14599
+ "values": [
14600
+ {
14601
+ "type": "string"
14602
+ }
14603
+ ],
14604
+ "optional": true,
14605
+ "required": false
14606
+ },
14563
14607
  {
14564
14608
  "name": "authToken",
14565
14609
  "type": "string",
@@ -14571,7 +14615,7 @@
14571
14615
  "mutable": false,
14572
14616
  "attr": "auth-token",
14573
14617
  "reflectToAttr": false,
14574
- "docs": "Authentication token required to authorize the refund transaction.",
14618
+ "docs": "",
14575
14619
  "docsTags": [],
14576
14620
  "values": [
14577
14621
  {
@@ -14582,22 +14626,22 @@
14582
14626
  "required": false
14583
14627
  },
14584
14628
  {
14585
- "name": "paymentAmountRefundable",
14586
- "type": "number",
14629
+ "name": "hideSubmitButton",
14630
+ "type": "boolean",
14587
14631
  "complexType": {
14588
- "original": "number",
14589
- "resolved": "number",
14632
+ "original": "boolean",
14633
+ "resolved": "boolean",
14590
14634
  "references": {}
14591
14635
  },
14592
14636
  "mutable": false,
14593
- "attr": "payment-amount-refundable",
14637
+ "attr": "hide-submit-button",
14594
14638
  "reflectToAttr": false,
14595
- "docs": "The amount of the payment to be refunded. This should be equal to the Payment `amount_refundable` property.",
14639
+ "docs": "",
14596
14640
  "docsTags": [],
14597
- "default": "0",
14641
+ "default": "false",
14598
14642
  "values": [
14599
14643
  {
14600
- "type": "number"
14644
+ "type": "boolean"
14601
14645
  }
14602
14646
  ],
14603
14647
  "optional": true,
@@ -14614,7 +14658,7 @@
14614
14658
  "mutable": false,
14615
14659
  "attr": "payment-id",
14616
14660
  "reflectToAttr": false,
14617
- "docs": "The unique identifier for the payment to be refunded.",
14661
+ "docs": "",
14618
14662
  "docsTags": [],
14619
14663
  "values": [
14620
14664
  {
@@ -14623,49 +14667,83 @@
14623
14667
  ],
14624
14668
  "optional": false,
14625
14669
  "required": false
14626
- },
14670
+ }
14671
+ ],
14672
+ "methods": [
14627
14673
  {
14628
- "name": "withButton",
14629
- "type": "boolean",
14674
+ "name": "submitRefund",
14675
+ "returns": {
14676
+ "type": "Promise<void>",
14677
+ "docs": ""
14678
+ },
14630
14679
  "complexType": {
14631
- "original": "boolean",
14632
- "resolved": "boolean",
14633
- "references": {}
14680
+ "signature": "(values: any) => Promise<void>",
14681
+ "parameters": [
14682
+ {
14683
+ "name": "values",
14684
+ "type": "any",
14685
+ "docs": ""
14686
+ }
14687
+ ],
14688
+ "references": {
14689
+ "Promise": {
14690
+ "location": "global",
14691
+ "id": "global::Promise"
14692
+ }
14693
+ },
14694
+ "return": "Promise<void>"
14634
14695
  },
14635
- "mutable": false,
14636
- "attr": "with-button",
14637
- "reflectToAttr": false,
14638
- "docs": "Flag to control the visibility of the submit button.",
14639
- "docsTags": [],
14640
- "values": [
14696
+ "signature": "submitRefund(values: any) => Promise<void>",
14697
+ "parameters": [
14641
14698
  {
14642
- "type": "boolean"
14699
+ "name": "values",
14700
+ "type": "any",
14701
+ "docs": ""
14643
14702
  }
14644
14703
  ],
14645
- "optional": true,
14646
- "required": false
14704
+ "docs": "",
14705
+ "docsTags": []
14647
14706
  }
14648
14707
  ],
14649
- "methods": [],
14650
14708
  "events": [
14651
14709
  {
14652
- "event": "submitted",
14653
- "detail": "RefundPaymentFields",
14710
+ "event": "error-event",
14711
+ "detail": "ComponentErrorEvent",
14654
14712
  "bubbles": true,
14655
14713
  "complexType": {
14656
- "original": "RefundPaymentFields",
14657
- "resolved": "RefundPaymentFields",
14714
+ "original": "ComponentErrorEvent",
14715
+ "resolved": "ComponentErrorEvent",
14658
14716
  "references": {
14659
- "RefundPaymentFields": {
14717
+ "ComponentErrorEvent": {
14718
+ "location": "import",
14719
+ "path": "../../api",
14720
+ "id": "src/api/index.ts::ComponentErrorEvent"
14721
+ }
14722
+ }
14723
+ },
14724
+ "cancelable": true,
14725
+ "composed": true,
14726
+ "docs": "",
14727
+ "docsTags": []
14728
+ },
14729
+ {
14730
+ "event": "submit-event",
14731
+ "detail": "ComponentSubmitEvent",
14732
+ "bubbles": true,
14733
+ "complexType": {
14734
+ "original": "ComponentSubmitEvent",
14735
+ "resolved": "ComponentSubmitEvent",
14736
+ "references": {
14737
+ "ComponentSubmitEvent": {
14660
14738
  "location": "import",
14661
- "path": "./refund-payment-schema",
14662
- "id": "src/components/refund-payment/refund-payment-schema.ts::RefundPaymentFields"
14739
+ "path": "../../api",
14740
+ "id": "src/api/index.ts::ComponentSubmitEvent"
14663
14741
  }
14664
14742
  }
14665
14743
  },
14666
14744
  "cancelable": true,
14667
14745
  "composed": true,
14668
- "docs": "Event emitted when the refund form is successfully submitted.\nThe submitted refund fields are passed as the event detail.",
14746
+ "docs": "",
14669
14747
  "docsTags": []
14670
14748
  }
14671
14749
  ],
@@ -19152,10 +19230,10 @@
19152
19230
  "docstring": "",
19153
19231
  "path": "src/api/index.ts"
19154
19232
  },
19155
- "src/components/refund-payment/refund-payment-schema.ts::RefundPaymentFields": {
19156
- "declaration": "export interface RefundPaymentFields {\n amount: string;\n description: string;\n}",
19233
+ "src/api/index.ts::ComponentSubmitEvent": {
19234
+ "declaration": "any",
19157
19235
  "docstring": "",
19158
- "path": "src/components/refund-payment/refund-payment-schema.ts"
19236
+ "path": "src/api/index.ts"
19159
19237
  },
19160
19238
  "src/api/index.ts::ComponentClickEvent": {
19161
19239
  "declaration": "any",
@@ -19177,11 +19255,6 @@
19177
19255
  "docstring": "",
19178
19256
  "path": "src/api/index.ts"
19179
19257
  },
19180
- "src/api/index.ts::ComponentSubmitEvent": {
19181
- "declaration": "any",
19182
- "docstring": "",
19183
- "path": "src/api/index.ts"
19184
- },
19185
19258
  "src/api/index.ts::ComponentErrorCodes": {
19186
19259
  "declaration": "any",
19187
19260
  "docstring": "",
@@ -88,6 +88,7 @@ class TerminalOrder {
88
88
  constructor(data) {
89
89
  this.id = data.id;
90
90
  this.business_id = data.business_id;
91
+ this.company_name = data.company_name;
91
92
  this.sub_account_id = data.sub_account_id;
92
93
  this.provider = data.provider || TerminalProviders.verifone;
93
94
  this.order_items = [];
@@ -3,7 +3,7 @@ import './ComponentError-c61dce41.js';
3
3
  import './Checkout-18d8bf94.js';
4
4
  import './Pagination-afc8f96d.js';
5
5
  import './Payment-806af354.js';
6
- import './SubAccount-837658ae.js';
6
+ import './SubAccount-7520271c.js';
7
7
  import { E as EntityDocumentType } from './Document-1907c0d4.js';
8
8
  import { c as bankAccountTypeOptions } from './business-form-options-86a13078.js';
9
9
  import './event-types-5c87de02.js';
@@ -4,7 +4,7 @@ import { u as identityNameValidation, l as lineOneValidation, k as lineTwoValida
4
4
  import { n as numberOnlyHandler } from './utils-20cdf321.js';
5
5
  import { S as StateOptions } from './state-options-a356fb11.js';
6
6
  import { F as FormControlErrorText } from './form-control-error-text-176d20d8.js';
7
- import { p as packageJson } from './package-f0bb46fd.js';
7
+ import { p as packageJson } from './package-01997353.js';
8
8
  import { a as iframeInputStyles } from './iframe-input-styles-state-ff730fe5.js';
9
9
  import { i as inputInvalidAndFocused, b as inputInvalid, a as inputFocused, c as input, l as label } from './parts-fd740f54.js';
10
10
  import './business-form-options-86a13078.js';
@@ -1,4 +1,4 @@
1
- import { p as packageJson } from './package-f0bb46fd.js';
1
+ import { p as packageJson } from './package-01997353.js';
2
2
  import { A as Api } from './Api-52242eb0.js';
3
3
 
4
4
  class AnalyticsService {
@@ -3,7 +3,7 @@ import './ComponentError-c61dce41.js';
3
3
  import './Checkout-18d8bf94.js';
4
4
  import './Pagination-afc8f96d.js';
5
5
  import './Payment-806af354.js';
6
- import './SubAccount-837658ae.js';
6
+ import './SubAccount-7520271c.js';
7
7
  import './Document-1907c0d4.js';
8
8
 
9
9
  class CheckoutService {
@@ -3,7 +3,7 @@ import './ComponentError-c61dce41.js';
3
3
  import './Checkout-18d8bf94.js';
4
4
  import { p as pagingDefaults } from './Pagination-afc8f96d.js';
5
5
  import './Payment-806af354.js';
6
- import './SubAccount-837658ae.js';
6
+ import './SubAccount-7520271c.js';
7
7
  import './Document-1907c0d4.js';
8
8
  import { V as table, W as tableCell } from './parts-fd740f54.js';
9
9
  import { T as TableClickActions, a as Table, b as TableLoadingState, c as TableEmptyState, d as TableErrorState } from './event-types-1bc52f1f.js';