@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,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
const PaymentMethodTypeLabels = {
|
|
3
4
|
bankAccount: 'New bank account',
|
|
4
5
|
card: 'New credit or debit card',
|
|
@@ -8,7 +9,7 @@ export class NewPaymentMethod {
|
|
|
8
9
|
this.onPaymentMethodOptionClick = () => {
|
|
9
10
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
10
11
|
};
|
|
11
|
-
this.iframeOrigin =
|
|
12
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
12
13
|
this.authToken = undefined;
|
|
13
14
|
this.accountId = undefined;
|
|
14
15
|
this.paymentMethodOption = undefined;
|
|
@@ -68,7 +69,7 @@ export class NewPaymentMethod {
|
|
|
68
69
|
}
|
|
69
70
|
render() {
|
|
70
71
|
var _a, _b, _c, _d;
|
|
71
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: '93c3e6d38d1e18be54006bf82cd6c8148df3518d', class: "payment-method" }, h("div", { key: '6dbb687fbd3e33a6095be7c39ec0974bcc4809b8', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '796868afd192703a81d94897872dd9c0504cbc1e', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
|
|
72
73
|
}
|
|
73
74
|
static get is() { return "justifi-new-payment-method"; }
|
|
74
75
|
static get properties() {
|
|
@@ -89,7 +90,7 @@ export class NewPaymentMethod {
|
|
|
89
90
|
},
|
|
90
91
|
"attribute": "iframe-origin",
|
|
91
92
|
"reflect": false,
|
|
92
|
-
"defaultValue": "
|
|
93
|
+
"defaultValue": "config.iframeOrigin"
|
|
93
94
|
},
|
|
94
95
|
"authToken": {
|
|
95
96
|
"type": "string",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { PaymentMethodTypes } from "../../api/Payment";
|
|
3
4
|
import { PaymentMethodOption } from "./payment-method-option-utils";
|
|
4
5
|
export class PaymentMethodOptions {
|
|
@@ -12,7 +13,7 @@ export class PaymentMethodOptions {
|
|
|
12
13
|
this.insuranceToggled = undefined;
|
|
13
14
|
this.authToken = undefined;
|
|
14
15
|
this.accountId = undefined;
|
|
15
|
-
this.iframeOrigin =
|
|
16
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
16
17
|
this.savedPaymentMethods = [];
|
|
17
18
|
this.paymentAmount = undefined;
|
|
18
19
|
this.selectedPaymentMethodId = undefined;
|
|
@@ -58,7 +59,7 @@ export class PaymentMethodOptions {
|
|
|
58
59
|
}
|
|
59
60
|
render() {
|
|
60
61
|
var _a;
|
|
61
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '86e309b90ab00f530dd803b00e5aab511f92300f' }, (_a = this.paymentMethodOptions) === null || _a === void 0 ? void 0 : _a.map((paymentMethodOption) => {
|
|
62
63
|
const newCard = paymentMethodOption.id === PaymentMethodTypes.card;
|
|
63
64
|
const newBankAccount = paymentMethodOption.id === PaymentMethodTypes.bankAccount;
|
|
64
65
|
const isSelected = this.selectedPaymentMethodId === paymentMethodOption.id;
|
|
@@ -272,7 +273,7 @@ export class PaymentMethodOptions {
|
|
|
272
273
|
},
|
|
273
274
|
"attribute": "iframe-origin",
|
|
274
275
|
"reflect": false,
|
|
275
|
-
"defaultValue": "
|
|
276
|
+
"defaultValue": "config.iframeOrigin"
|
|
276
277
|
},
|
|
277
278
|
"savedPaymentMethods": {
|
|
278
279
|
"type": "unknown",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Fragment, h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { CardBrandLabels } from "./payment-method-option-utils";
|
|
3
4
|
export class SavedPaymentMethod {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.onPaymentMethodOptionClick = () => {
|
|
6
7
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
7
8
|
};
|
|
8
|
-
this.iframeOrigin =
|
|
9
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
9
10
|
this.paymentMethodOption = undefined;
|
|
10
11
|
this.isSelected = undefined;
|
|
11
12
|
}
|
|
@@ -19,7 +20,7 @@ export class SavedPaymentMethod {
|
|
|
19
20
|
;
|
|
20
21
|
render() {
|
|
21
22
|
var _a, _b, _c, _d, _e;
|
|
22
|
-
return (h(Fragment, { key: '
|
|
23
|
+
return (h(Fragment, { key: '9c2174123f1675d60bc48d8109821c0bc2ad7682' }, h("div", { key: '07bffce2603110d44f38ffb2f57a60f07faddb3b', class: "payment-method" }, h("div", { key: 'f489d3a05db45c2b2581bc8f0fc093afed453d91', class: "payment-method-header p-3", onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '70681612520aa621c39a017b72b25a7dd3211282', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, CardBrandLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.brand], " *", (_e = this.paymentMethodOption) === null || _e === void 0 ? void 0 :
|
|
23
24
|
_e.acct_last_four)))));
|
|
24
25
|
}
|
|
25
26
|
static get is() { return "justifi-saved-payment-method"; }
|
|
@@ -41,7 +42,7 @@ export class SavedPaymentMethod {
|
|
|
41
42
|
},
|
|
42
43
|
"attribute": "iframe-origin",
|
|
43
44
|
"reflect": false,
|
|
44
|
-
"defaultValue": "
|
|
45
|
+
"defaultValue": "config.iframeOrigin"
|
|
45
46
|
},
|
|
46
47
|
"paymentMethodOption": {
|
|
47
48
|
"type": "unknown",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { config } from "../../../config";
|
|
2
3
|
import { formatCurrency } from "../../utils/utils";
|
|
3
4
|
const sezzleLogo = (h("img", { class: "sezzle-smart-button-logo-img", src: "https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg", alt: "Sezzle", style: {
|
|
4
5
|
display: 'inline',
|
|
@@ -38,7 +39,7 @@ export class SezzlePaymentMethod {
|
|
|
38
39
|
this.sezzleCheckout = checkout;
|
|
39
40
|
this.installmentPlan = this.sezzleCheckout.getInstallmentPlan(amount);
|
|
40
41
|
};
|
|
41
|
-
this.iframeOrigin =
|
|
42
|
+
this.iframeOrigin = config.iframeOrigin;
|
|
42
43
|
this.bnpl = undefined;
|
|
43
44
|
this.clientId = undefined;
|
|
44
45
|
this.accountId = undefined;
|
|
@@ -64,7 +65,7 @@ export class SezzlePaymentMethod {
|
|
|
64
65
|
}
|
|
65
66
|
render() {
|
|
66
67
|
var _a, _b, _c, _d, _e;
|
|
67
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: '4deca512311cd98d358c7099141b15538857a4e5', class: "payment-method" }, h("script", { key: '94b232291153bba85efebb101e7e6e816857da96', src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { key: '7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '1e15e6c2ddced23b049e2559da27532f9be94fb5', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '0a3637002ef373c05424d6769b070d9db0e66ce8', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, h("div", { key: '6398e2f00088edf8a1a3699e149760744dda4cb1' }, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", { key: 'bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8' }, h("span", { key: 'c07fd5d32fe897a45a67140e2cb81b1f4d537c4a' }, (_d = this.installmentPlan) === null || _d === void 0 ? void 0 : _d.installments.length), "\u00A0", h("span", { key: '2b11e4aa6389a4b98cd003c031aed8f01ec8a4df' }, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { key: '90cf3bfa1f0d36c8d4719f164d436407d7fc692b', class: "fw-bold" }, formatCurrency((_e = this.installmentPlan) === null || _e === void 0 ? void 0 : _e.installments[0].amountInCents))))))));
|
|
68
69
|
}
|
|
69
70
|
static get is() { return "justifi-sezzle-payment-method"; }
|
|
70
71
|
static get properties() {
|
|
@@ -85,7 +86,7 @@ export class SezzlePaymentMethod {
|
|
|
85
86
|
},
|
|
86
87
|
"attribute": "iframe-origin",
|
|
87
88
|
"reflect": false,
|
|
88
|
-
"defaultValue": "
|
|
89
|
+
"defaultValue": "config.iframeOrigin"
|
|
89
90
|
},
|
|
90
91
|
"bnpl": {
|
|
91
92
|
"type": "any",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { PaymentMethodTypes } from "../../api";
|
|
3
3
|
import { loadFontsOnParent } from "../../utils/utils";
|
|
4
|
+
import { config } from "../../../config";
|
|
4
5
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
6
|
import { getErrorMessage } from "../../api/services/utils";
|
|
6
7
|
import JustifiAnalytics from "../../api/Analytics";
|
|
@@ -105,15 +106,15 @@ export class PaymentForm {
|
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
render() {
|
|
108
|
-
return (h(StyledHost, { key: '
|
|
109
|
+
return (h(StyledHost, { key: '38bd6cca38d9068fa9277a8568a98f261a4cc616' }, h("form", { key: 'fec19f5e2f11934e6783124c4c437a2d3947f596', class: "row gy-3" }, this.showPaymentMethodTypeSelector() && (h("div", { key: '18001f78e03336d01de8473a57e3e228e9fce201', class: "col-12" }, h("justifi-payment-method-selector", { key: '260ac1ade3ccfe6baf518eb856bdf4d380025620', selectedPaymentMethodType: this.getSelectedPaymentMethodType(), onPaymentMethodSelected: event => this.paymentMethodSelectedHandler(event) }))), h("div", { key: 'f6ade2336314e05f2bdce75df8577939efe33e3b', class: "col-12" }, h("justifi-payment-method-form", { key: 'ad8e5b121b8425175f7ac7f38ab24dfba1801a28', "payment-method-form-type": this.getSelectedPaymentMethodType(), iframeOrigin: config.iframeOrigin, ref: el => {
|
|
109
110
|
if (el) {
|
|
110
111
|
this.paymentMethodFormRef = el;
|
|
111
112
|
}
|
|
112
|
-
} })), h("div", { key: '
|
|
113
|
+
} })), h("div", { key: '29f15f1cece3e07a569e514d08bf9996405699c6', class: "col-12" }, h("justifi-billing-form", { key: '9928924cc29bfa5c5e46ada294cb26da0c1d222b', legend: "Billing Info", ref: el => {
|
|
113
114
|
if (el) {
|
|
114
115
|
this.billingFormRef = el;
|
|
115
116
|
}
|
|
116
|
-
} })), h("slot", { key: '
|
|
117
|
+
} })), h("slot", { key: 'c36583ab34bc105b506df27aec02898455855cec', name: 'insurance' }), h("div", { key: 'cc38292ae8a59bc6f4624a8535e8b7c93e6f3a35', class: "col-12" }, h(Button, { key: 'e5fe0f50ee2322ab2a199a6229015c9daa198cc0', variant: "primary", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, isLoading: this.isLoading, "data-testid": "submit-button", style: { width: '100%' } }, this.submitButtonText || 'Submit')))));
|
|
117
118
|
}
|
|
118
119
|
static get is() { return "justifi-payment-form"; }
|
|
119
120
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,6 +2,7 @@ import { h, } from "@stencil/core";
|
|
|
2
2
|
import RefundFormSchema from "./refund-form-schema";
|
|
3
3
|
import { Api } from "../../api";
|
|
4
4
|
import { FormController } from "../form/form";
|
|
5
|
+
import { config } from "../../../config";
|
|
5
6
|
import { CURRENCY_MASK } from "../../utils/form-input-masks";
|
|
6
7
|
import { StyledHost } from "../../ui-components";
|
|
7
8
|
export class RefundForm {
|
|
@@ -70,11 +71,11 @@ export class RefundForm {
|
|
|
70
71
|
if (!this.authToken) {
|
|
71
72
|
console.warn('Warning: Missing auth-token.');
|
|
72
73
|
}
|
|
73
|
-
this.api = Api({ authToken: this.authToken, apiOrigin:
|
|
74
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
74
75
|
}
|
|
75
76
|
render() {
|
|
76
77
|
var _a;
|
|
77
|
-
return (h(StyledHost, { key: '
|
|
78
|
+
return (h(StyledHost, { key: 'd0d0962eaecab749aa1eb124e86701a2fb4dfd53' }, h("h1", { key: 'cb3071d89c291b1664e551fcf2808a64569ba5eb' }, "Refund"), this.refundInfoText && (h("div", { key: '01a6f4567f882d2eec492ef6d98db7d04747ecb4', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: '8ae5928aaf8ead35a7ad180a01bdde05ebec3d5f', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: '425a7dfe9d8b886b55fd0878f3989373733c1758', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '5516d2ac500611d2410b9b4c2a4d0d15e417b2d1', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: 'b67a7c56f070a5a25d91aa0cc77755b27d420fdc', class: "form-group" }, h("form-control-monetary", { key: '76b6cfdf2b39674434f4d880333dd5d5f603f0b6', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '5e581cdea69d2ce9dbad774214cd904923d199b3', class: "form-group" }, h("form-control-text", { key: '926ae888676a4089d3381bd4d650e6f84f6e206a', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: 'de5df506b7b64a69a16241f117bf9bea4fd79b57', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '92ad4d43677587c2c20dc03c6f03a6cf1f20ac12', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
78
79
|
}
|
|
79
80
|
static get is() { return "justifi-refund-form"; }
|
|
80
81
|
static get encapsulation() { return "shadow"; }
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const config = {
|
|
2
|
+
iframeOrigin: 'https://js.justifi.ai/v2',
|
|
3
|
+
proxyApiOrigin: 'https://wc-proxy.justifi.ai',
|
|
4
|
+
proxyAuthToken: 'eyJraWQiOiJqdXN0aWZpLWUyNDgyMmU3ODE1MmEzZjRkMjU1IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2F1dGguanVzdGlmaS5haS8iLCJhenAiOiJvYXNfMmlsWHBqOHQ2WVlEQ0xWU0FiVFczMiIsInN1YiI6Im9hc18yaWxYcGo4dDZZWURDTFZTQWJUVzMyQHNlc3Npb25zIiwiYXVkIjoiaHR0cHM6Ly9hcGkuanVzdGlmaS5haS92MSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsInBlcm1pc3Npb25zIjpbeyJyb2xlIjoicmVhZDphY2NvdW50IiwicmVzb3VyY2VfaWQiOiJhY2NfNUV0OWlYclNTQVpSMktTb3VRR0FXaSJ9LHsicm9sZSI6InJlYWQ6YnVzaW5lc3MiLCJyZXNvdXJjZV9pZCI6ImJpel8zYmg2OWJxMXJrM2RtWE5vQUtWb251In1dLCJleHAiOjE3MTE1NTk0MTQsImlhdCI6MTcwMzc4MzQxNCwicGxhdGZvcm1fYWNjb3VudF9pZCI6ImFjY18zcmVOYjRhTll5MmlXRFpRVmN6bXg0In0.oPOoDYxzrnpE8PRUaz-FCU4KqnSuNbFTeDkl3AtMscjUkIctP1OIFh-ZGBjbH5eVH5noXCbaiin0j92dS7jx4gLpxuYT2Q8gpZbuIsT7fa58elvGeRkUUJ-AC5ueZxlv90yPWMm0OIbyrV7XZhuwYyKbV-ZczEbl2JpvBMe40CM-LdClQV66d_-Kw9a23SabBVfYgP5V-5OsagOIESvzZoO-27tGlNkV2a-hxqddDCOZv0HvRYAtp5S7EQrmRdEBu5gCNbf1eRFG424hxZUFVr2LdetYuKQLxJjDdUjf86ZwEUecrEaDSupiN1VC3CitdOwBVf6-R_N0VpN4VLVD5g',
|
|
5
|
+
exampleAccountId: 'acc_5Et9iXrSSAZR2KSouQGAWi',
|
|
6
|
+
exampleBusinessId: 'biz_3bh69bq1rk3dmXNoAKVonu',
|
|
7
|
+
examplePaymentId: 'py_1NNeEnf4FbelxDCQN2RHcE',
|
|
8
|
+
examplePayoutId: 'po_17745yESnHyEgWNeunmhmR',
|
|
9
|
+
privateApiOrigin: '',
|
|
10
|
+
privateAuthToken: '',
|
|
11
|
+
};
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-10-03T19:21:08",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.19.2",
|
|
@@ -3040,7 +3040,7 @@
|
|
|
3040
3040
|
"reflectToAttr": false,
|
|
3041
3041
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
3042
3042
|
"docsTags": [],
|
|
3043
|
-
"default": "
|
|
3043
|
+
"default": "config.iframeOrigin",
|
|
3044
3044
|
"values": [
|
|
3045
3045
|
{
|
|
3046
3046
|
"type": "string"
|
|
@@ -6281,7 +6281,7 @@
|
|
|
6281
6281
|
"reflectToAttr": false,
|
|
6282
6282
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
6283
6283
|
"docsTags": [],
|
|
6284
|
-
"default": "
|
|
6284
|
+
"default": "config.iframeOrigin",
|
|
6285
6285
|
"values": [
|
|
6286
6286
|
{
|
|
6287
6287
|
"type": "string"
|
|
@@ -7035,7 +7035,7 @@
|
|
|
7035
7035
|
"reflectToAttr": false,
|
|
7036
7036
|
"docs": "URL for the rendered iFrame. End-users need not use this.",
|
|
7037
7037
|
"docsTags": [],
|
|
7038
|
-
"default": "
|
|
7038
|
+
"default": "config.iframeOrigin",
|
|
7039
7039
|
"values": [
|
|
7040
7040
|
{
|
|
7041
7041
|
"type": "string"
|
|
@@ -7961,7 +7961,7 @@
|
|
|
7961
7961
|
"reflectToAttr": false,
|
|
7962
7962
|
"docs": "",
|
|
7963
7963
|
"docsTags": [],
|
|
7964
|
-
"default": "
|
|
7964
|
+
"default": "config.iframeOrigin",
|
|
7965
7965
|
"values": [
|
|
7966
7966
|
{
|
|
7967
7967
|
"type": "string"
|
|
@@ -9370,7 +9370,7 @@
|
|
|
9370
9370
|
"reflectToAttr": false,
|
|
9371
9371
|
"docs": "",
|
|
9372
9372
|
"docsTags": [],
|
|
9373
|
-
"default": "
|
|
9373
|
+
"default": "config.iframeOrigin",
|
|
9374
9374
|
"values": [
|
|
9375
9375
|
{
|
|
9376
9376
|
"type": "string"
|
|
@@ -11524,7 +11524,7 @@
|
|
|
11524
11524
|
"reflectToAttr": false,
|
|
11525
11525
|
"docs": "",
|
|
11526
11526
|
"docsTags": [],
|
|
11527
|
-
"default": "
|
|
11527
|
+
"default": "config.iframeOrigin",
|
|
11528
11528
|
"values": [
|
|
11529
11529
|
{
|
|
11530
11530
|
"type": "string"
|
|
@@ -12466,7 +12466,7 @@
|
|
|
12466
12466
|
"reflectToAttr": false,
|
|
12467
12467
|
"docs": "",
|
|
12468
12468
|
"docsTags": [],
|
|
12469
|
-
"default": "
|
|
12469
|
+
"default": "config.iframeOrigin",
|
|
12470
12470
|
"values": [
|
|
12471
12471
|
{
|
|
12472
12472
|
"type": "string"
|
|
@@ -13945,7 +13945,7 @@
|
|
|
13945
13945
|
"path": "src/api/ComponentError.ts"
|
|
13946
13946
|
},
|
|
13947
13947
|
"src/api/Business.ts::IAdditionalQuestions": {
|
|
13948
|
-
"declaration": "export interface IAdditionalQuestions {\n business_revenue?: string;\n business_payment_volume?: string;\n business_when_service_received?: string;\n business_recurring_payments?: string;\n business_recurring_payments_percentage?: string;\n business_seasonal?: string;\n business_other_payment_details?: string;\n}",
|
|
13948
|
+
"declaration": "export interface IAdditionalQuestions {\n business_revenue?: string;\n business_payment_volume?: string;\n business_when_service_received?: string;\n business_recurring_payments?: string;\n business_recurring_payments_percentage?: string;\n business_seasonal?: string;\n business_other_payment_details?: string;\n payload?: any;\n}",
|
|
13949
13949
|
"docstring": "",
|
|
13950
13950
|
"path": "src/api/Business.ts"
|
|
13951
13951
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { p as packageJson } from './package-
|
|
2
|
-
import {
|
|
1
|
+
import { p as packageJson } from './package-925a0fdd.js';
|
|
2
|
+
import { c as config } from './config-476c7241.js';
|
|
3
|
+
import { A as Api } from './Api-c8abc2e0.js';
|
|
3
4
|
|
|
4
5
|
class AnalyticsService {
|
|
5
6
|
async record(body) {
|
|
6
7
|
const endpoint = 'analytics';
|
|
7
|
-
return Api({ apiOrigin:
|
|
8
|
+
return Api({ apiOrigin: config.proxyApiOrigin }).post(endpoint, body);
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -94,13 +94,13 @@ const Api = ({ authToken, apiOrigin }) => {
|
|
|
94
94
|
return makeRequest(endpoint, 'GET', params, null, signal);
|
|
95
95
|
}
|
|
96
96
|
async function post(endpoint, body, params, signal) {
|
|
97
|
-
return makeRequest(endpoint, 'POST', params, body, signal);
|
|
97
|
+
return makeRequest(endpoint, 'POST', params, JSON.stringify(body), signal);
|
|
98
98
|
}
|
|
99
99
|
async function put(endpoint, body, params, signal) {
|
|
100
|
-
return makeRequest(endpoint, 'PUT', params, body, signal);
|
|
100
|
+
return makeRequest(endpoint, 'PUT', params, JSON.stringify(body), signal);
|
|
101
101
|
}
|
|
102
102
|
async function patch(endpoint, body, params, signal) {
|
|
103
|
-
return makeRequest(endpoint, 'PATCH', params, body, signal);
|
|
103
|
+
return makeRequest(endpoint, 'PATCH', params, JSON.stringify(body), signal);
|
|
104
104
|
}
|
|
105
105
|
async function destroy(endpoint, params, signal) {
|
|
106
106
|
return makeRequest(endpoint, 'DELETE', params, null, signal);
|
|
@@ -7,7 +7,8 @@ class Owner {
|
|
|
7
7
|
this.dob_day = filterNumber(owner.dob_day);
|
|
8
8
|
this.dob_month = filterNumber(owner.dob_month);
|
|
9
9
|
this.dob_year = owner.dob_year;
|
|
10
|
-
this.dob_full =
|
|
10
|
+
this.dob_full =
|
|
11
|
+
constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
|
|
11
12
|
this.documents = owner.documents;
|
|
12
13
|
this.email = owner.email;
|
|
13
14
|
this.id = owner.id;
|
|
@@ -22,6 +23,23 @@ class Owner {
|
|
|
22
23
|
this.title = owner.title;
|
|
23
24
|
this.updated_at = owner.updated_at;
|
|
24
25
|
}
|
|
26
|
+
// Getter method to return the payload in the desired shape
|
|
27
|
+
get payload() {
|
|
28
|
+
return {
|
|
29
|
+
address: new Address(this.address || {}).payload,
|
|
30
|
+
dob_day: this.dob_day || '',
|
|
31
|
+
dob_month: this.dob_month || '',
|
|
32
|
+
dob_year: this.dob_year || '',
|
|
33
|
+
email: this.email || '',
|
|
34
|
+
identification_number: this.identification_number || undefined,
|
|
35
|
+
is_owner: this.is_owner || false,
|
|
36
|
+
metadata: this.metadata || null,
|
|
37
|
+
name: this.name || '',
|
|
38
|
+
phone: this.phone || '',
|
|
39
|
+
platform_account_id: this.platform_account_id || null,
|
|
40
|
+
title: this.title || '',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
25
43
|
}
|
|
26
44
|
class Representative {
|
|
27
45
|
constructor(representative) {
|
|
@@ -30,7 +48,8 @@ class Representative {
|
|
|
30
48
|
this.dob_day = filterNumber(representative.dob_day);
|
|
31
49
|
this.dob_month = filterNumber(representative.dob_month);
|
|
32
50
|
this.dob_year = representative.dob_year;
|
|
33
|
-
this.dob_full =
|
|
51
|
+
this.dob_full =
|
|
52
|
+
constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
|
|
34
53
|
this.documents = representative.documents;
|
|
35
54
|
this.email = representative.email;
|
|
36
55
|
this.id = representative.id;
|
|
@@ -45,6 +64,23 @@ class Representative {
|
|
|
45
64
|
this.title = representative.title;
|
|
46
65
|
this.updated_at = representative.updated_at;
|
|
47
66
|
}
|
|
67
|
+
// Getter method to return the payload in the desired shape
|
|
68
|
+
get payload() {
|
|
69
|
+
return {
|
|
70
|
+
address: new Address(this.address || {}).payload,
|
|
71
|
+
dob_day: this.dob_day || '',
|
|
72
|
+
dob_month: this.dob_month || '',
|
|
73
|
+
dob_year: this.dob_year || '',
|
|
74
|
+
email: this.email || '',
|
|
75
|
+
is_owner: this.is_owner || false,
|
|
76
|
+
identification_number: this.identification_number || undefined,
|
|
77
|
+
metadata: this.metadata || null,
|
|
78
|
+
name: this.name || '',
|
|
79
|
+
phone: this.phone || '',
|
|
80
|
+
platform_account_id: this.platform_account_id || null,
|
|
81
|
+
title: this.title || '',
|
|
82
|
+
};
|
|
83
|
+
}
|
|
48
84
|
}
|
|
49
85
|
|
|
50
86
|
var BusinessClassification;
|
|
@@ -70,16 +106,42 @@ class Address {
|
|
|
70
106
|
this.created_at = address.created_at;
|
|
71
107
|
this.updated_at = address.updated_at;
|
|
72
108
|
}
|
|
109
|
+
get payload() {
|
|
110
|
+
return {
|
|
111
|
+
platform_account_id: this.platform_account_id || '',
|
|
112
|
+
line1: this.line1 || '',
|
|
113
|
+
line2: this.line2 || '',
|
|
114
|
+
postal_code: this.postal_code || '',
|
|
115
|
+
city: this.city || '',
|
|
116
|
+
state: this.state || '',
|
|
117
|
+
country: this.country || '',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
73
120
|
}
|
|
74
121
|
class AdditionalQuestions {
|
|
75
122
|
constructor(additionalQuestions) {
|
|
76
123
|
this.business_revenue = additionalQuestions.business_revenue;
|
|
77
124
|
this.business_payment_volume = additionalQuestions.business_payment_volume;
|
|
78
|
-
this.business_when_service_received =
|
|
79
|
-
|
|
80
|
-
this.
|
|
125
|
+
this.business_when_service_received =
|
|
126
|
+
additionalQuestions.business_when_service_received;
|
|
127
|
+
this.business_recurring_payments =
|
|
128
|
+
additionalQuestions.business_recurring_payments;
|
|
129
|
+
this.business_recurring_payments_percentage =
|
|
130
|
+
additionalQuestions.business_recurring_payments_percentage;
|
|
81
131
|
this.business_seasonal = additionalQuestions.business_seasonal;
|
|
82
|
-
this.business_other_payment_details =
|
|
132
|
+
this.business_other_payment_details =
|
|
133
|
+
additionalQuestions.business_other_payment_details;
|
|
134
|
+
}
|
|
135
|
+
get payload() {
|
|
136
|
+
return {
|
|
137
|
+
business_revenue: this.business_revenue || '',
|
|
138
|
+
business_payment_volume: this.business_payment_volume || '',
|
|
139
|
+
business_when_service_received: this.business_when_service_received || '',
|
|
140
|
+
business_recurring_payments: this.business_recurring_payments || '',
|
|
141
|
+
business_recurring_payments_percentage: this.business_recurring_payments_percentage || '',
|
|
142
|
+
business_seasonal: this.business_seasonal || '',
|
|
143
|
+
business_other_payment_details: this.business_other_payment_details || '',
|
|
144
|
+
};
|
|
83
145
|
}
|
|
84
146
|
}
|
|
85
147
|
class CoreBusinessInfo {
|
|
@@ -94,10 +156,23 @@ class CoreBusinessInfo {
|
|
|
94
156
|
this.phone = coreBusinessInfo.phone;
|
|
95
157
|
this.date_of_incorporation = coreBusinessInfo.date_of_incorporation;
|
|
96
158
|
}
|
|
159
|
+
get payload() {
|
|
160
|
+
return {
|
|
161
|
+
classification: this.classification || '',
|
|
162
|
+
legal_name: this.legal_name || '',
|
|
163
|
+
doing_business_as: this.doing_business_as || '',
|
|
164
|
+
industry: this.industry || '',
|
|
165
|
+
tax_id: this.tax_id || '',
|
|
166
|
+
website_url: this.website_url || '',
|
|
167
|
+
email: this.email || '',
|
|
168
|
+
phone: this.phone || '',
|
|
169
|
+
date_of_incorporation: this.date_of_incorporation || '',
|
|
170
|
+
};
|
|
171
|
+
}
|
|
97
172
|
}
|
|
98
173
|
class Business {
|
|
99
174
|
constructor(business) {
|
|
100
|
-
this.additional_questions =
|
|
175
|
+
this.additional_questions = new AdditionalQuestions(business.additional_questions || {});
|
|
101
176
|
this.associated_accounts = business.associated_accounts;
|
|
102
177
|
this.classification = business.classification;
|
|
103
178
|
this.bank_accounts = business.bank_accounts;
|
|
@@ -107,20 +182,40 @@ class Business {
|
|
|
107
182
|
this.email = business.email;
|
|
108
183
|
this.id = business.id;
|
|
109
184
|
this.industry = business.industry;
|
|
110
|
-
this.legal_address =
|
|
185
|
+
this.legal_address = new Address(business.legal_address || {});
|
|
111
186
|
this.legal_name = business.legal_name;
|
|
112
187
|
this.metadata = business.metadata;
|
|
113
188
|
this.owners = business.owners;
|
|
114
189
|
this.phone = business.phone;
|
|
115
190
|
this.platform_account_id = business.platform_account_id;
|
|
116
191
|
this.product_categories = business.product_categories;
|
|
117
|
-
this.representative =
|
|
192
|
+
this.representative = new Representative(business.representative || {});
|
|
118
193
|
this.tax_id = business.tax_id;
|
|
119
194
|
this.terms_conditions_accepted = business.terms_conditions_accepted;
|
|
120
195
|
this.updated_at = business.updated_at;
|
|
121
196
|
this.website_url = business.website_url;
|
|
122
197
|
this.date_of_incorporation = business.date_of_incorporation;
|
|
123
198
|
}
|
|
199
|
+
get payload() {
|
|
200
|
+
return {
|
|
201
|
+
additional_questions: new AdditionalQuestions(this.additional_questions)
|
|
202
|
+
.payload,
|
|
203
|
+
classification: this.classification || '',
|
|
204
|
+
doing_business_as: this.doing_business_as || '',
|
|
205
|
+
email: this.email || '',
|
|
206
|
+
industry: this.industry || '',
|
|
207
|
+
legal_address: new Address(this.legal_address).payload,
|
|
208
|
+
legal_name: this.legal_name || '',
|
|
209
|
+
metadata: this.metadata || {},
|
|
210
|
+
owners: this.owners.map((owner) => ({ id: owner.id })),
|
|
211
|
+
phone: this.phone || '',
|
|
212
|
+
platform_account_id: this.platform_account_id || '',
|
|
213
|
+
representative: new Representative(this.representative).payload,
|
|
214
|
+
tax_id: this.tax_id || '',
|
|
215
|
+
website_url: this.website_url || '',
|
|
216
|
+
date_of_incorporation: this.date_of_incorporation || '',
|
|
217
|
+
};
|
|
218
|
+
}
|
|
124
219
|
}
|
|
125
220
|
|
|
126
221
|
export { AdditionalQuestions as A, Business as B, CoreBusinessInfo as C, Owner as O, Representative as R, BusinessClassification as a, Address as b };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-57431c24.js';
|
|
2
2
|
import { c as DetailItem, D as DetailSectionTitle } from './utils-01413a95.js';
|
|
3
|
-
import { i as isEmptyObject, s as snakeCaseToHumanReadable, e as formatMediumDate } from './utils-
|
|
3
|
+
import { i as isEmptyObject, s as snakeCaseToHumanReadable, e as formatMediumDate } from './utils-e66d8bca.js';
|
|
4
4
|
|
|
5
5
|
const sharedBusinessDetailsCss$4 = ".flex-1{flex:1}";
|
|
6
6
|
const AdditionalQuestionsDetailsStyle0 = sharedBusinessDetailsCss$4;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as create$3 } from './index.esm-fc4f5c0c.js';
|
|
2
|
-
import {
|
|
2
|
+
import { b as businessNameValidation, w as websiteUrlValidation, e as emailValidation, p as phoneValidation, d as doingBusinessAsValidation, a as businessClassificationValidation, i as industryValidation, t as taxIdValidation, c as dateOfIncorporationValidation, r as revenueValidation, f as paymentVolumeValidation, g as whenServiceReceivedValidation, h as recurringPaymentsValidation, j as recurringPaymentsPercentageValidation, s as seasonalBusinessValidation, o as otherPaymentDetailsValidation } from './schema-validations-e725d701.js';
|
|
3
3
|
|
|
4
4
|
const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
5
5
|
const schema = create$3({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BusinessClassification } from './Business-
|
|
1
|
+
import { a as BusinessClassification } from './Business-b73d5055.js';
|
|
2
2
|
|
|
3
3
|
const businessClassificationOptions = [
|
|
4
4
|
{
|
|
@@ -22,7 +22,7 @@ const businessClassificationOptions = [
|
|
|
22
22
|
value: BusinessClassification.public_company,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
label: 'Limited',
|
|
25
|
+
label: 'Limited Liability Company (LLC)',
|
|
26
26
|
value: BusinessClassification.limited,
|
|
27
27
|
},
|
|
28
28
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as create$3, a as create$6 } from './index.esm-fc4f5c0c.js';
|
|
2
|
-
import { l as lineOneValidation,
|
|
2
|
+
import { l as lineOneValidation, k as lineTwoValidation, m as cityValidation, n as stateValidation, q as postalValidation, u as identityNameValidation, v as identityTitleValidation, e as emailValidation, p as phoneValidation, x as dobValidation, y as ssnValidation } from './schema-validations-e725d701.js';
|
|
3
3
|
|
|
4
4
|
const addressSchema = (allowOptionalFields) => {
|
|
5
5
|
const schema = create$3({
|
|
@@ -45,46 +45,4 @@ const identitySchema = (role, allowOptionalFields) => {
|
|
|
45
45
|
return allowOptionalFields ? easySchema : schema;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
// This function is for the larger business form.
|
|
50
|
-
const parseBusiness = (values, initialValues) => {
|
|
51
|
-
var _a;
|
|
52
|
-
parseCoreInfo(values);
|
|
53
|
-
parseAddressInfo(values.legal_address);
|
|
54
|
-
parseIdentityInfo(values.representative);
|
|
55
|
-
((_a = initialValues.owners) === null || _a === void 0 ? void 0 : _a.length) && delete values.owners;
|
|
56
|
-
return values;
|
|
57
|
-
};
|
|
58
|
-
// These functions are for the stepped business form.
|
|
59
|
-
const parseCoreInfo = (values) => {
|
|
60
|
-
delete values.id;
|
|
61
|
-
delete values.documents;
|
|
62
|
-
delete values.bank_accounts;
|
|
63
|
-
delete values.product_categories;
|
|
64
|
-
delete values.created_at;
|
|
65
|
-
delete values.updated_at;
|
|
66
|
-
delete values.associated_accounts;
|
|
67
|
-
delete values.terms_conditions_accepted;
|
|
68
|
-
return values;
|
|
69
|
-
};
|
|
70
|
-
const parseAddressInfo = (values) => {
|
|
71
|
-
delete values.id;
|
|
72
|
-
delete values.created_at;
|
|
73
|
-
delete values.updated_at;
|
|
74
|
-
return values;
|
|
75
|
-
};
|
|
76
|
-
const parseIdentityInfo = (values) => {
|
|
77
|
-
delete values.id;
|
|
78
|
-
delete values.documents;
|
|
79
|
-
delete values.created_at;
|
|
80
|
-
delete values.updated_at;
|
|
81
|
-
delete values.address.id;
|
|
82
|
-
delete values.address.created_at;
|
|
83
|
-
delete values.address.updated_at;
|
|
84
|
-
delete values.business_id;
|
|
85
|
-
delete values.dob_full;
|
|
86
|
-
delete values.ssn_last4;
|
|
87
|
-
return values;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { addressSchema as a, parseCoreInfo as b, parseIdentityInfo as c, parseAddressInfo as d, identitySchema as i, parseBusiness as p };
|
|
48
|
+
export { addressSchema as a, identitySchema as i };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as config } from './config-476c7241.js';
|
|
2
|
+
import { A as Api } from './Api-c8abc2e0.js';
|
|
2
3
|
|
|
3
4
|
class BusinessService {
|
|
4
5
|
async fetchBusiness(businessId, authToken) {
|
|
5
6
|
const endpoint = `entities/business/${businessId}`;
|
|
6
|
-
return Api({ authToken, apiOrigin:
|
|
7
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
7
8
|
}
|
|
8
9
|
async patchBusiness(authToken, businessId, payload) {
|
|
9
10
|
const endpoint = `entities/business/${businessId}`;
|
|
10
|
-
return Api({ authToken, apiOrigin:
|
|
11
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
class IdentityService {
|
|
14
15
|
async fetchIdentity(identityId, authToken) {
|
|
15
16
|
const endpoint = `entities/identity/${identityId}`;
|
|
16
|
-
return Api({ authToken, apiOrigin:
|
|
17
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
|
|
17
18
|
}
|
|
18
19
|
async patchIdentity(authToken, identityId, payload) {
|
|
19
20
|
const endpoint = `entities/identity/${identityId}`;
|
|
20
|
-
return Api({ authToken, apiOrigin:
|
|
21
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
|
|
21
22
|
}
|
|
22
23
|
async postIdentity(authToken, payload) {
|
|
23
24
|
const endpoint = `entities/identity`;
|
|
24
|
-
return Api({ authToken, apiOrigin:
|
|
25
|
+
return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|