@justifi/webcomponents 4.19.1 → 4.19.2
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/{Analytics-f870b3ee.js → Analytics-c866f471.js} +3 -3
- package/dist/cjs/{Api-3bc6e43f.js → Api-b98b256f.js} +3 -3
- package/dist/cjs/{Business-aacbe893.js → Business-aa799fec.js} +104 -9
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
- package/dist/cjs/{business-additional-questions-schema-11ce0005.js → business-additional-questions-schema-26b0eecb.js} +1 -1
- package/dist/cjs/{business-form-options-26f9900c.js → business-form-options-5db0bd5e.js} +1 -1
- package/dist/cjs/{payload-parsers-969ab9b6.js → business-identity-schema-503ecb77.js} +1 -47
- package/dist/cjs/{business.service-f63650f5.js → business.service-65b0dbc8.js} +1 -1
- package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +26 -26
- package/dist/cjs/{get-payout-csv-f3aee6d0.js → get-payout-csv-b98b0651.js} +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +11 -11
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +12 -12
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +1 -1
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
- package/dist/cjs/{package-1321b070.js → package-0c613220.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-0a64f9cd.js → payment.service-33d6ac16.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/payout-details-core.cjs.entry.js +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{schema-validations-f3db892c.js → schema-validations-0a7e46a3.js} +1 -1
- package/dist/cjs/{utils-89d86e29.js → utils-af1b60a9.js} +0 -16
- package/dist/collection/api/Api.js +3 -3
- package/dist/collection/api/Business.js +66 -7
- package/dist/collection/api/Identity.js +39 -3
- package/dist/collection/api/services/analytics.service.js +1 -1
- package/dist/collection/api/services/checkout.service.js +1 -1
- package/dist/collection/api/services/insurance.service.js +2 -2
- package/dist/collection/api/services/provision.service.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-form.js +3 -4
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +4 -5
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +3 -5
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +3 -4
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +3 -4
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -2
- package/dist/docs.json +2 -2
- package/dist/esm/{Analytics-262cdde5.js → Analytics-3e74964a.js} +3 -3
- package/dist/esm/{Api-b09a2f6a.js → Api-c8abc2e0.js} +3 -3
- package/dist/esm/{Business-e218b4f4.js → Business-b73d5055.js} +104 -9
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/{business-additional-questions-schema-e39bc781.js → business-additional-questions-schema-a5583cf8.js} +1 -1
- package/dist/esm/{business-form-options-0b08e08c.js → business-form-options-d790973e.js} +1 -1
- package/dist/esm/{payload-parsers-62f443e1.js → business-identity-schema-9e3269fb.js} +2 -44
- package/dist/esm/{business.service-74bd1212.js → business.service-6f139c2b.js} +1 -1
- package/dist/esm/form-alert_5.entry.js +2 -2
- package/dist/esm/form-control-checkbox_9.entry.js +21 -21
- package/dist/esm/{get-payout-csv-b494abfe.js → get-payout-csv-383d96c1.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +11 -11
- package/dist/esm/justifi-bank-account-form.entry.js +3 -3
- package/dist/esm/justifi-billing-form_2.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +5 -5
- package/dist/esm/justifi-business-form.entry.js +11 -11
- package/dist/esm/justifi-card-form.entry.js +3 -3
- package/dist/esm/justifi-checkout-core.entry.js +1 -1
- package/dist/esm/justifi-checkout.entry.js +4 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-new-payment-method_4.entry.js +1 -1
- package/dist/esm/justifi-owner-form_3.entry.js +10 -10
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-form.entry.js +4 -4
- package/dist/esm/justifi-payment-method-form.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
- package/dist/esm/justifi-payments-list.entry.js +4 -4
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +4 -4
- package/dist/esm/justifi-refund-form.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
- package/dist/esm/{package-d88677e9.js → package-925a0fdd.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-3ca4a492.js → payment.service-e4fb5953.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +1 -1
- package/dist/esm/payout-details-core.entry.js +1 -1
- package/dist/esm/payouts-list-core.entry.js +1 -1
- package/dist/esm/{schema-validations-2f4fdebb.js → schema-validations-e725d701.js} +2 -2
- package/dist/esm/{utils-3c1dd2fa.js → utils-e66d8bca.js} +1 -16
- package/dist/module/Analytics.js +1 -1
- package/dist/module/Api.js +3 -3
- package/dist/module/Business.js +104 -9
- package/dist/module/business-additional-questions-form-step-core.js +3 -3
- package/dist/module/business-bank-account-form-step.js +2 -2
- package/dist/module/business-core-info-form-step-core.js +3 -5
- package/dist/module/business-document-upload-form-step.js +2 -2
- package/dist/module/business-document-upload-input-group.js +1 -1
- package/dist/module/business-documents-on-file.js +1 -1
- package/dist/module/business-owners-form-step-core.js +3 -3
- package/dist/module/business-representative-form-step-core.js +3 -4
- package/dist/module/business-terms-conditions-form-step.js +2 -2
- package/dist/module/justifi-business-form.js +3 -4
- package/dist/module/justifi-checkout.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +2 -2
- package/dist/module/legal-address-form-step-core.js +3 -4
- package/dist/module/owner-form-core2.js +4 -5
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +1 -1
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/saved-payment-method.js +1 -1
- package/dist/module/utils2.js +1 -16
- package/dist/types/api/Business.d.ts +87 -1
- package/dist/types/api/Identity.d.ts +45 -1
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +44 -1
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +11 -1
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +11 -1
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +24 -1
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +11 -1
- package/dist/webcomponents/{p-d765d638.js → p-0052db77.js} +1 -1
- package/dist/webcomponents/{p-60a370fc.entry.js → p-039183f1.entry.js} +1 -1
- package/dist/webcomponents/{p-b16dfd5d.entry.js → p-08a39a65.entry.js} +1 -1
- package/dist/webcomponents/{p-462dc522.entry.js → p-124c1ecd.entry.js} +1 -1
- package/dist/webcomponents/{p-d1c8d794.entry.js → p-1647f06b.entry.js} +1 -1
- package/dist/webcomponents/{p-d25c2f12.js → p-1815a43b.js} +1 -1
- package/dist/webcomponents/p-1cb2a51c.entry.js +1 -0
- package/dist/webcomponents/{p-1a43e355.entry.js → p-1eee25f3.entry.js} +1 -1
- package/dist/webcomponents/{p-3affadfc.entry.js → p-20cee11b.entry.js} +1 -1
- package/dist/webcomponents/{p-04a0dbb6.js → p-277aee05.js} +1 -1
- package/dist/webcomponents/{p-65b561da.entry.js → p-2a5cc4ee.entry.js} +1 -1
- package/dist/webcomponents/p-3b1340dc.js +1 -0
- package/dist/webcomponents/{p-890b3254.entry.js → p-43eff822.entry.js} +1 -1
- package/dist/webcomponents/p-4e01fec8.entry.js +1 -0
- package/dist/webcomponents/{p-241b0ed9.js → p-5022f21c.js} +1 -1
- package/dist/webcomponents/p-55182a59.js +1 -0
- package/dist/webcomponents/{p-83125497.js → p-5e2c9ec8.js} +1 -1
- package/dist/webcomponents/p-5e7c60d8.js +1 -0
- package/dist/webcomponents/p-6ac806ff.entry.js +1 -0
- package/dist/webcomponents/{p-198994c0.entry.js → p-6c2fc744.entry.js} +1 -1
- package/dist/webcomponents/{p-62b32c4c.entry.js → p-721dcf51.entry.js} +1 -1
- package/dist/webcomponents/p-77e55bfc.entry.js +1 -0
- package/dist/webcomponents/{p-29c0b182.js → p-7d3be485.js} +1 -1
- package/dist/webcomponents/{p-52021fa1.entry.js → p-817da23c.entry.js} +1 -1
- package/dist/webcomponents/p-82cff30c.js +1 -0
- package/dist/webcomponents/{p-8603348a.js → p-8eb10f02.js} +1 -1
- package/dist/webcomponents/{p-061dcb79.entry.js → p-8f9fb5c3.entry.js} +1 -1
- package/dist/webcomponents/p-9649b022.entry.js +1 -0
- package/dist/webcomponents/{p-9dc36f76.entry.js → p-9c076da2.entry.js} +1 -1
- package/dist/webcomponents/p-af0aeba4.entry.js +1 -0
- package/dist/webcomponents/p-b1408dea.entry.js +1 -0
- package/dist/webcomponents/{p-72c9e6b3.entry.js → p-ba95679b.entry.js} +1 -1
- package/dist/webcomponents/{p-1f70fa27.entry.js → p-bd2bb302.entry.js} +1 -1
- package/dist/webcomponents/{p-bc92235c.entry.js → p-d2af90c2.entry.js} +1 -1
- package/dist/webcomponents/{p-4abc17f0.entry.js → p-d76002d5.entry.js} +1 -1
- package/dist/webcomponents/{p-9ccfa1c9.entry.js → p-da1d174d.entry.js} +1 -1
- package/dist/webcomponents/{p-53e64f15.entry.js → p-e2b2213f.entry.js} +1 -1
- package/dist/webcomponents/{p-fe33151d.entry.js → p-eccf2e8e.entry.js} +1 -1
- package/dist/webcomponents/p-edab484a.entry.js +1 -0
- package/dist/webcomponents/{p-75b4daef.js → p-f5b5e47b.js} +1 -1
- package/dist/webcomponents/{p-4bac636e.entry.js → p-f844d67b.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
- package/dist/module/payload-parsers.js +0 -43
- package/dist/types/components/business-forms/utils/payload-parsers.d.ts +0 -4
- package/dist/webcomponents/p-2799383d.entry.js +0 -1
- package/dist/webcomponents/p-3d4d566d.entry.js +0 -1
- package/dist/webcomponents/p-3dd4c6c3.entry.js +0 -1
- package/dist/webcomponents/p-46f679a9.js +0 -1
- package/dist/webcomponents/p-48ae16e0.entry.js +0 -1
- package/dist/webcomponents/p-53948ff8.entry.js +0 -1
- package/dist/webcomponents/p-554a3c18.js +0 -1
- package/dist/webcomponents/p-92bb1e5f.entry.js +0 -1
- package/dist/webcomponents/p-ad41c8c7.entry.js +0 -1
- package/dist/webcomponents/p-af244664.js +0 -1
- package/dist/webcomponents/p-d101c5db.js +0 -1
- package/dist/webcomponents/p-d2a5054f.entry.js +0 -1
|
@@ -3,7 +3,6 @@ import { F as FormController } from './form.js';
|
|
|
3
3
|
import { O as Owner } from './Business.js';
|
|
4
4
|
import { b as BusinessFormClickActions } from './business-form-types.js';
|
|
5
5
|
import { i as identitySchema } from './business-identity-schema.js';
|
|
6
|
-
import { b as parseIdentityInfo } from './payload-parsers.js';
|
|
7
6
|
import { B as Button } from './button.js';
|
|
8
7
|
import { d as defineCustomElement$8 } from './form-control-date2.js';
|
|
9
8
|
import { d as defineCustomElement$7 } from './form-control-error-text2.js';
|
|
@@ -144,12 +143,12 @@ const BusinessOwnerFormCore = /*@__PURE__*/ proxyCustomElement(class BusinessOwn
|
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
get payload() {
|
|
147
|
-
let formValues =
|
|
146
|
+
let formValues = new Owner(this.formController.values.getValue()).payload;
|
|
148
147
|
if (this.ownerId) {
|
|
149
|
-
return
|
|
148
|
+
return formValues;
|
|
150
149
|
}
|
|
151
150
|
else {
|
|
152
|
-
return
|
|
151
|
+
return Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
get formTitle() {
|
|
@@ -180,7 +179,7 @@ const BusinessOwnerFormCore = /*@__PURE__*/ proxyCustomElement(class BusinessOwn
|
|
|
180
179
|
this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
|
|
181
180
|
}
|
|
182
181
|
render() {
|
|
183
|
-
return (h("form", { key: '
|
|
182
|
+
return (h("form", { key: '27f0d989f017bd03b84cf8c994fa96f9a65aad08', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2c793f1f8777181e5db0a4cae5b9994d9188685e' }, h("legend", { key: 'a8951fcd990c8136cf6672424869f5c96def3cef', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'faaf0cc27c448452a5172ad7fcfcf510ec586d2b' }), h("div", { key: '486638ad24414a05f84ada3f37a89d0cc12e7ffb', class: "row gy-3" }, h("owner-form-inputs", { key: 'bdfe7cb3305f31d93321319ef14eee3e5b331381', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '9e5c63e0637e0bffe5ab77a1f73c203704115479', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '85de4b69c697ebf96778f538b1535bd1fb2c43e7', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dd026432f19f84ae2142101191e511ebd62c2b3', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: '2570611bbe663e2e128f03806ecb036ce750c80b' }))));
|
|
184
183
|
}
|
|
185
184
|
static get watchers() { return {
|
|
186
185
|
"isLoading": ["loadingWatcher"]
|
package/dist/module/package.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { M as MapPaymentStatusToBadge, a as formatCurrency,
|
|
2
|
+
import { M as MapPaymentStatusToBadge, a as formatCurrency, e as formatDate, j as formatTime, s as snakeCaseToHumanReadable } from './utils2.js';
|
|
3
3
|
import { L as LoadingState, E as ErrorState, b as EntityHeadInfo, c as EntityHeadInfoItem, D as DetailSectionTitle, a as DetailItem, C as CodeBlock } from './utils.js';
|
|
4
4
|
import { S as StyledHost } from './styled-host.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './details.js';
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { p as pagingDefaults } from './Pagination.js';
|
|
3
3
|
import './Payment.js';
|
|
4
4
|
import './Payout.js';
|
|
5
|
-
import {
|
|
5
|
+
import { e as formatDate, j as formatTime, a as formatCurrency, M as MapPaymentStatusToBadge } from './utils2.js';
|
|
6
6
|
import { t as tableExportedParts, T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './exported-parts.js';
|
|
7
7
|
import { S as StyledHost } from './styled-host.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './form-control-date2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { k as MapPayoutStatusToBadge, a as formatCurrency, e as formatDate, j as formatTime } from './utils2.js';
|
|
3
3
|
import { L as LoadingState, E as ErrorState, b as EntityHeadInfo, c as EntityHeadInfoItem, D as DetailSectionTitle, a as DetailItem, C as CodeBlock } from './utils.js';
|
|
4
4
|
import { S as StyledHost } from './styled-host.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './details.js';
|
|
@@ -2,7 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
|
|
|
2
2
|
import { p as pagingDefaults } from './Pagination.js';
|
|
3
3
|
import './Payment.js';
|
|
4
4
|
import { a as PayoutStatuses, b as PayoutStatusesSafeNames } from './Payout.js';
|
|
5
|
-
import {
|
|
5
|
+
import { e as formatDate, j as formatTime, a as formatCurrency } from './utils2.js';
|
|
6
6
|
import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
|
|
7
7
|
import { t as tableExportedParts, T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './exported-parts.js';
|
|
8
8
|
import { S as StyledHost } from './styled-host.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as config } from './config.js';
|
|
3
|
-
import {
|
|
3
|
+
import { h as snakeToCamel } from './utils2.js';
|
|
4
4
|
|
|
5
5
|
class PaymentMethodOption {
|
|
6
6
|
constructor(paymentMethod) {
|
package/dist/module/utils2.js
CHANGED
|
@@ -3971,21 +3971,6 @@ function snakeToCamel(str) {
|
|
|
3971
3971
|
return '';
|
|
3972
3972
|
return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
|
|
3973
3973
|
}
|
|
3974
|
-
function flattenNestedObject(obj) {
|
|
3975
|
-
const result = {};
|
|
3976
|
-
for (const key in obj) {
|
|
3977
|
-
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
3978
|
-
const nestedObj = flattenNestedObject(obj[key]);
|
|
3979
|
-
for (const nestedKey in nestedObj) {
|
|
3980
|
-
result[nestedKey] = nestedObj[nestedKey];
|
|
3981
|
-
}
|
|
3982
|
-
}
|
|
3983
|
-
else {
|
|
3984
|
-
result[key] = obj[key];
|
|
3985
|
-
}
|
|
3986
|
-
}
|
|
3987
|
-
return result;
|
|
3988
|
-
}
|
|
3989
3974
|
function composeQueryParams(values) {
|
|
3990
3975
|
const queryParams = values.map((value) => {
|
|
3991
3976
|
if (value === values[0]) {
|
|
@@ -4024,4 +4009,4 @@ const isInRange = (num, min, max) => {
|
|
|
4024
4009
|
return num >= min && num <= max;
|
|
4025
4010
|
};
|
|
4026
4011
|
|
|
4027
|
-
export { MapPaymentStatusToBadge as M, formatCurrency as a, formatDisplayDate as b, composeQueryParams as c,
|
|
4012
|
+
export { MapPaymentStatusToBadge as M, formatCurrency as a, formatDisplayDate as b, composeQueryParams as c, isInRange as d, formatDate as e, formatMediumDate as f, formatTimeSeconds as g, snakeToCamel as h, isEmptyObject as i, formatTime as j, MapPayoutStatusToBadge as k, loadFontsOnParent as l, snakeCaseToHumanReadable as s };
|
|
@@ -34,6 +34,15 @@ export declare class Address implements IAddress {
|
|
|
34
34
|
created_at?: string;
|
|
35
35
|
updated_at?: string;
|
|
36
36
|
constructor(address: IAddress);
|
|
37
|
+
get payload(): {
|
|
38
|
+
platform_account_id: string;
|
|
39
|
+
line1: string;
|
|
40
|
+
line2: string;
|
|
41
|
+
postal_code: string;
|
|
42
|
+
city: string;
|
|
43
|
+
state: string;
|
|
44
|
+
country: string;
|
|
45
|
+
};
|
|
37
46
|
}
|
|
38
47
|
export interface ProductCategories {
|
|
39
48
|
credit: boolean;
|
|
@@ -49,6 +58,7 @@ export interface IAdditionalQuestions {
|
|
|
49
58
|
business_recurring_payments_percentage?: string;
|
|
50
59
|
business_seasonal?: string;
|
|
51
60
|
business_other_payment_details?: string;
|
|
61
|
+
payload?: any;
|
|
52
62
|
}
|
|
53
63
|
export declare class AdditionalQuestions implements IAdditionalQuestions {
|
|
54
64
|
business_revenue?: string;
|
|
@@ -59,6 +69,15 @@ export declare class AdditionalQuestions implements IAdditionalQuestions {
|
|
|
59
69
|
business_seasonal?: string;
|
|
60
70
|
business_other_payment_details?: string;
|
|
61
71
|
constructor(additionalQuestions: IAdditionalQuestions);
|
|
72
|
+
get payload(): {
|
|
73
|
+
business_revenue: string;
|
|
74
|
+
business_payment_volume: string;
|
|
75
|
+
business_when_service_received: string;
|
|
76
|
+
business_recurring_payments: string;
|
|
77
|
+
business_recurring_payments_percentage: string;
|
|
78
|
+
business_seasonal: string;
|
|
79
|
+
business_other_payment_details: string;
|
|
80
|
+
};
|
|
62
81
|
}
|
|
63
82
|
export interface ICoreBusinessInfo {
|
|
64
83
|
classification?: BusinessClassification;
|
|
@@ -82,6 +101,17 @@ export declare class CoreBusinessInfo implements ICoreBusinessInfo {
|
|
|
82
101
|
phone: string;
|
|
83
102
|
date_of_incorporation: string;
|
|
84
103
|
constructor(coreBusinessInfo: ICoreBusinessInfo);
|
|
104
|
+
get payload(): {
|
|
105
|
+
classification: string;
|
|
106
|
+
legal_name: string;
|
|
107
|
+
doing_business_as: string;
|
|
108
|
+
industry: string;
|
|
109
|
+
tax_id: string;
|
|
110
|
+
website_url: string;
|
|
111
|
+
email: string;
|
|
112
|
+
phone: string;
|
|
113
|
+
date_of_incorporation: string;
|
|
114
|
+
};
|
|
85
115
|
}
|
|
86
116
|
export interface IBusiness {
|
|
87
117
|
additional_questions: IAdditionalQuestions;
|
|
@@ -109,7 +139,7 @@ export interface IBusiness {
|
|
|
109
139
|
date_of_incorporation?: string;
|
|
110
140
|
}
|
|
111
141
|
export declare class Business implements IBusiness {
|
|
112
|
-
additional_questions:
|
|
142
|
+
additional_questions: IAdditionalQuestions;
|
|
113
143
|
associated_accounts: any[];
|
|
114
144
|
classification: BusinessClassification;
|
|
115
145
|
bank_accounts: IBankAccount[];
|
|
@@ -133,6 +163,62 @@ export declare class Business implements IBusiness {
|
|
|
133
163
|
date_of_incorporation?: string;
|
|
134
164
|
product_categories: ProductCategories;
|
|
135
165
|
constructor(business: IBusiness);
|
|
166
|
+
get payload(): {
|
|
167
|
+
additional_questions: {
|
|
168
|
+
business_revenue: string;
|
|
169
|
+
business_payment_volume: string;
|
|
170
|
+
business_when_service_received: string;
|
|
171
|
+
business_recurring_payments: string;
|
|
172
|
+
business_recurring_payments_percentage: string;
|
|
173
|
+
business_seasonal: string;
|
|
174
|
+
business_other_payment_details: string;
|
|
175
|
+
};
|
|
176
|
+
classification: string;
|
|
177
|
+
doing_business_as: string;
|
|
178
|
+
email: string;
|
|
179
|
+
industry: string;
|
|
180
|
+
legal_address: {
|
|
181
|
+
platform_account_id: string;
|
|
182
|
+
line1: string;
|
|
183
|
+
line2: string;
|
|
184
|
+
postal_code: string;
|
|
185
|
+
city: string;
|
|
186
|
+
state: string;
|
|
187
|
+
country: string;
|
|
188
|
+
};
|
|
189
|
+
legal_name: string;
|
|
190
|
+
metadata: any;
|
|
191
|
+
owners: {
|
|
192
|
+
id: string;
|
|
193
|
+
}[];
|
|
194
|
+
phone: string;
|
|
195
|
+
platform_account_id: string;
|
|
196
|
+
representative: {
|
|
197
|
+
address: {
|
|
198
|
+
platform_account_id: string;
|
|
199
|
+
line1: string;
|
|
200
|
+
line2: string;
|
|
201
|
+
postal_code: string;
|
|
202
|
+
city: string;
|
|
203
|
+
state: string;
|
|
204
|
+
country: string;
|
|
205
|
+
};
|
|
206
|
+
dob_day: string;
|
|
207
|
+
dob_month: string;
|
|
208
|
+
dob_year: string;
|
|
209
|
+
email: string;
|
|
210
|
+
is_owner: boolean;
|
|
211
|
+
identification_number: string;
|
|
212
|
+
metadata: any;
|
|
213
|
+
name: string;
|
|
214
|
+
phone: string;
|
|
215
|
+
platform_account_id: string;
|
|
216
|
+
title: string;
|
|
217
|
+
};
|
|
218
|
+
tax_id: string;
|
|
219
|
+
website_url: string;
|
|
220
|
+
date_of_incorporation: string;
|
|
221
|
+
};
|
|
136
222
|
}
|
|
137
223
|
export interface IProductReadiness {
|
|
138
224
|
business_id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, IAddress } from
|
|
1
|
+
import { Address, IAddress } from './Business';
|
|
2
2
|
export interface Identity {
|
|
3
3
|
address?: IAddress;
|
|
4
4
|
created_at?: string;
|
|
@@ -40,6 +40,28 @@ export declare class Owner implements Identity {
|
|
|
40
40
|
title?: string;
|
|
41
41
|
updated_at?: string;
|
|
42
42
|
constructor(owner: Identity);
|
|
43
|
+
get payload(): {
|
|
44
|
+
address: {
|
|
45
|
+
platform_account_id: string;
|
|
46
|
+
line1: string;
|
|
47
|
+
line2: string;
|
|
48
|
+
postal_code: string;
|
|
49
|
+
city: string;
|
|
50
|
+
state: string;
|
|
51
|
+
country: string;
|
|
52
|
+
};
|
|
53
|
+
dob_day: string;
|
|
54
|
+
dob_month: string;
|
|
55
|
+
dob_year: string;
|
|
56
|
+
email: string;
|
|
57
|
+
identification_number: string;
|
|
58
|
+
is_owner: boolean;
|
|
59
|
+
metadata: any;
|
|
60
|
+
name: string;
|
|
61
|
+
phone: string;
|
|
62
|
+
platform_account_id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
};
|
|
43
65
|
}
|
|
44
66
|
export declare class Representative implements Identity {
|
|
45
67
|
address?: Address;
|
|
@@ -62,4 +84,26 @@ export declare class Representative implements Identity {
|
|
|
62
84
|
title?: string;
|
|
63
85
|
updated_at?: string;
|
|
64
86
|
constructor(representative: Identity);
|
|
87
|
+
get payload(): {
|
|
88
|
+
address: {
|
|
89
|
+
platform_account_id: string;
|
|
90
|
+
line1: string;
|
|
91
|
+
line2: string;
|
|
92
|
+
postal_code: string;
|
|
93
|
+
city: string;
|
|
94
|
+
state: string;
|
|
95
|
+
country: string;
|
|
96
|
+
};
|
|
97
|
+
dob_day: string;
|
|
98
|
+
dob_month: string;
|
|
99
|
+
dob_year: string;
|
|
100
|
+
email: string;
|
|
101
|
+
is_owner: boolean;
|
|
102
|
+
identification_number: string;
|
|
103
|
+
metadata: any;
|
|
104
|
+
name: string;
|
|
105
|
+
phone: string;
|
|
106
|
+
platform_account_id: string;
|
|
107
|
+
title: string;
|
|
108
|
+
};
|
|
65
109
|
}
|
|
@@ -28,7 +28,50 @@ export declare class BusinessOwnerFormCore {
|
|
|
28
28
|
validate(): Promise<boolean>;
|
|
29
29
|
submit(): Promise<boolean>;
|
|
30
30
|
validateAndSubmit(event: any): Promise<void>;
|
|
31
|
-
get payload():
|
|
31
|
+
get payload(): {
|
|
32
|
+
address: {
|
|
33
|
+
platform_account_id: string;
|
|
34
|
+
line1: string;
|
|
35
|
+
line2: string;
|
|
36
|
+
postal_code: string;
|
|
37
|
+
city: string;
|
|
38
|
+
state: string;
|
|
39
|
+
country: string;
|
|
40
|
+
};
|
|
41
|
+
dob_day: string;
|
|
42
|
+
dob_month: string;
|
|
43
|
+
dob_year: string;
|
|
44
|
+
email: string;
|
|
45
|
+
identification_number: string;
|
|
46
|
+
is_owner: boolean;
|
|
47
|
+
metadata: any;
|
|
48
|
+
name: string;
|
|
49
|
+
phone: string;
|
|
50
|
+
platform_account_id: string;
|
|
51
|
+
title: string;
|
|
52
|
+
} | {
|
|
53
|
+
business_id: string;
|
|
54
|
+
address: {
|
|
55
|
+
platform_account_id: string;
|
|
56
|
+
line1: string;
|
|
57
|
+
line2: string;
|
|
58
|
+
postal_code: string;
|
|
59
|
+
city: string;
|
|
60
|
+
state: string;
|
|
61
|
+
country: string;
|
|
62
|
+
};
|
|
63
|
+
dob_day: string;
|
|
64
|
+
dob_month: string;
|
|
65
|
+
dob_year: string;
|
|
66
|
+
email: string;
|
|
67
|
+
identification_number: string;
|
|
68
|
+
is_owner: boolean;
|
|
69
|
+
metadata: any;
|
|
70
|
+
name: string;
|
|
71
|
+
phone: string;
|
|
72
|
+
platform_account_id: string;
|
|
73
|
+
title: string;
|
|
74
|
+
};
|
|
32
75
|
get formTitle(): "Edit Business Owner" | "Add Business Owner";
|
|
33
76
|
get submitButtonText(): "Update" | "Add";
|
|
34
77
|
get showRemoveButton(): boolean;
|
|
@@ -16,7 +16,17 @@ export declare class AdditionalQuestionsFormStepCore {
|
|
|
16
16
|
validateAndSubmit({ onSuccess }: {
|
|
17
17
|
onSuccess: any;
|
|
18
18
|
}): Promise<void>;
|
|
19
|
-
get patchPayload():
|
|
19
|
+
get patchPayload(): {
|
|
20
|
+
additional_questions: {
|
|
21
|
+
business_revenue: string;
|
|
22
|
+
business_payment_volume: string;
|
|
23
|
+
business_when_service_received: string;
|
|
24
|
+
business_recurring_payments: string;
|
|
25
|
+
business_recurring_payments_percentage: string;
|
|
26
|
+
business_seasonal: string;
|
|
27
|
+
business_other_payment_details: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
20
30
|
componentWillLoad(): void;
|
|
21
31
|
componentDidLoad(): void;
|
|
22
32
|
private getData;
|
|
@@ -17,7 +17,17 @@ export declare class BusinessCoreInfoFormStepCore {
|
|
|
17
17
|
validateAndSubmit({ onSuccess }: {
|
|
18
18
|
onSuccess: any;
|
|
19
19
|
}): Promise<void>;
|
|
20
|
-
get patchPayload():
|
|
20
|
+
get patchPayload(): {
|
|
21
|
+
classification: string;
|
|
22
|
+
legal_name: string;
|
|
23
|
+
doing_business_as: string;
|
|
24
|
+
industry: string;
|
|
25
|
+
tax_id: string;
|
|
26
|
+
website_url: string;
|
|
27
|
+
email: string;
|
|
28
|
+
phone: string;
|
|
29
|
+
date_of_incorporation: string;
|
|
30
|
+
};
|
|
21
31
|
componentWillLoad(): void;
|
|
22
32
|
componentDidLoad(): void;
|
|
23
33
|
private getData;
|
|
@@ -16,7 +16,30 @@ export declare class BusinessRepresentativeFormStepCore {
|
|
|
16
16
|
validateAndSubmit({ onSuccess }: {
|
|
17
17
|
onSuccess: any;
|
|
18
18
|
}): Promise<void>;
|
|
19
|
-
get patchPayload():
|
|
19
|
+
get patchPayload(): {
|
|
20
|
+
representative: {
|
|
21
|
+
address: {
|
|
22
|
+
platform_account_id: string;
|
|
23
|
+
line1: string;
|
|
24
|
+
line2: string;
|
|
25
|
+
postal_code: string;
|
|
26
|
+
city: string;
|
|
27
|
+
state: string;
|
|
28
|
+
country: string;
|
|
29
|
+
};
|
|
30
|
+
dob_day: string;
|
|
31
|
+
dob_month: string;
|
|
32
|
+
dob_year: string;
|
|
33
|
+
email: string;
|
|
34
|
+
is_owner: boolean;
|
|
35
|
+
identification_number: string;
|
|
36
|
+
metadata: any;
|
|
37
|
+
name: string;
|
|
38
|
+
phone: string;
|
|
39
|
+
platform_account_id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
20
43
|
componentWillLoad(): void;
|
|
21
44
|
componentDidLoad(): void;
|
|
22
45
|
private getData;
|
|
@@ -16,7 +16,17 @@ export declare class LegalAddressFormStepCore {
|
|
|
16
16
|
validateAndSubmit({ onSuccess }: {
|
|
17
17
|
onSuccess: any;
|
|
18
18
|
}): Promise<void>;
|
|
19
|
-
get patchPayload():
|
|
19
|
+
get patchPayload(): {
|
|
20
|
+
legal_address: {
|
|
21
|
+
platform_account_id: string;
|
|
22
|
+
line1: string;
|
|
23
|
+
line2: string;
|
|
24
|
+
postal_code: string;
|
|
25
|
+
city: string;
|
|
26
|
+
state: string;
|
|
27
|
+
country: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
20
30
|
componentWillLoad(): void;
|
|
21
31
|
componentDidLoad(): void;
|
|
22
32
|
private getData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={name:"@justifi/webcomponents",version:"4.19.
|
|
1
|
+
const e={name:"@justifi/webcomponents",version:"4.19.2",description:"JustiFi Web Components",collection:"dist/collection/collection-manifest.json",main:"dist/index.cjs.js",module:"dist/module/index.js",types:"dist/module/index.d.ts",repository:{type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"},homepage:"https://storybook.justifi.ai/?path=/docs/introduction--docs",publishConfig:{registry:"https://registry.npmjs.org"},files:["dist/"],scripts:{build:"stencil build --docs",dev:"stencil build --watch",lint:"eslint . --max-warnings 0",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",generate:"stencil generate",test:"TZ=utc stencil test --spec","test:watch":"TZ=utc stencil test --spec --watchAll","test:e2e":"stencil test --e2e","test:file":"stencil test --spec --watch --"},dependencies:{"@stencil/core":"^4.0.5","@stencil/store":"^2.0.8",bootstrap:"^5.2.3","chart.js":"^4.4.1","date-fns":"^2.29.3","dinero.js":"^1.9.1","iframe-resizer":"^4.3.7",imask:"^7.6.0",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"},devDependencies:{"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@stencil/sass":"^3.0.1","@types/jest":"27.0.3","@types/node":"^20.1.4","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",dotenv:"^16.3.1",jest:"^29.7.0","jest-cli":"^29.7.0","jest-environment-node":"^29.7.0",puppeteer:"^21.0.0","ts-jest":"^29.1.2"},license:"MIT",gitHead:"507bac1d941eae6e1f56e185ecd9bc9d22637783"};export{e as p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as t}from"./p-fad19d75.js";import{f as i}from"./p-
|
|
1
|
+
import{r as o,c as r,h as t}from"./p-fad19d75.js";import{f as i}from"./p-5e2c9ec8.js";import{c as a}from"./p-ae263544.js";import{C as s}from"./p-14c91ffd.js";import{i as e,v as c,a as d}from"./p-2338affa.js";import{B as l}from"./p-9c9c7dac.js";import{S as n}from"./p-ba4bae6f.js";import{S as f}from"./p-08b0fb31.js";class b{constructor(o){Object.assign(this,o)}}const h=class{constructor(t){o(this,t),this.submitted=r(this,"submitted",7),this.errorEvent=r(this,"error-event",7),this.loaded=r(this,"loaded",7),this.completeCheckout=async o=>{this.complete({payment:o,onSuccess:this.onSubmitted,onError:this.onError})},this.onSubmitted=o=>{this.submitted.emit(o),this.renderState="success"},this.onError=({error:o,code:r,severity:t})=>{this.serverError=o,this.errorEvent.emit({errorCode:r,message:o,severity:t}),this.renderState="error"},this.iframeOrigin=a.iframeOrigin,this.authToken=void 0,this.getCheckout=void 0,this.complete=void 0,this.checkoutId=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.hasLoadedFonts=!1,this.checkout=void 0,this.serverError=void 0,this.renderState="loading",this.creatingNewPaymentMethod=!1,this.insuranceToggled=!1}async fillBillingForm(o){this.paymentMethodOptionsRef.fillBillingForm(o)}componentWillLoad(){this.getCheckout&&(this.fetchData(),e("set",(o=>{const r=d[o];void 0!==r&&(this.insuranceToggled=r,this.fetchData())})))}fetchData(){this.renderState="loading",this.getCheckout({onSuccess:({checkout:o})=>{this.checkout=new b(o);const{status:r}=this.checkout;this.loaded.emit({checkout_status:r}),this.renderState="success"},onError:({error:o,code:r,severity:t})=>{this.serverError=o,this.renderState="error",this.errorEvent.emit({errorCode:r,message:o,severity:t})}})}async submit(o){var r;o.preventDefault(),this.renderState="loading";const t=c(),i=await this.paymentMethodOptionsRef.resolvePaymentMethod(t);i.validationError?this.renderState="error":i.error?(this.renderState="error",this.serverError=i.error.message,this.onError({code:i.error.code,error:i.error.message,severity:s.ERROR})):i.token?this.completeCheckout({payment_mode:"ecom",payment_token:i.token}):"success"===(null===(r=i.bnpl)||void 0===r?void 0:r.status)?this.completeCheckout({payment_mode:"bnpl"}):this.renderState="error"}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get paymentType(){var o,r,i,a,s;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(f,{variant:"rounded",height:"300px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("justifi-payment-method-options",{ref:o=>this.paymentMethodOptionsRef=o,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!this.disableBnpl,paymentMethodGroupId:null===(o=this.checkout)||void 0===o?void 0:o.payment_method_group_id,"show-saved-payment-methods":!this.disablePaymentMethodGroup,bnpl:null===(r=this.checkout)||void 0===r?void 0:r.bnpl,authToken:this.authToken,"account-id":null===(i=this.checkout)||void 0===i?void 0:i.account_id,savedPaymentMethods:(null===(a=this.checkout)||void 0===a?void 0:a.payment_methods)||[],paymentAmount:null===(s=this.checkout)||void 0===s?void 0:s.payment_amount,insuranceToggled:this.insuranceToggled})))}get summary(){var o,r;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(f,{height:"24px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("div",{class:"jfi-payment-description"},null===(o=this.checkout)||void 0===o?void 0:o.payment_description),t("div",{class:"jfi-payment-total"},t("span",{class:"jfi-payment-total-label"},"Total")," ",t("span",{class:"jfi-payment-total-amount"},i(+(null===(r=this.checkout)||void 0===r?void 0:r.total_amount))))))}render(){return t(n,{key:"e322f280a57bb0baab61174bca21f0a7e9afa3c1"},t("div",{key:"4ad8cc4f6243de8ddc03fb184ac4e960a04280eb",class:"row gy-3 jfi-checkout-core"},t("div",{key:"7f13e26b36790558c8eb455f4d5ab3d0952b4e62",class:"col-12"},t("h2",{key:"c5e4b6fc30f51821537915f3ce5d4830ed3f8da9",class:"fs-5 fw-bold pb-3 jfi-header"},"Summary"),this.summary),t("div",{key:"164b7a2cc51d871ad4a92044d0f7240e376bd4b3",class:"col-12"},t("slot",{key:"a98b7c6a0bb9e4d1b102e832ee7aa43218432298",name:"insurance"})),t("div",{key:"415d3aac64b4190f54d785695c50a92ce02a76c2",class:"col-12 mt-4"},t("h2",{key:"6d7f0df1165ec359877459a8bada855ef353c3b3",class:"fs-5 fw-bold pb-3 jfi-header"},"Payment"),t("h3",{key:"be8495d792cf065d2cbc7d3b46648c887951e313",class:"fs-6 fw-bold lh-lg"},"Select payment type"),t("div",{key:"5c9d8baffb50b0b10e9911463f307581cad7619c",class:"d-flex flex-column"},this.paymentType)),t("div",{key:"9351832b69a8e5285cae35534299b51193248719",class:"col-12"},t("div",{key:"5b0e382836c858369caf93a287272922024ce72b",class:"d-flex justify-content-end"},t(l,{key:"f76d37000f7b026e97f083e7cf817bed8f84f34f",type:"submit",variant:"primary",onClick:o=>this.submit(o),disabled:this.isLoading,isLoading:this.isLoading,style:{width:"100%"}},"Pay")))))}};h.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}.jfi-checkout-core{color:var(--jfi-body-color)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}*::part(invalid-feedback){color:var(--jfi-error-message-color);font-size:var(--jfi-error-message-font-size);margin:var(--jfi-error-message-margin);line-height:normal}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow);line-height:var(--jfi-submit-button-line-height);text-transform:var(--jfi-submit-button-text-transform)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}.jfi-header{color:var(--jfi-header-color);border-bottom:var(--jfi-header-border)}";export{h as justifi_checkout_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,F as s}from"./p-fad19d75.js";import{c as d}from"./p-ae263544.js";import{a}from"./p-df21aaad.js";import{g as h,f as n}from"./p-83125497.js";const r={bankAccount:"New bank account",card:"New credit or debit card"},c=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.authToken=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.paymentMethodGroupId=void 0,this.isSelected=void 0,this.saveNewPaymentMethodChecked=!1}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async resolvePaymentMethod(t){var i,e;if(!this.paymentMethodFormRef||!this.billingFormRef)return;if(!await this.validate()||!t.isValid)return{validationError:!0};const o=await this.tokenize();if(o.error)return{error:o.error};{const t=o.data;return{token:(null===(i=t.card)||void 0===i?void 0:i.token)||(null===(e=t.bank_account)||void 0===e?void 0:e.token)}}}async validate(){const t=await this.billingFormRef.validate(),i=await this.paymentMethodFormRef.validate();return t.isValid&&i.isValid}async tokenize(){try{const t=await this.billingFormRef.getValues();let i;i=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const e=this.authToken;return await this.paymentMethodFormRef.tokenize(e,i,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var t;return e("div",{class:"mt-2 pb-4 border-bottom"},e("div",{class:"mb-3"},e("justifi-payment-method-form",{ref:t=>this.paymentMethodFormRef=t,"payment-method-form-type":null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,"iframe-origin":this.iframeOrigin})),e("h3",{class:"fs-6 fw-bold lh-lg mb-4"},"Billing address"),e("justifi-billing-form",{ref:t=>this.billingFormRef=t}),e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}render(){var t,i,o,s;return e("div",{key:"93c3e6d38d1e18be54006bf82cd6c8148df3518d",class:"payment-method"},e("div",{key:"6dbb687fbd3e33a6095be7c39ec0974bcc4809b8",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"796868afd192703a81d94897872dd9c0504cbc1e",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},r[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id])),this.isSelected?this.showNewPaymentMethodForm():null)}};class l{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=h(t.type)}}var v;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(v||(v={}));const u=class{constructor(e){t(this,e),this.toggleCreatingNewPaymentMethod=i(this,"toggleCreatingNewPaymentMethod",7),this.showCard=void 0,this.showAch=void 0,this.showBnpl=void 0,this.showSavedPaymentMethods=void 0,this.paymentMethodGroupId=void 0,this.bnpl=void 0,this.insuranceToggled=void 0,this.authToken=void 0,this.accountId=void 0,this.iframeOrigin=d.iframeOrigin,this.savedPaymentMethods=[],this.paymentAmount=void 0,this.selectedPaymentMethodId=void 0,this.paymentMethodOptions=[]}async fillBillingForm(t){const i=this.selectedPaymentMethodOptionRef;i.fillBillingForm&&i.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,i;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new l(t))).filter((t=>(this.showCard||t.type!==a.card)&&(this.showAch||t.type!==a.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new l({id:a.sezzle})),this.showCard&&this.paymentMethodOptions.push(new l({id:a.card})),this.showAch&&this.paymentMethodOptions.push(new l({id:a.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(i=this.paymentMethodOptions[0])||void 0===i?void 0:i.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var i;return await(null===(i=this.selectedPaymentMethodOptionRef)||void 0===i?void 0:i.resolvePaymentMethod(t))}render(){var t;return e(o,{key:"86e309b90ab00f530dd803b00e5aab511f92300f"},null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.map((t=>{const i=this.selectedPaymentMethodId===t.id,o=t.id===a.sezzle;return t.id===a.card||t.id===a.bankAccount?e("justifi-new-payment-method",{paymentMethodOption:t,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,paymentMethodGroupId:this.paymentMethodGroupId,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):o?e("justifi-sezzle-payment-method",{paymentMethodOption:t,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?e("justifi-saved-payment-method",{paymentMethodOption:t,"is-selected":i,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}};u.style=":host{display:block}.payment-method-header{cursor:pointer;color:var(--jfi-radio-button-group-color);background-color:var(--jfi-radio-button-group-background-color);border-bottom:var(--jfi-radio-button-group-divider)}.payment-method-header:hover{color:var(--jfi-radio-button-group-color-hover);background-color:var(--jfi-radio-button-group-background-color-hover)}.form-check-input,label{cursor:pointer}.form-check-input{background-color:var(--jfi-radio-button-background-color);border-color:var(--jfi-radio-button-border-color)}.form-check-input:checked,.form-check-input:checked:focus{background-color:var(--jfi-radio-button-background-color-selected);border-color:var(--jfi-radio-button-border-color-selected)}.form-check-input:focus{border-color:var(--jfi-radio-button-border-color-focus);box-shadow:var(--jfi-radio-button-box-shadow-focus)}";const b=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.paymentMethodOption=void 0,this.isSelected=void 0}async resolvePaymentMethod(t){var i;return t.isValid?{token:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id}:{validationError:!0}}render(){var t,i,o,d,a;return e(s,{key:"9c2174123f1675d60bc48d8109821c0bc2ad7682"},e("div",{key:"07bffce2603110d44f38ffb2f57a60f07faddb3b",class:"payment-method"},e("div",{key:"f489d3a05db45c2b2581bc8f0fc093afed453d91",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"70681612520aa621c39a017b72b25a7dd3211282",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},v[null===(d=this.paymentMethodOption)||void 0===d?void 0:d.brand]," *",null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four))))}},m=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"}}),f=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((i=>{t=i}));const i=this.bnpl,e=+this.paymentAmount,o=new(0,window.Checkout)({mode:"popup",publicKey:i.provider_client_id,apiMode:i.provider_mode,apiVersion:i.provider_api_version});o.sezzleButtonElement=this.sezzleButtonRef,o.init({onClick:function(t){t.preventDefault(),o.startCheckout({checkout_url:i.provider_checkout_url})},onComplete:i=>t({bnpl:i.data}),onCancel:i=>t({bnpl:i.data}),onFailure:i=>t({bnpl:i.data})}),this.sezzleCheckout=o,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)},this.iframeOrigin=d.iframeOrigin,this.bnpl=void 0,this.clientId=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.isSelected=void 0,this.paymentAmount=void 0,this.installmentPlan=void 0,this.sezzleCheckout=void 0,this.sezzlePromise=void 0}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var t,i,o,s,d;return e("div",{key:"4deca512311cd98d358c7099141b15538857a4e5",class:"payment-method"},e("script",{key:"94b232291153bba85efebb101e7e6e816857da96",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{key:"7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"1e15e6c2ddced23b049e2559da27532f9be94fb5",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"0a3637002ef373c05424d6769b070d9db0e66ce8",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},e("div",{key:"6398e2f00088edf8a1a3699e149760744dda4cb1"},"Buy now, pay later with ",m),this.installmentPlan&&e("small",{key:"bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8"},e("span",{key:"c07fd5d32fe897a45a67140e2cb81b1f4d537c4a"},null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",e("span",{key:"2b11e4aa6389a4b98cd003c031aed8f01ec8a4df"},this.installmentPlan.schedule," payments of")," ",e("span",{key:"90cf3bfa1f0d36c8d4719f164d436407d7fc692b",class:"fw-bold"},n(null===(d=this.installmentPlan)||void 0===d?void 0:d.installments[0].amountInCents))))))}};export{c as justifi_new_payment_method,u as justifi_payment_method_options,b as justifi_saved_payment_method,f as justifi_sezzle_payment_method}
|
|
1
|
+
import{r as t,c as i,h as e,H as o,F as s}from"./p-fad19d75.js";import{c as d}from"./p-ae263544.js";import{a}from"./p-df21aaad.js";import{g as h,f as n}from"./p-5e2c9ec8.js";const r={bankAccount:"New bank account",card:"New credit or debit card"},c=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.authToken=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.paymentMethodGroupId=void 0,this.isSelected=void 0,this.saveNewPaymentMethodChecked=!1}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async resolvePaymentMethod(t){var i,e;if(!this.paymentMethodFormRef||!this.billingFormRef)return;if(!await this.validate()||!t.isValid)return{validationError:!0};const o=await this.tokenize();if(o.error)return{error:o.error};{const t=o.data;return{token:(null===(i=t.card)||void 0===i?void 0:i.token)||(null===(e=t.bank_account)||void 0===e?void 0:e.token)}}}async validate(){const t=await this.billingFormRef.validate(),i=await this.paymentMethodFormRef.validate();return t.isValid&&i.isValid}async tokenize(){try{const t=await this.billingFormRef.getValues();let i;i=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const e=this.authToken;return await this.paymentMethodFormRef.tokenize(e,i,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var t;return e("div",{class:"mt-2 pb-4 border-bottom"},e("div",{class:"mb-3"},e("justifi-payment-method-form",{ref:t=>this.paymentMethodFormRef=t,"payment-method-form-type":null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,"iframe-origin":this.iframeOrigin})),e("h3",{class:"fs-6 fw-bold lh-lg mb-4"},"Billing address"),e("justifi-billing-form",{ref:t=>this.billingFormRef=t}),e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}render(){var t,i,o,s;return e("div",{key:"93c3e6d38d1e18be54006bf82cd6c8148df3518d",class:"payment-method"},e("div",{key:"6dbb687fbd3e33a6095be7c39ec0974bcc4809b8",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"796868afd192703a81d94897872dd9c0504cbc1e",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},r[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id])),this.isSelected?this.showNewPaymentMethodForm():null)}};class l{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=h(t.type)}}var v;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(v||(v={}));const u=class{constructor(e){t(this,e),this.toggleCreatingNewPaymentMethod=i(this,"toggleCreatingNewPaymentMethod",7),this.showCard=void 0,this.showAch=void 0,this.showBnpl=void 0,this.showSavedPaymentMethods=void 0,this.paymentMethodGroupId=void 0,this.bnpl=void 0,this.insuranceToggled=void 0,this.authToken=void 0,this.accountId=void 0,this.iframeOrigin=d.iframeOrigin,this.savedPaymentMethods=[],this.paymentAmount=void 0,this.selectedPaymentMethodId=void 0,this.paymentMethodOptions=[]}async fillBillingForm(t){const i=this.selectedPaymentMethodOptionRef;i.fillBillingForm&&i.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,i;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new l(t))).filter((t=>(this.showCard||t.type!==a.card)&&(this.showAch||t.type!==a.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new l({id:a.sezzle})),this.showCard&&this.paymentMethodOptions.push(new l({id:a.card})),this.showAch&&this.paymentMethodOptions.push(new l({id:a.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(i=this.paymentMethodOptions[0])||void 0===i?void 0:i.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var i;return await(null===(i=this.selectedPaymentMethodOptionRef)||void 0===i?void 0:i.resolvePaymentMethod(t))}render(){var t;return e(o,{key:"86e309b90ab00f530dd803b00e5aab511f92300f"},null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.map((t=>{const i=this.selectedPaymentMethodId===t.id,o=t.id===a.sezzle;return t.id===a.card||t.id===a.bankAccount?e("justifi-new-payment-method",{paymentMethodOption:t,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,paymentMethodGroupId:this.paymentMethodGroupId,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):o?e("justifi-sezzle-payment-method",{paymentMethodOption:t,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?e("justifi-saved-payment-method",{paymentMethodOption:t,"is-selected":i,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}};u.style=":host{display:block}.payment-method-header{cursor:pointer;color:var(--jfi-radio-button-group-color);background-color:var(--jfi-radio-button-group-background-color);border-bottom:var(--jfi-radio-button-group-divider)}.payment-method-header:hover{color:var(--jfi-radio-button-group-color-hover);background-color:var(--jfi-radio-button-group-background-color-hover)}.form-check-input,label{cursor:pointer}.form-check-input{background-color:var(--jfi-radio-button-background-color);border-color:var(--jfi-radio-button-border-color)}.form-check-input:checked,.form-check-input:checked:focus{background-color:var(--jfi-radio-button-background-color-selected);border-color:var(--jfi-radio-button-border-color-selected)}.form-check-input:focus{border-color:var(--jfi-radio-button-border-color-focus);box-shadow:var(--jfi-radio-button-box-shadow-focus)}";const b=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.paymentMethodOption=void 0,this.isSelected=void 0}async resolvePaymentMethod(t){var i;return t.isValid?{token:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id}:{validationError:!0}}render(){var t,i,o,d,a;return e(s,{key:"9c2174123f1675d60bc48d8109821c0bc2ad7682"},e("div",{key:"07bffce2603110d44f38ffb2f57a60f07faddb3b",class:"payment-method"},e("div",{key:"f489d3a05db45c2b2581bc8f0fc093afed453d91",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"70681612520aa621c39a017b72b25a7dd3211282",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},v[null===(d=this.paymentMethodOption)||void 0===d?void 0:d.brand]," *",null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four))))}},m=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"}}),f=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((i=>{t=i}));const i=this.bnpl,e=+this.paymentAmount,o=new(0,window.Checkout)({mode:"popup",publicKey:i.provider_client_id,apiMode:i.provider_mode,apiVersion:i.provider_api_version});o.sezzleButtonElement=this.sezzleButtonRef,o.init({onClick:function(t){t.preventDefault(),o.startCheckout({checkout_url:i.provider_checkout_url})},onComplete:i=>t({bnpl:i.data}),onCancel:i=>t({bnpl:i.data}),onFailure:i=>t({bnpl:i.data})}),this.sezzleCheckout=o,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)},this.iframeOrigin=d.iframeOrigin,this.bnpl=void 0,this.clientId=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.isSelected=void 0,this.paymentAmount=void 0,this.installmentPlan=void 0,this.sezzleCheckout=void 0,this.sezzlePromise=void 0}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var t,i,o,s,d;return e("div",{key:"4deca512311cd98d358c7099141b15538857a4e5",class:"payment-method"},e("script",{key:"94b232291153bba85efebb101e7e6e816857da96",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{key:"7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"1e15e6c2ddced23b049e2559da27532f9be94fb5",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"0a3637002ef373c05424d6769b070d9db0e66ce8",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},e("div",{key:"6398e2f00088edf8a1a3699e149760744dda4cb1"},"Buy now, pay later with ",m),this.installmentPlan&&e("small",{key:"bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8"},e("span",{key:"c07fd5d32fe897a45a67140e2cb81b1f4d537c4a"},null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",e("span",{key:"2b11e4aa6389a4b98cd003c031aed8f01ec8a4df"},this.installmentPlan.schedule," payments of")," ",e("span",{key:"90cf3bfa1f0d36c8d4719f164d436407d7fc692b",class:"fw-bold"},n(null===(d=this.installmentPlan)||void 0===d?void 0:d.installments[0].amountInCents))))))}};export{c as justifi_new_payment_method,u as justifi_payment_method_options,b as justifi_saved_payment_method,f as justifi_sezzle_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as a,h as t}from"./p-fad19d75.js";import{M as d,f as s,b,c as i,s as f}from"./p-
|
|
1
|
+
import{r as e,c as a,h as t}from"./p-fad19d75.js";import{M as d,f as s,b,c as i,s as f}from"./p-5e2c9ec8.js";import{a as c,b as l,D as h,c as r,C as o,E as y,L as n}from"./p-dce846bf.js";import{S as u}from"./p-ba4bae6f.js";const k=class{constructor(t){e(this,t),this.errorEvent=a(this,"error-event",7),this.getPaymentDetails=void 0,this.payment=void 0,this.loading=!0,this.errorMessage=void 0}componentWillLoad(){this.getPaymentDetails&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.loading=!1,this.errorMessage=null},onError:({error:e,code:a,severity:t})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:a,message:e,severity:t}),this.loading=!1}})}render(){var e;return t(u,{key:"aaaea4076938af5a74197256dba1093265f0e2d6"},this.loading&&n(),!this.loading&&this.errorMessage&&y(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&t("justifi-details",{key:"12f06fa05915380403e244cbed053d0c04bfa1d4","error-message":this.errorMessage},t(c,{key:"4d496def6abfc728e6f184fb0729ac648fb2deaf",slot:"head-info",badge:t("span",{slot:"badge",innerHTML:d(this.payment.status)}),title:`${s(this.payment.amount)} ${null===(e=this.payment)||void 0===e?void 0:e.currency.toUpperCase()}`},t(l,{key:"78dcff13206646d594bdc80f6297d45dc9932694",classes:"border-1 border-end",title:"Updated At",value:`${b(this.payment.updated_at)} ${i(this.payment.updated_at)}`}),t(l,{key:"dfa0de667ebd28efd217b6bdf548b9b1b728b57e",classes:"border-1 border-end",title:"Created At",value:`${b(this.payment.created_at)} ${i(this.payment.created_at)}`}),t(l,{key:"b449b180034f28504007a9c2fb0598607dc00efb",title:"ID",value:this.payment.id})),t("div",{key:"62af84e244e38b24b32f791d13f1b21b49942597",slot:"detail-sections"},t(h,{key:"0ddb0366b4ab737c7b08a37764b8ce2f7ec4a1e9",sectionTitle:"Details"}),t("div",{key:"cb699194db16cb8608834779f560e882f6f9da7c",class:"d-table gap-2 w-100"},t(r,{key:"3b6eb4a8b782668951bba90be3b5d522f3f7c69b",title:"Amount",value:s(this.payment.amount)}),t(r,{key:"7a59ab0b12a263c38c40a98acbff6492d370b28b",title:"Fees",value:s(this.payment.fee_amount)}),t(r,{key:"a9eaa5d1959425205c144dc2aa7c7fad77014290",title:"Refunded",value:s(this.payment.amount_refunded)}),t(r,{key:"d70c3a4bf48c9c69625d5f27f1095f9b0744a71e",title:"Net",value:s(this.payment.balance)}),t(r,{key:"28f526b1adcd475c2ae88a8bf09ae4aea7935df6",title:"Status",value:d(this.payment.status)}),t(r,{key:"700f51d787f20f575e3e11aa72a8da29a9587c2a",title:"Payment ID",value:this.payment.id}),t(r,{key:"ea72ecc9c2f5055d4b0f6b37cd16cb318f9a797c",title:"Processing Fees",value:s(this.payment.fee_amount)}),t(r,{key:"9d66af2c0c0baef4e8b7b021daf0b4d6adb267d2",title:"Statement Descriptor",value:this.payment.statement_descriptor}),t(r,{key:"3f21501c1e08feeee1e7427a42faf1c5d1d9c84d",title:"Description",value:this.payment.description})),this.payment.payment_method.card&&[t(h,{key:"b7767b93e090c0195aca6c99b66b48d61b6134b3",sectionTitle:"Payment Method"}),t("div",{key:"a363c7a7e69932a8ffeddb5e0d53f7df13119a9a",class:"d-table gap-2 w-100"},t(r,{key:"fb0e1f64fcec23e513590b3048593565685d8400",title:"ID",value:this.payment.payment_method.card.id}),t(r,{key:"bc181b1b94039e1aad341a8e563ba923976c806b",title:"Payment Type",value:"Card"}),t(r,{key:"88b21dd2368b88232cd0f464c381d4423fe3c774",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),t(r,{key:"040fd71315ead633f9c89e9a9dad906889759d77",title:"Brand",value:f(this.payment.payment_method.card.brand)}),t(r,{key:"35ebc74de2c5c8fafd95fc5b15ff4f2ca85220cc",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[t(h,{key:"f10eef0b4e4067fb78dbff16719a6f266f4e6bab",sectionTitle:"Payment Method"}),t("div",{key:"6c1ef713b5dcabba5b516f3cbbd088d098873303",class:"d-table gap-2 w-100"},t(r,{key:"8880fd0fb2b16ee6f177aba15d6f4485c95af252",title:"ID",value:this.payment.payment_method.bank_account.id}),t(r,{key:"baa70304d2972f69ce8a5d077a076b16f986745b",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),t(r,{key:"dcb63b9258bea698bf2d165c611dfa05cb320f30",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),t(r,{key:"806696c15aa5ef242c230d9c9aea642ddfdfd93d",title:"Account Owner",value:this.payment.payment_method.payersName}))],t(h,{key:"83289d8f2cf57a624678260555f00af4ea96a566",sectionTitle:"Metadata"}),t("div",{key:"02e248b962e0c06f4d83bae75a5759b234fea36b",class:"d-table gap-2 w-100"},t(o,{key:"5d81879c7815102219ed010dab9f573ad6b7985d",metadata:this.payment.metadata})))))}static get watchers(){return{getPaymentDetails:["updateOnPropChange"]}}};export{k as payment_details_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,H as r}from"./p-fad19d75.js";import{E as e}from"./p-dce846bf.js";import{B as o}from"./p-
|
|
1
|
+
import{r as s,c as i,h as t,H as r}from"./p-fad19d75.js";import{E as e}from"./p-dce846bf.js";import{B as o}from"./p-f5b5e47b.js";import{B as a}from"./p-5e7c60d8.js";import{C as n,a as d}from"./p-14c91ffd.js";import{g as c,a as h}from"./p-8115b2f4.js";import{J as p}from"./p-82cff30c.js";import"./p-ae263544.js";import"./p-7d3be485.js";import"./p-1ff8810b.js";import"./p-6078a370.js";import"./p-0052db77.js";const m=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.businessId=void 0,this.authToken=void 0,this.errorMessage=void 0,this.getBusiness=void 0}componentWillLoad(){this.analytics=new p(this),this.initializeGetBusiness()}disconnectedCallback(){this.analytics.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:d.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR});this.getBusiness=(({id:s,authToken:i,service:t})=>async({onSuccess:r,onError:e})=>{var o;try{const d=await t.fetchBusiness(s,i);if(d.error)return e({error:c(d.error),code:h(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});r({business:new a(d.data)})}catch(s){const i=h(null==s?void 0:s.code);return e({error:s.message||s,code:i,severity:n.ERROR})}})({id:this.businessId,authToken:this.authToken,service:new o})}render(){return t(r,null,this.errorMessage?e(this.errorMessage):t("business-details-core",{getBusiness:this.getBusiness}))}};export{m as justifi_business_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./p-
|
|
1
|
+
import{a as e}from"./p-5e7c60d8.js";const a=[{label:"Choose business classification",value:""},{label:"Sole Proprietor",value:e.sole_proprietor},{label:"Partnership",value:e.partnership},{label:"Corporation",value:e.corporation},{label:"Public Company",value:e.public_company},{label:"Limited Liability Company (LLC)",value:e.limited},{label:"Non Profit",value:e.non_profit},{label:"Government",value:e.government}],l=[{label:"Within 7 days",value:"Within 7 days"},{label:"Within 30 days",value:"Within 30 days"},{label:"Within 90 days",value:"Within 90 days"},{label:"Within 120 days",value:"Within 120 days"},{label:"More than 120 days",value:"More than 120 days"}],s=[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],i=[{label:"Yes. The majority of the business revenue is generated in 3-6 months.",value:"Yes"},{label:"No. The business revenue is generated evenly throughout the year.",value:"No"}],n=[{label:"Checking",value:"checking"},{label:"Savings",value:"savings"}];export{l as a,a as b,n as c,s as r,i as s}
|