@justifi/webcomponents 4.12.2 → 4.13.0-rc.0
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/{Business-21cef37d.js → Business-98686045.js} +9 -4
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/{business-additional-questions-schema-f5f303fb.js → business-additional-questions-schema-f8086f7a.js} +17 -9
- package/dist/cjs/{business-form-types-a3cc374d.js → business-form-options-fd1c0032.js} +50 -33
- package/dist/cjs/business-form-types-29b2bad9.js +26 -0
- package/dist/cjs/form-control-date_3.cjs.entry.js +2 -2
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +7 -12
- package/dist/cjs/form-input-masks-0879c139.js +27 -0
- package/dist/cjs/{index-fc5339a5.js → index-d8e99b54.js} +352 -198
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +10 -9
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +7 -7
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-business-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +9 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +26 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +1 -1
- package/dist/cjs/justifi-owner-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +1 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{payload-parsers-74693a97.js → payload-parsers-fe27be37.js} +62 -7
- package/dist/cjs/{state-options-4fbcb48a.js → state-options-4145f9b4.js} +0 -4
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Business.js +8 -3
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -2
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +4 -2
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +4 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -2
- package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +16 -9
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +3 -1
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +3 -0
- package/dist/collection/components/business-forms/schemas/schema-validations.js +51 -7
- package/dist/collection/components/business-forms/utils/business-form-options.js +119 -0
- package/dist/collection/components/business-forms/utils/business-form-types.js +0 -81
- package/dist/collection/components/checkout/checkout-actions.js +28 -5
- package/dist/collection/components/checkout/checkout-core.js +30 -6
- package/dist/collection/components/checkout/payment-method-options.js +2 -18
- package/dist/collection/components/checkout/test/checkout-actions.spec.js +126 -0
- package/dist/collection/components/checkout/test/checkout-core.spec.js +127 -0
- package/dist/collection/components/checkout/test/checkout.spec.js +0 -153
- package/dist/collection/components/form/form-control-monetary.css +1812 -0
- package/dist/collection/components/form/form-control-monetary.js +24 -11
- package/dist/collection/components/form/test/form-control-monetary.spec.js +5 -3
- package/dist/collection/components/refund-form/refund-form.js +2 -1
- package/dist/collection/utils/form-input-masks.js +15 -0
- package/dist/collection/utils/state-options.js +0 -4
- package/dist/docs.json +93 -30
- package/dist/esm/{Business-0e8a9a3a.js → Business-6e0efa26.js} +9 -4
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{business-additional-questions-schema-a84dd641.js → business-additional-questions-schema-8e742129.js} +18 -10
- package/dist/esm/{business-form-types-7420dc96.js → business-form-options-75c0a7ec.js} +46 -32
- package/dist/esm/business-form-types-0d76133c.js +26 -0
- package/dist/esm/form-control-date_3.entry.js +2 -2
- package/dist/esm/form-control-datepart_2.entry.js +1 -1
- package/dist/esm/form-control-monetary.entry.js +7 -12
- package/dist/esm/form-input-masks-0e18300f.js +22 -0
- package/dist/esm/{index-5eb05747.js → index-dc1350b1.js} +352 -198
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +10 -9
- package/dist/esm/justifi-additional-questions_4.entry.js +7 -7
- package/dist/esm/justifi-billing-form_4.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +6 -5
- package/dist/esm/justifi-business-list.entry.js +2 -2
- package/dist/esm/justifi-business-owners.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +9 -4
- package/dist/esm/justifi-checkout.entry.js +27 -5
- package/dist/esm/justifi-new-payment-method_4.entry.js +1 -1
- package/dist/esm/justifi-owner-form.entry.js +6 -5
- package/dist/esm/justifi-payment-provisioning.entry.js +1 -3
- package/dist/esm/justifi-refund-form.entry.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{payload-parsers-0c4fc2b1.js → payload-parsers-73c12fa2.js} +55 -8
- package/dist/esm/{state-options-a356fb11.js → state-options-c0b757ad.js} +0 -4
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +8 -3
- package/dist/module/additional-questions-details2.js +2 -2
- package/dist/module/additional-questions.js +18 -4
- package/dist/module/business-additional-questions-form-step.js +18 -4
- package/dist/module/business-additional-questions-schema.js +16 -9
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-core-info-form-step.js +10 -3
- package/dist/module/business-core-info-schema.js +3 -1
- package/dist/module/business-core-info.js +9 -3
- package/dist/module/business-form-options.js +122 -0
- package/dist/module/business-form-types.js +153 -82
- package/dist/module/business-identity-schema.js +1 -1
- package/dist/module/business-representative-form-step.js +1 -1
- package/dist/module/checkout-core.js +9 -5
- package/dist/module/form-control-monetary2.js +8 -12
- package/dist/module/form-input-masks.js +16 -1
- package/dist/module/index2.js +352 -198
- package/dist/module/justifi-business-form.js +2 -2
- package/dist/module/justifi-checkout.js +27 -5
- package/dist/module/justifi-payment-provisioning.js +1 -1
- package/dist/module/justifi-refund-form.js +2 -1
- package/dist/module/legal-address-form-step.js +1 -1
- package/dist/module/owner-form.js +2 -2
- package/dist/module/payload-parsers.js +1 -107
- package/dist/module/payment-method-form.js +2 -2
- package/dist/module/payment-method-options.js +2 -2
- package/dist/module/state-options.js +0 -4
- package/dist/types/api/Business.d.ts +15 -5
- package/dist/types/api/services/checkout.service.d.ts +3 -3
- package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +10 -4
- package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +2 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +12 -4
- package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +3 -0
- package/dist/types/components/business-forms/schemas/schema-validations.d.ts +8 -0
- package/dist/types/components/business-forms/utils/business-form-options.d.ts +21 -0
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +0 -9
- package/dist/types/components/checkout/checkout-core.d.ts +3 -2
- package/dist/types/components/checkout/payment-method-options.d.ts +1 -1
- package/dist/types/components/form/form-control-monetary.d.ts +1 -0
- package/dist/types/components.d.ts +4 -2
- package/dist/types/utils/form-input-masks.d.ts +15 -0
- package/dist/webcomponents/{p-18cf5a16.entry.js → p-19885f77.entry.js} +1 -1
- package/dist/webcomponents/p-2c4c5f0d.entry.js +1 -0
- package/dist/webcomponents/p-30b6ea06.entry.js +1 -0
- package/dist/webcomponents/p-31e8f29c.entry.js +1 -0
- package/dist/webcomponents/p-31fe7232.entry.js +1 -0
- package/dist/webcomponents/p-3496e37f.js +1 -0
- package/dist/webcomponents/{p-2fbe8823.entry.js → p-35e59bb5.entry.js} +1 -1
- package/dist/webcomponents/p-3917edbf.entry.js +1 -0
- package/dist/webcomponents/p-3934a3a8.entry.js +1 -0
- package/dist/webcomponents/p-3ffe6784.js +1 -0
- package/dist/webcomponents/{p-e3946c2b.js → p-49c349e7.js} +1 -1
- package/dist/webcomponents/p-4d335a3d.entry.js +1 -0
- package/dist/webcomponents/p-4ff52695.entry.js +1 -0
- package/dist/webcomponents/p-525db3e8.js +1 -0
- package/dist/webcomponents/p-57fbd98d.js +1 -0
- package/dist/webcomponents/p-5a789239.entry.js +1 -0
- package/dist/webcomponents/{p-5f5e730c.entry.js → p-834cba99.entry.js} +1 -1
- package/dist/webcomponents/p-87d646c0.js +1 -0
- package/dist/webcomponents/{p-2bee72bd.entry.js → p-8da13f40.entry.js} +1 -1
- package/dist/webcomponents/p-935d6f55.js +1 -0
- package/dist/webcomponents/{p-b38baa84.entry.js → p-ba454cd7.entry.js} +1 -1
- package/dist/webcomponents/p-ed6ca114.js +1 -0
- package/dist/webcomponents/p-ee68566f.entry.js +1 -0
- package/dist/webcomponents/{p-b9f04fb0.entry.js → p-f152d6b8.entry.js} +1 -1
- package/dist/webcomponents/p-f3cf3513.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/form-input-masks-efd44b8e.js +0 -11
- package/dist/esm/form-input-masks-84875967.js +0 -7
- package/dist/webcomponents/p-01913426.js +0 -1
- package/dist/webcomponents/p-2319abaf.entry.js +0 -1
- package/dist/webcomponents/p-51ee396f.entry.js +0 -1
- package/dist/webcomponents/p-52e4cc27.js +0 -1
- package/dist/webcomponents/p-602a1588.entry.js +0 -1
- package/dist/webcomponents/p-6078a370.js +0 -1
- package/dist/webcomponents/p-6ec77980.entry.js +0 -1
- package/dist/webcomponents/p-81c43ba5.entry.js +0 -1
- package/dist/webcomponents/p-927150b4.entry.js +0 -1
- package/dist/webcomponents/p-93579716.js +0 -1
- package/dist/webcomponents/p-9e35b0f6.entry.js +0 -1
- package/dist/webcomponents/p-9e3f9e05.entry.js +0 -1
- package/dist/webcomponents/p-9ec89299.entry.js +0 -1
- package/dist/webcomponents/p-bfc634c6.entry.js +0 -1
- package/dist/webcomponents/p-c1b92cec.entry.js +0 -1
- package/dist/webcomponents/p-cb86b2fd.js +0 -1
- package/dist/webcomponents/p-d2b7beac.js +0 -1
|
@@ -9,10 +9,10 @@ import { A as Api } from './Api.js';
|
|
|
9
9
|
import './Pagination.js';
|
|
10
10
|
import './Payment.js';
|
|
11
11
|
import './Payout.js';
|
|
12
|
-
import {
|
|
12
|
+
import { a as parseBusiness } from './payload-parsers.js';
|
|
13
13
|
import { c as config } from './config.js';
|
|
14
14
|
import { F as FormAlert } from './utils4.js';
|
|
15
|
-
import { B as BusinessFormServerErrors,
|
|
15
|
+
import { B as BusinessFormServerErrors, l as BusinessFormClickActions } from './business-form-types.js';
|
|
16
16
|
import { b as Business } from './Business.js';
|
|
17
17
|
import { d as defineCustomElement$b } from './form-control-date2.js';
|
|
18
18
|
import { d as defineCustomElement$a } from './form-control-monetary2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getErrorMessage } from './utils3.js';
|
|
2
|
+
import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode } from './utils3.js';
|
|
3
3
|
import { A as Api } from './Api.js';
|
|
4
4
|
import './Pagination.js';
|
|
5
5
|
import './Payment.js';
|
|
@@ -16,6 +16,7 @@ import { d as defineCustomElement$3 } from './select-input2.js';
|
|
|
16
16
|
import { d as defineCustomElement$2 } from './text-input2.js';
|
|
17
17
|
|
|
18
18
|
const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSuccess, onError }) => {
|
|
19
|
+
var _a;
|
|
19
20
|
try {
|
|
20
21
|
const response = await service.fetchCheckout(authToken, checkoutId);
|
|
21
22
|
if (!response.error) {
|
|
@@ -24,14 +25,25 @@ const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSucce
|
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
27
|
const responseError = getErrorMessage(response.error);
|
|
27
|
-
|
|
28
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
29
|
+
return onError({
|
|
30
|
+
error: responseError,
|
|
31
|
+
code,
|
|
32
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
33
|
+
});
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
catch (error) {
|
|
31
|
-
|
|
37
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
38
|
+
return onError({
|
|
39
|
+
error: error.message || error,
|
|
40
|
+
code,
|
|
41
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
42
|
+
});
|
|
32
43
|
}
|
|
33
44
|
};
|
|
34
45
|
const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ payment, onSuccess, onError }) => {
|
|
46
|
+
var _a;
|
|
35
47
|
try {
|
|
36
48
|
const response = await service.complete(authToken, checkoutId, payment);
|
|
37
49
|
if (!response.error) {
|
|
@@ -40,11 +52,21 @@ const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ pa
|
|
|
40
52
|
}
|
|
41
53
|
else {
|
|
42
54
|
const responseError = getErrorMessage(response.error);
|
|
43
|
-
|
|
55
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
56
|
+
return onError({
|
|
57
|
+
error: responseError,
|
|
58
|
+
code,
|
|
59
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
60
|
+
});
|
|
44
61
|
}
|
|
45
62
|
}
|
|
46
63
|
catch (error) {
|
|
47
|
-
|
|
64
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
65
|
+
return onError({
|
|
66
|
+
error: error.message || error,
|
|
67
|
+
code,
|
|
68
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
69
|
+
});
|
|
48
70
|
}
|
|
49
71
|
};
|
|
50
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { F as FormAlert, L as LoadingSpinner } from './utils4.js';
|
|
3
|
-
import {
|
|
3
|
+
import { l as BusinessFormClickActions } from './business-form-types.js';
|
|
4
4
|
import { d as defineCustomElement$d } from './form-control-date2.js';
|
|
5
5
|
import { d as defineCustomElement$c } from './form-control-monetary2.js';
|
|
6
6
|
import { d as defineCustomElement$b } from './form-control-number-masked2.js';
|
|
@@ -6,6 +6,7 @@ import './Payment.js';
|
|
|
6
6
|
import './Payout.js';
|
|
7
7
|
import { F as FormController } from './form.js';
|
|
8
8
|
import { c as config } from './config.js';
|
|
9
|
+
import { C as CURRENCY_MASK } from './form-input-masks.js';
|
|
9
10
|
import { d as defineCustomElement$3 } from './form-control-monetary2.js';
|
|
10
11
|
import { d as defineCustomElement$2 } from './form-control-text2.js';
|
|
11
12
|
|
|
@@ -96,7 +97,7 @@ const RefundForm = /*@__PURE__*/ proxyCustomElement(class RefundForm extends HTM
|
|
|
96
97
|
}
|
|
97
98
|
render() {
|
|
98
99
|
var _a;
|
|
99
|
-
return (h(Host, null, h("h1", null, "Refund"), this.refundInfoText && (h("div", { class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { class: "m-0", innerHTML: this.refundInfoText }))), h("form", { onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { class: "form-group" }, h("form-control-monetary", { name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.amount })), h("div", { class: "form-group" }, h("form-control-text", { name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.notes })), this.withButton && (h("div", { class: "form-group d-flex flex-row-reverse" }, h("button", { type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
100
|
+
return (h(Host, null, h("h1", null, "Refund"), this.refundInfoText && (h("div", { class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { class: "m-0", innerHTML: this.refundInfoText }))), h("form", { onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { class: "form-group" }, h("form-control-monetary", { 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), error: this.errors.amount })), h("div", { class: "form-group" }, h("form-control-text", { name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), error: this.errors.notes })), this.withButton && (h("div", { class: "form-group d-flex flex-row-reverse" }, h("button", { type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
100
101
|
}
|
|
101
102
|
static get style() { return refundFormCss; }
|
|
102
103
|
}, [1, "justifi-refund-form", {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { F as FormController } from './form.js';
|
|
3
3
|
import { A as Api } from './Api.js';
|
|
4
4
|
import { c as Address } from './Business.js';
|
|
5
|
-
import {
|
|
5
|
+
import { c as parseAddressInfo } from './payload-parsers.js';
|
|
6
6
|
import { a as addressSchema } from './business-address-schema.js';
|
|
7
7
|
import { c as config } from './config.js';
|
|
8
8
|
import { B as BusinessFormServerErrors } from './business-form-types.js';
|
|
@@ -6,12 +6,12 @@ import './Pagination.js';
|
|
|
6
6
|
import './Payment.js';
|
|
7
7
|
import './Payout.js';
|
|
8
8
|
import { O as Owner } from './Business.js';
|
|
9
|
-
import {
|
|
9
|
+
import { b as parseIdentityInfo } from './payload-parsers.js';
|
|
10
10
|
import { i as identitySchema } from './business-identity-schema.js';
|
|
11
11
|
import { c as config } from './config.js';
|
|
12
12
|
import { L as LoadingSpinner } from './utils4.js';
|
|
13
13
|
import { d as deconstructDate } from './helpers.js';
|
|
14
|
-
import {
|
|
14
|
+
import { C as OwnerFormServerErrors, O as OwnerFormClickActions } from './business-form-types.js';
|
|
15
15
|
import { d as defineCustomElement$5 } from './form-control-date2.js';
|
|
16
16
|
import { d as defineCustomElement$4 } from './form-control-number-masked2.js';
|
|
17
17
|
import { d as defineCustomElement$3 } from './form-control-select2.js';
|
|
@@ -1,109 +1,3 @@
|
|
|
1
|
-
import { a as create$6 } from './index.esm.js';
|
|
2
|
-
import { a as BusinessTypeOptions, b as BusinessStructureOptions } from './business-form-types.js';
|
|
3
|
-
import { S as StateOptions } from './state-options.js';
|
|
4
|
-
|
|
5
|
-
const transformEmptyString = (value) => {
|
|
6
|
-
return value === '' ? null : value;
|
|
7
|
-
};
|
|
8
|
-
const businessNameRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
|
|
9
|
-
const phoneRegex = /^\d{10}$/;
|
|
10
|
-
const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
11
|
-
const taxIdRegex = /^\d{9}$/;
|
|
12
|
-
const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
|
|
13
|
-
const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
|
|
14
|
-
|
|
15
|
-
// Common Validations
|
|
16
|
-
const emailValidation = create$6()
|
|
17
|
-
.email('Enter valid email')
|
|
18
|
-
.transform(transformEmptyString);
|
|
19
|
-
const phoneValidation = create$6()
|
|
20
|
-
.matches(phoneRegex, 'Enter valid phone number')
|
|
21
|
-
.transform(transformEmptyString);
|
|
22
|
-
// Core Info Validations
|
|
23
|
-
const businessNameValidation = create$6()
|
|
24
|
-
.min(2, 'Name must be at least 2 characters')
|
|
25
|
-
.max(100, 'Name must be less than 100 characters')
|
|
26
|
-
.matches(businessNameRegex, 'Enter valid business name')
|
|
27
|
-
.transform(transformEmptyString);
|
|
28
|
-
const doingBusinessAsValidation = create$6()
|
|
29
|
-
.min(2, 'Name must be at least 2 characters')
|
|
30
|
-
.max(100, 'Name must be less than 100 characters')
|
|
31
|
-
.matches(businessNameRegex, 'Enter valid doing business as')
|
|
32
|
-
.transform(transformEmptyString);
|
|
33
|
-
const websiteUrlValidation = create$6()
|
|
34
|
-
.matches(urlRegex, 'Enter valid website url')
|
|
35
|
-
.transform(transformEmptyString);
|
|
36
|
-
const businessTypeValidation = create$6()
|
|
37
|
-
.oneOf(BusinessTypeOptions.map((option) => option.value), 'Select business type')
|
|
38
|
-
.transform(transformEmptyString);
|
|
39
|
-
const businessStructureValidation = create$6()
|
|
40
|
-
.oneOf(BusinessStructureOptions.map((option) => option.value), 'Select business structure')
|
|
41
|
-
.transform(transformEmptyString);
|
|
42
|
-
const industryValidation = create$6()
|
|
43
|
-
.min(2, 'Industry must be at least 2 characters')
|
|
44
|
-
.max(50, 'Industry must be less than 50 characters')
|
|
45
|
-
.matches(stringLettersOnlyRegex, 'Enter valid industry')
|
|
46
|
-
.transform(transformEmptyString);
|
|
47
|
-
const taxIdValidation = create$6()
|
|
48
|
-
.matches(taxIdRegex, 'Enter valid tax id')
|
|
49
|
-
.transform(transformEmptyString);
|
|
50
|
-
// Identity Validations
|
|
51
|
-
const identityNameValidation = create$6()
|
|
52
|
-
.min(2, 'Name must be at least 2 characters')
|
|
53
|
-
.max(100, 'Name must be less than 100 characters')
|
|
54
|
-
.matches(stringLettersOnlyRegex, 'Enter valid name')
|
|
55
|
-
.transform(transformEmptyString);
|
|
56
|
-
const identityTitleValidation = create$6()
|
|
57
|
-
.min(2, 'Title must be at least 2 characters')
|
|
58
|
-
.max(50, 'Title must be less than 50 characters')
|
|
59
|
-
.matches(stringLettersOnlyRegex, 'Enter valid title')
|
|
60
|
-
.transform(transformEmptyString);
|
|
61
|
-
const dobValidation = (role) => {
|
|
62
|
-
return (create$6()
|
|
63
|
-
.test('min', 'Enter a valid date', (value) => {
|
|
64
|
-
const date = new Date(value);
|
|
65
|
-
const minDate = new Date('1902-01-01');
|
|
66
|
-
return date >= minDate;
|
|
67
|
-
})
|
|
68
|
-
.test('age', `${role} must be at least 18 years old`, (value) => {
|
|
69
|
-
const date = new Date(value);
|
|
70
|
-
const minAgeDate = new Date();
|
|
71
|
-
minAgeDate.setFullYear(minAgeDate.getFullYear() - 18);
|
|
72
|
-
return date <= minAgeDate;
|
|
73
|
-
})
|
|
74
|
-
.transform(transformEmptyString));
|
|
75
|
-
};
|
|
76
|
-
const ssnValidation = create$6()
|
|
77
|
-
.matches(ssnRegex, 'Enter valid SSN')
|
|
78
|
-
.test('not-repeat', 'Enter valid SSN', (value) => {
|
|
79
|
-
return !/^(\d)\1+$/.test(value);
|
|
80
|
-
})
|
|
81
|
-
.test('not-seq', 'Enter valid SSN', (value) => {
|
|
82
|
-
return value !== '123456789';
|
|
83
|
-
})
|
|
84
|
-
.transform(transformEmptyString);
|
|
85
|
-
// Address Validations
|
|
86
|
-
const lineOneValidation = create$6()
|
|
87
|
-
.min(5, 'Address must be at least 5 characters')
|
|
88
|
-
.max(100, 'Address must be less than 100 characters')
|
|
89
|
-
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 1')
|
|
90
|
-
.transform(transformEmptyString);
|
|
91
|
-
const lineTwoValidation = create$6()
|
|
92
|
-
.max(100, 'Address must be less than 100 characters')
|
|
93
|
-
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 2')
|
|
94
|
-
.transform(transformEmptyString);
|
|
95
|
-
const cityValidation = create$6()
|
|
96
|
-
.min(2, 'City must be at least 2 characters')
|
|
97
|
-
.max(50, 'City must be less than 50 characters')
|
|
98
|
-
.matches(/^(?!^\s+$)[a-zA-Z\s]*$/, 'Enter valid city')
|
|
99
|
-
.transform(transformEmptyString);
|
|
100
|
-
const stateValidation = create$6()
|
|
101
|
-
.oneOf(StateOptions.map((option) => option.value), 'Select state')
|
|
102
|
-
.transform(transformEmptyString);
|
|
103
|
-
const postalValidation = create$6()
|
|
104
|
-
.matches(/^[0-9]{5}$/, 'Enter valid postal code')
|
|
105
|
-
.transform(transformEmptyString);
|
|
106
|
-
|
|
107
1
|
// These props should not be sent to the server
|
|
108
2
|
// This function is for the larger business form.
|
|
109
3
|
const parseBusiness = (values, initialValues) => {
|
|
@@ -144,4 +38,4 @@ const parseIdentityInfo = (values) => {
|
|
|
144
38
|
return values;
|
|
145
39
|
};
|
|
146
40
|
|
|
147
|
-
export {
|
|
41
|
+
export { parseBusiness as a, parseIdentityInfo as b, parseAddressInfo as c, parseCoreInfo as p };
|
|
@@ -1490,7 +1490,7 @@ const MessageEventType = {
|
|
|
1490
1490
|
};
|
|
1491
1491
|
|
|
1492
1492
|
const name = "@justifi/webcomponents";
|
|
1493
|
-
const version = "4.
|
|
1493
|
+
const version = "4.13.0-rc.0";
|
|
1494
1494
|
const description = "JustiFi Web Components";
|
|
1495
1495
|
const main = "dist/module/index.js";
|
|
1496
1496
|
const module = "dist/module/index.js";
|
|
@@ -1524,7 +1524,7 @@ const dependencies = {
|
|
|
1524
1524
|
"date-fns": "^2.29.3",
|
|
1525
1525
|
"dinero.js": "^1.9.1",
|
|
1526
1526
|
"iframe-resizer": "^4.3.7",
|
|
1527
|
-
imask: "^7.
|
|
1527
|
+
imask: "^7.6.0",
|
|
1528
1528
|
rxjs: "^7.8.1",
|
|
1529
1529
|
"ts-dedent": "^2.2.0",
|
|
1530
1530
|
uuid: "^9.0.0",
|
|
@@ -23,8 +23,8 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
|
|
|
23
23
|
this.accountId = undefined;
|
|
24
24
|
this.iframeOrigin = config.iframeOrigin;
|
|
25
25
|
this.savedPaymentMethods = [];
|
|
26
|
-
this.selectedPaymentMethodId = undefined;
|
|
27
26
|
this.paymentAmount = undefined;
|
|
27
|
+
this.selectedPaymentMethodId = undefined;
|
|
28
28
|
this.paymentMethodOptions = [];
|
|
29
29
|
}
|
|
30
30
|
paymentMethodsChanged() {
|
|
@@ -90,8 +90,8 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
|
|
|
90
90
|
"accountId": [1, "account-id"],
|
|
91
91
|
"iframeOrigin": [1025, "iframe-origin"],
|
|
92
92
|
"savedPaymentMethods": [16],
|
|
93
|
-
"selectedPaymentMethodId": [1, "selected-payment-method-id"],
|
|
94
93
|
"paymentAmount": [1, "payment-amount"],
|
|
94
|
+
"selectedPaymentMethodId": [32],
|
|
95
95
|
"paymentMethodOptions": [32],
|
|
96
96
|
"resolvePaymentMethod": [64]
|
|
97
97
|
}, [[0, "paymentMethodOptionSelected", "paymentMethodOptionSelected"]], {
|
|
@@ -70,14 +70,20 @@ export interface ProductCategories {
|
|
|
70
70
|
export interface IAdditionalQuestions {
|
|
71
71
|
business_revenue?: string;
|
|
72
72
|
business_payment_volume?: string;
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
business_when_service_received?: string;
|
|
74
|
+
business_recurring_payments?: string;
|
|
75
|
+
business_recurring_payments_percentage?: string;
|
|
76
|
+
business_seasonal?: string;
|
|
77
|
+
business_other_payment_details?: string;
|
|
75
78
|
}
|
|
76
79
|
export declare class AdditionalQuestions implements IAdditionalQuestions {
|
|
77
80
|
business_revenue?: string;
|
|
78
81
|
business_payment_volume?: string;
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
business_when_service_received?: string;
|
|
83
|
+
business_recurring_payments?: string;
|
|
84
|
+
business_recurring_payments_percentage?: string;
|
|
85
|
+
business_seasonal?: string;
|
|
86
|
+
business_other_payment_details?: string;
|
|
81
87
|
constructor(additionalQuestions: IAdditionalQuestions);
|
|
82
88
|
}
|
|
83
89
|
export interface ICoreBusinessInfo {
|
|
@@ -90,6 +96,7 @@ export interface ICoreBusinessInfo {
|
|
|
90
96
|
website_url?: string;
|
|
91
97
|
email?: string;
|
|
92
98
|
phone?: string;
|
|
99
|
+
date_of_incorporation?: string;
|
|
93
100
|
}
|
|
94
101
|
export declare class CoreBusinessInfo implements ICoreBusinessInfo {
|
|
95
102
|
business_type: BusinessType;
|
|
@@ -101,6 +108,7 @@ export declare class CoreBusinessInfo implements ICoreBusinessInfo {
|
|
|
101
108
|
website_url: string;
|
|
102
109
|
email: string;
|
|
103
110
|
phone: string;
|
|
111
|
+
date_of_incorporation: string;
|
|
104
112
|
constructor(coreBusinessInfo: ICoreBusinessInfo);
|
|
105
113
|
}
|
|
106
114
|
export interface IBusiness {
|
|
@@ -125,9 +133,10 @@ export interface IBusiness {
|
|
|
125
133
|
tax_id: string;
|
|
126
134
|
updated_at: string;
|
|
127
135
|
website_url: string;
|
|
136
|
+
date_of_incorporation?: string;
|
|
128
137
|
}
|
|
129
138
|
export declare class Business implements IBusiness {
|
|
130
|
-
additional_questions:
|
|
139
|
+
additional_questions: AdditionalQuestions | {};
|
|
131
140
|
business_type: BusinessType;
|
|
132
141
|
business_structure: BusinessStructure;
|
|
133
142
|
bank_accounts: BankAccount[];
|
|
@@ -147,6 +156,7 @@ export declare class Business implements IBusiness {
|
|
|
147
156
|
tax_id: string;
|
|
148
157
|
updated_at: string;
|
|
149
158
|
website_url: string;
|
|
159
|
+
date_of_incorporation?: string;
|
|
150
160
|
product_categories: ProductCategories;
|
|
151
161
|
constructor(business: IBusiness);
|
|
152
162
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IApiResponse, ICheckout } from '..';
|
|
1
|
+
import { IApiResponse, ICheckout, ICheckoutCompleteResponse } from '..';
|
|
2
2
|
export interface ICheckoutService {
|
|
3
3
|
fetchCheckout(authToken: string, checkoutId: string): Promise<IApiResponse<ICheckout>>;
|
|
4
4
|
complete(authToken: string, checkoutId: string, payment: {
|
|
5
5
|
payment_mode: string;
|
|
6
6
|
payment_token?: string;
|
|
7
|
-
}): Promise<IApiResponse<
|
|
7
|
+
}): Promise<IApiResponse<ICheckoutCompleteResponse>>;
|
|
8
8
|
}
|
|
9
9
|
export declare class CheckoutService implements ICheckoutService {
|
|
10
10
|
fetchCheckout(authToken: string, checkoutId: string): Promise<IApiResponse<ICheckout>>;
|
|
11
11
|
complete(authToken: string, checkoutId: string, payment: {
|
|
12
12
|
payment_mode: string;
|
|
13
13
|
payment_token?: string;
|
|
14
|
-
}): Promise<IApiResponse<
|
|
14
|
+
}): Promise<IApiResponse<ICheckoutCompleteResponse>>;
|
|
15
15
|
}
|
package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
export declare const additionalQuestionsSchema: (allowOptionalFields?: boolean) => import("yup").ObjectSchema<{
|
|
2
2
|
business_revenue: string;
|
|
3
3
|
business_payment_volume: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
business_when_service_received: string;
|
|
5
|
+
business_recurring_payments: string;
|
|
6
|
+
business_recurring_payments_percentage: string;
|
|
7
|
+
business_seasonal: string;
|
|
8
|
+
business_other_payment_details: string;
|
|
6
9
|
}, import("yup").AnyObject, {
|
|
7
10
|
business_revenue: undefined;
|
|
8
11
|
business_payment_volume: undefined;
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
business_when_service_received: undefined;
|
|
13
|
+
business_recurring_payments: undefined;
|
|
14
|
+
business_recurring_payments_percentage: undefined;
|
|
15
|
+
business_seasonal: undefined;
|
|
16
|
+
business_other_payment_details: undefined;
|
|
11
17
|
}, "">;
|
|
@@ -8,6 +8,7 @@ export declare const businessCoreInfoSchema: (allowOptionalFields?: boolean) =>
|
|
|
8
8
|
business_structure: string;
|
|
9
9
|
industry: string;
|
|
10
10
|
tax_id: string;
|
|
11
|
+
date_of_incorporation: string;
|
|
11
12
|
}, import("yup").AnyObject, {
|
|
12
13
|
legal_name: undefined;
|
|
13
14
|
website_url: undefined;
|
|
@@ -18,4 +19,5 @@ export declare const businessCoreInfoSchema: (allowOptionalFields?: boolean) =>
|
|
|
18
19
|
business_structure: undefined;
|
|
19
20
|
industry: undefined;
|
|
20
21
|
tax_id: undefined;
|
|
22
|
+
date_of_incorporation: undefined;
|
|
21
23
|
}, "">;
|
|
@@ -8,10 +8,13 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
|
|
|
8
8
|
country?: string;
|
|
9
9
|
};
|
|
10
10
|
additional_questions: {
|
|
11
|
+
business_recurring_payments?: string;
|
|
11
12
|
business_revenue?: string;
|
|
12
13
|
business_payment_volume?: string;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
business_when_service_received?: string;
|
|
15
|
+
business_recurring_payments_percentage?: string;
|
|
16
|
+
business_seasonal?: string;
|
|
17
|
+
business_other_payment_details?: string;
|
|
15
18
|
};
|
|
16
19
|
representative: {
|
|
17
20
|
address?: {
|
|
@@ -38,6 +41,7 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
|
|
|
38
41
|
business_structure: unknown;
|
|
39
42
|
industry: unknown;
|
|
40
43
|
tax_id: unknown;
|
|
44
|
+
date_of_incorporation: unknown;
|
|
41
45
|
}, import("yup").AnyObject, {
|
|
42
46
|
legal_address: {
|
|
43
47
|
line1: undefined;
|
|
@@ -50,8 +54,11 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
|
|
|
50
54
|
additional_questions: {
|
|
51
55
|
business_revenue: undefined;
|
|
52
56
|
business_payment_volume: undefined;
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
business_when_service_received: undefined;
|
|
58
|
+
business_recurring_payments: undefined;
|
|
59
|
+
business_recurring_payments_percentage: undefined;
|
|
60
|
+
business_seasonal: undefined;
|
|
61
|
+
business_other_payment_details: undefined;
|
|
55
62
|
};
|
|
56
63
|
representative: {
|
|
57
64
|
name: undefined;
|
|
@@ -78,4 +85,5 @@ export declare const businessFormSchema: import("yup").ObjectSchema<{
|
|
|
78
85
|
business_structure: undefined;
|
|
79
86
|
industry: undefined;
|
|
80
87
|
tax_id: undefined;
|
|
88
|
+
date_of_incorporation: undefined;
|
|
81
89
|
}, "">;
|
|
@@ -4,4 +4,7 @@ export declare const phoneRegex: RegExp;
|
|
|
4
4
|
export declare const urlRegex: RegExp;
|
|
5
5
|
export declare const taxIdRegex: RegExp;
|
|
6
6
|
export declare const stringLettersOnlyRegex: RegExp;
|
|
7
|
+
export declare const numbersOnlyRegex: RegExp;
|
|
7
8
|
export declare const ssnRegex: RegExp;
|
|
9
|
+
export declare const streetAddressRegex: RegExp;
|
|
10
|
+
export declare const poBoxRegex: RegExp;
|
|
@@ -7,6 +7,7 @@ export declare const businessTypeValidation: import("yup").StringSchema<string,
|
|
|
7
7
|
export declare const businessStructureValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
8
8
|
export declare const industryValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
9
9
|
export declare const taxIdValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
10
|
+
export declare const dateOfIncorporationValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
10
11
|
export declare const identityNameValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
11
12
|
export declare const identityTitleValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
12
13
|
export declare const dobValidation: (role: string) => import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
@@ -16,3 +17,10 @@ export declare const lineTwoValidation: import("yup").StringSchema<string, impor
|
|
|
16
17
|
export declare const cityValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
17
18
|
export declare const stateValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
18
19
|
export declare const postalValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
20
|
+
export declare const revenueValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
21
|
+
export declare const paymentVolumeValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
22
|
+
export declare const whenServiceReceivedValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
23
|
+
export declare const recurringPaymentsValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
24
|
+
export declare const recurringPaymentsPercentageValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
25
|
+
export declare const seasonalBusinessValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
26
|
+
export declare const otherPaymentDetailsValidation: import("yup").StringSchema<string, import("yup").AnyObject, undefined, "">;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BusinessStructure, BusinessType } from "../../../api/Business";
|
|
2
|
+
export declare const businessTypeOptions: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: BusinessType | string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const businessStructureOptions: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: BusinessStructure | string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const businessServiceReceivedOptions: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const recurringPaymentsOptions: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
export declare const seasonalBusinessOptions: {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BusinessStructure, BusinessType } from "../../../api/Business";
|
|
2
1
|
export interface BusinessFormSubmitEvent {
|
|
3
2
|
data: any;
|
|
4
3
|
metadata?: BusinessFormEventMetaData;
|
|
@@ -47,12 +46,4 @@ export declare enum OwnerFormClickActions {
|
|
|
47
46
|
addOwnerForm = "addOwnerForm",
|
|
48
47
|
updateOwner = "updateOwner"
|
|
49
48
|
}
|
|
50
|
-
export declare const BusinessTypeOptions: {
|
|
51
|
-
label: string;
|
|
52
|
-
value: BusinessType | string;
|
|
53
|
-
}[];
|
|
54
|
-
export declare const BusinessStructureOptions: {
|
|
55
|
-
label: string;
|
|
56
|
-
value: BusinessStructure | string;
|
|
57
|
-
}[];
|
|
58
49
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { ICheckout, ICheckoutCompleteResponse } from '../../api/Checkout';
|
|
3
|
+
import { ComponentError } from '../../api/ComponentError';
|
|
3
4
|
export declare class CheckoutCore {
|
|
4
5
|
/**
|
|
5
6
|
* URL for the rendered iFrame. End-users need not use this.
|
|
@@ -15,15 +16,15 @@ export declare class CheckoutCore {
|
|
|
15
16
|
serverError: boolean;
|
|
16
17
|
errorMessage: string;
|
|
17
18
|
creatingNewPaymentMethod: boolean;
|
|
18
|
-
selectedPaymentMethodToken: string;
|
|
19
19
|
submitted: EventEmitter<ICheckoutCompleteResponse>;
|
|
20
|
+
errorEvent: EventEmitter<ComponentError>;
|
|
20
21
|
private paymentMethodOptionsRef?;
|
|
21
22
|
componentWillLoad(): void;
|
|
22
23
|
connectedCallback(): void;
|
|
23
24
|
fetchData(): void;
|
|
24
25
|
loadFontsOnParent(): Promise<any>;
|
|
25
26
|
submit(event: any): Promise<void>;
|
|
26
|
-
onSubmitted: (data:
|
|
27
|
+
onSubmitted: (data: ICheckoutCompleteResponse) => void;
|
|
27
28
|
private loadingSpinner;
|
|
28
29
|
render(): any;
|
|
29
30
|
}
|
|
@@ -10,8 +10,8 @@ export declare class PaymentMethodOptions {
|
|
|
10
10
|
accountId: string;
|
|
11
11
|
iframeOrigin?: string;
|
|
12
12
|
savedPaymentMethods: any[];
|
|
13
|
-
selectedPaymentMethodId: string;
|
|
14
13
|
paymentAmount: string;
|
|
14
|
+
selectedPaymentMethodId: string;
|
|
15
15
|
paymentMethodOptions: PaymentMethodOption[];
|
|
16
16
|
toggleCreatingNewPaymentMethod: EventEmitter;
|
|
17
17
|
private selectedPaymentMethodOptionRef?;
|
|
@@ -77,6 +77,7 @@ export namespace Components {
|
|
|
77
77
|
"error": string;
|
|
78
78
|
"inputHandler": (name: string, value: string) => void;
|
|
79
79
|
"label": string;
|
|
80
|
+
"maskOptions": any;
|
|
80
81
|
"name": string;
|
|
81
82
|
}
|
|
82
83
|
interface FormControlNumber {
|
|
@@ -453,7 +454,6 @@ export namespace Components {
|
|
|
453
454
|
"paymentAmount": string;
|
|
454
455
|
"resolvePaymentMethod": () => Promise<PaymentMethodPayload>;
|
|
455
456
|
"savedPaymentMethods": any[];
|
|
456
|
-
"selectedPaymentMethodId": string;
|
|
457
457
|
"showAch": boolean;
|
|
458
458
|
"showCard": boolean;
|
|
459
459
|
}
|
|
@@ -1288,6 +1288,7 @@ declare global {
|
|
|
1288
1288
|
};
|
|
1289
1289
|
interface HTMLJustifiCheckoutCoreElementEventMap {
|
|
1290
1290
|
"submitted": ICheckoutCompleteResponse;
|
|
1291
|
+
"error-event": ComponentError;
|
|
1291
1292
|
}
|
|
1292
1293
|
interface HTMLJustifiCheckoutCoreElement extends Components.JustifiCheckoutCore, HTMLStencilElement {
|
|
1293
1294
|
addEventListener<K extends keyof HTMLJustifiCheckoutCoreElementEventMap>(type: K, listener: (this: HTMLJustifiCheckoutCoreElement, ev: JustifiCheckoutCoreCustomEvent<HTMLJustifiCheckoutCoreElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -2030,6 +2031,7 @@ declare namespace LocalJSX {
|
|
|
2030
2031
|
"error"?: string;
|
|
2031
2032
|
"inputHandler"?: (name: string, value: string) => void;
|
|
2032
2033
|
"label"?: string;
|
|
2034
|
+
"maskOptions"?: any;
|
|
2033
2035
|
"name"?: string;
|
|
2034
2036
|
"onFormControlBlur"?: (event: FormControlMonetaryCustomEvent<any>) => void;
|
|
2035
2037
|
"onFormControlInput"?: (event: FormControlMonetaryCustomEvent<any>) => void;
|
|
@@ -2314,6 +2316,7 @@ declare namespace LocalJSX {
|
|
|
2314
2316
|
* URL for the rendered iFrame. End-users need not use this.
|
|
2315
2317
|
*/
|
|
2316
2318
|
"iframeOrigin"?: string;
|
|
2319
|
+
"onError-event"?: (event: JustifiCheckoutCoreCustomEvent<ComponentError>) => void;
|
|
2317
2320
|
"onSubmitted"?: (event: JustifiCheckoutCoreCustomEvent<ICheckoutCompleteResponse>) => void;
|
|
2318
2321
|
}
|
|
2319
2322
|
interface JustifiDetails {
|
|
@@ -2435,7 +2438,6 @@ declare namespace LocalJSX {
|
|
|
2435
2438
|
"onToggleCreatingNewPaymentMethod"?: (event: JustifiPaymentMethodOptionsCustomEvent<any>) => void;
|
|
2436
2439
|
"paymentAmount"?: string;
|
|
2437
2440
|
"savedPaymentMethods"?: any[];
|
|
2438
|
-
"selectedPaymentMethodId"?: string;
|
|
2439
2441
|
"showAch"?: boolean;
|
|
2440
2442
|
"showCard"?: boolean;
|
|
2441
2443
|
}
|
|
@@ -5,3 +5,18 @@ export declare const TAX_ID_MASKS: {
|
|
|
5
5
|
US: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const SSN_MASK = "000-00-0000";
|
|
8
|
+
export declare const CURRENCY_MASK: {
|
|
9
|
+
WHOLE: {
|
|
10
|
+
mask: NumberConstructor;
|
|
11
|
+
thousandsSeparator: string;
|
|
12
|
+
normalizeZeros: boolean;
|
|
13
|
+
};
|
|
14
|
+
DECIMAL: {
|
|
15
|
+
mask: NumberConstructor;
|
|
16
|
+
scale: number;
|
|
17
|
+
thousandsSeparator: string;
|
|
18
|
+
padFractionalZeros: boolean;
|
|
19
|
+
normalizeZeros: boolean;
|
|
20
|
+
radix: string;
|
|
21
|
+
};
|
|
22
|
+
};
|