@justifi/webcomponents 4.19.2-rc → 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-66574423.js → Analytics-c866f471.js} +4 -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-cf545610.js → business-additional-questions-schema-26b0eecb.js} +1 -1
- package/dist/cjs/{business-form-options-582467fe.js → business-form-options-5db0bd5e.js} +2 -2
- package/dist/cjs/{payload-parsers-1cbc3b57.js → business-identity-schema-503ecb77.js} +1 -47
- package/dist/cjs/{business.service-090a21e1.js → business.service-65b0dbc8.js} +7 -6
- package/dist/cjs/config-ff2dda66.js +15 -0
- 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-238e839a.js → get-payout-csv-b98b0651.js} +5 -4
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +15 -14
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +14 -13
- package/dist/cjs/justifi-card-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +4 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +6 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +10 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -11
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +8 -7
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -6
- package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +4 -3
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -5
- package/dist/cjs/{package-0b65a049.js → package-0c613220.js} +4 -2
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-c92635c8.js → payment.service-33d6ac16.js} +4 -3
- 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-2733de42.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 +2 -1
- package/dist/collection/api/services/business.service.js +6 -5
- package/dist/collection/api/services/checkout.service.js +3 -2
- package/dist/collection/api/services/insurance.service.js +3 -2
- package/dist/collection/api/services/payment.service.js +3 -2
- package/dist/collection/api/services/payout.service.js +4 -3
- package/dist/collection/api/services/provision.service.js +4 -2
- package/dist/collection/api/services/reports.service.js +2 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-form.js +5 -5
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
- package/dist/collection/components/card-form/card-form.js +4 -3
- package/dist/collection/components/checkout/checkout-core.js +4 -3
- package/dist/collection/components/checkout/new-payment-method.js +4 -3
- package/dist/collection/components/checkout/payment-method-options.js +4 -3
- package/dist/collection/components/checkout/saved-payment-method.js +4 -3
- package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
- package/dist/collection/components/payment-form/payment-form.js +4 -3
- package/dist/collection/components/refund-form/refund-form.js +3 -2
- package/dist/config.js +11 -0
- package/dist/docs.json +9 -9
- package/dist/esm/{Analytics-6f321899.js → Analytics-3e74964a.js} +4 -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-956e3caf.js → business-additional-questions-schema-a5583cf8.js} +1 -1
- package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-d790973e.js} +2 -2
- package/dist/esm/{payload-parsers-acb719d1.js → business-identity-schema-9e3269fb.js} +2 -44
- package/dist/esm/{business.service-37d0cc72.js → business.service-6f139c2b.js} +7 -6
- package/dist/esm/config-476c7241.js +13 -0
- 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-a702a0d9.js → get-payout-csv-383d96c1.js} +5 -4
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +15 -14
- package/dist/esm/justifi-bank-account-form.entry.js +6 -5
- package/dist/esm/justifi-billing-form_2.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +6 -5
- package/dist/esm/justifi-business-form.entry.js +13 -12
- package/dist/esm/justifi-card-form.entry.js +6 -5
- package/dist/esm/justifi-checkout-core.entry.js +4 -3
- package/dist/esm/justifi-checkout.entry.js +6 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +5 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +10 -9
- package/dist/esm/justifi-owner-form_3.entry.js +11 -10
- package/dist/esm/justifi-payment-details.entry.js +5 -4
- package/dist/esm/justifi-payment-form.entry.js +8 -7
- package/dist/esm/justifi-payment-method-form.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +7 -6
- package/dist/esm/justifi-payments-list.entry.js +5 -4
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -4
- package/dist/esm/justifi-refund-form.entry.js +4 -3
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -5
- package/dist/esm/{package-9f727069.js → package-925a0fdd.js} +4 -2
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-9359fe15.js → payment.service-e4fb5953.js} +4 -3
- 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-a83ff220.js → schema-validations-e725d701.js} +2 -2
- package/dist/esm/{utils-3c1dd2fa.js → utils-e66d8bca.js} +1 -16
- package/dist/module/Analytics.js +2 -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 +4 -3
- package/dist/module/business-core-info-form-step-core.js +3 -5
- package/dist/module/business-document-upload-form-step.js +4 -3
- 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-form-options.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 +4 -3
- package/dist/module/business.service.js +6 -5
- package/dist/module/checkout-core.js +3 -2
- package/dist/module/config.js +13 -0
- package/dist/module/get-payout-csv.js +4 -3
- package/dist/module/justifi-bank-account-form.js +3 -2
- package/dist/module/justifi-business-form.js +5 -5
- package/dist/module/justifi-card-form.js +3 -2
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-payment-form.js +4 -3
- package/dist/module/justifi-payment-provisioning.js +3 -2
- package/dist/module/justifi-refund-form.js +3 -2
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/legal-address-form-step-core.js +3 -4
- package/dist/module/new-payment-method.js +3 -2
- package/dist/module/owner-form-core2.js +4 -5
- package/dist/module/package.js +4 -2
- package/dist/module/payment-details-core2.js +1 -1
- package/dist/module/payment-method-options.js +3 -2
- package/dist/module/payment.service.js +3 -2
- 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 +4 -3
- package/dist/module/sezzle-payment-method.js +3 -2
- 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/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
- package/dist/webcomponents/p-0052db77.js +1 -0
- package/dist/webcomponents/p-039183f1.entry.js +1 -0
- package/dist/webcomponents/p-08a39a65.entry.js +1 -0
- package/dist/webcomponents/{p-462dc522.entry.js → p-124c1ecd.entry.js} +1 -1
- package/dist/webcomponents/p-1647f06b.entry.js +1 -0
- package/dist/webcomponents/p-1815a43b.js +1 -0
- 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-20cee11b.entry.js +1 -0
- package/dist/webcomponents/{p-3fd13ca3.js → p-277aee05.js} +1 -1
- package/dist/webcomponents/p-2a5cc4ee.entry.js +1 -0
- package/dist/webcomponents/p-3b1340dc.js +1 -0
- package/dist/webcomponents/p-43eff822.entry.js +1 -0
- package/dist/webcomponents/p-4e01fec8.entry.js +1 -0
- package/dist/webcomponents/{p-89887332.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-6c2fc744.entry.js +1 -0
- 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-8eb10f02.js +1 -0
- package/dist/webcomponents/p-8f9fb5c3.entry.js +1 -0
- package/dist/webcomponents/p-9649b022.entry.js +1 -0
- package/dist/webcomponents/p-9c076da2.entry.js +1 -0
- package/dist/webcomponents/p-ae263544.js +1 -0
- package/dist/webcomponents/p-af0aeba4.entry.js +1 -0
- package/dist/webcomponents/p-b1408dea.entry.js +1 -0
- package/dist/webcomponents/p-ba95679b.entry.js +1 -0
- package/dist/webcomponents/p-bd2bb302.entry.js +1 -0
- package/dist/webcomponents/p-d2af90c2.entry.js +1 -0
- package/dist/webcomponents/{p-4abc17f0.entry.js → p-d76002d5.entry.js} +1 -1
- package/dist/webcomponents/{p-8e541a32.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-f5b5e47b.js +1 -0
- package/dist/webcomponents/{p-d23e1960.entry.js → p-f844d67b.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +4 -2
- package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
- package/dist/globals.d.ts +0 -2
- 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-04a61500.entry.js +0 -1
- package/dist/webcomponents/p-0e1bc91e.js +0 -1
- package/dist/webcomponents/p-14fdc01c.entry.js +0 -1
- package/dist/webcomponents/p-17e4246f.entry.js +0 -1
- package/dist/webcomponents/p-2b79f265.entry.js +0 -1
- package/dist/webcomponents/p-30a493cd.entry.js +0 -1
- package/dist/webcomponents/p-32211b2f.entry.js +0 -1
- package/dist/webcomponents/p-3352353a.entry.js +0 -1
- package/dist/webcomponents/p-3c6a8a36.entry.js +0 -1
- package/dist/webcomponents/p-47d79529.js +0 -1
- package/dist/webcomponents/p-72d42a01.entry.js +0 -1
- package/dist/webcomponents/p-77cf6f75.entry.js +0 -1
- package/dist/webcomponents/p-7c0002c6.js +0 -1
- package/dist/webcomponents/p-85960c15.entry.js +0 -1
- package/dist/webcomponents/p-85fc69e5.js +0 -1
- package/dist/webcomponents/p-8a038cd9.js +0 -1
- package/dist/webcomponents/p-8e7d4df4.entry.js +0 -1
- package/dist/webcomponents/p-af244664.js +0 -1
- package/dist/webcomponents/p-b29f5084.entry.js +0 -1
- package/dist/webcomponents/p-b4b8b531.js +0 -1
- package/dist/webcomponents/p-ba5fae28.js +0 -1
- package/dist/webcomponents/p-bd2ecd23.entry.js +0 -1
- package/dist/webcomponents/p-c8c3a97d.entry.js +0 -1
- package/dist/webcomponents/p-cd37a87e.entry.js +0 -1
- package/dist/webcomponents/p-e14c133e.entry.js +0 -1
- package/dist/webcomponents/p-e789152a.entry.js +0 -1
- package/dist/webcomponents/p-ecdf60f6.entry.js +0 -1
- package/dist/webcomponents/p-f117d1d1.entry.js +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Api } from "..";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
export class CheckoutService {
|
|
3
4
|
async fetchCheckout(authToken, checkoutId) {
|
|
4
5
|
const endpoint = `checkouts/${checkoutId}`;
|
|
5
|
-
return Api({ authToken, apiOrigin:
|
|
6
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
6
7
|
}
|
|
7
8
|
async complete(authToken, checkoutId, payment) {
|
|
8
9
|
const endpoint = `checkouts/${checkoutId}/complete`;
|
|
@@ -12,6 +13,6 @@ export class CheckoutService {
|
|
|
12
13
|
if (payment.payment_token) {
|
|
13
14
|
payload.payment_token = payment.payment_token;
|
|
14
15
|
}
|
|
15
|
-
return Api({ authToken, apiOrigin:
|
|
16
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Api } from "..";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
export class InsuranceService {
|
|
3
4
|
async fetchQuote(authToken, payload) {
|
|
4
5
|
const endpoint = 'insurance/quotes';
|
|
5
|
-
return Api({ authToken, apiOrigin:
|
|
6
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
6
7
|
}
|
|
7
8
|
async toggleCoverage(authToken, quoteId, payload) {
|
|
8
9
|
const endpoint = `insurance/quotes/${quoteId}/toggle`;
|
|
9
|
-
return Api({ authToken, apiOrigin:
|
|
10
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Api } from "..";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
export class PaymentService {
|
|
3
4
|
async fetchPayments(accountId, authToken, params) {
|
|
4
|
-
const api = Api({ authToken, apiOrigin:
|
|
5
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
5
6
|
const endpoint = `account/${accountId}/payments`;
|
|
6
7
|
return api.get(endpoint, params);
|
|
7
8
|
}
|
|
8
9
|
async fetchPayment(paymentId, authToken) {
|
|
9
10
|
const endpoint = `payments/${paymentId}`;
|
|
10
|
-
return Api({ authToken, apiOrigin:
|
|
11
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Api } from "..";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
export class PayoutService {
|
|
3
4
|
async fetchPayouts(accountId, authToken, params) {
|
|
4
|
-
const api = Api({ authToken, apiOrigin:
|
|
5
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
5
6
|
const endpoint = `account/${accountId}/payouts`;
|
|
6
7
|
return api.get(endpoint, params);
|
|
7
8
|
}
|
|
8
9
|
async fetchPayout(payoutId, authToken) {
|
|
9
|
-
const api = Api({ authToken, apiOrigin:
|
|
10
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
10
11
|
const endpoint = `payouts/${payoutId}`;
|
|
11
12
|
return api.get(endpoint);
|
|
12
13
|
}
|
|
13
14
|
async fetchCSV(payoutId, authToken) {
|
|
14
|
-
const api = Api({ authToken, apiOrigin:
|
|
15
|
+
const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
|
|
15
16
|
const endpoint = `reports/payouts/${payoutId}`;
|
|
16
17
|
return api.get(endpoint);
|
|
17
18
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
import Api from "../Api";
|
|
3
|
+
;
|
|
2
4
|
export class ProvisionService {
|
|
3
5
|
async postProvisioning(authToken, businessId, product) {
|
|
4
6
|
const endpoint = `entities/provisioning`;
|
|
5
7
|
const payload = {
|
|
6
8
|
business_id: businessId,
|
|
7
|
-
product_category: product
|
|
9
|
+
product_category: product
|
|
8
10
|
};
|
|
9
|
-
return Api({ authToken, apiOrigin:
|
|
11
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
import Api from "../Api";
|
|
2
3
|
export class ReportsService {
|
|
3
4
|
async fetchGrossVolumeChartData(accountId, authToken) {
|
|
4
|
-
const api = Api({ authToken: authToken, apiOrigin:
|
|
5
|
+
const api = Api({ authToken: authToken, apiOrigin: config.proxyApiOrigin });
|
|
5
6
|
const endpoint = `account/${accountId}/reports/gross_volume`;
|
|
6
7
|
return api.get(endpoint);
|
|
7
8
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { h, } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import JustifiAnalytics from "../../api/Analytics";
|
|
3
4
|
export class BankAccountForm {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.validationMode = undefined;
|
|
6
|
-
this.iframeOrigin =
|
|
7
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
7
8
|
this.internalStyleOverrides = undefined;
|
|
8
9
|
}
|
|
9
10
|
readyHandler(event) {
|
|
@@ -55,7 +56,7 @@ export class BankAccountForm {
|
|
|
55
56
|
return this.childRef.resize();
|
|
56
57
|
}
|
|
57
58
|
render() {
|
|
58
|
-
return (h("justifi-payment-method-form", { key: '
|
|
59
|
+
return (h("justifi-payment-method-form", { key: 'e2fa64d199a6c550329c9797a6951335e7c12bc6', ref: el => {
|
|
59
60
|
if (el) {
|
|
60
61
|
this.childRef = el;
|
|
61
62
|
}
|
|
@@ -97,7 +98,7 @@ export class BankAccountForm {
|
|
|
97
98
|
},
|
|
98
99
|
"attribute": "iframe-origin",
|
|
99
100
|
"reflect": false,
|
|
100
|
-
"defaultValue": "
|
|
101
|
+
"defaultValue": "config.iframeOrigin"
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
104
|
}
|
|
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { FormController } from "../../form/form";
|
|
3
3
|
import { businessFormSchema } from "../schemas/business-form-schema";
|
|
4
4
|
import { Api } from "../../../api";
|
|
5
|
-
import {
|
|
5
|
+
import { config } from "../../../../config";
|
|
6
6
|
import { BusinessFormClickActions, BusinessFormServerErrors } from "../utils/business-form-types";
|
|
7
7
|
import { Business } from "../../../api/Business";
|
|
8
8
|
import JustifiAnalytics from "../../../api/Analytics";
|
|
@@ -23,8 +23,8 @@ export class BusinessForm {
|
|
|
23
23
|
try {
|
|
24
24
|
const values = this.formController.values.getValue();
|
|
25
25
|
const initialValues = this.formController.getInitialValues();
|
|
26
|
-
const payload =
|
|
27
|
-
const response = await this.api.patch(this.businessEndpoint,
|
|
26
|
+
const payload = new Business(Object.assign(Object.assign({}, initialValues), values)).payload;
|
|
27
|
+
const response = await this.api.patch(this.businessEndpoint, payload);
|
|
28
28
|
this.handleReponse(response);
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
@@ -68,7 +68,7 @@ export class BusinessForm {
|
|
|
68
68
|
if (!this.businessId)
|
|
69
69
|
console.error(missingBusinessIdMessage);
|
|
70
70
|
this.formController = new FormController(businessFormSchema);
|
|
71
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
71
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
72
72
|
this.fetchData();
|
|
73
73
|
}
|
|
74
74
|
disconnectedCallback() {
|
|
@@ -96,7 +96,7 @@ export class BusinessForm {
|
|
|
96
96
|
this.instantiateBusiness(response.data);
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(StyledHost, { key: '
|
|
99
|
+
return (h(StyledHost, { key: 'e388e1e7658969f0e5687102a62345e2790da97a', exportparts: "label,input,input-invalid" }, h("form", { key: 'c22a562e57539e982a071b1906e5bf0bcc249e7d', onSubmit: this.validateAndSubmit }, h("div", { key: '44243cd965b448f5be9058880aa2deb32f4ce8dc', class: "row gap-3" }, h("h1", { key: 'd666ed8ddacc8ac05d7f42c2f4824208b92cdb3f' }, this.title), h("form-alert", { key: 'b1d4025078c4373a789609f2e14d309f0ee280fe', text: this.errorMessage, hideAlert: this.hideErrors }), h("div", { key: 'cdc1d597a5dbf9581182de302a453e4ea98bb28f', class: "col-12 mb-4" }, h("justifi-business-core-info", { key: '2333164de020eadf54da91cabdcbeb87a2fd1b75', formController: this.formController })), h("div", { key: '74eafa5c419f6d6fe2eb3eeb8521e12175f7ee3a', class: "col-12 mb-4" }, h("justifi-legal-address-form", { key: '1e5a373f95a77bf3aba1a9f3538b3a2ac3dbf716', formController: this.formController })), h("div", { key: 'ec9f6195f3674b426722463341445f0ed1746178', class: "col-12 mb-4" }, h("justifi-additional-questions", { key: '0adbc60492f4ad71e3877c446376999418b7dc15', formController: this.formController })), h("div", { key: 'cdfb8d0d40e9f888afd9c23cd97d33d861d16f62', class: "col-12 mb-4" }, h("justifi-business-representative", { key: '4d03ec95b7c2918494c9970b3e6a5826d4d69a10', formController: this.formController })), h("div", { key: '0682dba469e57a938b175499312de5d5c4f55a69', class: "col-12 d-flex flex-row-reverse" }, h("button", { key: '64791e2742ee129787094c7123e87c4262735556', type: "submit", class: "btn btn-primary jfi-submit-button", disabled: this.disabledState, onClick: () => this.fireClickEvents({ name: BusinessFormClickActions.submit }) }, this.isLoading ? 'Loading...' : 'Submit'))))));
|
|
100
100
|
}
|
|
101
101
|
static get is() { return "justifi-business-form"; }
|
|
102
102
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,6 @@ import { FormController } from "../../form/form";
|
|
|
3
3
|
import { Owner } from "../../../api/Identity";
|
|
4
4
|
import { BusinessFormClickActions } from "../utils/business-form-types";
|
|
5
5
|
import { identitySchema } from "../schemas/business-identity-schema";
|
|
6
|
-
import { parseIdentityInfo } from "../utils/payload-parsers";
|
|
7
6
|
import { Button } from "../../../ui-components";
|
|
8
7
|
export class BusinessOwnerFormCore {
|
|
9
8
|
loadingWatcher() {
|
|
@@ -128,12 +127,12 @@ export class BusinessOwnerFormCore {
|
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
get payload() {
|
|
131
|
-
let formValues =
|
|
130
|
+
let formValues = new Owner(this.formController.values.getValue()).payload;
|
|
132
131
|
if (this.ownerId) {
|
|
133
|
-
return
|
|
132
|
+
return formValues;
|
|
134
133
|
}
|
|
135
134
|
else {
|
|
136
|
-
return
|
|
135
|
+
return Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
get formTitle() {
|
|
@@ -164,7 +163,7 @@ export class BusinessOwnerFormCore {
|
|
|
164
163
|
this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
|
|
165
164
|
}
|
|
166
165
|
render() {
|
|
167
|
-
return (h("form", { key: '
|
|
166
|
+
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' }))));
|
|
168
167
|
}
|
|
169
168
|
static get is() { return "owner-form-core"; }
|
|
170
169
|
static get properties() {
|
|
@@ -61,8 +61,8 @@ export class AdditionalQuestionsFormStepCore {
|
|
|
61
61
|
}
|
|
62
62
|
;
|
|
63
63
|
get patchPayload() {
|
|
64
|
-
let formValues = this.formController.values.getValue();
|
|
65
|
-
return
|
|
64
|
+
let formValues = new AdditionalQuestions(this.formController.values.getValue()).payload;
|
|
65
|
+
return { additional_questions: formValues };
|
|
66
66
|
}
|
|
67
67
|
componentWillLoad() {
|
|
68
68
|
this.getBusiness && this.getData();
|
|
@@ -76,7 +76,7 @@ export class AdditionalQuestionsFormStepCore {
|
|
|
76
76
|
render() {
|
|
77
77
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
78
78
|
const additionalQuestionsDefaultValue = this.formController.getInitialValues();
|
|
79
|
-
return (h("form", { key: '
|
|
79
|
+
return (h("form", { key: '275b193388d360ab6dacfb70ea9e06d68d68cbf8' }, h("fieldset", { key: '740ce0b08ad00efa1345f69cf977e64283307533' }, h("legend", { key: '7f531cdf699ad93234bbdd5d9336ee782e770597' }, "Additional Questions"), h("hr", { key: 'cb81b0b4dc9e6a52ff9bf70571a200fee50e8146' }), h("div", { key: '9100fdb4857a5a9a2b42f0188cfac075974afbeb', class: 'row gy-3' }, h("div", { key: 'ee0885251b8e49cb33359a42897097552e9d0ff9', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '555b00e0b6728dca26a42813991f35dec41e2577', name: 'business_revenue', label: 'What is the business\u2019 estimated annual revenue from its primary business activities?', inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: '689ecc46bffe9cfe7190428e191802332485f139', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '19a4269b31af12f9e07655c9dc0d9db1de46caa2', name: 'business_payment_volume', label: "What is the business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: 'f6eebbdd589cf4eb506d3d94502a027e639889d9', class: 'col-12' }, h("form-control-select", { key: '112bb7ee88335d9b8e8f9300ff190f164b750b39', name: 'business_when_service_received', label: 'On average, how long after paying will your customers typically receive their goods or services?', inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { key: '49864b5aeca86d221cc12690e2f9976fe9ee86ef', class: 'col-12' }, h("form-control-select", { key: 'a07159d8e7e49b9b1df5bcf2dcede994d0059595', name: 'business_recurring_payments', label: 'Does your business offer recurring payments?', inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_recurring_payments, options: recurringPaymentsOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments })), h("div", { key: '3a03321d7dd9202c290443d756105bb2565a3e55', class: 'col-12' }, h("form-control-text", { key: '319a5fcb7ac6e975c41cfd5b19d5de0e98504f5d', name: 'business_recurring_payments_percentage', label: 'What percent of revenue is generated from each recurring payment type offered?', inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_recurring_payments_percentage, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments_percentage })), h("div", { key: 'e108f26d04e7f9510f89ab09daab53e86f5c30e1', class: 'col-12' }, h("form-control-select", { key: '45fb9296592415ddb947b55e3c7c73d198b96fac', name: 'business_seasonal', label: 'Is this business seasonal?', inputHandler: this.inputHandler, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.business_seasonal, options: seasonalBusinessOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_seasonal })), h("div", { key: '0b40ac8429c07279acb3d360124853a608a01664', class: 'col-12' }, h("form-control-text", { key: '880e00acdfa51f95b643f1ecc8d6fccba1167e6c', name: 'business_other_payment_details', label: 'Is there anything else you would like us to know about how your customers pay the business?', inputHandler: this.inputHandler, errorText: (_g = this.errors) === null || _g === void 0 ? void 0 : _g.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
|
|
80
80
|
}
|
|
81
81
|
static get is() { return "justifi-additional-questions-form-step-core"; }
|
|
82
82
|
static get properties() {
|
|
@@ -4,6 +4,7 @@ import { BusinessFormStep } from "../../utils/business-form-types";
|
|
|
4
4
|
import { businessBankAccountSchema } from "../../schemas/business-bank-account-schema";
|
|
5
5
|
import { bankAccountTypeOptions } from "../../utils/business-form-options";
|
|
6
6
|
import { Api } from "../../../../api";
|
|
7
|
+
import { config } from "../../../../../config";
|
|
7
8
|
import { numberOnlyHandler } from "../../../form/utils";
|
|
8
9
|
import { BankAccount } from "../../../../api/BankAccount";
|
|
9
10
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
|
|
@@ -48,7 +49,7 @@ export class BusinessBankAccountFormStep {
|
|
|
48
49
|
try {
|
|
49
50
|
const formValues = this.formController.values.getValue();
|
|
50
51
|
const payload = Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
|
|
51
|
-
const response = await this.api.post(this.bankAccountEndpoint,
|
|
52
|
+
const response = await this.api.post(this.bankAccountEndpoint, payload);
|
|
52
53
|
this.handleResponse(response, onSuccess);
|
|
53
54
|
}
|
|
54
55
|
catch (error) {
|
|
@@ -104,7 +105,7 @@ export class BusinessBankAccountFormStep {
|
|
|
104
105
|
;
|
|
105
106
|
componentWillLoad() {
|
|
106
107
|
this.formController = new FormController(businessBankAccountSchema(this.allowOptionalFields));
|
|
107
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
108
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
108
109
|
if (this.businessId && this.authToken) {
|
|
109
110
|
this.fetchData();
|
|
110
111
|
}
|
|
@@ -117,7 +118,7 @@ export class BusinessBankAccountFormStep {
|
|
|
117
118
|
}
|
|
118
119
|
render() {
|
|
119
120
|
const bankAccountDefaultValue = this.formController.getInitialValues();
|
|
120
|
-
return (h("form", { key: '
|
|
121
|
+
return (h("form", { key: 'c2bdcd5ab6301d1a39e4d774df101281c41e2002' }, h("fieldset", { key: '7f6b607be5b7bc5fcd0dc1687adaa1ad00d7d2e9' }, h("legend", { key: '91b68746c65bb68f4fbd2eef151258e6915f8e35' }, "Bank Account Info"), h("hr", { key: '5eceedbf59faef10757c9e2b04d4dc4cd6b88a9b' }), h("div", { key: 'd3185db7fceb9851ccb44c1c89f8cbe5a37c24e0', class: "row gy-3" }, h("div", { key: '625caf0e9b93c244d94c69174ffff57126d39fa1', class: "col-12" }, h("form-control-text", { key: 'ddf3206b09047dfea56df850babe6c8f92ed33ee', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'd7d498353eec8e1947ce748aa35cbee63e793817', class: "col-12" }, h("form-control-text", { key: 'a80050dcd088db0209c2e5da65b310d7fc7877f5', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'ea5578470e0e4d0fd5b973807475a02c7764c9c8', class: "col-12" }, h("form-control-text", { key: 'dd8c77b43ddfca61cfd5ed39ce6e142654f18d9f', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'cb3256226c5fdfa5ff2a02c456a6c384e06d16a6', class: "col-12" }, h("form-control-select", { key: 'a865f48350a0ae6b6a2a540dc2d54de72a8af074', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'aa9062a25dade06db1f175d4233f2e5bb4e7ecd7', class: "col-12" }, h("form-control-text", { key: '1a87920e4df50178625446c770e4182d918664c7', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled })), h("div", { key: 'c72858a29aa1289b367c0eb89d6cc0eded23346d', class: "col-12" }, h("form-control-text", { key: 'b7fb93bcf16c01689245d5aca11142b013fe6adc', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled }))))));
|
|
121
122
|
}
|
|
122
123
|
static get is() { return "justifi-business-bank-account-form-step"; }
|
|
123
124
|
static get properties() {
|
|
@@ -4,8 +4,6 @@ import { FormController } from "../../../form/form";
|
|
|
4
4
|
import { CoreBusinessInfo } from "../../../../api/Business";
|
|
5
5
|
import { businessClassificationOptions } from "../../utils/business-form-options";
|
|
6
6
|
import { PHONE_MASKS } from "../../../../utils/form-input-masks";
|
|
7
|
-
import { parseCoreInfo } from "../../utils/payload-parsers";
|
|
8
|
-
import { flattenNestedObject } from "../../../../utils/utils";
|
|
9
7
|
import { numberOnlyHandler } from "../../../form/utils";
|
|
10
8
|
export class BusinessCoreInfoFormStepCore {
|
|
11
9
|
constructor() {
|
|
@@ -65,8 +63,8 @@ export class BusinessCoreInfoFormStepCore {
|
|
|
65
63
|
}
|
|
66
64
|
;
|
|
67
65
|
get patchPayload() {
|
|
68
|
-
let formValues =
|
|
69
|
-
return
|
|
66
|
+
let formValues = new CoreBusinessInfo(this.formController.values.getValue()).payload;
|
|
67
|
+
return formValues;
|
|
70
68
|
}
|
|
71
69
|
componentWillLoad() {
|
|
72
70
|
this.getBusiness && this.getData();
|
|
@@ -79,7 +77,7 @@ export class BusinessCoreInfoFormStepCore {
|
|
|
79
77
|
}
|
|
80
78
|
render() {
|
|
81
79
|
const coreInfoDefaultValue = this.formController.getInitialValues();
|
|
82
|
-
return (h("form", { key: '
|
|
80
|
+
return (h("form", { key: 'ab0ae9821e19c2a2d1e87ce16b23cfe56bafb31b' }, h("fieldset", { key: 'eec949b50436218cee02c6410c34959a6b10ebf8' }, h("legend", { key: '34b37dddcb967275ddd3d561dd2931b74103c0ce' }, "General Info"), h("hr", { key: 'af37f3171790265c3b7d22d2328c31842c5a12ea' }), h("div", { key: 'ba4780eec04a8b34f644895913e99ea49c587f81', class: 'row gy-3' }, h("div", { key: '8109ee7485afc5a5ee3e38c947ef9387cab5daa4', class: 'col-12' }, h("form-control-text", { key: '885bc9f67fc4738cb5abc6165bf1f6f5b3382a90', name: 'legal_name', label: 'Legal Name', defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '453b4e25b812015a50f72e76159111818d0065f5', class: 'col-12' }, h("form-control-text", { key: 'a63ec6c1e936ab1104b92e6fdd5f6a350559009c', name: 'doing_business_as', label: 'Doing Business As (DBA)', defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: '8a39b25c7d9c414569e22e73a98d7b136b0623dd', class: 'col-12 col-md-8' }, h("form-control-select", { key: '41d6d3a45431953746e86a5aea6ebb0a39674009', name: 'classification', label: 'Business Classification', options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'd98e5f2ee6e7d3ddc23ba5501db4f698cc88ba40', class: 'col-12 col-md-4' }, h("form-control-date", { key: '4ea36622261e3a649b934700ee676c062789c519', name: 'date_of_incorporation', label: 'Date of Incorporation', defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '8617887e16cbc3a40b0c1ab56597d7098c7ac62f', class: 'col-12 col-md-6' }, h("form-control-text", { key: '9357ddb686194100fe705111bbc965c2956dddb4', name: 'industry', label: 'Industry', defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '968b0f492f354279736b531295a1e4813a5de0b0', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'd082445d9f876794e525839fb35457f114e89dac', name: 'tax_id', label: 'Tax ID (EIN or SSN)', defaultValue: coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, maxLength: 9 })), h("div", { key: 'a0e041bb3fa323e378d2b9730dd9055c9ecf1dfc', class: 'col-12' }, h("form-control-text", { key: '4994efe8c6cb5faf84accd0f2965b508d084144e', name: 'website_url', label: 'Website URL', defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: '0f7f1548e704095aaef9d4fccd7c81284ff7bbed', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'e1cffd24b03e5e3655649b68900c74fcc89513c5', name: 'email', label: 'Email Address', defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '1732635477c58d1f57aa5b8dc0c560ae0c215501', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '04979d08463efc69557b782fda772702935349a7', name: 'phone', label: 'Phone Number', defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
|
|
83
81
|
}
|
|
84
82
|
static get is() { return "justifi-business-core-info-form-step-core"; }
|
|
85
83
|
static get properties() {
|
|
@@ -37,7 +37,7 @@ export class BusinessOwnersFormStepCore {
|
|
|
37
37
|
let submittedData;
|
|
38
38
|
this.formLoading.emit(true);
|
|
39
39
|
this.patchBusiness({
|
|
40
|
-
payload:
|
|
40
|
+
payload: { owners: this.ownersPayload },
|
|
41
41
|
onSuccess: (response) => {
|
|
42
42
|
submittedData = response;
|
|
43
43
|
onSuccess();
|
|
@@ -111,9 +111,9 @@ export class BusinessOwnersFormStepCore {
|
|
|
111
111
|
this.ownersPayload = updatedOwners;
|
|
112
112
|
}
|
|
113
113
|
render() {
|
|
114
|
-
return (h("div", { key: '
|
|
114
|
+
return (h("div", { key: 'f2358952d2d28841fb8e6bc66e9846eb2cdcc97e' }, h("legend", { key: 'ab3f7e6758cc50760681a9fdd07f8e137da65980' }, "Owners"), h("hr", { key: '57828746f9991da89e77a1f96b51f6df2d33d666' }), h("div", { key: '4f7f58bf1b5d40079228eef118946e17b407db63', class: 'row gy-3' }, this.ownersPayload.map((owner) => {
|
|
115
115
|
return (h("justifi-owner-form", { key: owner.id, authToken: this.authToken, businessId: this.businessId, ownerId: owner.id, removeOwner: this.removeOwnerForm, newFormOpen: this.newFormOpen, ownersLength: this.ownersPayload.length, allowOptionalFields: this.allowOptionalFields, ref: (ref) => this.matchRef(ref, owner.id) }));
|
|
116
|
-
})), h("div", { key: '
|
|
116
|
+
})), h("div", { key: '88dad43cc24d7c1e1220acb6b7791c2172074d61', class: 'd-flex justify-content-start' }, h("div", { key: '9359481d78e5c3ba9599d2fce5837c5fdfe1d6f0', class: 'gap-2' }, h(Button, { key: '04ee1c49c34567b079432df8fb2b1b298fb7d7a3', variant: 'primary', onClick: () => this.addOwnerForm(true), hidden: !this.showAddOwnerButton }, "Add Owner")))));
|
|
117
117
|
}
|
|
118
118
|
static get is() { return "justifi-business-owners-form-step-core"; }
|
|
119
119
|
static get properties() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { Representative } from "../../../../api/Identity";
|
|
3
|
-
import { parseIdentityInfo } from "../../utils/payload-parsers";
|
|
4
3
|
import { FormController } from "../../../form/form";
|
|
5
4
|
import { identitySchema } from "../../schemas/business-identity-schema";
|
|
6
5
|
export class BusinessRepresentativeFormStepCore {
|
|
@@ -56,8 +55,8 @@ export class BusinessRepresentativeFormStepCore {
|
|
|
56
55
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
57
56
|
}
|
|
58
57
|
get patchPayload() {
|
|
59
|
-
let formValues =
|
|
60
|
-
return
|
|
58
|
+
let formValues = new Representative(this.formController.values.getValue()).payload;
|
|
59
|
+
return { representative: formValues };
|
|
61
60
|
}
|
|
62
61
|
componentWillLoad() {
|
|
63
62
|
this.getBusiness && this.getData();
|
|
@@ -69,7 +68,7 @@ export class BusinessRepresentativeFormStepCore {
|
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
70
|
render() {
|
|
72
|
-
return (h("justifi-business-representative-form-inputs", { key: '
|
|
71
|
+
return (h("justifi-business-representative-form-inputs", { key: '855736c2c1565b0b9e2cf57131a72298ccc889d5', representativeDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }));
|
|
73
72
|
}
|
|
74
73
|
static get is() { return "justifi-business-representative-form-step-core"; }
|
|
75
74
|
static get properties() {
|
|
@@ -3,6 +3,7 @@ import { FormController } from "../../../form/form";
|
|
|
3
3
|
import { BusinessFormStep } from "../../utils/business-form-types";
|
|
4
4
|
import { Business } from "../../../../api/Business";
|
|
5
5
|
import Api from "../../../../api/Api";
|
|
6
|
+
import { config } from "../../../../../config";
|
|
6
7
|
import { businessDocumentSchema } from "../../schemas/business-document-upload-schema";
|
|
7
8
|
import { EntityDocument, EntityDocumentStorage } from "../../../../api/Document";
|
|
8
9
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
|
|
@@ -46,7 +47,7 @@ export class BusinessDocumentFormStep {
|
|
|
46
47
|
this.formLoading.emit(true);
|
|
47
48
|
const payload = docData.record_data;
|
|
48
49
|
try {
|
|
49
|
-
const response = await this.api.post(this.documentEndpoint,
|
|
50
|
+
const response = await this.api.post(this.documentEndpoint, payload);
|
|
50
51
|
return this.handleDocRecordResponse(docData, response);
|
|
51
52
|
}
|
|
52
53
|
catch (error) {
|
|
@@ -145,7 +146,7 @@ export class BusinessDocumentFormStep {
|
|
|
145
146
|
return 'entities/document';
|
|
146
147
|
}
|
|
147
148
|
componentWillLoad() {
|
|
148
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
149
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
149
150
|
if (this.businessId && this.authToken) {
|
|
150
151
|
this.fetchData();
|
|
151
152
|
}
|
|
@@ -178,7 +179,7 @@ export class BusinessDocumentFormStep {
|
|
|
178
179
|
return (h("justifi-business-document-upload-input-group", { paymentVolume: this.paymentVolume, inputHandler: this.inputHandler, storeFiles: this.storeFiles, errors: this.errors }));
|
|
179
180
|
}
|
|
180
181
|
render() {
|
|
181
|
-
return (h("form", { key: '
|
|
182
|
+
return (h("form", { key: '38bb9070ca04f773ec092ebb14ce8ad20f33d8cf' }, h("fieldset", { key: '9c736d11200bb9c5a37c1319f3bfb349b7a5e93f' }, h("legend", { key: '92ed2fb864e85e38532af364518c25ef4bd275a5' }, "Document Uploads"), h("p", { key: 'f5803df74a5d0bc4e544c6cc968333f2a3f77385' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '0c696d1bdb614bdacb3cbadeee66c95149efda68' }), this.documentsOnFile, h("div", { key: '7919205dfda677526d810a9fa1507ed8a55eafb8', class: "d-flex flex-column" }, this.formInputs))));
|
|
182
183
|
}
|
|
183
184
|
static get is() { return "justifi-business-document-upload-form-step"; }
|
|
184
185
|
static get properties() {
|
|
@@ -3,7 +3,6 @@ import { addressSchema } from "../../schemas/business-address-schema";
|
|
|
3
3
|
import { FormController } from "../../../form/form";
|
|
4
4
|
import { Address } from "../../../../api/Business";
|
|
5
5
|
import StateOptions from "../../../../utils/state-options";
|
|
6
|
-
import { parseAddressInfo } from "../../utils/payload-parsers";
|
|
7
6
|
import { numberOnlyHandler } from "../../../form/utils";
|
|
8
7
|
export class LegalAddressFormStepCore {
|
|
9
8
|
constructor() {
|
|
@@ -62,8 +61,8 @@ export class LegalAddressFormStepCore {
|
|
|
62
61
|
}
|
|
63
62
|
;
|
|
64
63
|
get patchPayload() {
|
|
65
|
-
let formValues =
|
|
66
|
-
return
|
|
64
|
+
let formValues = new Address(this.formController.values.getValue()).payload;
|
|
65
|
+
return { legal_address: formValues };
|
|
67
66
|
}
|
|
68
67
|
componentWillLoad() {
|
|
69
68
|
this.getBusiness && this.getData();
|
|
@@ -77,7 +76,7 @@ export class LegalAddressFormStepCore {
|
|
|
77
76
|
render() {
|
|
78
77
|
var _a, _b, _c, _d, _e, _f;
|
|
79
78
|
const legalAddressDefaultValue = this.formController.getInitialValues();
|
|
80
|
-
return (h("form", { key: '
|
|
79
|
+
return (h("form", { key: '5a95fe5a130deded7e160e6fe4ba1d09e6a6aabc' }, h("fieldset", { key: '2011fac5c860b7beee5eaac28e697b284067f2e6' }, h("legend", { key: 'dbe411d80d10a71bc63f18fcdb58a40b124e8eaf' }, "Business Legal Address"), h("hr", { key: '4a91dd5e67e5770778d2dd59716e1e532d644ee9' }), h("div", { key: 'cd53516a98498ab82ab347a1f7c836be262b9fdb', class: 'row gy-3' }, h("div", { key: '14cd5fee5661681ccff95eabf8cd6f2d4cff2296', class: 'col-12' }, h("form-control-text", { key: 'e4b0a5e30fc1a35e5127a76710211874fb68898b', name: 'line1', label: 'Legal Address', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line1, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.line1 })), h("div", { key: '2c35da509732e73e2abb4365d6d9e2056d7ce771', class: 'col-12' }, h("form-control-text", { key: 'c8ae2a5c75d0fe8c5ddd46d9150590b8a4f99a5e', name: 'line2', label: 'Address Line 2', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line2, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line2 })), h("div", { key: '07649ebd5a848eee63398965c30e8e30fcc88354', class: 'col-12' }, h("form-control-text", { key: 'cb25047c3458124f7d837b7948e807214f1a0a0a', name: 'city', label: 'City', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.city, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.city })), h("div", { key: 'ce3ddc5f3639503dbc02668aea7139ffff376545', class: 'col-12' }, h("form-control-select", { key: '00d18b4af1f415828b40404888a6c69d0611d0cc', name: 'state', label: 'State', options: StateOptions, inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.state, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.state })), h("div", { key: '1988bd739af107d9595f6fed897f257da13ac997', class: 'col-12' }, h("form-control-text", { key: '55144c39845d4cc36704170b73458f761f311d00', name: 'postal_code', label: 'Postal Code', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.postal_code, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler })), h("div", { key: 'cccba799a75280693f461f390121b13006877f35', class: 'col-12' }, h("form-control-select", { key: 'e49b21a781280fb2e9cc9f6b88ddcc6d7408c5f8', name: 'country', label: 'Country', options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.country, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.country,
|
|
81
80
|
// just for now so we skip handling country specificities
|
|
82
81
|
disabled: true }))))));
|
|
83
82
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { FormController } from "../../../form/form";
|
|
3
3
|
import { BusinessFormStep } from "../../utils/business-form-types";
|
|
4
|
+
import { config } from "../../../../../config";
|
|
4
5
|
import { businessTermsConditionsSchema } from "../../schemas/business-terms-conditions-schema";
|
|
5
6
|
import { Api } from "../../../../api";
|
|
6
7
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
|
|
@@ -27,7 +28,7 @@ export class BusinessTermsConditionsFormStep {
|
|
|
27
28
|
this.sendData = async (onSuccess) => {
|
|
28
29
|
this.formLoading.emit(true);
|
|
29
30
|
try {
|
|
30
|
-
const payload =
|
|
31
|
+
const payload = this.termsPayload;
|
|
31
32
|
const response = await this.api.post(this.termsConditionsEndpoint, payload);
|
|
32
33
|
this.handleResponse(response, onSuccess);
|
|
33
34
|
}
|
|
@@ -70,7 +71,7 @@ export class BusinessTermsConditionsFormStep {
|
|
|
70
71
|
};
|
|
71
72
|
}
|
|
72
73
|
async componentWillLoad() {
|
|
73
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
74
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
74
75
|
this.formController = new FormController(businessTermsConditionsSchema(this.allowOptionalFields));
|
|
75
76
|
if (this.businessId && this.authToken) {
|
|
76
77
|
this.fetchData();
|
|
@@ -106,7 +107,7 @@ export class BusinessTermsConditionsFormStep {
|
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
render() {
|
|
109
|
-
return (h("form", { key: '
|
|
110
|
+
return (h("form", { key: 'a292e2b1b69d152009000d9e7009e5ab07698bc8' }, h("fieldset", { key: '30843e9ed0029f64abcf076512af82974dd99598' }, h("legend", { key: '6453679a074056668bdd93cb91d2d725b73fb0da' }, "Terms and Conditions"), h("hr", { key: '6a44c1128e3dceb770b16533aa61fb5e81f5dda2' }), h("justifi-business-terms-conditions-text", { key: '714c9f81c1d1f91712a276259acf4eb6734b40d4' }), h("br", { key: '5e955908e53af5ade77fca9f2a47e8a9d10e7ad8' }), h("div", { key: '7c6ca9d2634c7cc6988292ffedf86b64c3865557', class: "row-gy-3" }, h("div", { key: 'e8f01c4bdcc07e0063e3b8f5f1acbabc9b3310f7', class: "col-12" }, h("form-control-checkbox", { key: 'e09eeb02dc30a9461e958bf43685d2c58f4a608f', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
|
|
110
111
|
}
|
|
111
112
|
static get is() { return "justifi-business-terms-conditions-form-step"; }
|
|
112
113
|
static get properties() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import JustifiAnalytics from "../../api/Analytics";
|
|
3
4
|
export class CardForm {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.validationMode = undefined;
|
|
6
|
-
this.iframeOrigin =
|
|
7
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
7
8
|
this.singleLine = false;
|
|
8
9
|
this.internalStyleOverrides = undefined;
|
|
9
10
|
}
|
|
@@ -56,7 +57,7 @@ export class CardForm {
|
|
|
56
57
|
return this.childRef.resize();
|
|
57
58
|
}
|
|
58
59
|
render() {
|
|
59
|
-
return (h("justifi-payment-method-form", { key: '
|
|
60
|
+
return (h("justifi-payment-method-form", { key: '58843b8a47f35d716845de11f6a66d8960bc0776', ref: el => {
|
|
60
61
|
if (el) {
|
|
61
62
|
this.childRef = el;
|
|
62
63
|
}
|
|
@@ -98,7 +99,7 @@ export class CardForm {
|
|
|
98
99
|
},
|
|
99
100
|
"attribute": "iframe-origin",
|
|
100
101
|
"reflect": false,
|
|
101
|
-
"defaultValue": "
|
|
102
|
+
"defaultValue": "config.iframeOrigin"
|
|
102
103
|
},
|
|
103
104
|
"singleLine": {
|
|
104
105
|
"type": "boolean",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { formatCurrency } from "../../utils/utils";
|
|
3
|
+
import { config } from "../../../config";
|
|
3
4
|
import { Checkout } from "../../api/Checkout";
|
|
4
5
|
import { ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
import { insuranceValues, insuranceValuesOn, validateInsuranceValues } from "../insurance/insurance-state";
|
|
@@ -26,7 +27,7 @@ export class CheckoutCore {
|
|
|
26
27
|
});
|
|
27
28
|
this.renderState = 'error';
|
|
28
29
|
};
|
|
29
|
-
this.iframeOrigin =
|
|
30
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
30
31
|
this.authToken = undefined;
|
|
31
32
|
this.getCheckout = undefined;
|
|
32
33
|
this.complete = undefined;
|
|
@@ -122,7 +123,7 @@ export class CheckoutCore {
|
|
|
122
123
|
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
|
|
123
124
|
}
|
|
124
125
|
render() {
|
|
125
|
-
return (h(StyledHost, { key: '
|
|
126
|
+
return (h(StyledHost, { key: 'e322f280a57bb0baab61174bca21f0a7e9afa3c1' }, h("div", { key: '4ad8cc4f6243de8ddc03fb184ac4e960a04280eb', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '7f13e26b36790558c8eb455f4d5ab3d0952b4e62', class: "col-12" }, h("h2", { key: 'c5e4b6fc30f51821537915f3ce5d4830ed3f8da9', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '164b7a2cc51d871ad4a92044d0f7240e376bd4b3', class: "col-12" }, h("slot", { key: 'a98b7c6a0bb9e4d1b102e832ee7aa43218432298', name: "insurance" })), h("div", { key: '415d3aac64b4190f54d785695c50a92ce02a76c2', class: "col-12 mt-4" }, h("h2", { key: '6d7f0df1165ec359877459a8bada855ef353c3b3', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'be8495d792cf065d2cbc7d3b46648c887951e313', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '5c9d8baffb50b0b10e9911463f307581cad7619c', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: '9351832b69a8e5285cae35534299b51193248719', class: "col-12" }, h("div", { key: '5b0e382836c858369caf93a287272922024ce72b', class: "d-flex justify-content-end" }, h(Button, { key: 'f76d37000f7b026e97f083e7cf817bed8f84f34f', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
|
|
126
127
|
}
|
|
127
128
|
static get is() { return "justifi-checkout-core"; }
|
|
128
129
|
static get encapsulation() { return "shadow"; }
|
|
@@ -154,7 +155,7 @@ export class CheckoutCore {
|
|
|
154
155
|
},
|
|
155
156
|
"attribute": "iframe-origin",
|
|
156
157
|
"reflect": false,
|
|
157
|
-
"defaultValue": "
|
|
158
|
+
"defaultValue": "config.iframeOrigin"
|
|
158
159
|
},
|
|
159
160
|
"authToken": {
|
|
160
161
|
"type": "string",
|