@justifi/webcomponents 6.0.0-rc.15 → 6.0.0-rc.16
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.
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-CVOffMTi.js → check-pkg-version-DfzaKEDg.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +36 -369
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +7 -7
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +7 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-MU7zz6nI.js → package-CHNXn8wx.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +2 -1
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +37 -46
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +2 -2
- package/dist/esm/{check-pkg-version-BLDmtrcB.js → check-pkg-version-Cz8T6Ux8.js} +1 -1
- package/dist/esm/{checkout.store-DNDbZO3M.js → checkout.store-OD-OX5On.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number-masked_2.entry.js +2 -2
- package/dist/esm/form-control-number.entry.js +2 -2
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +2 -2
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/justifi-apple-pay.entry.js +37 -370
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +8 -8
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +2 -2
- package/dist/esm/justifi-checkout-summary_7.entry.js +8 -7
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +2 -2
- package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-order-terminals.entry.js +3 -3
- package/dist/esm/justifi-payment-details.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payment-transactions-list.entry.js +3 -3
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +3 -3
- package/dist/esm/justifi-payout-details.entry.js +2 -2
- package/dist/esm/justifi-payout-transactions-list.entry.js +3 -3
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +3 -3
- package/dist/esm/justifi-refund-payment.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +3 -3
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-BFz8vLec.js → package-BiTF1__F.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +8 -8
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/payments-list-core.entry.js +1 -1
- package/dist/esm/payout-details-core.entry.js +3 -3
- package/dist/esm/payouts-list-core.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/terminals-list-core.entry.js +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/justifi-apple-pay.js +34 -372
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +2 -2
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/modular-checkout.js +2 -1
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/summary.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/module/tokenize-payment-method.js +1 -1
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +0 -4
- package/dist/webcomponents/p-054193e4.entry.js +1 -0
- package/dist/webcomponents/p-07c3c25e.entry.js +1 -0
- package/dist/webcomponents/p-0913a57b.entry.js +1 -0
- package/dist/webcomponents/p-099e96ba.entry.js +1 -0
- package/dist/webcomponents/{p-50f6a37b.entry.js → p-0bba0dd0.entry.js} +1 -1
- package/dist/webcomponents/p-0e80830f.entry.js +1 -0
- package/dist/webcomponents/{p-a6748a1d.entry.js → p-13c21c47.entry.js} +1 -1
- package/dist/webcomponents/{p-5961ab23.entry.js → p-225da0b5.entry.js} +1 -1
- package/dist/webcomponents/{p-2d14f144.entry.js → p-225ed545.entry.js} +1 -1
- package/dist/webcomponents/{p-71f9c48a.entry.js → p-2550e845.entry.js} +1 -1
- package/dist/webcomponents/p-2ae3613e.entry.js +1 -0
- package/dist/webcomponents/{p-286221ee.entry.js → p-2b47ddd8.entry.js} +1 -1
- package/dist/webcomponents/{p-12136157.entry.js → p-3a34e4f9.entry.js} +1 -1
- package/dist/webcomponents/p-3caee9d2.entry.js +1 -0
- package/dist/webcomponents/p-3d94c845.entry.js +1 -0
- package/dist/webcomponents/{p-9c997d0b.entry.js → p-45e8185c.entry.js} +1 -1
- package/dist/webcomponents/{p-65c958b1.entry.js → p-4abf0877.entry.js} +1 -1
- package/dist/webcomponents/{p-33311d41.entry.js → p-559be51b.entry.js} +1 -1
- package/dist/webcomponents/p-5a3fc339.entry.js +1 -0
- package/dist/webcomponents/p-654d85ca.entry.js +1 -0
- package/dist/webcomponents/{p-1c157c8e.entry.js → p-69bf5e32.entry.js} +1 -1
- package/dist/webcomponents/{p-81c2edfb.entry.js → p-73dd0306.entry.js} +1 -1
- package/dist/webcomponents/p-7c463a59.entry.js +1 -0
- package/dist/webcomponents/p-7fcbccc7.entry.js +1 -0
- package/dist/webcomponents/p-87acb5ec.entry.js +1 -0
- package/dist/webcomponents/{p-9fc567d8.entry.js → p-8c95827f.entry.js} +1 -1
- package/dist/webcomponents/{p-8d743490.entry.js → p-93ed5490.entry.js} +1 -1
- package/dist/webcomponents/{p-949cecf8.entry.js → p-995c2cbf.entry.js} +1 -1
- package/dist/webcomponents/p-9c621697.entry.js +1 -0
- package/dist/webcomponents/{p-DjB0cvKF.js → p-BcAsEqa5.js} +1 -1
- package/dist/webcomponents/p-BiTF1__F.js +1 -0
- package/dist/webcomponents/{p-Cb3h46bV.js → p-CItulios.js} +1 -1
- package/dist/webcomponents/{p-0ff04742.entry.js → p-a5114207.entry.js} +1 -1
- package/dist/webcomponents/{p-c340830a.entry.js → p-a53710c4.entry.js} +1 -1
- package/dist/webcomponents/p-a65d751d.entry.js +1 -0
- package/dist/webcomponents/p-a7712cea.entry.js +1 -0
- package/dist/webcomponents/{p-98ef7e25.entry.js → p-b9ab3803.entry.js} +1 -1
- package/dist/webcomponents/{p-522e7b24.entry.js → p-bf2df971.entry.js} +1 -1
- package/dist/webcomponents/{p-cbd65ba9.entry.js → p-c3cfcd4b.entry.js} +1 -1
- package/dist/webcomponents/{p-f887ae7c.entry.js → p-ce272d8a.entry.js} +1 -1
- package/dist/webcomponents/p-cff8ae71.entry.js +1 -0
- package/dist/webcomponents/{p-ed901f9d.entry.js → p-d031ad31.entry.js} +1 -1
- package/dist/webcomponents/p-d5d271d3.entry.js +1 -0
- package/dist/webcomponents/{p-52cbd667.entry.js → p-dba55699.entry.js} +1 -1
- package/dist/webcomponents/p-e5282f6c.entry.js +1 -0
- package/dist/webcomponents/{p-2dec38c9.entry.js → p-e7921c1f.entry.js} +1 -1
- package/dist/webcomponents/{p-7f422774.entry.js → p-eabaeaf6.entry.js} +1 -1
- package/dist/webcomponents/{p-0e2010f1.entry.js → p-f6e3f1ca.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-1f7a796e.entry.js +0 -1
- package/dist/webcomponents/p-2abcad8b.entry.js +0 -1
- package/dist/webcomponents/p-2b39ab97.entry.js +0 -1
- package/dist/webcomponents/p-402caa84.entry.js +0 -1
- package/dist/webcomponents/p-42d4ea58.entry.js +0 -1
- package/dist/webcomponents/p-50ef7446.entry.js +0 -1
- package/dist/webcomponents/p-537aa971.entry.js +0 -1
- package/dist/webcomponents/p-7186f4a7.entry.js +0 -1
- package/dist/webcomponents/p-75fff382.entry.js +0 -1
- package/dist/webcomponents/p-77948b46.entry.js +0 -1
- package/dist/webcomponents/p-852febb1.entry.js +0 -1
- package/dist/webcomponents/p-8b2eff55.entry.js +0 -1
- package/dist/webcomponents/p-BFz8vLec.js +0 -1
- package/dist/webcomponents/p-aa6194ef.entry.js +0 -1
- package/dist/webcomponents/p-bc45aa92.entry.js +0 -1
- package/dist/webcomponents/p-e45bd6ec.entry.js +0 -1
- package/dist/webcomponents/p-e6d1ed81.entry.js +0 -1
- package/dist/webcomponents/p-e7fc542c.entry.js +0 -1
- package/dist/webcomponents/p-f849a34e.entry.js +0 -1
- package/dist/webcomponents/p-fa1884b4.entry.js +0 -1
|
@@ -51,7 +51,7 @@ const TerminalsListFilters = /*@__PURE__*/ proxyCustomElement(class TerminalsLis
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const filterMenuParams = Object.assign({}, filterParams);
|
|
54
|
-
return (h(StyledHost, { key: '
|
|
54
|
+
return (h(StyledHost, { key: '5e6f1e8abcc7cffc26c101160bff40ff5092ff90' }, h("table-filters-menu", { key: '6a57cb7deeb0c6927ee557402ef2618a3d3d8a29', params: filterMenuParams, clearParams: clearParams, part: terminalsListFilterMenu }, h("div", { key: 'aaa63156c9603aafbe1b9dd4d4f87670b4e0ab66', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'f76ca827834a98595a98d6bb6f982807506fe240', class: "p-2" }, h("form-control-text", { key: 'f9acf97e42e3e5f5ee216a10e116ab1aff2e6390', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.terminalId || filterParams.terminal_id, disabled: !!this.terminalId, part: terminalIdTerminalsListFilterParam })), h("div", { key: 'c4ac977f7433193e7a9c52be483c65cb5f96f214', class: "p-2" }, h("form-control-text", { key: '035fc59523056240eea5da7b63d75028278d3102', name: "terminal_order_id", label: "Terminal Order ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.terminalOrderId || filterParams.terminal_order_id, disabled: !!this.terminalOrderId, part: terminalOrderIdTerminalsListFilterParam })), h("div", { key: 'ab72f5ef8a0191b1726cd84c36a7cca28a78ecf0', class: "p-2" }, h("form-control-select", { key: '4a684c87e04e11f55c59d45a281f7c258fae4f0d', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.terminalStatus || filterParams.status, disabled: !!this.terminalStatus, part: terminalStatusTerminalsListFilterParam }))))));
|
|
55
55
|
}
|
|
56
56
|
}, [257, "justifi-terminals-list-filters", {
|
|
57
57
|
"terminalId": [1, "terminal-id"],
|
|
@@ -101,7 +101,7 @@ const TerminalsList = /*@__PURE__*/ proxyCustomElement(class TerminalsList exten
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
return (h(StyledHost, { key: '
|
|
104
|
+
return (h(StyledHost, { key: '705ee40711e90c28a6b1699f450befa7c5b5529b' }, h("terminals-list-core", { key: '3d54a1519e5299eb83d16bf2034711fc0dd0cc18', getTerminals: this.getTerminals, getSubAccounts: this.getSubAccounts, "onError-event": this.handleErrorEvent, columns: this.columns })));
|
|
105
105
|
}
|
|
106
106
|
static get watchers() { return {
|
|
107
107
|
"accountId": ["propChanged"],
|
|
@@ -106,6 +106,7 @@ const ModularCheckout = /*@__PURE__*/ proxyCustomElement(class ModularCheckout e
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
connectedCallback() {
|
|
109
|
+
console.log("connectedCallback", checkoutStore.checkoutLoaded);
|
|
109
110
|
this.observer = new MutationObserver(() => {
|
|
110
111
|
this.queryFormRefs();
|
|
111
112
|
this.setupApplePayListeners(); // set up again listeners when DOM changes
|
|
@@ -409,7 +410,7 @@ const ModularCheckout = /*@__PURE__*/ proxyCustomElement(class ModularCheckout e
|
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
412
|
render() {
|
|
412
|
-
return h(Host, { key: '
|
|
413
|
+
return h(Host, { key: '7ee5bc2bb0a8c1ed497440c7b1f90d1a2fb3c8bb' });
|
|
413
414
|
}
|
|
414
415
|
get hostEl() { return this; }
|
|
415
416
|
}, [256, "justifi-modular-checkout", {
|
package/dist/module/package.js
CHANGED
|
@@ -59,16 +59,16 @@ const PaymentDetailsCore = /*@__PURE__*/ proxyCustomElement(class PaymentDetails
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(StyledHost, { key: '
|
|
63
|
-
this.payment && (h("justifi-details", { key: '
|
|
64
|
-
h(DetailSectionTitle, { key: '
|
|
65
|
-
h("div", { key: '
|
|
62
|
+
return (h(StyledHost, { key: 'a94fc292445a0d8d3d77b0702fe5f19efc432634' }, this.loading && h(PaymentDetailsLoading, { key: 'd07e44b295fd5ce424a0a67d21e3c4ceec4634f4' }), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && !this.errorMessage &&
|
|
63
|
+
this.payment && (h("justifi-details", { key: 'c6cd0c034c948b4b96415b5bde6a3808dc1686e2', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: 'cff0b6a11617d68a42f20d6e3631097bafc34971', slot: "head-info", badge: (h("div", { class: "d-flex gap-1" }, MapPaymentStatusToBadge(this.payment.status), this.payment.expedited ? (h(Badge, { variant: BadgeVariant.WARNING, title: "Expedited", text: "Expedited" })) : null)), title: this.payment.formattedPaymentAmount(this.payment.amount) }, h(EntityHeadInfoItem, { key: 'a143d34fd230aa855286b1252b8e032f94fbd9a9', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payment.updated_at)} ${formatTime(this.payment.updated_at)}` }), h(EntityHeadInfoItem, { key: '96e5af4a6c37667a4be5bf27cdfec6a5ea3978fd', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payment.created_at)} ${formatTime(this.payment.created_at)}` }), h(EntityHeadInfoItem, { key: '76f2fd4b5569ad4f6463fb36984e3d4309235473', title: "ID", value: this.payment.id })), h("div", { key: '9d5b04c789c248b358ffecfebac6b62a1d8f0a27', slot: 'detail-sections' }, h(DetailSectionTitle, { key: '78f20430c4935b222c954fdc6eba89e715f668fc', sectionTitle: "Details" }), h("div", { key: '77d314983116b6dd2fc9989c1987d2371b5902b7', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '41c4eb6797577967d4ee6bc6a546faf62bca48c6', title: "Amount", value: this.payment.formattedPaymentAmount(this.payment.amount) }), h(DetailItem, { key: '51308e304e515290f1d4e96fda9ed0b7c9523055', title: "Fees", value: this.payment.formattedPaymentAmount(this.payment.fee_amount) }), h(DetailItem, { key: 'e6d24cb563963c8a540969437dd70674f04c02fc', title: "Refunded", value: this.payment.formattedPaymentAmount(this.payment.amount_refunded) }), h(DetailItem, { key: '1640fe0c210efb6193cc791624fd274299516f4e', title: "Net", value: this.payment.formattedPaymentAmount(this.payment.balance) }), h(DetailItem, { key: '9f2f34ef1aa4e2ec522ceda4bcdf398ede745c65', title: "Status", value: MapPaymentStatusToBadge(this.payment.status) }), h(DetailItem, { key: '9f1cf33ce4a80dc55efc2d88882e9f52933e4aaa', title: "Payment ID", value: this.payment.id }), h(DetailItem, { key: '2ec3eca801e5187912dc8107644270da03679a79', title: "Processing Fees", value: this.payment.formattedPaymentAmount(this.payment.fee_amount) }), h(DetailItem, { key: '14065f819a71be0bee5a7980f66d88852a96a152', title: "Statement Descriptor", value: this.payment.statement_descriptor }), h(DetailItem, { key: '7c5f72aaf86eaf7ef035cd359822988573a42862', title: "Description", value: this.payment.description }), h(DetailItem, { key: 'b1081bad614684d8205ca3377e16bd2377d6da88', title: "Expedited", value: this.payment.expedited ? 'Yes' : 'No' })), this.payment.payment_method.card && [
|
|
64
|
+
h(DetailSectionTitle, { key: 'a3e655f58e6482800dc53e55c5dd17d9e41ad08d', sectionTitle: "Payment Method" }),
|
|
65
|
+
h("div", { key: '225667fced83ad89e25cfc19c950b870a2558308', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '58c44b427b356a3576584c6a59301efcab0ed67f', title: "ID", value: this.payment.payment_method.card.id }), h(DetailItem, { key: 'a2b60b522a6fbed58ad06f0df88e551070faf752', title: "Payment Type", value: "Card" }), h(DetailItem, { key: '6e094728a62fcdd01d0fdadab0bce26894dcd4b6', title: "Last 4 Numbers", value: this.payment.payment_method.lastFourDigits }), h(DetailItem, { key: '3d703d83c3c7a115c6e64227a417997b63cf8748', title: "Brand", value: snakeCaseToHumanReadable(this.payment.payment_method.card.brand) }), h(DetailItem, { key: 'cf5dd3615ce5770f071aad7f1144862f00af760d', title: "Cardholder", value: this.payment.payment_method.payersName }))
|
|
66
66
|
], this.payment.payment_method.bank_account && [
|
|
67
|
-
h(DetailSectionTitle, { key: '
|
|
68
|
-
h("div", { key: '
|
|
67
|
+
h(DetailSectionTitle, { key: '8b167fe0967859af1555245634e4f6cdaae77ccf', sectionTitle: "Payment Method" }),
|
|
68
|
+
h("div", { key: '3b84740a7e8f792b4f3987a88bff3e85003ea549', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '1ef1e3781ea046145c58c721f1abfb2183e81db1', title: "ID", value: this.payment.payment_method.bank_account.id }), h(DetailItem, { key: '383f4756aac8901eef21786d9c9c6ff5ce097d7d', title: "Last 4 Numbers", value: this.payment.last_four_digits }), h(DetailItem, { key: '3cbb0f11eaf47b3b3923d3371f33df95ca022bd8', title: "Bank Name", value: this.payment.payment_method.bank_account.brand }), h(DetailItem, { key: 'b122e28ddb446b03b0a70b6cf3ac23fe84fd945d', title: "Account Owner", value: this.payment.payment_method.payersName }))
|
|
69
69
|
], this.payment.metadata && [
|
|
70
|
-
h(DetailSectionTitle, { key: '
|
|
71
|
-
h("div", { key: '
|
|
70
|
+
h(DetailSectionTitle, { key: '5b6d6c2ade6badd80f8b6c4a4c6427710ba9ac66', sectionTitle: 'Metadata' }),
|
|
71
|
+
h("div", { key: 'a3d59ae07f2601b0895624c0a640693ef076b71e', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: 'b61349ed2f6536b2131b05ed0e8e337733309117', metadata: this.payment.metadata }))
|
|
72
72
|
])))));
|
|
73
73
|
}
|
|
74
74
|
static get watchers() { return {
|
|
@@ -14,7 +14,7 @@ const PaymentMethodOption$1 = /*@__PURE__*/ proxyCustomElement(class PaymentMeth
|
|
|
14
14
|
this.__attachShadow();
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(StyledHost, { key: '
|
|
17
|
+
return (h(StyledHost, { key: '276e7685b6f5b7430fdac887fa5f270245011f6d', class: "payment-method" }, h("div", { key: '032431a1a0e3e97077c84f02288e3e0d1334e230', class: "radio-list-item p-3", part: radioListItem, onClick: this.clickHandler, hidden: this.radioButtonHidden }, h("form-control-radio", { key: '33a53344736a2a5d8546cbec24cc6c4aaebf7629', name: "paymentMethodType", value: this.paymentMethodOptionId, checked: this.isSelected, label: this.label }))));
|
|
18
18
|
}
|
|
19
19
|
}, [257, "payment-method-option", {
|
|
20
20
|
"paymentMethodOptionId": [1, "payment-method-option-id"],
|
|
@@ -118,7 +118,7 @@ const PaymentsListCore = /*@__PURE__*/ proxyCustomElement(class PaymentsListCore
|
|
|
118
118
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (h(TableWrapper, { key: '
|
|
121
|
+
return (h(TableWrapper, { key: '0f667b8996650351ee636d548437217696ba8845' }, h(TableComponent, { key: 'ea49b5f4a53b03525a960954df711f39ee1ec41d' }, h(TableHead, { key: '7e06f612e6aa80267abba505c5b44506a907ae1a' }, h(TableHeadRow, { key: '561827555ab274f70fe4e2e08442689b82f8b2c9' }, this.paymentsTable.columnData.map((column) => column))), h(TableBody, { key: 'a1f724d553ca43fbe20aeeb1bcbedf87e7d5b917' }, h(TableLoadingState, { key: '27c9f9e459857cf208f9bcb1a5a81f02fcac0850', columnSpan: this.paymentsTable.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: '546e87c7198e6b7efaf1dde4dba0e2bc9dd9e4a7', isEmpty: this.showEmptyState, columnSpan: this.paymentsTable.columnData.length }), h(TableErrorState, { key: 'cbb35d379ac52943549b58128af24f682b53254f', columnSpan: this.paymentsTable.columnData.length, errorMessage: this.errorMessage }), this.showRowData && this.paymentsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '4b8de6a6841bd6f087f8819febd3136742e535eb' }, h(TableFootRow, { key: 'cb2f446cd73c72e551378d73d5fb7089bcf9b8a0' }, h(TableFootCell, { key: '01098f6891794529ddfc1d7b1303706313694316', colSpan: this.paymentsTable.columnData.length }, h("pagination-menu", { key: 'a907422b1d6246570d14862478154465c4ad59c9', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) }))))))));
|
|
122
122
|
}
|
|
123
123
|
static get watchers() { return {
|
|
124
124
|
"pagingParams": ["updateOnPropChange"],
|
|
@@ -74,9 +74,9 @@ const PayoutDetailsCore = /*@__PURE__*/ proxyCustomElement(class PayoutDetailsCo
|
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
76
|
var _a;
|
|
77
|
-
return (h(StyledHost, { key: '
|
|
78
|
-
h(DetailSectionTitle, { key: '
|
|
79
|
-
h("div", { key: '
|
|
77
|
+
return (h(StyledHost, { key: '142cd93a5538d48542c001dfaf8ecf0a8f0649e1' }, this.loading && h(PayoutDetailsLoading, { key: 'e4a301d09a48776c7cbc3c9b606e42558748301b' }), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && this.payout && (h("justifi-details", { key: '65c7a12cf23056d1940d08b0c3ff96368c601720', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: 'ef299affbf2facfb03f4af8f7d8933fb7cc0dac5', slot: "head-info", badge: (h("div", { class: "d-flex gap-1" }, MapPayoutStatusToBadge((_a = this.payout) === null || _a === void 0 ? void 0 : _a.status), this.payout.settlement_priority === 'expedited' ? (h(Badge, { variant: BadgeVariant.WARNING, title: "Expedited", text: "Expedited" })) : (h(Badge, { variant: BadgeVariant.SECONDARY, title: "Standard", text: "Standard" })))), title: this.payout.formattedPaymentAmount(this.payout.amount) }, h(EntityHeadInfoItem, { key: '585d7d174f20f6b49e3fce34e0e236a89b90d083', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}` }), h(EntityHeadInfoItem, { key: '6066bfdaef670375ae97453d84422228d2a5eead', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}` }), h(EntityHeadInfoItem, { key: '7e526cbd6e31ca6139c8f31e7946749a59905fea', title: "ID", value: this.payout.id }), h("div", { key: 'eeeab1a03a0097c3c1be036d6f3f2a72dfb376dc', class: "m-4" }, h(Button, { key: 'ac90d236d37a925c157b99e1c348128bb0835060', variant: "secondary", class: "btn btn-outline-secondary d-flex align-items-center", onClick: this.downloadCSV }, "Export CSV"))), h("div", { key: '3d01f52695bb407cba4a2166ebbd90d09580cbe9', slot: 'detail-sections' }, h(DetailSectionTitle, { key: 'ec7727a7c9a93bd51ae670f20c1453538676a95c', sectionTitle: "Details" }), h("div", { key: '469fad5f27810729811fba91c4a4275d27cbf18e', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '5f32a3e8631fdd2d047f5ccd933e200322d50de2', title: "Date paid", value: formatDate(this.payout.deposits_at) }), h(DetailItem, { key: '807284a840687b7257176366ff06f5150ba4a0ad', title: "Statement Description", value: this.payout.description }), h(DetailItem, { key: '908464c42582f596e114c18f873ec3b3eac332ed', title: "Payout Method", value: this.payout.delivery_method }), h(DetailItem, { key: '736b86cfb1cbfaad58e042e6a936db4237e5fbb7', title: "Amount", value: this.payout.formattedPaymentAmount(this.payout.amount) }), h(DetailItem, { key: '919453e082a6f8534df07f3fd2cd0ffc6bf81539', title: "Fee", value: this.payout.formattedPaymentAmount(this.payout.fees_total) })), h(DetailSectionTitle, { key: '7b033d532fa94ddb0a6e53861d126a50601f8bdf', sectionTitle: "Account" }), h("div", { key: '373c6745a0ab57d21fa88e9a470e63bd8c0ad999', class: "d-table gap-2 w-100" }, h(DetailItem, { key: 'ea140c2b46fd503a85c97ec9cd5859fa8c0fc8e3', title: "ID", value: this.payout.account_id }), h(DetailItem, { key: 'd94a8db9bdc0f5ab359e3cb7b9c0cfb1002db550', title: "Account Type", value: this.payout.bank_account.account_type }), h(DetailItem, { key: '5317a5bef89080a7e70732025ab030674fcb79c3', title: "Institution", value: this.payout.bank_account.account_type }), h(DetailItem, { key: 'f46e83995276c83361933381bc620336ef44f166', title: "Routing Number", value: this.payout.bank_account.routing_number }), h(DetailItem, { key: '933aee12e24e152a5a8628f303b7c7e9709baf64', title: "Account Number", value: this.payout.bank_account.account_number_last4 })), this.payout.metadata && [
|
|
78
|
+
h(DetailSectionTitle, { key: '1e5233f88f9254c0a5525032470273e2f58ed59c', sectionTitle: 'Metadata' }),
|
|
79
|
+
h("div", { key: '63678c1f4eb207a4aced6f132e95c7cd646da9a3', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '7e5095e9be051524e8ab17ffe380b1315c5f7c98', metadata: this.payout.metadata }))
|
|
80
80
|
])))));
|
|
81
81
|
}
|
|
82
82
|
static get watchers() { return {
|
|
@@ -173,7 +173,7 @@ const PayoutsListCore = /*@__PURE__*/ proxyCustomElement(class PayoutsListCore e
|
|
|
173
173
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
174
174
|
}
|
|
175
175
|
render() {
|
|
176
|
-
return (h(TableWrapper, { key: '
|
|
176
|
+
return (h(TableWrapper, { key: '503793db2fd72d3854bfa1eba2051bc822000a1a' }, h(TableComponent, { key: '1db195f7f1206bef7236ccd814c464c61b12f3d3' }, h(TableHead, { key: 'a61137a34fddf3f854102ec7a2964f127d7555f9' }, h(TableHeadRow, { key: '3d3c330e5758ccb4aa14bb7b5ae993d8d2c1718e' }, this.payoutsTable.columnData.map((column) => column))), h(TableBody, { key: 'a483803ea8dd9db844f36f9f8c7a89e81d7322b4' }, h(TableLoadingState, { key: '10bee5e971e10b0313b9b411c292f8f65bf1cf82', columnSpan: this.payoutsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'c8ec9f17a98baa81b4b1830eb8d0bfad45cc8ee1', isEmpty: this.showEmptyState, columnSpan: this.payoutsTable.columnKeys.length }), h(TableErrorState, { key: '94cd786053173ce22f797b0da263488cab9b5139', columnSpan: this.payoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.payoutsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '533bb1571ae70a03f60d13d5742296f425512919' }, h(TableFootRow, { key: '15924c92e5c9f2202066ebfa02aebc2c52fccee3' }, h(TableFootCell, { key: '48bd284c90d4ac044b5fd5f323c90fab5e9fdb5d', colSpan: this.payoutsTable.columnData.length }, h("pagination-menu", { key: 'cfc4bc6b077267ced59bf8b2519ee0354e676560', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) }))))))));
|
|
177
177
|
}
|
|
178
178
|
static get watchers() { return {
|
|
179
179
|
"pagingParams": ["updateOnPropChange"],
|
package/dist/module/summary.js
CHANGED
|
@@ -14,7 +14,7 @@ const Summary = /*@__PURE__*/ proxyCustomElement(class Summary extends HTMLEleme
|
|
|
14
14
|
this.__attachShadow();
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(StyledHost, { key: '
|
|
17
|
+
return (h(StyledHost, { key: '3161e6f6a196c79d684574cafbc90bcf741b2150' }, h("section", { key: '594b4485ed4fd9d7c1ee7f4556f071139f92ef0c' }, h("div", { key: '5c2d14677dda6fc7ddcb074d4887b839385dca3a' }, h("div", { key: 'fb850cd7e9c11741349710696dd4e6241c98e805', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '959014d7fa2a9c97bae0c986313a604930c1e0f3' }, h("span", { key: '14ab0932a083568419b1c36c95f9072c73962b11', part: text }, "Total"), "\u00A0", h("span", { key: '08a9e00332253070ae984b77eb2a9bab88eb3472', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
|
|
18
18
|
}
|
|
19
19
|
}, [257, "justifi-checkout-summary"]);
|
|
20
20
|
function defineCustomElement() {
|
|
@@ -166,7 +166,7 @@ const TerminalOrdersListCore = /*@__PURE__*/ proxyCustomElement(class TerminalOr
|
|
|
166
166
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
167
167
|
}
|
|
168
168
|
render() {
|
|
169
|
-
return (h(TableWrapper, { key: '
|
|
169
|
+
return (h(TableWrapper, { key: 'a8131df17851ab1468e025932371fa4b97ccc144' }, h(TableComponent, { key: '0fc81f64fb8a8f138f25c70522d046921edbd094' }, h(TableHead, { key: '7cc8be0184008cf08128eb1f241ab670538ecc65' }, h(TableHeadRow, { key: '5a7aa37a2b8f02469ca6c703e098da9431c0b45f' }, this.terminalOrdersTable.columnData.map((column) => column))), h(TableBody, { key: 'ff32aad8d5c4f319550d47ae1e0f77b617aa3d70' }, h(TableLoadingState, { key: 'dcc25430c77867a2c9639eba359c0d54cbacb73a', columnSpan: this.terminalOrdersTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: '474ecda7420d595f49777f31910a380b48a8a1bc', isEmpty: this.showEmptyState, columnSpan: this.terminalOrdersTable.columnKeys.length }), h(TableErrorState, { key: 'd91e28581823ca91778159914157a003b011caaf', columnSpan: this.terminalOrdersTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalOrdersTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '6dea4a93ab757d35916b9351e4e5fa7f76b4afd9' }, h(TableFootRow, { key: '5098c2d994bb0ba397bc94d7a0e9419b06e582a5' }, h(TableFootCell, { key: '5a8f90708691987f672cde0c102323225568d989', colSpan: this.terminalOrdersTable.columnData.length }, h("pagination-menu", { key: '509e53f4c070fc9a8b479dc673c526417aceb5ef', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) }))))))));
|
|
170
170
|
}
|
|
171
171
|
static get watchers() { return {
|
|
172
172
|
"pagingParams": ["updateOnPropChange"],
|
|
@@ -24,7 +24,7 @@ const TerminalQuantitySelector = /*@__PURE__*/ proxyCustomElement(class Terminal
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: '852621f3c36375e9c300201e4405c95501488c6d', class: "rounded shadow-sm card p-2", part: card }, h("div", { key: '1695cd25eaf56619ef4cc39d81c11ca9b6a5cd45', class: "d-flex gap-3" }, h("div", { key: '9930b0bd8881bc70bc5bdb2b31428980ec83a49b', class: "d-flex align-items-center" }, h("img", { key: 'ac71b5e64fd9081e8dc9c962cac1e747f2234fc4', src: this.imageUrl, alt: this.modelName, height: 75, width: 75, part: image })), h("div", { key: '0d575087df793cdeaf7bc04744d60647ea7d563f', class: "d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center" }, h("div", { key: '35f18a705ee606a825c8ad7a6ebe449e6941e4e5', class: "row" }, h("div", { key: 'bf4f916904479fc7abf3167cacd9a655709a5048', class: "col-6 d-flex gap-2" }, this.modelName, h("form-control-tooltip", { key: '1a96f19f6f9732c5f8d9dbb2405de2d3f24b142d', helpText: this.description })), h("div", { key: 'af1ca75c5134c832d8f64b63833b7494c8c11ca5', class: "col-6 d-flex justify-content-end align-items-center" }, h("button", { key: '0d400a00a808c508ba870dc8e37d597581dd86ae', class: "p-0 minus btn", onClick: this.removeUnit, part: buttonLink }, "-"), h("div", { key: '4348aef4cf19c02c574242f82061087e74e82617', class: "w-25 text-center" }, this.selectedQuantity), h("button", { key: '75791dfdb7861bb7c1e4a2dc5376bceb12a19009', class: "p-0 plus btn", onClick: this.addUnit, part: buttonLink }, "+")))))));
|
|
28
28
|
}
|
|
29
29
|
}, [256, "terminal-quantity-selector", {
|
|
30
30
|
"modelName": [1, "model-name"],
|
|
@@ -180,7 +180,7 @@ const TerminalsListCore = /*@__PURE__*/ proxyCustomElement(class TerminalsListCo
|
|
|
180
180
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
181
181
|
}
|
|
182
182
|
render() {
|
|
183
|
-
return (h(TableWrapper, { key: '
|
|
183
|
+
return (h(TableWrapper, { key: '27022f23dcede378c6a6d16bffb040aa6448f4be' }, h(TableComponent, { key: '5d369cf93698adb50b843f65c747672abeb74cb4' }, h(TableHead, { key: '21173a74ccb82d7c3278157dae4ef3d471dbee5f' }, h(TableHeadRow, { key: '43e425567500ff324fd6ed68647a9504df812bf6' }, this.terminalsTable.columnData.map((column) => column))), h(TableBody, { key: '1151ee93144161308f8b27b0172acb32d2096d25' }, h(TableLoadingState, { key: '353fb24dfbd941e8bba6f62799e0feea42d05c53', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'daa19b965b5519e766ba8bbb63cfc4327128bf22', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), h(TableErrorState, { key: 'ee44061fa93cd20a59040a7b3faaeac10a925810', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '12cb09495ba8d416fd3593ccae4f205735226ecf' }, h(TableFootRow, { key: 'da2e2695e6101193db9f67a0a76ce1ce8abdc646' }, h(TableFootCell, { key: 'bffd81b4e90e668caa47813f96ab1a7764fa0f1b', colSpan: this.terminalsTable.columnData.length }, h("pagination-menu", { key: '61c268da3402e0675f54515617a6bd2d58834e17', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) }))))))));
|
|
184
184
|
}
|
|
185
185
|
static get watchers() { return {
|
|
186
186
|
"pagingParams": ["updateOnPropChange"],
|
|
@@ -274,7 +274,7 @@ const TokenizePaymentMethod = /*@__PURE__*/ proxyCustomElement(class TokenizePay
|
|
|
274
274
|
return paymentMethodId === PaymentMethodTypes.card ? (h("justifi-card-form", { ref: (el) => (this.paymentMethodFormRef = el) })) : (h("justifi-bank-account-form", { ref: (el) => (this.paymentMethodFormRef = el) }));
|
|
275
275
|
}
|
|
276
276
|
render() {
|
|
277
|
-
return (h(StyledHost, { key: '
|
|
277
|
+
return (h(StyledHost, { key: '27acb4552c8e2431792108448608c039baa705c6' }, h("form", { key: '914d43a641bbc484da9399d9d7b938215666862b' }, h("fieldset", { key: '4df90b4279eaa9c02268074c1d4c630c75e54f26' }, h("div", { key: 'b4b8895c7e5b9a3e615d357e2a6fdba5c245decb', class: "row gy-3" }, h("div", { key: '10ecdd6afffef324179fabcab340e4290c22f594', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: '3327294952c67643c9c77178f801bbbba09fd511', class: "col-12" }, h("justifi-button", { key: '6de96d2c0065f676e696433f8ef6438527830437', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
|
|
278
278
|
}
|
|
279
279
|
get host() { return this; }
|
|
280
280
|
static get watchers() { return {
|
|
@@ -27,10 +27,6 @@ export declare class ApplePay {
|
|
|
27
27
|
applePayError: EventEmitter<{
|
|
28
28
|
error: string;
|
|
29
29
|
}>;
|
|
30
|
-
private unsubscribeCheckoutLoaded?;
|
|
31
|
-
componentWillLoad(): void;
|
|
32
|
-
disconnectedCallback(): void;
|
|
33
|
-
watchPropsChange(): void;
|
|
34
30
|
private initializeApplePay;
|
|
35
31
|
private handleApplePayClick;
|
|
36
32
|
isSupported(): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as a}from"./p-Bn7inNWG.js";import{T as e,a as i,b as r,c as h,d as o,e as c,f as n,g as p,h as m,i as d,j as f,k as b,l as j}from"./p-CB0mCq1M.js";import{T as u}from"./p-CZfYo5-1.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-Da3idOSV.js";import{p as l}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{t as g,a as y}from"./p-DRXvcLy9.js";import{o as k,g as C}from"./p-BY1mRAvj.js";import"./p-RvUQ__Pq.js";import"./p-BbZwa5UI.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DDUmOl3v.js";const O=class{constructor(a){t(this,a),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminalOrders=[],this.loading=!0,this.paging=l,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:u.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:u.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const a=this.terminalOrders.find((t=>t.id===s));this.clickEvent.emit({name:u.row,data:a})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalOrdersTable=new e(this.terminalOrders,this.columns,g,y),this.getTerminalOrders&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:s})=>{this.terminalOrders=t,this.paging=s,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:s,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:a})},final:()=>{this.loading=!1}})}get terminalOrderParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return a(j,{key:"a8131df17851ab1468e025932371fa4b97ccc144"},a(i,{key:"0fc81f64fb8a8f138f25c70522d046921edbd094"},a(r,{key:"7cc8be0184008cf08128eb1f241ab670538ecc65"},a(h,{key:"5a7aa37a2b8f02469ca6c703e098da9431c0b45f"},this.terminalOrdersTable.columnData.map((t=>t)))),a(o,{key:"ff32aad8d5c4f319550d47ae1e0f77b617aa3d70"},a(c,{key:"dcc25430c77867a2c9639eba359c0d54cbacb73a",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),a(n,{key:"474ecda7420d595f49777f31910a380b48a8a1bc",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),a(p,{key:"d91e28581823ca91778159914157a003b011caaf",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((t,s)=>a(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&a(d,{key:"6dea4a93ab757d35916b9351e4e5fa7f76b4afd9"},a(f,{key:"5098c2d994bb0ba397bc94d7a0e9419b06e582a5"},a(b,{key:"5a8f90708691987f672cde0c102323225568d989",colSpan:this.terminalOrdersTable.columnData.length},a("pagination-menu",{key:"509e53f4c070fc9a8b479dc673c526417aceb5ef",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminalOrders:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{O as terminal_orders_list_core}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as r}from"./p-Bn7inNWG.js";import{A as o}from"./p-7s1gsXM5.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{E as n}from"./p-DNo0OPOP.js";import{c as h,J as c}from"./p-BcAsEqa5.js";import"./p-DhGNCW2f.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-BiTF1__F.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const h=await r.fetchGrossVolumeChartData(s,t);h.error?e({error:p(h.error),code:a(null===(n=h.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(h.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:p(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,c as i,H as s,g as a}from"./p-Bn7inNWG.js";import{z as n,r as o}from"./p-RvUQ__Pq.js";import{f as r}from"./p-BHf9IqGw.js";import{c as h,o as c,g as l,a as d}from"./p-CItulios.js";import{S as u}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{H as y}from"./p-DIDloHpm.js";import{H as m,b as p,h as M,i as v}from"./p-B71k50jz.js";import{H as g}from"./p-BSt6p1oq.js";import{J as f,c as k}from"./p-BcAsEqa5.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import{C as j,a as b,b as T}from"./p-Cjcsf8ku.js";import{P as N,I as w}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as D,a as I}from"./p-D2muobcE.js";import{C}from"./p-DK2sRMlx.js";import{A}from"./p-7s1gsXM5.js";import{a as E,b as x,P as z}from"./p-CbL73B6U.js";import{C as P}from"./p-ZpPDShvP.js";import"./p-CpaS1Lex.js";import"./p-BiTF1__F.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const L=class{constructor(e){t(this,e)}render(){return e(u,{key:"3161e6f6a196c79d684574cafbc90bcf741b2150"},e("section",{key:"594b4485ed4fd9d7c1ee7f4556f071139f92ef0c"},e("div",{key:"5c2d14677dda6fc7ddcb074d4887b839385dca3a"},e("div",{key:"fb850cd7e9c11741349710696dd4e6241c98e805",part:n},null==h?void 0:h.paymentDescription),e("div",{key:"959014d7fa2a9c97bae0c986313a604930c1e0f3"},e("span",{key:"14ab0932a083568419b1c36c95f9072c73962b11",part:n},"Total")," ",e("span",{key:"08a9e00332253070ae984b77eb2a9bab88eb3472",part:n},r(+(null==h?void 0:h.totalAmount)))))))}},O=class{constructor(e){t(this,e),this.levels={h1:y,h2:m,h3:g},this.level="h1"}render(){return e(u,{key:"eb3651b698897193d34a6c6456cd57dd0bd0bc43"},e(this.levels[this.level],{key:"39caee687f93d3d4d90e62d9fbcae318eaa8022e",text:this.text,class:this.class}))}},S=A();class _{async getLinkToken(t,e,i,s){return S.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,a,n){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),a&&(r.payment_method_group_id=a),S.post({endpoint:o,body:r,authToken:t,signal:n})}}const R=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new _,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:a}=t.detail;e&&i?(h.paymentToken=s,h.selectedPaymentMethod={type:N.applePay},this.submitCheckout()):(console.error("Apple Pay completed but failed:",a),this.errorEvent.emit({message:(null==a?void 0:a.message)||"Apple Pay payment failed",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR}))},this.handleApplePayError=t=>{const{error:e}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})},this.handleApplePayCancelled=()=>{h.paymentToken=void 0,h.selectedPaymentMethod=void 0}}connectedCallback(){console.log("connectedCallback",h.checkoutLoaded),this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),h.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new C};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:a})=>{var n;try{const o=await i.fetchCheckout(t,e);if(o.error)return a({error:I(o.error),code:D(null===(n=o.error)||void 0===n?void 0:n.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=D(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:a,onError:n})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return n({error:I(r.error),code:D(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});a({checkout:r.data})}catch(t){const e=D(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),c((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new f(this),k(),h.authToken=this.authToken,this.fetchCheckout(),p("set",(t=>{const e=v[t];void 0!==e&&M(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==w.completed?t.status!==w.expired||this.errorEvent.emit({message:T.CHECKOUT_EXPIRED,errorCode:b.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:T.CHECKOUT_ALREADY_COMPLETED,errorCode:b.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:b.FETCH_ERROR,severity:j.ERROR})}}):this.errorEvent.emit({message:T.NOT_AUTHENTICATED,errorCode:b.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,a,n;h.accountId=t.account_id,h.checkoutLoaded=!0,h.paymentMethods=t.payment_methods,h.paymentMethodGroupId=t.payment_method_group_id,h.paymentDescription=t.payment_description,h.totalAmount=t.total_amount,h.paymentAmount=t.payment_amount,h.bnplEnabled=t.payment_settings.bnpl_payments,h.insuranceEnabled=t.payment_settings.insurance_payments,h.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,h.bnplProviderClientId=null===(i=null==t?void 0:t.bnpl)||void 0===i?void 0:i.provider_client_id,h.bnplProviderMode=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_mode,h.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,h.bnplProviderCheckoutUrl=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:l(),selectedPaymentMethod:h.selectedPaymentMethod,savedPaymentMethods:h.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const a=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},n=Object.assign(Object.assign({},t),a),o=Object.assign({accountId:h.accountId,payment_method_group_id:void 0},n);h.savePaymentMethod&&(o.payment_method_group_id=h.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:h.accountId}));return r.error?r:(h.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){h.selectedPaymentMethod=t,h.paymentToken=t.id||void 0}async validate(){const t=[];if(h.insuranceEnabled&&this.insuranceFormRef&&t.push(this.insuranceFormRef.validate()),(h.selectedPaymentMethod.type===N.card&&void 0===h.selectedPaymentMethod.id||h.selectedPaymentMethod.type===N.bankAccount&&void 0===h.selectedPaymentMethod.id)&&(this.paymentMethodFormRef&&t.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&t.push(this.billingFormRef.validate())),0===t.length)return!0;try{return!!(await Promise.all(t)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:b.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e;const i=await this.validate(),s=h.selectedPaymentMethod.type===N.plaid;if(h.selectedPaymentMethod.type===N.card&&void 0===h.selectedPaymentMethod.id||h.selectedPaymentMethod.type===N.bankAccount&&void 0===h.selectedPaymentMethod.id){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}if(s&&!h.paymentToken){const t=h.plaidPublicToken,i=h.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});try{const s=await this.plaidService.tokenizeBankAccount(h.authToken,h.accountId,t,i||void 0,h.savePaymentMethod?h.paymentMethodGroupId:void 0);if(null==s?void 0:s.error)return void this.errorEvent.emit({message:"string"==typeof s.error?s.error:s.error.message||"Failed to tokenize bank account",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});const a=null==s?void 0:s.data,n=(null===(e=null==a?void 0:a.bank_account)||void 0===e?void 0:e.token)||(null==a?void 0:a.token)||(null==a?void 0:a.id);h.paymentToken=n}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR})}}if(!i)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:b.VALIDATION_ERROR,severity:j.ERROR});if(!h.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:b.TOKENIZE_ERROR,severity:j.ERROR});let a;a={payment_mode:(()=>{switch(h.selectedPaymentMethod.type){case N.card:case N.bankAccount:case N.plaid:return E.ECOM;case N.sezzle:return E.BNPL;case N.applePay:return E.APPLE_PAY;default:return}})(),payment_token:h.paymentToken},this.completeCheckout({payment:a,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:b.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return e(s,{key:"7ee5bc2bb0a8c1ed497440c7b1f90d1a2fb3c8bb"})}get hostEl(){return a(this)}};var U;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(U||(U={}));const B={[U.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[U.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[U.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[U.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[U.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[U.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[U.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[U.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[U.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[U.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[U.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[U.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[U.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},Q={[U.PLAID_SDK_LOAD_FAILED]:j.ERROR,[U.PLAID_LINK_INIT_FAILED]:j.ERROR,[U.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[U.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[U.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[U.PLAID_TOKEN_EXPIRED]:j.WARNING,[U.PLAID_NETWORK_ERROR]:j.WARNING,[U.PLAID_USER_CANCELLED]:j.INFO,[U.PLAID_TIMEOUT]:j.WARNING,[U.PLAID_INVALID_CREDENTIALS]:j.ERROR,[U.PLAID_ACCOUNT_LOCKED]:j.ERROR,[U.PLAID_MAINTENANCE]:j.WARNING,[U.PLAID_RATE_LIMITED]:j.WARNING},Y=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new _,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{h.authToken&&h.accountId&&h.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:U.PLAID_SDK_LOAD_FAILED,message:B[U.PLAID_SDK_LOAD_FAILED],severity:Q[U.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:U.PLAID_LINK_TOKEN_FAILED,message:B[U.PLAID_LINK_TOKEN_FAILED],severity:Q[U.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:U.PLAID_LINK_INIT_FAILED,message:B[U.PLAID_LINK_INIT_FAILED],severity:Q[U.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,a;try{if(!h.authToken||!h.accountId)return void this.handleError({code:U.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(h.authToken,h.accountId,h.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(h.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=U.PLAID_LINK_TOKEN_FAILED,o=B[n],r=!0;"AbortError"===t.name?(n=U.PLAID_TIMEOUT,o=B[n],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(n=U.PLAID_NETWORK_ERROR,o=B[n],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(a=t.message)||void 0===a?void 0:a.includes("unauthorized")))&&(n=U.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:n,message:o,severity:Q[n],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return U.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return U.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return U.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return U.PLAID_RATE_LIMITED;case"maintenance":return U.PLAID_MAINTENANCE;case"not_authenticated":return U.PLAID_INVALID_CREDENTIALS;default:return U.PLAID_LINK_TOKEN_FAILED}return U.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,h.selectedPaymentMethod={type:N.plaid}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),h.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=U.PLAID_AUTHENTICATION_FAILED,i=B[e],s=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=U.PLAID_INVALID_CREDENTIALS,i=B[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=U.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=U.PLAID_ACCOUNT_LOCKED,i=B[e],s=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=U.PLAID_MAINTENANCE,i=B[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=U.PLAID_RATE_LIMITED,i=B[e],s=!0;break;case"INVALID_REQUEST":e=U.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=U.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const n=t.error_message.toLowerCase();n.includes("not supported")||n.includes("unsupported")?(e=U.PLAID_BANK_NOT_SUPPORTED,i=B[e],s=!1,a="Try a different payment method"):(n.includes("expired")||n.includes("timeout"))&&(e=U.PLAID_TOKEN_EXPIRED,i=B[e],s=!0)}this.handleError({code:e,message:i,severity:Q[e],originalError:t,retryable:s,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{const t=h.selectedPaymentMethod.type===N.plaid;this.isSelected!==t&&(this.isSelected=t)}}onSelectionChange(t){t&&h.selectedPaymentMethod.type!==N.plaid&&(h.selectedPaymentMethod={type:N.plaid}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:U.PLAID_SDK_LOAD_FAILED,message:B[U.PLAID_SDK_LOAD_FAILED],severity:Q[U.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){this.isSelected=h.selectedPaymentMethod.type===N.plaid}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return h.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,h.selectedPaymentMethod={type:N.plaid},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(h.selectedPaymentMethod={type:N.plaid})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=d("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==h.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=e("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return e(u,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{title:"Pay with Plaid"},e("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},F=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),h.selectedPaymentMethod=t,h.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t.type===x.CARD&&h.disableCreditCard||t.type===x.BANK_ACCOUNT&&h.disableBankAccount)}componentWillLoad(){h.paymentMethods.length||console.warn("No saved payment methods available."),h.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return h.disablePaymentMethodGroup?null:e(u,null,e("div",{class:"saved-payment-methods"},h.paymentMethods.length?h.paymentMethods.filter(this.isAllowedPaymentMethod).map((t=>e("div",{class:"radio-list-item p-3",part:o,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:h.paymentToken===(null==t?void 0:t.id),label:`${P[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},H=e("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),V=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=z.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(h.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:h.bnplProviderClientId,apiMode:h.bnplProviderMode,apiVersion:h.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:h.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){h.selectedPaymentMethod={type:N.sezzle},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return!h.bnplEnabled||h.disableBnpl?(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null):e(u,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",null,e("div",null,"Buy now, pay later with ",H),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},r(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents)))))}},W={[N.bankAccount]:"New bank account",[N.card]:"New credit or debit card"},Z="Payment form not ready",q="Validation error",G=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){k(),this.analytics=new f(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,h.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:b.TOKENIZE_ERROR,message:q}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(b.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:b.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:Z}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||h.authToken,account:this.accountId||h.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||h.authToken||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||h.accountId||this.emitError({errorCode:b.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=N.bankAccount,h.selectedPaymentMethod={type:N.bankAccount}):(this.selectedPaymentMethod=N.card,h.selectedPaymentMethod={type:N.card}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(N.card),this.disableBankAccount||t.push(N.bankAccount),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:j.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",Z);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||q;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||h.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!h.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const i=this.selectedPaymentMethod===t&&void 0===h.selectedPaymentMethod.id;return e("div",{class:"payment-method"},e("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:i,label:W[t],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return e("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),e("div",{class:"mt-4"},e("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),e("div",{class:"mt-4"},e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return e(t===N.card?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return e(u,{key:"27acb4552c8e2431792108448608c039baa705c6"},e("form",{key:"914d43a641bbc484da9399d9d7b938215666862b"},e("fieldset",{key:"4df90b4279eaa9c02268074c1d4c630c75e54f26"},e("div",{key:"b4b8895c7e5b9a3e615d357e2a6fdba5c245decb",class:"row gy-3"},e("div",{key:"10ecdd6afffef324179fabcab340e4290c22f594",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),e("div",{key:"3327294952c67643c9c77178f801bbbba09fd511",class:"col-12"},e("justifi-button",{key:"6de96d2c0065f676e696433f8ef6438527830437",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return a(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{L as justifi_checkout_summary,O as justifi_header,R as justifi_modular_checkout,Y as justifi_plaid_payment_method,F as justifi_saved_payment_methods,V as justifi_sezzle_payment_method,G as justifi_tokenize_payment_method}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as r,h as t}from"./p-Bn7inNWG.js";import{S as i}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-BcAsEqa5.js";import{d as a}from"./p-DRXvcLy9.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{i as c}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as m,a as d}from"./p-D2muobcE.js";import{A as h}from"./p-7s1gsXM5.js";import"./p-BiTF1__F.js";import"./p-RvUQ__Pq.js";import"./p-BHf9IqGw.js";import"./p-DDUmOl3v.js";import"./p-CpaS1Lex.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=h();class f{async fetchTerminalOrders(s,r,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:s},authToken:r})}}const u=class{constructor(t){s(this,t),this.errorEvent=r(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:s,authToken:r,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,h;try{const a=await t.fetchTerminalOrders(s,r,i);if(a.error)return o({error:d(a.error),code:m(null===(h=a.error)||void 0===h?void 0:h.code),severity:n.ERROR});{const s=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((s=>new c(s))))||[],pagingInfo:s})}}catch(s){const r=m(null==s?void 0:s.code);return o({error:s.message||s,code:r,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new f}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"55f0bf858787e00c304972c941a477815712df9d"},t("terminal-orders-list-core",{key:"2d47e23bc2157d79254f34dfe0551fb32a9d88cc",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{u as justifi_terminal_orders_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-Bn7inNWG.js";import{P as r}from"./p-BdKWuCys.js";import{m as
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-Bn7inNWG.js";import{P as r}from"./p-BdKWuCys.js";import{m as p}from"./p-JyHlIFWl.js";import{E as e}from"./p-DNo0OPOP.js";import{C as o,a}from"./p-Cjcsf8ku.js";import{c as m,J as n}from"./p-BcAsEqa5.js";import"./p-7s1gsXM5.js";import"./p-DhGNCW2f.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-HXpYMWUU.js";import"./p-Da3idOSV.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-D2muobcE.js";import"./p-RvUQ__Pq.js";import"./p-BiTF1__F.js";const h=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.paymentService=new r,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new n(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=p({id:this.paymentId,authToken:this.authToken,service:new r}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:o.ERROR}))}render(){return this.errorMessage?e(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{h as justifi_payment_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as e}from"./p-Bn7inNWG.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-sw5RO19U.js";import{P as l,Q as p,R as f,S as o}from"./p-RvUQ__Pq.js";import{S as c}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{d}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const n=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{s[a]=e}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([a,e])=>{e&&(i[a]=e)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:d.connected},{label:"Disconnected",value:d.disconnected},{label:"Unknown",value:d.unknown},{label:"Pending Configuration",value:d.pending_configuration}]}render(){const a=Object.assign({},s);return e(c,{key:"5e6f1e8abcc7cffc26c101160bff40ff5092ff90"},e("table-filters-menu",{key:"6a57cb7deeb0c6927ee557402ef2618a3d3d8a29",params:a,clearParams:r,part:l},e("div",{key:"aaa63156c9603aafbe1b9dd4d4f87670b4e0ab66",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"f76ca827834a98595a98d6bb6f982807506fe240",class:"p-2"},e("form-control-text",{key:"f9acf97e42e3e5f5ee216a10e116ab1aff2e6390",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:p})),e("div",{key:"c4ac977f7433193e7a9c52be483c65cb5f96f214",class:"p-2"},e("form-control-text",{key:"035fc59523056240eea5da7b63d75028278d3102",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:f})),e("div",{key:"ab72f5ef8a0191b1726cd84c36a7cca28a78ecf0",class:"p-2"},e("form-control-select",{key:"4a684c87e04e11f55c59d45a281f7c258fae4f0d",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:o})))))}};export{n as justifi_terminals_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a}from"./p-Bn7inNWG.js";import{c as i,l as r,b as o,T as h,a as
|
|
1
|
+
import{r as t,c as e,h as s,H as a}from"./p-Bn7inNWG.js";import{c as i,l as r,b as o,T as h,a as d}from"./p-RvUQ__Pq.js";import{F as c}from"./p-BfM6X7lF.js";import"./p-CZfYo5-1.js";const l=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=d),t}render(){return s(a,{key:"2e4a67de83ef5dcd64ff15e1f6fbc125db0d121d"},s("div",{key:"e73d09d041e2152e88917ac65f8a5b5bb7949df4",class:"form-group d-flex flex-column"},s("div",{key:"7c0e2d8be29956e61aaa37bc4575efc595382ce7",class:"d-flex gap-2"},s("label",{key:"1d3692f53203455abacb1addb300549d5d47d8e6",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"e16354b0813c63cd2b21b4185fdd33c0159d9ee3",helpText:this.helpText})),s("input",{key:"bf559dea1bf215276a69833a0d5ff78502043669",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"df02643ac9a15c675726ccba1bfb2ec45ed2c4bc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{l as form_control_date}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-Bn7inNWG.js";import{c as r,a as i,F as o}from"./p-CR9D6mKt.js";import{f as n}from"./p-BHf9IqGw.js";import"./p-DhGNCW2f.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as m}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{B as h}from"./p-DD0Mvpeu.js";import{S as p}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-BdKWuCys.js";import{m as d}from"./p-JyHlIFWl.js";import{c as f,J as v}from"./p-
|
|
1
|
+
import{h as t,r as s,c as e}from"./p-Bn7inNWG.js";import{c as r,a as i,F as o}from"./p-CR9D6mKt.js";import{f as n}from"./p-BHf9IqGw.js";import"./p-DhGNCW2f.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as m}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{B as h}from"./p-DD0Mvpeu.js";import{S as p}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-BdKWuCys.js";import{m as d}from"./p-JyHlIFWl.js";import{c as f,J as v}from"./p-BcAsEqa5.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-7s1gsXM5.js";import{S as w}from"./p-CaAVuW6B.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-CpaS1Lex.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-BiTF1__F.js";const C=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},B=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=b();class A{async postRefund(t,s,e,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const D=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),R=()=>t(p,null,t("div",{class:"row gap-5"},t(D,null),t(D,null),t(D,null))),S=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(g())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(g(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new m({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new A}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(R,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:B,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(h,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{S as justifi_refund_payment}
|