@justifi/webcomponents 6.12.1 → 6.12.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 (158) hide show
  1. package/dist/cjs/{Analytics-BhduX1FR.js → Analytics-DcqsdFaD.js} +2 -2
  2. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  3. package/dist/cjs/card-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{check-pkg-version-Bd2yxoh4.js → check-pkg-version-DFTQGZz1.js} +1 -1
  5. package/dist/cjs/{get-business-CKC1P4Qs.js → get-business-TFzhaBXn.js} +4 -1
  6. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  7. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  8. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +74 -36
  9. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +3 -3
  10. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
  11. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
  12. package/dist/cjs/justifi-business-form.cjs.entry.js +3 -3
  13. package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
  14. package/dist/cjs/justifi-checkout.cjs.entry.js +5 -6
  15. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +3 -3
  16. package/dist/cjs/justifi-dispute-management.cjs.entry.js +4 -4
  17. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +7 -7
  18. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
  19. package/dist/cjs/justifi-order-terminals.cjs.entry.js +8 -7
  20. package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -3
  21. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -4
  22. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
  23. package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
  24. package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
  25. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
  26. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
  27. package/dist/cjs/justifi-refund-payment.cjs.entry.js +3 -3
  28. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  29. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
  30. package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
  31. package/dist/cjs/{package-CjFkmEML.js → package-bM0MyhTf.js} +1 -1
  32. package/dist/collection/actions/business/get-business.js +4 -1
  33. package/dist/collection/api/Analytics.js +1 -1
  34. package/dist/collection/collection-manifest.json +6 -6
  35. package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +3 -1
  36. package/dist/collection/components/checkout/justifi-checkout.js +2 -3
  37. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  38. package/dist/collection/components/dispute-management/dispute-response/justifi-additional-statement.js +1 -1
  39. package/dist/collection/components/dispute-management/dispute-response/justifi-cancellation-policy.js +1 -1
  40. package/dist/collection/components/dispute-management/dispute-response/justifi-customer-details.js +1 -1
  41. package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +1 -1
  42. package/dist/collection/components/dispute-management/dispute-response/justifi-duplicate-charge.js +1 -1
  43. package/dist/collection/components/dispute-management/dispute-response/justifi-electronic-evidence.js +1 -1
  44. package/dist/collection/components/dispute-management/dispute-response/justifi-product-or-service.js +1 -1
  45. package/dist/collection/components/dispute-management/dispute-response/justifi-refund-policy.js +1 -1
  46. package/dist/collection/components/dispute-management/dispute-response/justifi-shipping-details.js +1 -1
  47. package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
  48. package/dist/collection/components/dispute-management/justifi-dispute-notification.js +2 -2
  49. package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +34 -14
  50. package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +4 -1
  51. package/dist/collection/components/modular-checkout/sub-components/justifi-plaid-payment-method.js +27 -14
  52. package/dist/collection/components/modular-checkout/sub-components/justifi-saved-payment-methods.js +7 -5
  53. package/dist/collection/components/order-terminals/justifi-order-terminals.js +4 -3
  54. package/dist/docs.json +6 -6
  55. package/dist/esm/{Analytics-4PEV3c9V.js → Analytics-Cyc3ZLPx.js} +2 -2
  56. package/dist/esm/bank-account-form.entry.js +2 -2
  57. package/dist/esm/card-form.entry.js +2 -2
  58. package/dist/esm/{check-pkg-version-BmgaID9z.js → check-pkg-version-6iGDh82c.js} +1 -1
  59. package/dist/esm/{get-business-DpFRs5dE.js → get-business-DIpEbczl.js} +4 -1
  60. package/dist/esm/hidden-input_2.entry.js +1 -1
  61. package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
  62. package/dist/esm/justifi-apple-pay_11.entry.js +75 -37
  63. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +3 -3
  64. package/dist/esm/justifi-bank-account-form.entry.js +3 -3
  65. package/dist/esm/justifi-business-details.entry.js +4 -4
  66. package/dist/esm/justifi-business-form.entry.js +3 -3
  67. package/dist/esm/justifi-card-form.entry.js +3 -3
  68. package/dist/esm/justifi-checkout.entry.js +5 -6
  69. package/dist/esm/justifi-checkouts-list.entry.js +3 -3
  70. package/dist/esm/justifi-dispute-management.entry.js +4 -4
  71. package/dist/esm/justifi-dispute-notification_3.entry.js +7 -7
  72. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
  73. package/dist/esm/justifi-order-terminals.entry.js +8 -7
  74. package/dist/esm/justifi-payment-details.entry.js +3 -3
  75. package/dist/esm/justifi-payment-provisioning.entry.js +6 -4
  76. package/dist/esm/justifi-payment-transactions-list.entry.js +3 -3
  77. package/dist/esm/justifi-payments-list.entry.js +3 -3
  78. package/dist/esm/justifi-payout-details.entry.js +3 -3
  79. package/dist/esm/justifi-payout-transactions-list.entry.js +3 -3
  80. package/dist/esm/justifi-payouts-list.entry.js +3 -3
  81. package/dist/esm/justifi-refund-payment.entry.js +3 -3
  82. package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
  83. package/dist/esm/justifi-terminal-orders-list.entry.js +3 -3
  84. package/dist/esm/justifi-terminals-list.entry.js +3 -3
  85. package/dist/esm/{package-CXKOe1m5.js → package-beXEDfB9.js} +1 -1
  86. package/dist/module/Analytics.js +1 -1
  87. package/dist/module/dispute-response-core.js +1 -1
  88. package/dist/module/get-business.js +4 -1
  89. package/dist/module/justifi-additional-statement2.js +1 -1
  90. package/dist/module/justifi-apple-pay2.js +34 -14
  91. package/dist/module/justifi-cancellation-policy2.js +1 -1
  92. package/dist/module/justifi-checkout.js +2 -3
  93. package/dist/module/justifi-customer-details2.js +1 -1
  94. package/dist/module/justifi-dispute-management.js +1 -1
  95. package/dist/module/justifi-dispute-notification2.js +2 -2
  96. package/dist/module/justifi-dispute-response2.js +1 -1
  97. package/dist/module/justifi-duplicate-charge2.js +1 -1
  98. package/dist/module/justifi-electronic-evidence2.js +1 -1
  99. package/dist/module/justifi-google-pay2.js +4 -1
  100. package/dist/module/justifi-order-terminals.js +4 -3
  101. package/dist/module/justifi-payment-provisioning.js +3 -1
  102. package/dist/module/justifi-plaid-payment-method2.js +27 -14
  103. package/dist/module/justifi-product-or-service2.js +1 -1
  104. package/dist/module/justifi-refund-policy2.js +1 -1
  105. package/dist/module/justifi-saved-payment-methods2.js +7 -5
  106. package/dist/module/justifi-shipping-details2.js +1 -1
  107. package/dist/module/package.js +1 -1
  108. package/dist/types/actions/business/get-business.d.ts +2 -1
  109. package/dist/types/components/business-forms/payment-provisioning/justifi-payment-provisioning.d.ts +1 -1
  110. package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +3 -0
  111. package/dist/types/components/modular-checkout/sub-components/justifi-plaid-payment-method.d.ts +2 -2
  112. package/dist/webcomponents/{p-647668b6.entry.js → p-1c4f5f1d.entry.js} +1 -1
  113. package/dist/webcomponents/{p-f4b390bc.entry.js → p-1e8135f0.entry.js} +1 -1
  114. package/dist/webcomponents/{p-017edf85.entry.js → p-2a755daf.entry.js} +1 -1
  115. package/dist/webcomponents/{p-0e9cb724.entry.js → p-31e74a5a.entry.js} +1 -1
  116. package/dist/webcomponents/{p-2b25c768.entry.js → p-3488951f.entry.js} +1 -1
  117. package/dist/webcomponents/p-437a99dc.entry.js +1 -0
  118. package/dist/webcomponents/p-49c0cd3a.entry.js +1 -0
  119. package/dist/webcomponents/p-4d21df48.entry.js +1 -0
  120. package/dist/webcomponents/p-50f5e313.entry.js +1 -0
  121. package/dist/webcomponents/{p-06e88d51.entry.js → p-5ef854e0.entry.js} +1 -1
  122. package/dist/webcomponents/{p-cd267d76.entry.js → p-67498c25.entry.js} +1 -1
  123. package/dist/webcomponents/{p-61ebdd8b.entry.js → p-6f0c582a.entry.js} +1 -1
  124. package/dist/webcomponents/{p-f481695c.entry.js → p-94306884.entry.js} +1 -1
  125. package/dist/webcomponents/{p-b76b743e.entry.js → p-9937e2e7.entry.js} +1 -1
  126. package/dist/webcomponents/{p-b6d59ff4.entry.js → p-9dca1331.entry.js} +1 -1
  127. package/dist/webcomponents/{p-GP5gWjhc.js → p-DgH-jcIo.js} +1 -1
  128. package/dist/webcomponents/p-a75d76ff.entry.js +1 -0
  129. package/dist/webcomponents/p-a7778957.entry.js +1 -0
  130. package/dist/webcomponents/p-a9d7cdae.entry.js +1 -0
  131. package/dist/webcomponents/p-b060a9c9.entry.js +1 -0
  132. package/dist/webcomponents/p-bdf21f71.entry.js +1 -0
  133. package/dist/webcomponents/{p-259ea5e0.entry.js → p-be5d1005.entry.js} +1 -1
  134. package/dist/webcomponents/p-beXEDfB9.js +1 -0
  135. package/dist/webcomponents/{p-d3829e18.entry.js → p-c09fccd3.entry.js} +1 -1
  136. package/dist/webcomponents/p-c827cbc9.entry.js +1 -0
  137. package/dist/webcomponents/{p-1e080e95.entry.js → p-c9e1df15.entry.js} +1 -1
  138. package/dist/webcomponents/p-cc5b7c27.entry.js +1 -0
  139. package/dist/webcomponents/{p-1e66d430.entry.js → p-e0b3735f.entry.js} +1 -1
  140. package/dist/webcomponents/p-ef89824b.entry.js +1 -0
  141. package/dist/webcomponents/p-qrNmDp6K.js +1 -0
  142. package/dist/webcomponents/{p-cXPhRFs-.js → p-zi3ljCdQ.js} +1 -1
  143. package/dist/webcomponents/webcomponents.esm.js +1 -1
  144. package/package.json +1 -1
  145. package/dist/webcomponents/p-11faee45.entry.js +0 -1
  146. package/dist/webcomponents/p-238163d8.entry.js +0 -1
  147. package/dist/webcomponents/p-4f57368a.entry.js +0 -1
  148. package/dist/webcomponents/p-608a41d2.entry.js +0 -1
  149. package/dist/webcomponents/p-6ecb3ef9.entry.js +0 -1
  150. package/dist/webcomponents/p-87a4b33f.entry.js +0 -1
  151. package/dist/webcomponents/p-9870fff0.entry.js +0 -1
  152. package/dist/webcomponents/p-CXKOe1m5.js +0 -1
  153. package/dist/webcomponents/p-GJyHX3us.js +0 -1
  154. package/dist/webcomponents/p-b8c59954.entry.js +0 -1
  155. package/dist/webcomponents/p-cf31ccdd.entry.js +0 -1
  156. package/dist/webcomponents/p-d58a330d.entry.js +0 -1
  157. package/dist/webcomponents/p-ed580b3c.entry.js +0 -1
  158. package/dist/webcomponents/p-f91c49a2.entry.js +0 -1
@@ -76,7 +76,6 @@ const JustifiCheckout$1 = /*@__PURE__*/ proxyCustomElement(class JustifiCheckout
76
76
  checkoutStore.isSubmitting = false;
77
77
  }
78
78
  checkoutError(_event) {
79
- console.error('[justifi-checkout] error-event received', _event === null || _event === void 0 ? void 0 : _event.detail);
80
79
  checkoutStore.isSubmitting = false;
81
80
  }
82
81
  checkoutChanged(event) {
@@ -111,9 +110,9 @@ const JustifiCheckout$1 = /*@__PURE__*/ proxyCustomElement(class JustifiCheckout
111
110
  }
112
111
  render() {
113
112
  var _a, _b;
114
- return (h(StyledHost, { key: '3d9d149e2fe85c02aae2ca21a1dc655eda9e4af8' }, h("justifi-modular-checkout", { key: 'f1af5a7f23e895338500cb81e0f618b1bc911a84', ref: (el) => {
113
+ return (h(StyledHost, { key: 'ffd2abaacc7edae588a9abe3a4ff96807b34fcff' }, h("justifi-modular-checkout", { key: '9196c278e24353aeb1ac02c85253d629f683522b', ref: (el) => {
115
114
  this.modularCheckoutRef = el;
116
- }, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '9ccf111654a251e0836c75ec9c696459dc20173f', class: "row gy-3 jfi-checkout-core" }, h("div", { key: 'b89f34eb2441b4ccf1b62de860440aef1aaa29e0', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: '04cb13fa1980b6b762ab920b1200173f004d84e2', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: '15e13cb04cd7d402ff06a252dcee9e57ad33aa54' }, h("justifi-checkout-summary", { key: 'dd03dfa689be11328f2a9a955582bb144f765649' }))), h("div", { key: '2cbf3b6cd39027a5af4338e8dddf96d82b06e317', class: "col-12 mt-4" }, h("slot", { key: 'cc22673d5d7a6abed5dec41fb426b411bcb40bd9', name: "insurance" })), h("div", { key: '36793dae298583ecf989dcd0d875ca256899026f', class: "col-12 mt-4" }, h("justifi-header", { key: 'd343214c1b13f18d8c12a2734df74392b4eeeda6', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: '4c301118984abf62e283244270d283211052ea35', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: 'd94d75d2c4966aa3a5b1971c278d549cab084373', class: "d-flex flex-column" }, h("section", { key: '034d710eeb6a034e2e5ab4a9f035097ca090d95f' }, h("div", { key: '085a5cf1f48dda17aecb94cd3571c209b26cada9' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: '866d933df84c42a656a25c4efb8e8248a66c83fa', class: "mb-3" }, h("justifi-apple-pay", { key: 'b1779224cb632c0be71f1656f0741240393c9305' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: '6d0ccb9db6ae00463c619306d288234da77522bd', class: "mb-3" }, h("justifi-google-pay", { key: '10b8ef6bf5e8113be078e481ba966d554c4cb8de', ref: (el) => (this.googlePayRef = el) }))), h("justifi-saved-payment-methods", { key: '3018b688d7f59501d444c0129e492e6b04c656f8' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && (h("justifi-radio-list-item", { key: 'a61ee95ee25e5ec034c7cc4f4ab0f2f081acf6f6', name: "paymentMethodType", value: PAYMENT_METHODS.SEZZLE, checked: ((_a = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.SEZZLE, label: h("justifi-sezzle-payment-method", { ref: (el) => (this.sezzlePaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.sezzlePaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), this.availablePaymentMethods.includes(PAYMENT_METHODS.PLAID) && !this.disableBnpl && (h("justifi-radio-list-item", { key: '99236535da0076054f9314ae188c7262651874cd', name: "paymentMethodType", value: PAYMENT_METHODS.PLAID, checked: ((_b = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.PLAID, label: h("justifi-plaid-payment-method", { ref: (el) => (this.plaidPaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.plaidPaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), h("justifi-tokenize-payment-method", { key: 'd72193f53af86d07313e68fcffab022749c708ee', ref: (el) => (this.tokenizePaymentMethodRef = el), authToken: this.authToken, accountId: checkoutStore.accountId, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, hideSubmitButton: true, paymentMethodGroupId: checkoutStore.paymentMethodGroupId }))))), h("div", { key: '2cbfec00fbd62b19aae94f8cb4d9a29dd9c3ac70', class: "mt-4" }, h("justifi-button", { key: '92120dc18d5244fe867e03e03cebe110681a1975', text: "Pay", type: "submit", variant: "primary", clickHandler: (e) => this.submit(e), disabled: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, isLoading: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, customStyle: { width: '100%', textAlign: "center" } }))))));
115
+ }, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '895298286bc0aa6acbda896a4f148dd4f8d7e7d2', class: "row gy-3 jfi-checkout-core" }, h("div", { key: 'dd186ed2f0fd479cd60024423b6d55625b962e55', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: '920d4eca26846aa1cbc16693fa45a9d8054d95a7', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: '560f8c3757a7cf53fd0aa898fd243b16a2f8e8d5' }, h("justifi-checkout-summary", { key: '31faa6ca984aa22985927a1f80273c86a67c7025' }))), h("div", { key: '3128ae40a739573da32598213a289d8751503fb0', class: "col-12 mt-4" }, h("slot", { key: '4a310881bbc4017734082d5c4f6b41d3d5f2a424', name: "insurance" })), h("div", { key: '8047c4da62e2fd67bd0b3f8654c6a19c0cacc255', class: "col-12 mt-4" }, h("justifi-header", { key: '631ff14201f6246906e3e1572515de21a7977773', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: '7fdc560ef42a5c2e8571f332e3c4ce8ff460d235', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: '81dcb52c051044adb4dbd92ac73ee3096edc592b', class: "d-flex flex-column" }, h("section", { key: '4359903b195009a2e8fb997a1f77880cba40dea4' }, h("div", { key: '21728867e6288c3fb7d5e5a6ee3d15974568b866' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: 'bdaa6b6c6d09cba294b2e46b85270241c86d2251', class: "mb-3" }, h("justifi-apple-pay", { key: '150d707bff7b79a1d19141f21a9c47e00e54418a' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: 'ce2be06b20a1e7d0159fde68a1c5c349c2d11998', class: "mb-3" }, h("justifi-google-pay", { key: '0fc867ce77467eb1f1fd198a62e88bd2795f4914', ref: (el) => (this.googlePayRef = el) }))), h("justifi-saved-payment-methods", { key: '0bb1999c093b3837bfdb879134dc54f66c90e164' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && (h("justifi-radio-list-item", { key: '1599be9bcea7569d822a204c805f08f18a4e00a4', name: "paymentMethodType", value: PAYMENT_METHODS.SEZZLE, checked: ((_a = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.SEZZLE, label: h("justifi-sezzle-payment-method", { ref: (el) => (this.sezzlePaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.sezzlePaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), this.availablePaymentMethods.includes(PAYMENT_METHODS.PLAID) && !this.disableBnpl && (h("justifi-radio-list-item", { key: 'c1de230257d290efa05f7a7166c2f069451c71a3', name: "paymentMethodType", value: PAYMENT_METHODS.PLAID, checked: ((_b = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.PLAID, label: h("justifi-plaid-payment-method", { ref: (el) => (this.plaidPaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.plaidPaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), h("justifi-tokenize-payment-method", { key: '44bca4ee57857afd4eee213cef98db2d4bd42490', ref: (el) => (this.tokenizePaymentMethodRef = el), authToken: this.authToken, accountId: checkoutStore.accountId, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, hideSubmitButton: true, paymentMethodGroupId: checkoutStore.paymentMethodGroupId }))))), h("div", { key: 'e5b6b4ac6b0fcec20380082f1b4cc5ba73bb88aa', class: "mt-4" }, h("justifi-button", { key: '188a8f46fd37b5f4f2d9b3ba7ff179d44d4a6656', text: "Pay", type: "submit", variant: "primary", clickHandler: (e) => this.submit(e), disabled: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, isLoading: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, customStyle: { width: '100%', textAlign: "center" } }))))));
117
116
  }
118
117
  static get watchers() { return {
119
118
  "authToken": ["propChanged"],
@@ -43,7 +43,7 @@ const JustifiCustomerDetails = /*@__PURE__*/ proxyCustomElement(class JustifiCus
43
43
  }
44
44
  render() {
45
45
  var _a, _b, _c, _d, _e;
46
- return (h("div", { key: '99a3ca32c4f0867f1c9ce8be6e24de3206111b2b' }, h("div", { key: 'd7e62b1331acdcdff20c6a8141d2447d070d338d', class: "row gy-3" }, h("div", { key: '7c6d1924454163791d3e220d000a4d37588d4eb8', class: "col-12" }, h("h2", { key: '25cd3fac6addfe1d66052de8d5fbae6204168409', class: "h5", part: heading5 }, "Customer Details")), h("div", { key: 'f6335d63a564fbfa597129e55939e8958dbc156e', class: "col-12" }, h("form-control-text", { key: 'af06a0b36a775d3f8fcf88e9294be3241f0c45b7', label: "Full Name", name: "customer_name", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_name, inputHandler: this.inputHandler, errorText: this.errors.customer_name })), h("div", { key: '7e0f3c1c8a354ece07ccbadd32f1d21f184a6eed', class: "col-12" }, h("form-control-text", { key: '34e43daff0a9335fd55ddd1511b39738f20947bc', label: "Email", name: "customer_email_address", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.customer_email_address, inputHandler: this.inputHandler, errorText: this.errors.customer_email_address })), h("div", { key: 'c88f74e81d377f328e82020134d679fc402b884c', class: "col-12" }, h("form-control-textarea", { key: '785d88c1a038a7a6f3417d13620b7f8104e23c5f', label: "Billing Address", name: "customer_billing_address", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.customer_billing_address, inputHandler: this.inputHandler, errorText: this.errors.customer_billing_address })), h("div", { key: '7d3d38d2a781eebac7bb77a9bacb816547060a7d', class: "col-12" }, h("form-control-file-v2", { key: '3fc2ada66ba9be0a9a5d65f380237ac044134e27', label: "Customer Signature", name: "customer_signature", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.customer_signature })), h("div", { key: '30c6c70d765fd4b1f7e37ee2f37b01e9b3ec2b4f', class: "col-12" }, h("form-control-file-v2", { key: 'a84cd87563ad2fa2c7dcf832d3b1219bfded150c', label: "Customer Communication", name: "customer_communication", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.customer_communication })))));
46
+ return (h("div", { key: '8bc10877cfabb168cd717d463a1ae252809275f5' }, h("div", { key: '12dc083ba94dfbb7b20671c636a0be03f3b67070', class: "row gy-3" }, h("div", { key: '429c91062e19b12711baa35d14b1337f8fbfc9d6', class: "col-12" }, h("h2", { key: '406723145d3bdbaa52b2897a5dc4347be34e7eea', class: "h5", part: heading5 }, "Customer Details")), h("div", { key: '40d5e8bd7c2b1fe8786c38fc2b7a3789278f3497', class: "col-12" }, h("form-control-text", { key: 'ade5ccaf5a45ba5f3f81c68196bfc7879da03315', label: "Full Name", name: "customer_name", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_name, inputHandler: this.inputHandler, errorText: this.errors.customer_name })), h("div", { key: 'baf8a129aa64d4507bce0d1f9ed7077f0911715e', class: "col-12" }, h("form-control-text", { key: '786f84b55ffec13cc937dff50e587e28865c7114', label: "Email", name: "customer_email_address", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.customer_email_address, inputHandler: this.inputHandler, errorText: this.errors.customer_email_address })), h("div", { key: '2805d754316314934648955b34e8c6da5f709192', class: "col-12" }, h("form-control-textarea", { key: '95a7a8a9d1d9ea70478021110808545c0730ffec', label: "Billing Address", name: "customer_billing_address", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.customer_billing_address, inputHandler: this.inputHandler, errorText: this.errors.customer_billing_address })), h("div", { key: '78fa90926cc11695379a95dde849cfb28cf829f5', class: "col-12" }, h("form-control-file-v2", { key: '984ab42f7742afcb0b74ccf65f313ead0542f75d', label: "Customer Signature", name: "customer_signature", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.customer_signature })), h("div", { key: 'de0bf546a3e767ec1e362446f14edea449643b2b', class: "col-12" }, h("form-control-file-v2", { key: '4124feba010476d48ab052142b7fb962d1550934', label: "Customer Communication", name: "customer_communication", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.customer_communication })))));
47
47
  }
48
48
  }, [256, "justifi-customer-details", {
49
49
  "disputeResponse": [8, "dispute-response"],
@@ -97,7 +97,7 @@ const JustifiDisputeManagement$1 = /*@__PURE__*/ proxyCustomElement(class Justif
97
97
  }
98
98
  }
99
99
  render() {
100
- return (h("justifi-dispute-management-core", { key: '934ece663ee7323be1157e67c566424081245b0c', getDispute: this.getDispute, disputeId: this.disputeId, authToken: this.authToken, "onError-event": this.handleErrorEvent }));
100
+ return (h("justifi-dispute-management-core", { key: 'db9bf0998d45a71d9c2a72f4cedbe4276e67a238', getDispute: this.getDispute, disputeId: this.disputeId, authToken: this.authToken, "onError-event": this.handleErrorEvent }));
101
101
  }
102
102
  static get watchers() { return {
103
103
  "disputeId": ["propChanged"],
@@ -59,8 +59,8 @@ const JustifiDisputeNotification = /*@__PURE__*/ proxyCustomElement(class Justif
59
59
  }
60
60
  render() {
61
61
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
62
- return (h(StyledHost, { key: 'a6dbf060e1e5a39e7fe7f3112c6e034a59f5a928' }, this.isLoading && (h("div", { key: 'eaa14797c7580a555496bf7e8932eeac73496bcb', style: { marginBottom: '8px' } }, h(Skeleton, { key: 'bb1ffea882722815cd2b13918106b353f009c96a', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: 'b60948cb4edaf5a4de1d67a09099153fea963b16', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: '0a4138f385131b03888d013057ef93e9052c1fa2', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && this.isDueDatePassed() && (h("div", { key: '85c4b8c9377e2b835508a9cb1be63054bc79cd43', part: text }, h("h1", { key: '5ae89800fb1483aa05a69f065bc800992404e4d3', class: "h4", part: heading4 }, "The due date (", (_b = this.dispute) === null || _b === void 0 ? void 0 :
63
- _b.due_date, ") for this dispute has passed"), h("p", { key: '75c85bf9609b8727d1397c9d6a2540af93e1a253' }, "You can no longer submit evidence to counter this dispute."))), ((_c = this.dispute) === null || _c === void 0 ? void 0 : _c.needsResponse) && !this.isDueDatePassed() && (h("div", { key: 'c4595f142ec169b5bf0f1010ba6632714f886b83', part: text }, h("h1", { key: 'ca612f94c53ab7f33a30ac4a1504a4335f19c381', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: '7160eb7a6adc283b34815dce378b4184b08c6834' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '9a06a5d966d7fcafe87e5c9103440f23f8e064cc', class: "h5" }, "Dispute details"), h("div", { key: 'cf72240182797f37cdcc6af724cf898757da825d', class: "d-table gap-2" }, h("div", { key: 'b834b58994ad1a512e527fd59614c6164c0bd496', class: "d-table-row gap-2" }, h("span", { key: '3f305bf8b5683003e02fba3dc75b2f5500a548e9', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '57b3dabcfa8db14ecd7b3c7ddedbdd280f5552d1', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_d = this.dispute) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { key: '3c138f8f5af1d0a0ae47489ec2bed97236b3334a', class: "d-table-row gap-2" }, h("span", { key: '7e121a904798c9dc9da1d622ba9c270ee17df4b6', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: 'aa10e2315d8bfef4e7a4972fef48b4dd08685a65', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_e = this.dispute) === null || _e === void 0 ? void 0 : _e.reason)), h("div", { key: 'e304065263a80702ab79ee850dc1323616eb3468', class: "d-table-row gap-2" }, h("span", { key: '4ea490a9617e179edf1a2eb1180e9eb807262ad7', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Due Date"), h("span", { key: '44da82cf86775600312b4915361b246841073ef6', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_f = this.dispute) === null || _f === void 0 ? void 0 : _f.due_date))), h("div", { key: '4fbc80ef5dc90b0f78d6617e0776d7a7c1371ea2', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '3a65ea6fdf5f0ea4b18cc9fee6dbebea6a0d3708', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '56a4adb004c1663beb045f69c69e9e61c5a93e6d', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.underReview) && (h("div", { key: 'd29034e2e03b098fafced8ae7bd8b0c04b429b8e', part: text }, h("h1", { key: '1f46bde8fa553508a6f42bb2e9f9ea5847ffadb3', class: "h4", part: heading4 }, "This payment is disputed and under review"), h("p", { key: '687de84072f9bc1ff40504abebcfe066fddff933' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_h = this.dispute) === null || _h === void 0 ? void 0 : _h.won) && (h("div", { key: 'e7934860b19cc5b7d6564adbd7ca19acbe2eef4d', part: text }, h("h1", { key: '994928d139ef6027a7ca1bb9bb33a3c645610c64', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '9ab997a8c0e615d5090ec19ce56d83dbabbc10cf' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_j = this.dispute) === null || _j === void 0 ? void 0 : _j.lost) && (h("div", { key: '1e31aed9becfeffeccdf604c93bc9eeb88431cf7', part: text }, h("h1", { key: '9959904c6c8ff6a3b09fd5f53b1a500ffce9af70', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: 'e31b5e2bcd90955000d6950aa316e8b58b0e3065' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
62
+ return (h(StyledHost, { key: '736e9c381309e08926162292fdbf7b62cc2087e9' }, this.isLoading && (h("div", { key: '21bdc2b142c32d00323211dda36074976b63dbb4', style: { marginBottom: '8px' } }, h(Skeleton, { key: 'e73b642a8c2a02b397affeb1fff5e5c35a3d87fb', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: '8ba58aa2227e88903a3eccc2bb8b577c05515139', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: 'fb88ccd69ee44cf8af5e9093906fc21016a2a5b6', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && this.isDueDatePassed() && (h("div", { key: 'e1fb6db600ef9418b47eb5e51ef8c62f4b005183', part: text }, h("h1", { key: 'ac2e9efc93c68d30f2a20ce2816c668826adfe6d', class: "h4", part: heading4 }, "The due date (", (_b = this.dispute) === null || _b === void 0 ? void 0 :
63
+ _b.due_date, ") for this dispute has passed"), h("p", { key: '6d189ad1eaa6c9e144749a5bab6aefcf3541e382' }, "You can no longer submit evidence to counter this dispute."))), ((_c = this.dispute) === null || _c === void 0 ? void 0 : _c.needsResponse) && !this.isDueDatePassed() && (h("div", { key: '2212952890d5fedb650c15d6e526e3fbf9ab9a68', part: text }, h("h1", { key: '67426dbff584f957e89a8d86570fab038de53f8d', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: '513490e2c25f4b12d1400d74862618aaf9794bd3' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '352898d8cae890914bf8feffd0ca913b71cd6c18', class: "h5" }, "Dispute details"), h("div", { key: 'b2b00e53e015d2cfb7a58ee66220af6dbb22467a', class: "d-table gap-2" }, h("div", { key: 'ee7162b5c176c1d334f09cdda553a1ef6e9b1dd0', class: "d-table-row gap-2" }, h("span", { key: '863e381c1610481ae609e4f9e3bc4d4cba6981cb', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: 'a4860c2b8b4f9f79cea5b45e8da37509368e02fd', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_d = this.dispute) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { key: '15b6c3183065af7771ffd31971e9c120c28cb285', class: "d-table-row gap-2" }, h("span", { key: '1a43935f1a8fa71dbd7b511430d5b29179a00d40', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: '6351bb9fcc392700e52f6a19a5b7796f0db81b7c', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_e = this.dispute) === null || _e === void 0 ? void 0 : _e.reason)), h("div", { key: '07badb71175a086399c2cd7e21f20eef2dc71547', class: "d-table-row gap-2" }, h("span", { key: '7f000a4206424cd4808d5cd9a20c339bf3ecaf18', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Due Date"), h("span", { key: 'a768799fd24012e11c9a3907f9da9959c815d475', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_f = this.dispute) === null || _f === void 0 ? void 0 : _f.due_date))), h("div", { key: 'b077e8d4e7c446db5c46f41174dbbf18647da81d', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: 'b113557e1ebabd4d787d95d3cf65c50c66085f0b', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '8fc56615440cd75503c7ce9324670592e1c88068', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.underReview) && (h("div", { key: '1419d80deb612294fe979d8cbf2fb76eab05c30c', part: text }, h("h1", { key: 'd77570d765ec7c1161c29f667911df1a40004c5b', class: "h4", part: heading4 }, "This payment is disputed and under review"), h("p", { key: 'b4e258895b34f062b244d710a0b947e08bb5bbea' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_h = this.dispute) === null || _h === void 0 ? void 0 : _h.won) && (h("div", { key: '7e32157b5bcdc02bfd125b9b03607f67488ab48e', part: text }, h("h1", { key: 'd087b4fcb56468bd8aa9904286f858591af94ba1', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '0aa0f4003d253874c6bd639afffba2ca37c9985e' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_j = this.dispute) === null || _j === void 0 ? void 0 : _j.lost) && (h("div", { key: 'f3855957e8222a4837f5cee6026b0c56df3ed185', part: text }, h("h1", { key: '1c0261b5d45e54b26982be2112b92d8585933b7a', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: 'f8ae5063b7254794687af55b989a5f282846fbfb' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
64
64
  }
65
65
  }, [257, "justifi-dispute-notification", {
66
66
  "dispute": [16],
@@ -80,7 +80,7 @@ const JustifiDisputeResponse = /*@__PURE__*/ proxyCustomElement(class JustifiDis
80
80
  }
81
81
  }
82
82
  render() {
83
- return (h(StyledHost, { key: '13eedd8da825613c7d060cf1426c949a7c233d17' }, h("justifi-dispute-response-core", { key: '3a05c657309a72761033e064aa91866a2855c5a0', "onError-event": this.handleErrorEvent, "dispute-id": this.disputeId, disputeResponse: this.disputeResponse, createDisputeEvidence: this.createDisputeEvidence, updateDisputeResponse: this.updateDisputeResponse, submitDisputeResponse: this.submitDisputeResponse })));
83
+ return (h(StyledHost, { key: 'fb08d6796fe7740f292eff620d04e943adb30b22' }, h("justifi-dispute-response-core", { key: 'cb1859a262749d3e11c14844e5a9a5909970ee06', "onError-event": this.handleErrorEvent, "dispute-id": this.disputeId, disputeResponse: this.disputeResponse, createDisputeEvidence: this.createDisputeEvidence, updateDisputeResponse: this.updateDisputeResponse, submitDisputeResponse: this.submitDisputeResponse })));
84
84
  }
85
85
  ;
86
86
  static get watchers() { return {
@@ -42,7 +42,7 @@ const JustifiDuplicateCharge = /*@__PURE__*/ proxyCustomElement(class JustifiDup
42
42
  }
43
43
  render() {
44
44
  var _a, _b, _c;
45
- return (h("div", { key: '98ca80e403dd32506af99145e08204be5eec4b31' }, h("div", { key: 'a8eeafb1ba7af0cb64b739a6c433c9a8ff9d5d92', class: "row gy-3" }, h("div", { key: 'be0573c9b62984e6b2bcf01242e75cca0ae8cc8c', class: "col-12" }, h("h2", { key: '6c40320a1da739177366d671ff2cff3688ab157e', class: "h5", part: heading5 }, "Duplicate Charge")), h("div", { key: '4778b442ff686afeebcf9d19d6d91847ae3e7e5d', class: "col-12" }, h("form-control-text", { key: '7413dbaba70c32f8982b9719a2b27398aaa6f33a', label: "Original Payment ID", name: "duplicate_charge_original_payment_id", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.duplicate_charge_original_payment_id, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_original_payment_id })), h("div", { key: '53da7a4a0143e14ec5a334b3181d5e3d0588a634', class: "col-12" }, h("form-control-textarea", { key: 'c26aaeea93f882d9baa35cf9d5ba5e26b86a83dc', label: "Duplicate Charge Explanation", name: "duplicate_charge_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.duplicate_charge_explanation, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_explanation })), h("div", { key: '9e0f630e9211f701d7949c2d96e69dd62d221bd2', class: "col-12" }, h("form-control-file-v2", { key: '1f6495ddc4c034337b860208721a703416ae5c0d', label: "Duplicate Charge Documentation", name: "duplicate_charge_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.duplicate_charge_documentation })))));
45
+ return (h("div", { key: 'a34d10b642c601ff1a2e6109bdad5550afef0dc7' }, h("div", { key: '65dfe9ecb13d4038fbceb5b3f88313e473ad0f2f', class: "row gy-3" }, h("div", { key: '5ec12191f9e56396ff1e67b53dcdfecdca8f21e9', class: "col-12" }, h("h2", { key: 'b5bf89077f1ae3dcbb6c37e28b2728a0c88ed1b4', class: "h5", part: heading5 }, "Duplicate Charge")), h("div", { key: '52cdf5962d03f1724dc610a4525a4bf09a68fe4e', class: "col-12" }, h("form-control-text", { key: '785cc51d4491326c3e7555404e47726cb6f6f0ea', label: "Original Payment ID", name: "duplicate_charge_original_payment_id", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.duplicate_charge_original_payment_id, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_original_payment_id })), h("div", { key: 'c3142d3b716cb3a191d930a5961d8361e4ef6204', class: "col-12" }, h("form-control-textarea", { key: 'd6cd675e958cd0685a89812891c599393a309fef', label: "Duplicate Charge Explanation", name: "duplicate_charge_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.duplicate_charge_explanation, inputHandler: this.inputHandler, errorText: this.errors.duplicate_charge_explanation })), h("div", { key: 'e805678d04d01f4763ee663590e89e96be9fcfb4', class: "col-12" }, h("form-control-file-v2", { key: 'c83c4e91ebba42be4a6e640aa73186f6b461c42f', label: "Duplicate Charge Documentation", name: "duplicate_charge_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.duplicate_charge_documentation })))));
46
46
  }
47
47
  }, [256, "justifi-duplicate-charge", {
48
48
  "disputeResponse": [8, "dispute-response"],
@@ -39,7 +39,7 @@ const JustifiElectronicEvidence = /*@__PURE__*/ proxyCustomElement(class Justifi
39
39
  }
40
40
  render() {
41
41
  var _a, _b;
42
- return (h("div", { key: 'cfa8c6c92bb2790dbaea1939e6acc7539fd848d7' }, h("div", { key: '63d38a0c614f932ef018791fb1388b3dc49c7e5c', class: "row gy-3" }, h("div", { key: '6140c07a8c354d9339509a00141fbc7a1de146f4', class: "col-12" }, h("h2", { key: '40c755fe0938930e0283c391df12c417850eecb4', class: "h5", part: heading5 }, "Electronic Evidence")), h("div", { key: 'e5145c83af0623fe602ea51a171d97e2e4064e19', class: "col-12" }, h("form-control-text", { key: 'c1886a0f25a6955526dd07ae9a5e00a29172a716', label: "Purchase IP Address", name: "customer_purchase_ip_address", helpText: "The IP address used by the customer during the purchase.", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_purchase_ip_address, inputHandler: this.inputHandler, errorText: this.errors.customer_purchase_ip_address })), h("div", { key: 'fd6fa580702047999cfd94fddccd3e9185d61201', class: "col-12" }, h("form-control-file-v2", { key: '816fb2eb5d3ca714e7b4e35398cfce41a5a02ae1', label: "Activity Logs", name: "activity_log", helpText: "Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.activity_log })))));
42
+ return (h("div", { key: '3b0122e517065a72f2d7b8411d75067db093e284' }, h("div", { key: '3f6b7c42a8e6419a4890ae29c41afd98ecdd8f11', class: "row gy-3" }, h("div", { key: 'f807c043be7f75e7f9befd24cb80fd93f56678d5', class: "col-12" }, h("h2", { key: '3c4315f405ab5cead5eebe48975f26e9d93e0d84', class: "h5", part: heading5 }, "Electronic Evidence")), h("div", { key: 'd84fa8fcc504137031181fdb1974f50d1bc49ef8', class: "col-12" }, h("form-control-text", { key: 'db3862f6a1ebd5afcf5e1ff2943de3d977e56bbe', label: "Purchase IP Address", name: "customer_purchase_ip_address", helpText: "The IP address used by the customer during the purchase.", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_purchase_ip_address, inputHandler: this.inputHandler, errorText: this.errors.customer_purchase_ip_address })), h("div", { key: '4e882539af79b200962740ae5645df663c82bde9', class: "col-12" }, h("form-control-file-v2", { key: '2be5e0f0d1ad5b47d41fabb1f2fe25397e7cc69f', label: "Activity Logs", name: "activity_log", helpText: "Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.activity_log })))));
43
43
  }
44
44
  }, [256, "justifi-electronic-evidence", {
45
45
  "disputeResponse": [8, "dispute-response"],
@@ -126,11 +126,14 @@ const JustifiGooglePay = /*@__PURE__*/ proxyCustomElement(class JustifiGooglePay
126
126
  }, this.iframeOrigin);
127
127
  }
128
128
  render() {
129
+ if (!checkoutStore.checkoutLoaded) {
130
+ return null;
131
+ }
129
132
  if (!checkoutStore.googlePayEnabled) {
130
133
  console.warn("Google Pay is not enabled for this checkout");
131
134
  return null;
132
135
  }
133
- return (h(Host, null, h(GooglePaySkeleton, { isLoading: !this.isReadyToPay }), h("iframe", { ref: (el) => (this.iframeElement = el), src: `${this.iframeOrigin}/v2/googlePay`, style: {
136
+ return (h(Host, null, h(GooglePaySkeleton, { isLoading: !this.isReadyToPay }), h("iframe", { ref: (el) => (this.iframeElement = el), src: `${this.iframeOrigin}/v2/googlePay`, allow: "payment", style: {
134
137
  border: "none",
135
138
  width: "100%",
136
139
  height: "48px",
@@ -142,12 +142,13 @@ const JustifiOrderTerminals$1 = /*@__PURE__*/ proxyCustomElement(class JustifiOr
142
142
  })({
143
143
  onSuccess: ({ business }) => {
144
144
  this.business = new Business(business);
145
- this.loading.business = false;
146
145
  },
147
146
  onError: ({ error, code, severity }) => {
148
147
  this.handleError(error, code, severity);
148
+ },
149
+ final: () => {
149
150
  this.loading.business = false;
150
- }
151
+ },
151
152
  });
152
153
  }
153
154
  initializeGetTerminalModels() {
@@ -207,7 +208,7 @@ const JustifiOrderTerminals$1 = /*@__PURE__*/ proxyCustomElement(class JustifiOr
207
208
  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))));
208
209
  }
209
210
  render() {
210
- return (h(StyledHost, { key: '1dc7e86cd02a1d549ee19b6e24dec5278af70e44' }, h("div", { key: 'a6c3f18e4ad62606aa04c9a71ff4c949a6cc407f', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
211
+ return (h(StyledHost, { key: '3f0f23fdf6a5f5f7e8ef527ea28e6fcfcdc70a3a' }, h("div", { key: 'd69fe7a14eaaa468c45b6fa6967298ba1a387e6b', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
211
212
  }
212
213
  }, [257, "justifi-order-terminals", {
213
214
  "businessId": [1, "business-id"],
@@ -139,7 +139,9 @@ const JustifiPaymentProvisioning$1 = /*@__PURE__*/ proxyCustomElement(class Just
139
139
  }
140
140
  };
141
141
  this.decrementSteps = () => {
142
- return this.currentStep--;
142
+ if (this.currentStep > 0) {
143
+ this.currentStep -= 1;
144
+ }
143
145
  };
144
146
  this.previousStepButtonOnClick = () => {
145
147
  this.clickEvent.emit({ name: BusinessFormClickActions.previousStep });
@@ -29,6 +29,7 @@ const JustifiPlaidPaymentMethod = /*@__PURE__*/ proxyCustomElement(class Justifi
29
29
  this.isSelected = false;
30
30
  this.retryCount = 0;
31
31
  this.isRetrying = false;
32
+ this.sdkLoaded = false;
32
33
  this.plaidService = new PlaidService();
33
34
  this.maxRetries = 3;
34
35
  this.retryDelay = 2000; // 2 seconds
@@ -375,15 +376,31 @@ const JustifiPlaidPaymentMethod = /*@__PURE__*/ proxyCustomElement(class Justifi
375
376
  this.openPlaidLink();
376
377
  }
377
378
  }
378
- componentDidRender() {
379
- if (!this.scriptRef)
379
+ componentWillLoad() {
380
+ var _a;
381
+ this.isSelected = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.PLAID;
382
+ if (checkoutStore.bankAccountVerification !== true)
380
383
  return;
381
- this.scriptRef.onload = () => {
382
- // Wait for store to be populated before initializing
383
- this.waitForStoreAndInitialize();
384
- };
385
- // Add error handler for script loading failures
386
- this.scriptRef.onerror = () => {
384
+ if (checkoutStore.checkoutLoaded) {
385
+ this.loadPlaidSDK();
386
+ }
387
+ else {
388
+ onChange('checkoutLoaded', (loaded) => {
389
+ if (loaded && checkoutStore.bankAccountVerification === true) {
390
+ this.loadPlaidSDK();
391
+ }
392
+ });
393
+ }
394
+ }
395
+ loadPlaidSDK() {
396
+ if (this.sdkLoaded)
397
+ return;
398
+ this.sdkLoaded = true;
399
+ const script = document.createElement('script');
400
+ script.src = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js';
401
+ script.async = true;
402
+ script.onload = () => this.initializePlaidLink();
403
+ script.onerror = () => {
387
404
  this.handleError({
388
405
  code: PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
389
406
  message: PLAID_ERROR_MESSAGES[PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
@@ -392,11 +409,7 @@ const JustifiPlaidPaymentMethod = /*@__PURE__*/ proxyCustomElement(class Justifi
392
409
  userAction: 'Refresh the page and try again'
393
410
  });
394
411
  };
395
- }
396
- componentWillLoad() {
397
- var _a;
398
- // Initialize selection state based on store
399
- this.isSelected = ((_a = checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.PLAID;
412
+ document.head.appendChild(script);
400
413
  }
401
414
  async resolvePaymentMethod() {
402
415
  if (!this.publicToken) {
@@ -542,7 +555,7 @@ const JustifiPlaidPaymentMethod = /*@__PURE__*/ proxyCustomElement(class Justifi
542
555
  }
543
556
  return null;
544
557
  };
545
- return (h(StyledHost, { class: "payment-method" }, h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { title: "Pay with Plaid" }, h("div", { onClick: (event) => { event.preventDefault(); this.handleSelectionClick(); } }, "Pay with Bank Account ", plaidLogo, " "), renderErrorState(), renderStatusState())));
558
+ return (h(StyledHost, { class: "payment-method" }, h("div", { title: "Pay with Plaid" }, h("div", { onClick: (event) => { event.preventDefault(); this.handleSelectionClick(); } }, "Pay with Bank Account ", plaidLogo, " "), renderErrorState(), renderStatusState())));
546
559
  }
547
560
  static get watchers() { return {
548
561
  "isSelected": ["onSelectionChange"]
@@ -41,7 +41,7 @@ const JustifiProductOrService = /*@__PURE__*/ proxyCustomElement(class JustifiPr
41
41
  }
42
42
  render() {
43
43
  var _a, _b, _c;
44
- return (h("div", { key: 'e43f3118bb3b607e3af86cbdf8cba319bd0c7f26' }, h("div", { key: 'ab2452d038e39e3b2781d72b0b43c42899734fce', class: "row gy-3" }, h("div", { key: '04a31b25a688803623882e91e6d27ebdcab3fc99', class: "col-12" }, h("h2", { key: 'c32d209d8c441287353316222a2ad11d66ad3022', class: "h5", part: heading5 }, "Product & Service Details")), h("div", { key: '936a6427c3531df4dcc096ff50bc31a0b85a4bcb', class: "col-12" }, h("form-control-text", { key: 'e7c77f6b3f35ff66935e2c48c4a6c7b203cdc3ea', label: "Product Description", name: "product_description", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.product_description, inputHandler: this.inputHandler, errorText: this.errors.product_description })), h("div", { key: '51e374b7cf4053261f0bc44a19ee13c39e4b8a88', class: "col-12" }, h("form-control-date", { key: '0b11a59dbd74b0e6fe568a948c643722542647ab', label: "Service Date", name: "service_date", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.service_date, inputHandler: this.inputHandler, errorText: this.errors.service_date })), h("div", { key: 'e18ae7ebca9050fc87aed1d51d664c278b16c341', class: "col-12" }, h("form-control-file-v2", { key: 'dd7567eb79c3d273bfa3b4464dd39b9508d8a018', label: "Service Documentation", name: "service_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.service_documentation })))));
44
+ return (h("div", { key: '4587b32b05500749ada539467d8eb2409d0180bd' }, h("div", { key: 'b6696b8324fff8752b227ae3ba41a13ba1ac9063', class: "row gy-3" }, h("div", { key: '013ea18c3848964f098d18c13caf3dde4670093a', class: "col-12" }, h("h2", { key: '6329d4950881a7856b8b47c9e047c8d25e48aaac', class: "h5", part: heading5 }, "Product & Service Details")), h("div", { key: 'c30067cffb73b64e57ee0189ef53ef04337a8cf3', class: "col-12" }, h("form-control-text", { key: '23060ee222508fe8ef1e4063bd19a95cb4fab288', label: "Product Description", name: "product_description", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.product_description, inputHandler: this.inputHandler, errorText: this.errors.product_description })), h("div", { key: '05902305859cbbfa5572fdc2303ef27c4533cbda', class: "col-12" }, h("form-control-date", { key: 'cc4ca8d15ab2d04863323fdb73f4f3cde363b61d', label: "Service Date", name: "service_date", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.service_date, inputHandler: this.inputHandler, errorText: this.errors.service_date })), h("div", { key: 'a0986336639e8ff22cfa7fd10eb761fa5159e8e7', class: "col-12" }, h("form-control-file-v2", { key: '352467c92329bbf22535a38ee4c2a14d9a9110c6', label: "Service Documentation", name: "service_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.service_documentation })))));
45
45
  }
46
46
  }, [256, "justifi-product-or-service", {
47
47
  "disputeResponse": [8, "dispute-response"],
@@ -41,7 +41,7 @@ const JustifiRefundPolicy = /*@__PURE__*/ proxyCustomElement(class JustifiRefund
41
41
  }
42
42
  render() {
43
43
  var _a, _b, _c, _d;
44
- return (h("div", { key: 'c5a20cda29feb1dd2bc608a34f1d479e75218606' }, h("div", { key: '137aeb0f70a8ae6daba6f44d0128098c1580d91a', class: "row gy-3" }, h("div", { key: '9a5839b430e5dc73b6543f17fc53c927859a36c9', class: "col-12" }, h("h2", { key: 'bdd71c1c572428ba0d274e7319786a5236de193b', class: "h5", part: heading5 }, "Refund Policy and Receipt")), h("div", { key: '191121597d2277907a526d1c3ea1662e40c5ffc0', class: "col-12" }, h("form-control-textarea", { key: '131ecd8df82112e62825c821e3408f721b65486d', label: "Refund Policy Disclosure", name: "refund_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.refund_policy_disclosure, inputHandler: this.inputHandler })), h("div", { key: 'ea28978ddac1ca271b4d2685559c30564756e24c', class: "col-12" }, h("form-control-textarea", { key: 'dbf87760ec66daffe670e13014d69bb899fb4e6f', label: "Refund Refusal Explanation", name: "refund_refusal_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.refund_refusal_explanation, inputHandler: this.inputHandler })), h("div", { key: 'f04e0f3e88971625b296c9a13d2e4c66ca0ee431', class: "col-12" }, h("form-control-file-v2", { key: 'fa4b249335a73a479c8e6abbc4c44e2fe3ab11e6', label: "Upload Refund Policy", name: "refund_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.refund_policy })), h("div", { key: 'e06df78e4ee3b06278850d53d0484fd750ee48ed', class: "col-12" }, h("form-control-file-v2", { key: '82980ca492c41b2e705ad1e686af84122a94b7a2', label: "Upload Receipt", name: "receipt", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.receipt })))));
44
+ return (h("div", { key: 'e59738a3425e348d989077da9353aa12293cea2f' }, h("div", { key: '32365305802a0584b959e04268796b21ca73fe21', class: "row gy-3" }, h("div", { key: 'ab46282525e6afb9b4db2f82ea6a716e1bd32649', class: "col-12" }, h("h2", { key: 'b1c9fbfccf63eee921a734e0e82cc868ddfb6652', class: "h5", part: heading5 }, "Refund Policy and Receipt")), h("div", { key: '1287269e5c352018fd289c64e876b985137c36c8', class: "col-12" }, h("form-control-textarea", { key: '217292c1ea3a92c3a1cfb68c6d1cbe5b4c532262', label: "Refund Policy Disclosure", name: "refund_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.refund_policy_disclosure, inputHandler: this.inputHandler })), h("div", { key: '7b54f191e06110c1c186ae316558d7617bd3fc93', class: "col-12" }, h("form-control-textarea", { key: 'ec77cd98d1c77c88e74655b430f89bb2e79bb125', label: "Refund Refusal Explanation", name: "refund_refusal_explanation", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.refund_refusal_explanation, inputHandler: this.inputHandler })), h("div", { key: '68971eb2d792f9f733e68b6e9bcab8965cc51412', class: "col-12" }, h("form-control-file-v2", { key: '991ef9fa96a95a52caf72b723d854f17d2c76a0c', label: "Upload Refund Policy", name: "refund_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.refund_policy })), h("div", { key: '22528492e08a56f5b72ad11ef754d1a46884093f', class: "col-12" }, h("form-control-file-v2", { key: '4ea877eeef562dd232bdf5d1359d54cc4e030365', label: "Upload Receipt", name: "receipt", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.receipt })))));
45
45
  }
46
46
  }, [256, "justifi-refund-policy", {
47
47
  "disputeResponse": [8, "dispute-response"],
@@ -35,11 +35,13 @@ const JustifiSavedPaymentMethods = /*@__PURE__*/ proxyCustomElement(class Justif
35
35
  };
36
36
  }
37
37
  componentWillLoad() {
38
- if (!checkoutStore.paymentMethods.length) {
39
- console.warn('No saved payment methods available.');
40
- }
41
- if (checkoutStore.disablePaymentMethodGroup) {
42
- console.warn('Payment method group is disabled.');
38
+ if (checkoutStore.checkoutLoaded) {
39
+ if (!checkoutStore.paymentMethods.length) {
40
+ console.warn('No saved payment methods available.');
41
+ }
42
+ if (checkoutStore.disablePaymentMethodGroup) {
43
+ console.warn('Payment method group is disabled.');
44
+ }
43
45
  }
44
46
  }
45
47
  render() {
@@ -46,7 +46,7 @@ const JustifiShippingDetails = /*@__PURE__*/ proxyCustomElement(class JustifiShi
46
46
  }
47
47
  render() {
48
48
  var _a, _b, _c, _d, _e;
49
- return (h("div", { key: '5095dc339b43e49c59b6efcfacacbb680408edf5' }, h("div", { key: '1fbe12df13f6013c2223b60b94ac0a5fa4596dc0', class: "row gy-3" }, h("div", { key: 'd31cb56b51c77a39125f3531e9513ebc51155277', class: "col-12" }, h("h2", { key: '317c209a7e3168e85b4e0c672a6c8cb8f5e2177c', class: "h5", part: heading5 }, "Shipping Details")), h("div", { key: '27f75f17046c752629058d496cb7820b23dcbc2c', class: "col-12" }, h("form-control-text", { key: '3640223bb57f4d6eea09df3d3a0c66b7f5cce998', label: "Shipping Carrier Name", name: "shipping_carrier", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.shipping_carrier, inputHandler: this.inputHandler, errorText: this.errors.shipping_carrier })), h("div", { key: 'e31d26c7622a07833814aba997c25fa114dfd276', class: "col-12" }, h("form-control-text", { key: 'e6cc2d569c05e28452428577c9991d3f45ab97c8', label: "Tracking Number", name: "shipping_tracking_number", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.shipping_tracking_number, inputHandler: this.inputHandler, errorText: this.errors.shipping_tracking_number })), h("div", { key: '6ebb9e323186e4db61e42c68757f218b6d412253', class: "col-12" }, h("form-control-date", { key: 'aee185a1e9a7bdf3a9ff79d4cef4937dae6b9eaf', label: "Date Shipped", name: "shipping_date", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.shipping_date, inputHandler: this.inputHandler, errorText: this.errors.shipping_date })), h("div", { key: 'afee1bf9054a4d43b1c708a254459134453e014c', class: "col-12" }, h("form-control-textarea", { key: 'b238c60b5fc8805d5969ceb271ecbb0b5f77f7b4', label: "Shipping Address", name: "shipping_address", defaultValue: (_d = this.disputeResponse) === null || _d === void 0 ? void 0 : _d.shipping_address, inputHandler: this.inputHandler, errorText: this.errors.shipping_address })), h("div", { key: '631889f4538c546dc386009b229acd9fb7a98a6c', class: "col-12" }, h("form-control-file-v2", { key: 'd960f9f6494ffd3f5bc4b62fa66f3466974f07c5', label: "Shipping Documentation", name: "shipping_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.shipping_documentation })))));
49
+ return (h("div", { key: '66ab4f496a037d4724fcc127803d2fd4c72ad2a8' }, h("div", { key: 'a650a56e124ecc55aaa383a32e27cad862801d01', class: "row gy-3" }, h("div", { key: 'aedaacba104b8540eedafcbc8f7c776fa99ab387', class: "col-12" }, h("h2", { key: 'b4e2dc10ef6cbdab47143f2cc64a484050bfc416', class: "h5", part: heading5 }, "Shipping Details")), h("div", { key: '7110551e0ecf98b149f008eb7105235b8d601454', class: "col-12" }, h("form-control-text", { key: '2c17294567ff47b181c8d11cfda7651671adac92', label: "Shipping Carrier Name", name: "shipping_carrier", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.shipping_carrier, inputHandler: this.inputHandler, errorText: this.errors.shipping_carrier })), h("div", { key: '031476a2435c80b8ae27fb50303f14797d84a801', class: "col-12" }, h("form-control-text", { key: '67441fbba00af48235867763561cf8adf66b9e69', label: "Tracking Number", name: "shipping_tracking_number", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.shipping_tracking_number, inputHandler: this.inputHandler, errorText: this.errors.shipping_tracking_number })), h("div", { key: '1fcc1bf129d3ec577f4f36a2801422044ec0a59e', class: "col-12" }, h("form-control-date", { key: 'aa0464427d083dceba8e1604e045c707366d6046', label: "Date Shipped", name: "shipping_date", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.shipping_date, inputHandler: this.inputHandler, errorText: this.errors.shipping_date })), h("div", { key: 'f61850943df4c9d6605cde9d86b2e8275ced0af4', class: "col-12" }, h("form-control-textarea", { key: 'a1d4997810348a93f26a9f4932890ffd911ea062', label: "Shipping Address", name: "shipping_address", defaultValue: (_d = this.disputeResponse) === null || _d === void 0 ? void 0 : _d.shipping_address, inputHandler: this.inputHandler, errorText: this.errors.shipping_address })), h("div", { key: '9dd41ee3436d63e0c89318129e811630e4aad75d', class: "col-12" }, h("form-control-file-v2", { key: 'fe1879caad49f44f1abd312a3925a20e6bdc11bf', label: "Shipping Documentation", name: "shipping_documentation", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.shipping_documentation })))));
50
50
  }
51
51
  }, [256, "justifi-shipping-details", {
52
52
  "disputeResponse": [8, "dispute-response"],
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "6.12.1";
2
+ const version = "6.12.3";
3
3
  var webcomponentsPackageJson = {
4
4
  name: name,
5
5
  version: version};
@@ -2,7 +2,8 @@ export declare const makeGetBusiness: ({ id, authToken, service }: {
2
2
  id: any;
3
3
  authToken: any;
4
4
  service: any;
5
- }) => ({ onSuccess, onError }: {
5
+ }) => ({ onSuccess, onError, final }: {
6
6
  onSuccess: any;
7
7
  onError: any;
8
+ final: any;
8
9
  }) => Promise<any>;
@@ -33,7 +33,7 @@ export declare class JustifiPaymentProvisioning {
33
33
  get totalSteps(): number;
34
34
  get stepCounter(): string;
35
35
  incrementSteps: () => number;
36
- decrementSteps: () => number;
36
+ decrementSteps: () => void;
37
37
  previousStepButtonOnClick: () => void;
38
38
  nextStepButtonOnClick: (e: any, clickEventName: any) => void;
39
39
  render(): any;
@@ -2,6 +2,7 @@ import { EventEmitter } from "../../../stencil-public-runtime";
2
2
  import { ApplePayButtonType, ApplePayButtonStyle, IApplePayToken } from "../../../api/ApplePay";
3
3
  export declare class JustifiApplePay {
4
4
  private applePayService;
5
+ private sdkLoaded;
5
6
  countryCode: string;
6
7
  merchantIdentifier: string;
7
8
  merchantDisplayName: string;
@@ -37,6 +38,8 @@ export declare class JustifiApplePay {
37
38
  readonly INITIALIZATION_ERROR: "INITIALIZATION_ERROR";
38
39
  readonly PAYMENT_FAILED: "PAYMENT_FAILED";
39
40
  };
41
+ componentWillLoad(): void;
42
+ private loadApplePaySDK;
40
43
  private initializeApplePay;
41
44
  private handleApplePayClick;
42
45
  isSupported(): Promise<boolean>;
@@ -11,7 +11,7 @@ export declare class JustifiPlaidPaymentMethod {
11
11
  isSelected: boolean;
12
12
  retryCount: number;
13
13
  isRetrying: boolean;
14
- private scriptRef;
14
+ private sdkLoaded;
15
15
  private plaidService;
16
16
  private unsubscribeFromStore;
17
17
  private maxRetries;
@@ -23,8 +23,8 @@ export declare class JustifiPlaidPaymentMethod {
23
23
  plaidError: EventEmitter;
24
24
  plaidErrorRecovered: EventEmitter;
25
25
  onSelectionChange(newValue: boolean): void;
26
- componentDidRender(): void;
27
26
  componentWillLoad(): void;
27
+ private loadPlaidSDK;
28
28
  waitForStoreAndInitialize: () => void;
29
29
  resolvePaymentMethod(): Promise<PaymentMethodPayload>;
30
30
  getPaymentToken(): Promise<string | undefined>;
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-DnrawQn3.js";import{B as d}from"./p-2LVpxCS_.js";import{S as c}from"./p-BqNNwq6C.js";import{S as o}from"./p-DcBvJu0k.js";import"./p-CZfYo5-1.js";import{C as n,e as h}from"./p-CUI41_5y.js";import{g as p,a as f}from"./p-B5vVjDc_.js";import{D as l}from"./p-hhdRync5.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b}from"./p-GP5gWjhc.js";import{J as y}from"./p-cXPhRFs-.js";import"./p-HXpYMWUU.js";import"./p-BH0Xfn-F.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-CXKOe1m5.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"a6dbf060e1e5a39e7fe7f3112c6e034a59f5a928"},this.isLoading&&s("div",{key:"eaa14797c7580a555496bf7e8932eeac73496bcb",style:{marginBottom:"8px"}},s(o,{key:"bb1ffea882722815cd2b13918106b353f009c96a",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"b60948cb4edaf5a4de1d67a09099153fea963b16",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"0a4138f385131b03888d013057ef93e9052c1fa2",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"85c4b8c9377e2b835508a9cb1be63054bc79cd43",part:a},s("h1",{key:"5ae89800fb1483aa05a69f065bc800992404e4d3",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"75c85bf9609b8727d1397c9d6a2540af93e1a253"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"c4595f142ec169b5bf0f1010ba6632714f886b83",part:a},s("h1",{key:"ca612f94c53ab7f33a30ac4a1504a4335f19c381",class:"h4",part:r},"This payment is disputed"),s("p",{key:"7160eb7a6adc283b34815dce378b4184b08c6834"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"9a06a5d966d7fcafe87e5c9103440f23f8e064cc",class:"h5"},"Dispute details"),s("div",{key:"cf72240182797f37cdcc6af724cf898757da825d",class:"d-table gap-2"},s("div",{key:"b834b58994ad1a512e527fd59614c6164c0bd496",class:"d-table-row gap-2"},s("span",{key:"3f305bf8b5683003e02fba3dc75b2f5500a548e9",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"57b3dabcfa8db14ecd7b3c7ddedbdd280f5552d1",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"3c138f8f5af1d0a0ae47489ec2bed97236b3334a",class:"d-table-row gap-2"},s("span",{key:"7e121a904798c9dc9da1d622ba9c270ee17df4b6",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"aa10e2315d8bfef4e7a4972fef48b4dd08685a65",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"e304065263a80702ab79ee850dc1323616eb3468",class:"d-table-row gap-2"},s("span",{key:"4ea490a9617e179edf1a2eb1180e9eb807262ad7",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"44da82cf86775600312b4915361b246841073ef6",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"4fbc80ef5dc90b0f78d6617e0776d7a7c1371ea2",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"3a65ea6fdf5f0ea4b18cc9fee6dbebea6a0d3708",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"56a4adb004c1663beb045f69c69e9e61c5a93e6d",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"d29034e2e03b098fafced8ae7bd8b0c04b429b8e",part:a},s("h1",{key:"1f46bde8fa553508a6f42bb2e9f9ea5847ffadb3",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"687de84072f9bc1ff40504abebcfe066fddff933"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"e7934860b19cc5b7d6564adbd7ca19acbe2eef4d",part:a},s("h1",{key:"994928d139ef6027a7ca1bb9bb33a3c645610c64",class:"h4",part:r},"This payment was disputed"),s("p",{key:"9ab997a8c0e615d5090ec19ce56d83dbabbc10cf"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"1e31aed9becfeffeccdf604c93bc9eeb88431cf7",part:a},s("h1",{key:"9959904c6c8ff6a3b09fd5f53b1a500ffce9af70",class:"h4",part:r},"This payment was disputed"),s("p",{key:"e31b5e2bcd90955000d6950aa316e8b58b0e3065"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"13eedd8da825613c7d060cf1426c949a7c233d17"},s("justifi-dispute-response-core",{key:"3a05c657309a72761033e064aa91866a2855c5a0","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"c08c10977c1623e1bc7a86b81fe1dd865a2e51ed",class:"row gy-3"},s("div",{key:"227c651ce1a06865edb4eb2c5339b3123b6a4db5",class:"col-12"},s("h1",{key:"7c880d92b985d125d286c8443fcb4005a937c070",class:"h4",part:r},"Counter dispute")),s("div",{key:"96413bfd5d67f298811f7ec5f63789be2b6b3dd6",class:"col-12"},this.currentStepComponent),s("div",{key:"7beb58f7a362798a498c72d5bd7ae274dd84e596",class:"col-12"},s("div",{key:"78a4a3671c0b50199b2ca5ed09f9d42b0cc0624f",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
1
+ import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-DnrawQn3.js";import{B as d}from"./p-2LVpxCS_.js";import{S as c}from"./p-BqNNwq6C.js";import{S as o}from"./p-DcBvJu0k.js";import"./p-CZfYo5-1.js";import{C as n,e as h}from"./p-CUI41_5y.js";import{g as p,a as f}from"./p-B5vVjDc_.js";import{D as l}from"./p-hhdRync5.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b}from"./p-DgH-jcIo.js";import{J as y}from"./p-zi3ljCdQ.js";import"./p-HXpYMWUU.js";import"./p-BH0Xfn-F.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-beXEDfB9.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"736e9c381309e08926162292fdbf7b62cc2087e9"},this.isLoading&&s("div",{key:"21bdc2b142c32d00323211dda36074976b63dbb4",style:{marginBottom:"8px"}},s(o,{key:"e73b642a8c2a02b397affeb1fff5e5c35a3d87fb",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"8ba58aa2227e88903a3eccc2bb8b577c05515139",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"fb88ccd69ee44cf8af5e9093906fc21016a2a5b6",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"e1fb6db600ef9418b47eb5e51ef8c62f4b005183",part:a},s("h1",{key:"ac2e9efc93c68d30f2a20ce2816c668826adfe6d",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"6d189ad1eaa6c9e144749a5bab6aefcf3541e382"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"2212952890d5fedb650c15d6e526e3fbf9ab9a68",part:a},s("h1",{key:"67426dbff584f957e89a8d86570fab038de53f8d",class:"h4",part:r},"This payment is disputed"),s("p",{key:"513490e2c25f4b12d1400d74862618aaf9794bd3"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"352898d8cae890914bf8feffd0ca913b71cd6c18",class:"h5"},"Dispute details"),s("div",{key:"b2b00e53e015d2cfb7a58ee66220af6dbb22467a",class:"d-table gap-2"},s("div",{key:"ee7162b5c176c1d334f09cdda553a1ef6e9b1dd0",class:"d-table-row gap-2"},s("span",{key:"863e381c1610481ae609e4f9e3bc4d4cba6981cb",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"a4860c2b8b4f9f79cea5b45e8da37509368e02fd",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"15b6c3183065af7771ffd31971e9c120c28cb285",class:"d-table-row gap-2"},s("span",{key:"1a43935f1a8fa71dbd7b511430d5b29179a00d40",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"6351bb9fcc392700e52f6a19a5b7796f0db81b7c",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"07badb71175a086399c2cd7e21f20eef2dc71547",class:"d-table-row gap-2"},s("span",{key:"7f000a4206424cd4808d5cd9a20c339bf3ecaf18",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"a768799fd24012e11c9a3907f9da9959c815d475",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"b077e8d4e7c446db5c46f41174dbbf18647da81d",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"b113557e1ebabd4d787d95d3cf65c50c66085f0b",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"8fc56615440cd75503c7ce9324670592e1c88068",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"1419d80deb612294fe979d8cbf2fb76eab05c30c",part:a},s("h1",{key:"d77570d765ec7c1161c29f667911df1a40004c5b",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"b4e258895b34f062b244d710a0b947e08bb5bbea"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"7e32157b5bcdc02bfd125b9b03607f67488ab48e",part:a},s("h1",{key:"d087b4fcb56468bd8aa9904286f858591af94ba1",class:"h4",part:r},"This payment was disputed"),s("p",{key:"0aa0f4003d253874c6bd639afffba2ca37c9985e"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"f3855957e8222a4837f5cee6026b0c56df3ed185",part:a},s("h1",{key:"1c0261b5d45e54b26982be2112b92d8585933b7a",class:"h4",part:r},"This payment was disputed"),s("p",{key:"f8ae5063b7254794687af55b989a5f282846fbfb"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"fb08d6796fe7740f292eff620d04e943adb30b22"},s("justifi-dispute-response-core",{key:"cb1859a262749d3e11c14844e5a9a5909970ee06","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"2cc3b2abef27f1ecf146dca2423fe07efd98c816",class:"row gy-3"},s("div",{key:"4c0303a7ad858568888c1345709858ac922ec176",class:"col-12"},s("h1",{key:"e857a204a17cb406790023c68e1f2908e3e194bc",class:"h4",part:r},"Counter dispute")),s("div",{key:"bff6c1e8d5852569d868829aaf6721e8489ee577",class:"col-12"},this.currentStepComponent),s("div",{key:"4ea8230871e5f0b90e4fed95821bf1ed6ba6ad83",class:"col-12"},s("div",{key:"a489196afb70fc4fc7c14c8ad2d55253b6f71a64",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
@@ -1 +1 @@
1
- import{h as e,r as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DcBvJu0k.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{e as c}from"./p-BRnBHsdq.js";import{c as r}from"./p-GP5gWjhc.js";import"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-CXKOe1m5.js";const d=i=>{const{isReady:a}=i;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"120px"}),e(t,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"110px"}),e(t,{height:"36px"}))))},n=class{constructor(e){i(this,e),this.isReady=!1}async componentWillLoad(){await a(),this.iframeOrigin=s.iframeOrigin,this.tabId=c(),r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((i=>{e.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return e&&i}async tokenize({clientId:e,paymentMethodMetadata:i,account:t}){return await this.accountNumberIframeElement.tokenize(e,i,t)}render(){return e("div",{key:"85e116539bb4721484d9877706ff93de1a68ec59"},e(d,{key:"b12a13d02b004e2957a55eb00fb38178dc283a92",isReady:this.isReady}),e("hidden-input",{key:"657ed7946158788e9291906ec0966eb3bd3c544c"}),e("div",{key:"321fddef9af616686d525af94dc4a65b5a4c18e6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"cee2dcc5bf8032ca95dc6b46e6a2bb47b371986b",class:"row mb-3"},e("iframe-input",{key:"50dfad1fc1eb41a87f2964e80d39036da1fc89ce",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),e("div",{key:"bd47ac6ff7c687ce9eb7e6ea2a66628392f73cdc",class:"row"},e("iframe-input",{key:"bbe98adda61bc72925e77714139b604d2959e156",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{n as bank_account_form}
1
+ import{h as e,r as i}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DcBvJu0k.js";import{w as a,c as s}from"./p-DVJaoI_m.js";import{e as c}from"./p-BRnBHsdq.js";import{c as r}from"./p-DgH-jcIo.js";import"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-beXEDfB9.js";const d=i=>{const{isReady:a}=i;return a?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"120px"}),e(t,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(t,{height:"18px",width:"110px"}),e(t,{height:"36px"}))))},n=class{constructor(e){i(this,e),this.isReady=!1}async componentWillLoad(){await a(),this.iframeOrigin=s.iframeOrigin,this.tabId=c(),r()}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((i=>{e.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return e&&i}async tokenize({clientId:e,paymentMethodMetadata:i,account:t}){return await this.accountNumberIframeElement.tokenize(e,i,t)}render(){return e("div",{key:"85e116539bb4721484d9877706ff93de1a68ec59"},e(d,{key:"b12a13d02b004e2957a55eb00fb38178dc283a92",isReady:this.isReady}),e("hidden-input",{key:"657ed7946158788e9291906ec0966eb3bd3c544c"}),e("div",{key:"321fddef9af616686d525af94dc4a65b5a4c18e6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"cee2dcc5bf8032ca95dc6b46e6a2bb47b371986b",class:"row mb-3"},e("iframe-input",{key:"50dfad1fc1eb41a87f2964e80d39036da1fc89ce",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),e("div",{key:"bd47ac6ff7c687ce9eb7e6ea2a66628392f73cdc",class:"row"},e("iframe-input",{key:"bbe98adda61bc72925e77714139b604d2959e156",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{n as bank_account_form}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{l as s,C as a,e as r}from"./p-CUI41_5y.js";import{J as n}from"./p-cXPhRFs-.js";import{c as o}from"./p-GP5gWjhc.js";import{T as c}from"./p--e0ff06z.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as d,a as p}from"./p-B5vVjDc_.js";import{m,S as l}from"./p-qcQTYcr3.js";import{S as u}from"./p-BqNNwq6C.js";import{T as f,l as b,a as v,b as g,c as j,d as k,e as y,f as _,g as w,h as T,i as C,j as S,k as D}from"./p-bn_huKYG.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as I}from"./p-pL4dNfsl.js";import{a3 as A,a4 as B}from"./p-DnrawQn3.js";import{k as N}from"./p-BRnBHsdq.js";import{o as x,g as E}from"./p-Dw63wyhO.js";import"./p-CXKOe1m5.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-CDf5H0TB.js";const G={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},q={nickname:(e,i)=>t("td",{part:B(i)},e.nickname),model_name:(e,i)=>t("td",{part:B(i)},e.model_name),id:(e,i)=>t("td",{part:B(i)},e.id),provider:(e,i)=>t("td",{part:B(i)},N(e.provider)),provider_serial_number:(e,i)=>t("td",{part:B(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:B(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:B(i)},e.sub_account_name),status:(e,i)=>t("td",{part:B(i)},t(I,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},H=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,G,q),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),x("set",(()=>{this.pagingParams={}})),x("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new l}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=E();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(u,{key:"3429d0dc6534dda4e9dc6417924040a53fd5a032"},t(b,{key:"00c6172e8bb77ed0824381785b17fdd556c942a1"},t(v,{key:"d0119d84743bb06d1e0562eee3124197d46f3b13"},t(g,{key:"9721788579474c7db31587f57ff1aa4159cae7c3"},t(j,{key:"e689b5546ad32ad75bcbedb0cf184b4a6adf1bf3"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"220a3f509f17333888640b0034da30d9375c4100"},t(y,{key:"d444e883ddd69ef5b05754476e6ea66c598a2c5f",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(_,{key:"a6ee22d5138114688ff2c8525e8b5ce8fb00a853",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(w,{key:"e151dba5915e622eb7a63ce7912fabe6924df7dd",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"91c0903d8c81817f82e7a8864a4188fac602af87"},t(S,{key:"322abe78babc127fccb9309c14c91b30a5d86700"},t(D,{key:"e9843c61dd4eb031f514ff35f3354998dfaec59e",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"d6b0bdaa7459afb8cd164c540843e7a4d8376f53",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{H as justifi_terminals_list}
1
+ import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{l as s,C as a,e as r}from"./p-CUI41_5y.js";import{J as n}from"./p-zi3ljCdQ.js";import{c as o}from"./p-DgH-jcIo.js";import{T as c}from"./p--e0ff06z.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as d,a as p}from"./p-B5vVjDc_.js";import{m,S as l}from"./p-qcQTYcr3.js";import{S as u}from"./p-BqNNwq6C.js";import{T as f,l as b,a as v,b as g,c as j,d as k,e as y,f as _,g as w,h as T,i as C,j as S,k as D}from"./p-bn_huKYG.js";import{T as O}from"./p-CZfYo5-1.js";import{B as I,a as P}from"./p-pL4dNfsl.js";import{a3 as A,a4 as B}from"./p-DnrawQn3.js";import{k as N}from"./p-BRnBHsdq.js";import{o as x,g as E}from"./p-Dw63wyhO.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-CDf5H0TB.js";const H={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},q={nickname:(e,i)=>t("td",{part:B(i)},e.nickname),model_name:(e,i)=>t("td",{part:B(i)},e.model_name),id:(e,i)=>t("td",{part:B(i)},e.id),provider:(e,i)=>t("td",{part:B(i)},N(e.provider)),provider_serial_number:(e,i)=>t("td",{part:B(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:B(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:B(i)},e.sub_account_name),status:(e,i)=>t("td",{part:B(i)},t(P,Object.assign({},{connected:{variant:I.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:I.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:I.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:I.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:I.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},z=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,H,q),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),x("set",(()=>{this.pagingParams={}})),x("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new l}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=E();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(u,{key:"3429d0dc6534dda4e9dc6417924040a53fd5a032"},t(b,{key:"00c6172e8bb77ed0824381785b17fdd556c942a1"},t(v,{key:"d0119d84743bb06d1e0562eee3124197d46f3b13"},t(g,{key:"9721788579474c7db31587f57ff1aa4159cae7c3"},t(j,{key:"e689b5546ad32ad75bcbedb0cf184b4a6adf1bf3"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"220a3f509f17333888640b0034da30d9375c4100"},t(y,{key:"d444e883ddd69ef5b05754476e6ea66c598a2c5f",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(_,{key:"a6ee22d5138114688ff2c8525e8b5ce8fb00a853",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(w,{key:"e151dba5915e622eb7a63ce7912fabe6924df7dd",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"91c0903d8c81817f82e7a8864a4188fac602af87"},t(S,{key:"322abe78babc127fccb9309c14c91b30a5d86700"},t(D,{key:"e9843c61dd4eb031f514ff35f3354998dfaec59e",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"d6b0bdaa7459afb8cd164c540843e7a4d8376f53",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{z as justifi_terminals_list}