@justifi/webcomponents 4.12.1 → 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-c928bf29.js → Business-98686045.js} +27 -4
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +4 -4
- package/dist/cjs/{business-additional-questions-schema-3813615c.js → business-additional-questions-schema-f8086f7a.js} +19 -9
- package/dist/cjs/business-form-options-fd1c0032.js +128 -0
- package/dist/cjs/{business-form-types-4b138bf2.js → business-form-types-29b2bad9.js} +0 -26
- 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 +4 -4
- 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-58d3798e.js → payload-parsers-fe27be37.js} +65 -6
- 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 +26 -3
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -2
- package/dist/collection/components/business-details/generic-info-details/generic-info-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 +5 -1
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +3 -0
- package/dist/collection/components/business-forms/schemas/schema-validations.js +53 -6
- 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 -23
- 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/payment-method-form/payment-method-form.js +1 -1
- 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-6cb1b9c8.js → Business-6e0efa26.js} +28 -5
- package/dist/esm/additional-questions-details_5.entry.js +4 -4
- package/dist/esm/business-additional-questions-schema-8e742129.js +54 -0
- package/dist/esm/business-form-options-75c0a7ec.js +122 -0
- package/dist/esm/{business-form-types-5ba52d61.js → business-form-types-0d76133c.js} +1 -25
- 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 +4 -4
- 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-3e817fe9.js → payload-parsers-73c12fa2.js} +57 -7
- 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 +27 -4
- 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 +5 -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 -24
- 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/generic-info-details2.js +2 -2
- package/dist/module/index2.js +352 -198
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +3 -3
- package/dist/module/justifi-business-list.js +1 -1
- 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 +2 -2
- package/dist/module/owner-form.js +2 -2
- package/dist/module/payload-parsers.js +1 -104
- package/dist/module/payment-method-form.js +3 -3
- package/dist/module/payment-method-options.js +2 -2
- package/dist/module/state-options.js +0 -4
- package/dist/types/api/Business.d.ts +34 -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 +4 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +14 -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 +9 -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 -5
- 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-31e70d65.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-49c349e7.js +1 -0
- 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-71b8e2da.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/business-additional-questions-schema-228d86e0.js +0 -44
- package/dist/esm/form-input-masks-84875967.js +0 -7
- package/dist/webcomponents/p-01913426.js +0 -1
- package/dist/webcomponents/p-07080c01.entry.js +0 -1
- package/dist/webcomponents/p-0d371ff5.entry.js +0 -1
- package/dist/webcomponents/p-2319abaf.entry.js +0 -1
- package/dist/webcomponents/p-26fe62d6.entry.js +0 -1
- package/dist/webcomponents/p-31ccb5f0.entry.js +0 -1
- package/dist/webcomponents/p-4c705f56.js +0 -1
- package/dist/webcomponents/p-6078a370.js +0 -1
- package/dist/webcomponents/p-737473d8.js +0 -1
- package/dist/webcomponents/p-787d8f52.js +0 -1
- package/dist/webcomponents/p-889a83d2.js +0 -1
- package/dist/webcomponents/p-927150b4.entry.js +0 -1
- package/dist/webcomponents/p-93579716.js +0 -1
- package/dist/webcomponents/p-9b0e5c25.entry.js +0 -1
- package/dist/webcomponents/p-9e3f9e05.entry.js +0 -1
- package/dist/webcomponents/p-c1b92cec.entry.js +0 -1
- package/dist/webcomponents/p-c865cda8.entry.js +0 -1
- package/dist/webcomponents/p-edab5f2b.entry.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import IMask from "imask";
|
|
3
|
+
import { CURRENCY_MASK } from "../../utils/form-input-masks";
|
|
3
4
|
export class MonetaryInput {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.imask = null;
|
|
@@ -8,6 +9,7 @@ export class MonetaryInput {
|
|
|
8
9
|
this.error = undefined;
|
|
9
10
|
this.defaultValue = undefined;
|
|
10
11
|
this.inputHandler = undefined;
|
|
12
|
+
this.maskOptions = CURRENCY_MASK.DECIMAL;
|
|
11
13
|
}
|
|
12
14
|
handleDefaultValueChange(newValue) {
|
|
13
15
|
this.updateInput(newValue);
|
|
@@ -23,14 +25,7 @@ export class MonetaryInput {
|
|
|
23
25
|
initializeIMask() {
|
|
24
26
|
if (!this.textInput)
|
|
25
27
|
return;
|
|
26
|
-
this.imask = IMask(this.textInput,
|
|
27
|
-
mask: Number,
|
|
28
|
-
scale: 2,
|
|
29
|
-
thousandsSeparator: ',',
|
|
30
|
-
padFractionalZeros: true,
|
|
31
|
-
normalizeZeros: true,
|
|
32
|
-
radix: '.',
|
|
33
|
-
});
|
|
28
|
+
this.imask = IMask(this.textInput, this.maskOptions);
|
|
34
29
|
this.imask.on('accept', () => {
|
|
35
30
|
const rawValue = this.imask.unmaskedValue;
|
|
36
31
|
this.inputHandler(this.name, rawValue);
|
|
@@ -44,18 +39,18 @@ export class MonetaryInput {
|
|
|
44
39
|
}
|
|
45
40
|
}
|
|
46
41
|
render() {
|
|
47
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text" }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
42
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("div", { class: "input-group mb-3" }, h("span", { class: "input-group-text" }, "$"), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control monetary is-invalid' : 'form-control monetary', type: "text" }), this.error && h("div", { class: "invalid-feedback" }, this.error))));
|
|
48
43
|
}
|
|
49
44
|
static get is() { return "form-control-monetary"; }
|
|
50
45
|
static get encapsulation() { return "shadow"; }
|
|
51
46
|
static get originalStyleUrls() {
|
|
52
47
|
return {
|
|
53
|
-
"$": ["form-control-
|
|
48
|
+
"$": ["form-control-monetary.scss"]
|
|
54
49
|
};
|
|
55
50
|
}
|
|
56
51
|
static get styleUrls() {
|
|
57
52
|
return {
|
|
58
|
-
"$": ["form-control-
|
|
53
|
+
"$": ["form-control-monetary.css"]
|
|
59
54
|
};
|
|
60
55
|
}
|
|
61
56
|
static get properties() {
|
|
@@ -142,6 +137,24 @@ export class MonetaryInput {
|
|
|
142
137
|
"tags": [],
|
|
143
138
|
"text": ""
|
|
144
139
|
}
|
|
140
|
+
},
|
|
141
|
+
"maskOptions": {
|
|
142
|
+
"type": "any",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "any",
|
|
146
|
+
"resolved": "any",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"attribute": "mask-options",
|
|
156
|
+
"reflect": false,
|
|
157
|
+
"defaultValue": "CURRENCY_MASK.DECIMAL"
|
|
145
158
|
}
|
|
146
159
|
};
|
|
147
160
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
2
|
import { MonetaryInput } from "../form-control-monetary";
|
|
3
|
+
import { CURRENCY_MASK } from "../../../utils/form-input-masks";
|
|
3
4
|
describe('form-control-monetary', () => {
|
|
4
5
|
it('renders correctly with default props', async () => {
|
|
5
6
|
const page = await newSpecPage({
|
|
@@ -17,6 +18,7 @@ describe('form-control-monetary', () => {
|
|
|
17
18
|
name="amount"
|
|
18
19
|
error="Invalid amount"
|
|
19
20
|
defaultValue="1000"
|
|
21
|
+
maskOptions=${CURRENCY_MASK.DECIMAL}
|
|
20
22
|
></form-control-monetary>
|
|
21
23
|
`,
|
|
22
24
|
});
|
|
@@ -32,7 +34,7 @@ describe('form-control-monetary', () => {
|
|
|
32
34
|
const inputHandlerMock = jest.fn();
|
|
33
35
|
const page = await newSpecPage({
|
|
34
36
|
components: [MonetaryInput],
|
|
35
|
-
html: `<form-control-monetary></form-control-monetary>`,
|
|
37
|
+
html: `<form-control-monetary maskOptions=${CURRENCY_MASK.DECIMAL}></form-control-monetary>`,
|
|
36
38
|
});
|
|
37
39
|
page.rootInstance.inputHandler = inputHandlerMock;
|
|
38
40
|
await page.waitForChanges();
|
|
@@ -48,7 +50,7 @@ describe('form-control-monetary', () => {
|
|
|
48
50
|
it('emits formControlBlur on input blur', async () => {
|
|
49
51
|
const page = await newSpecPage({
|
|
50
52
|
components: [MonetaryInput],
|
|
51
|
-
html: `<form-control-monetary></form-control-monetary>`,
|
|
53
|
+
html: `<form-control-monetary maskOptions=${CURRENCY_MASK.DECIMAL}></form-control-monetary>`,
|
|
52
54
|
});
|
|
53
55
|
const blurSpy = jest.fn();
|
|
54
56
|
page.win.addEventListener('formControlBlur', blurSpy);
|
|
@@ -60,7 +62,7 @@ describe('form-control-monetary', () => {
|
|
|
60
62
|
it('displays error message when error prop is set', async () => {
|
|
61
63
|
const page = await newSpecPage({
|
|
62
64
|
components: [MonetaryInput],
|
|
63
|
-
html: `<form-control-monetary error="Invalid amount"></form-control-monetary>`,
|
|
65
|
+
html: `<form-control-monetary error="Invalid amount" maskOptions=${CURRENCY_MASK.DECIMAL}></form-control-monetary>`,
|
|
64
66
|
});
|
|
65
67
|
const errorDiv = page.root.shadowRoot.querySelector('.invalid-feedback');
|
|
66
68
|
expect(errorDiv.textContent).toBe('Invalid amount');
|
|
@@ -72,11 +72,11 @@ export class PaymentMethodForm {
|
|
|
72
72
|
render() {
|
|
73
73
|
return (h(Host, null, h("iframe", { id: `justifi-payment-method-form-${this.paymentMethodFormType}`, src: this.getIframeSrc(), ref: el => {
|
|
74
74
|
this.iframeElement = el;
|
|
75
|
+
this.initializeFrameCommunicationService();
|
|
75
76
|
}, onLoad: () => {
|
|
76
77
|
iFrameResize({
|
|
77
78
|
scrollbars: false,
|
|
78
79
|
}, this.iframeElement);
|
|
79
|
-
this.initializeFrameCommunicationService();
|
|
80
80
|
this.sendStyleOverrides();
|
|
81
81
|
} })));
|
|
82
82
|
}
|
|
@@ -3,6 +3,7 @@ import RefundFormSchema from "./refund-form-schema";
|
|
|
3
3
|
import { Api } from "../../api";
|
|
4
4
|
import { FormController } from "../form/form";
|
|
5
5
|
import { config } from "../../../config";
|
|
6
|
+
import { CURRENCY_MASK } from "../../utils/form-input-masks";
|
|
6
7
|
export class RefundForm {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.authToken = undefined;
|
|
@@ -73,7 +74,7 @@ export class RefundForm {
|
|
|
73
74
|
}
|
|
74
75
|
render() {
|
|
75
76
|
var _a;
|
|
76
|
-
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))))));
|
|
77
|
+
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))))));
|
|
77
78
|
}
|
|
78
79
|
static get is() { return "justifi-refund-form"; }
|
|
79
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,3 +3,18 @@ export const PHONE_MASKS = {
|
|
|
3
3
|
};
|
|
4
4
|
export const TAX_ID_MASKS = { US: '00-0000000' };
|
|
5
5
|
export const SSN_MASK = '000-00-0000';
|
|
6
|
+
export const CURRENCY_MASK = {
|
|
7
|
+
WHOLE: {
|
|
8
|
+
mask: Number,
|
|
9
|
+
thousandsSeparator: ',',
|
|
10
|
+
normalizeZeros: true,
|
|
11
|
+
},
|
|
12
|
+
DECIMAL: {
|
|
13
|
+
mask: Number,
|
|
14
|
+
scale: 2,
|
|
15
|
+
thousandsSeparator: ',',
|
|
16
|
+
padFractionalZeros: true,
|
|
17
|
+
normalizeZeros: true,
|
|
18
|
+
radix: '.',
|
|
19
|
+
}
|
|
20
|
+
};
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-05-
|
|
2
|
+
"timestamp": "2024-05-20T14:59:29",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.10.0",
|
|
@@ -341,12 +341,20 @@
|
|
|
341
341
|
}
|
|
342
342
|
],
|
|
343
343
|
"dependents": [
|
|
344
|
+
"justifi-business-core-info",
|
|
345
|
+
"justifi-business-core-info-form-step",
|
|
344
346
|
"justifi-business-representative",
|
|
345
347
|
"justifi-business-representative-form-step",
|
|
346
348
|
"justifi-owner-form"
|
|
347
349
|
],
|
|
348
350
|
"dependencies": [],
|
|
349
351
|
"dependencyGraph": {
|
|
352
|
+
"justifi-business-core-info": [
|
|
353
|
+
"form-control-date"
|
|
354
|
+
],
|
|
355
|
+
"justifi-business-core-info-form-step": [
|
|
356
|
+
"form-control-date"
|
|
357
|
+
],
|
|
350
358
|
"justifi-business-representative": [
|
|
351
359
|
"form-control-date"
|
|
352
360
|
],
|
|
@@ -666,6 +674,28 @@
|
|
|
666
674
|
"optional": false,
|
|
667
675
|
"required": false
|
|
668
676
|
},
|
|
677
|
+
{
|
|
678
|
+
"name": "maskOptions",
|
|
679
|
+
"type": "any",
|
|
680
|
+
"complexType": {
|
|
681
|
+
"original": "any",
|
|
682
|
+
"resolved": "any",
|
|
683
|
+
"references": {}
|
|
684
|
+
},
|
|
685
|
+
"mutable": false,
|
|
686
|
+
"attr": "mask-options",
|
|
687
|
+
"reflectToAttr": false,
|
|
688
|
+
"docs": "",
|
|
689
|
+
"docsTags": [],
|
|
690
|
+
"default": "CURRENCY_MASK.DECIMAL",
|
|
691
|
+
"values": [
|
|
692
|
+
{
|
|
693
|
+
"type": "any"
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
"optional": false,
|
|
697
|
+
"required": false
|
|
698
|
+
},
|
|
669
699
|
{
|
|
670
700
|
"name": "name",
|
|
671
701
|
"type": "string",
|
|
@@ -1353,6 +1383,8 @@
|
|
|
1353
1383
|
}
|
|
1354
1384
|
],
|
|
1355
1385
|
"dependents": [
|
|
1386
|
+
"justifi-additional-questions",
|
|
1387
|
+
"justifi-additional-questions-form-step",
|
|
1356
1388
|
"justifi-business-core-info",
|
|
1357
1389
|
"justifi-business-core-info-form-step",
|
|
1358
1390
|
"justifi-identity-address-form",
|
|
@@ -1361,6 +1393,12 @@
|
|
|
1361
1393
|
],
|
|
1362
1394
|
"dependencies": [],
|
|
1363
1395
|
"dependencyGraph": {
|
|
1396
|
+
"justifi-additional-questions": [
|
|
1397
|
+
"form-control-select"
|
|
1398
|
+
],
|
|
1399
|
+
"justifi-additional-questions-form-step": [
|
|
1400
|
+
"form-control-select"
|
|
1401
|
+
],
|
|
1364
1402
|
"justifi-business-core-info": [
|
|
1365
1403
|
"form-control-select"
|
|
1366
1404
|
],
|
|
@@ -1595,6 +1633,8 @@
|
|
|
1595
1633
|
}
|
|
1596
1634
|
],
|
|
1597
1635
|
"dependents": [
|
|
1636
|
+
"justifi-additional-questions",
|
|
1637
|
+
"justifi-additional-questions-form-step",
|
|
1598
1638
|
"justifi-business-core-info",
|
|
1599
1639
|
"justifi-business-core-info-form-step",
|
|
1600
1640
|
"justifi-business-owners",
|
|
@@ -1608,6 +1648,12 @@
|
|
|
1608
1648
|
],
|
|
1609
1649
|
"dependencies": [],
|
|
1610
1650
|
"dependencyGraph": {
|
|
1651
|
+
"justifi-additional-questions": [
|
|
1652
|
+
"form-control-text"
|
|
1653
|
+
],
|
|
1654
|
+
"justifi-additional-questions-form-step": [
|
|
1655
|
+
"form-control-text"
|
|
1656
|
+
],
|
|
1611
1657
|
"justifi-business-core-info": [
|
|
1612
1658
|
"form-control-text"
|
|
1613
1659
|
],
|
|
@@ -1823,11 +1869,15 @@
|
|
|
1823
1869
|
"justifi-business-form"
|
|
1824
1870
|
],
|
|
1825
1871
|
"dependencies": [
|
|
1826
|
-
"form-control-monetary"
|
|
1872
|
+
"form-control-monetary",
|
|
1873
|
+
"form-control-select",
|
|
1874
|
+
"form-control-text"
|
|
1827
1875
|
],
|
|
1828
1876
|
"dependencyGraph": {
|
|
1829
1877
|
"justifi-additional-questions": [
|
|
1830
|
-
"form-control-monetary"
|
|
1878
|
+
"form-control-monetary",
|
|
1879
|
+
"form-control-select",
|
|
1880
|
+
"form-control-text"
|
|
1831
1881
|
],
|
|
1832
1882
|
"justifi-business-form": [
|
|
1833
1883
|
"justifi-additional-questions"
|
|
@@ -2020,11 +2070,15 @@
|
|
|
2020
2070
|
"justifi-payment-provisioning"
|
|
2021
2071
|
],
|
|
2022
2072
|
"dependencies": [
|
|
2023
|
-
"form-control-monetary"
|
|
2073
|
+
"form-control-monetary",
|
|
2074
|
+
"form-control-select",
|
|
2075
|
+
"form-control-text"
|
|
2024
2076
|
],
|
|
2025
2077
|
"dependencyGraph": {
|
|
2026
2078
|
"justifi-additional-questions-form-step": [
|
|
2027
|
-
"form-control-monetary"
|
|
2079
|
+
"form-control-monetary",
|
|
2080
|
+
"form-control-select",
|
|
2081
|
+
"form-control-text"
|
|
2028
2082
|
],
|
|
2029
2083
|
"justifi-payment-provisioning": [
|
|
2030
2084
|
"justifi-additional-questions-form-step"
|
|
@@ -2549,12 +2603,14 @@
|
|
|
2549
2603
|
],
|
|
2550
2604
|
"dependencies": [
|
|
2551
2605
|
"form-control-text",
|
|
2606
|
+
"form-control-date",
|
|
2552
2607
|
"form-control-select",
|
|
2553
2608
|
"form-control-number-masked"
|
|
2554
2609
|
],
|
|
2555
2610
|
"dependencyGraph": {
|
|
2556
2611
|
"justifi-business-core-info": [
|
|
2557
2612
|
"form-control-text",
|
|
2613
|
+
"form-control-date",
|
|
2558
2614
|
"form-control-select",
|
|
2559
2615
|
"form-control-number-masked"
|
|
2560
2616
|
],
|
|
@@ -2750,12 +2806,14 @@
|
|
|
2750
2806
|
],
|
|
2751
2807
|
"dependencies": [
|
|
2752
2808
|
"form-control-text",
|
|
2809
|
+
"form-control-date",
|
|
2753
2810
|
"form-control-select",
|
|
2754
2811
|
"form-control-number-masked"
|
|
2755
2812
|
],
|
|
2756
2813
|
"dependencyGraph": {
|
|
2757
2814
|
"justifi-business-core-info-form-step": [
|
|
2758
2815
|
"form-control-text",
|
|
2816
|
+
"form-control-date",
|
|
2759
2817
|
"form-control-select",
|
|
2760
2818
|
"form-control-number-masked"
|
|
2761
2819
|
],
|
|
@@ -3095,6 +3153,7 @@
|
|
|
3095
3153
|
],
|
|
3096
3154
|
"justifi-business-core-info": [
|
|
3097
3155
|
"form-control-text",
|
|
3156
|
+
"form-control-date",
|
|
3098
3157
|
"form-control-select",
|
|
3099
3158
|
"form-control-number-masked"
|
|
3100
3159
|
],
|
|
@@ -3103,7 +3162,9 @@
|
|
|
3103
3162
|
"form-control-select"
|
|
3104
3163
|
],
|
|
3105
3164
|
"justifi-additional-questions": [
|
|
3106
|
-
"form-control-monetary"
|
|
3165
|
+
"form-control-monetary",
|
|
3166
|
+
"form-control-select",
|
|
3167
|
+
"form-control-text"
|
|
3107
3168
|
],
|
|
3108
3169
|
"justifi-business-representative": [
|
|
3109
3170
|
"form-control-text",
|
|
@@ -4381,6 +4442,26 @@
|
|
|
4381
4442
|
}
|
|
4382
4443
|
],
|
|
4383
4444
|
"events": [
|
|
4445
|
+
{
|
|
4446
|
+
"event": "error-event",
|
|
4447
|
+
"detail": "ComponentError",
|
|
4448
|
+
"bubbles": true,
|
|
4449
|
+
"complexType": {
|
|
4450
|
+
"original": "ComponentError",
|
|
4451
|
+
"resolved": "ComponentError",
|
|
4452
|
+
"references": {
|
|
4453
|
+
"ComponentError": {
|
|
4454
|
+
"location": "import",
|
|
4455
|
+
"path": "../../api/ComponentError",
|
|
4456
|
+
"id": "src/api/ComponentError.ts::ComponentError"
|
|
4457
|
+
}
|
|
4458
|
+
}
|
|
4459
|
+
},
|
|
4460
|
+
"cancelable": true,
|
|
4461
|
+
"composed": true,
|
|
4462
|
+
"docs": "",
|
|
4463
|
+
"docsTags": []
|
|
4464
|
+
},
|
|
4384
4465
|
{
|
|
4385
4466
|
"event": "submitted",
|
|
4386
4467
|
"detail": "IApiResponse<{ payment_mode: \"ecom\" | \"bnpl\"; payment_token: null; payment_status: string; payment_response: null; checkout_id: string; additional_transactions: any[]; checkout: ICheckout; }>",
|
|
@@ -6455,27 +6536,6 @@
|
|
|
6455
6536
|
"optional": false,
|
|
6456
6537
|
"required": false
|
|
6457
6538
|
},
|
|
6458
|
-
{
|
|
6459
|
-
"name": "selectedPaymentMethodId",
|
|
6460
|
-
"type": "string",
|
|
6461
|
-
"complexType": {
|
|
6462
|
-
"original": "string",
|
|
6463
|
-
"resolved": "string",
|
|
6464
|
-
"references": {}
|
|
6465
|
-
},
|
|
6466
|
-
"mutable": false,
|
|
6467
|
-
"attr": "selected-payment-method-id",
|
|
6468
|
-
"reflectToAttr": false,
|
|
6469
|
-
"docs": "",
|
|
6470
|
-
"docsTags": [],
|
|
6471
|
-
"values": [
|
|
6472
|
-
{
|
|
6473
|
-
"type": "string"
|
|
6474
|
-
}
|
|
6475
|
-
],
|
|
6476
|
-
"optional": false,
|
|
6477
|
-
"required": false
|
|
6478
|
-
},
|
|
6479
6539
|
{
|
|
6480
6540
|
"name": "showAch",
|
|
6481
6541
|
"type": "boolean",
|
|
@@ -6895,6 +6955,7 @@
|
|
|
6895
6955
|
],
|
|
6896
6956
|
"justifi-business-core-info-form-step": [
|
|
6897
6957
|
"form-control-text",
|
|
6958
|
+
"form-control-date",
|
|
6898
6959
|
"form-control-select",
|
|
6899
6960
|
"form-control-number-masked"
|
|
6900
6961
|
],
|
|
@@ -6903,7 +6964,9 @@
|
|
|
6903
6964
|
"form-control-select"
|
|
6904
6965
|
],
|
|
6905
6966
|
"justifi-additional-questions-form-step": [
|
|
6906
|
-
"form-control-monetary"
|
|
6967
|
+
"form-control-monetary",
|
|
6968
|
+
"form-control-select",
|
|
6969
|
+
"form-control-text"
|
|
6907
6970
|
],
|
|
6908
6971
|
"justifi-business-representative-form-step": [
|
|
6909
6972
|
"form-control-text",
|
|
@@ -9789,12 +9852,12 @@
|
|
|
9789
9852
|
"path": "src/api/ComponentError.ts"
|
|
9790
9853
|
},
|
|
9791
9854
|
"src/api/Business.ts::IAdditionalQuestions": {
|
|
9792
|
-
"declaration": "export interface IAdditionalQuestions {\n business_revenue?: string;\n business_payment_volume?: string;\n
|
|
9855
|
+
"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}",
|
|
9793
9856
|
"docstring": "",
|
|
9794
9857
|
"path": "src/api/Business.ts"
|
|
9795
9858
|
},
|
|
9796
9859
|
"src/api/Business.ts::IBusiness": {
|
|
9797
|
-
"declaration": "export interface IBusiness {\n additional_questions: IAdditionalQuestions | {};\n business_type: BusinessType;\n bank_accounts: BankAccount[];\n created_at: string;\n documents: Document[];\n doing_business_as: string;\n email: string;\n id: string;\n industry: string;\n legal_address: IAddress | {};\n legal_name: string;\n metadata: any;\n owners: Identity[];\n phone: string;\n platform_account_id: string;\n product_categories: ProductCategories;\n representative: Identity | {};\n tax_id: string;\n updated_at: string;\n website_url: string;\n}",
|
|
9860
|
+
"declaration": "export interface IBusiness {\n additional_questions: IAdditionalQuestions | {};\n business_type: BusinessType;\n business_structure: BusinessStructure;\n bank_accounts: BankAccount[];\n created_at: string;\n documents: Document[];\n doing_business_as: string;\n email: string;\n id: string;\n industry: string;\n legal_address: IAddress | {};\n legal_name: string;\n metadata: any;\n owners: Identity[];\n phone: string;\n platform_account_id: string;\n product_categories: ProductCategories;\n representative: Identity | {};\n tax_id: string;\n updated_at: string;\n website_url: string;\n date_of_incorporation?: string;\n}",
|
|
9798
9861
|
"docstring": "",
|
|
9799
9862
|
"path": "src/api/Business.ts"
|
|
9800
9863
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StateOptions } from './state-options-
|
|
1
|
+
import { S as StateOptions } from './state-options-c0b757ad.js';
|
|
2
2
|
|
|
3
3
|
function getStateAbbreviation(stateName) {
|
|
4
4
|
const state = StateOptions.find(s => s.label === stateName);
|
|
@@ -76,6 +76,22 @@ var BusinessType;
|
|
|
76
76
|
BusinessType["non_profit"] = "non_profit";
|
|
77
77
|
BusinessType["government_entity"] = "government_entity";
|
|
78
78
|
})(BusinessType || (BusinessType = {}));
|
|
79
|
+
var BusinessStructure;
|
|
80
|
+
(function (BusinessStructure) {
|
|
81
|
+
BusinessStructure["sole_proprietorship"] = "sole_proprietorship";
|
|
82
|
+
BusinessStructure["single_llc"] = "single_llc";
|
|
83
|
+
BusinessStructure["multi_llc"] = "multi_llc";
|
|
84
|
+
BusinessStructure["private_partnership"] = "private_partnership";
|
|
85
|
+
BusinessStructure["private_corporation"] = "private_corporation";
|
|
86
|
+
BusinessStructure["unincorporated_association"] = "unincorporated_association";
|
|
87
|
+
BusinessStructure["public_partnership"] = "public_partnership";
|
|
88
|
+
BusinessStructure["public_corporation"] = "public_corporation";
|
|
89
|
+
BusinessStructure["incorporated"] = "incorporated";
|
|
90
|
+
BusinessStructure["unincorporated"] = "unincorporated";
|
|
91
|
+
BusinessStructure["government_unit"] = "government_unit";
|
|
92
|
+
BusinessStructure["government_instrumentality"] = "government_instrumentality";
|
|
93
|
+
BusinessStructure["tax_exempt_government_instrumentality"] = "tax_exempt_government_instrumentality";
|
|
94
|
+
})(BusinessStructure || (BusinessStructure = {}));
|
|
79
95
|
class Address {
|
|
80
96
|
constructor(address) {
|
|
81
97
|
this.id = address.id;
|
|
@@ -94,13 +110,17 @@ class AdditionalQuestions {
|
|
|
94
110
|
constructor(additionalQuestions) {
|
|
95
111
|
this.business_revenue = additionalQuestions.business_revenue;
|
|
96
112
|
this.business_payment_volume = additionalQuestions.business_payment_volume;
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
113
|
+
this.business_when_service_received = additionalQuestions.business_when_service_received;
|
|
114
|
+
this.business_recurring_payments = additionalQuestions.business_recurring_payments;
|
|
115
|
+
this.business_recurring_payments_percentage = additionalQuestions.business_recurring_payments_percentage;
|
|
116
|
+
this.business_seasonal = additionalQuestions.business_seasonal;
|
|
117
|
+
this.business_other_payment_details = additionalQuestions.business_other_payment_details;
|
|
99
118
|
}
|
|
100
119
|
}
|
|
101
120
|
class CoreBusinessInfo {
|
|
102
121
|
constructor(coreBusinessInfo) {
|
|
103
122
|
this.business_type = coreBusinessInfo.business_type;
|
|
123
|
+
this.business_structure = coreBusinessInfo.business_structure;
|
|
104
124
|
this.legal_name = coreBusinessInfo.legal_name;
|
|
105
125
|
this.doing_business_as = coreBusinessInfo.doing_business_as;
|
|
106
126
|
this.industry = coreBusinessInfo.industry;
|
|
@@ -108,13 +128,15 @@ class CoreBusinessInfo {
|
|
|
108
128
|
this.website_url = coreBusinessInfo.website_url;
|
|
109
129
|
this.email = coreBusinessInfo.email;
|
|
110
130
|
this.phone = coreBusinessInfo.phone;
|
|
131
|
+
this.date_of_incorporation = coreBusinessInfo.date_of_incorporation;
|
|
111
132
|
}
|
|
112
133
|
}
|
|
113
134
|
class Business {
|
|
114
135
|
constructor(business) {
|
|
115
|
-
this.additional_questions = business.additional_questions || {};
|
|
136
|
+
this.additional_questions = Object.assign({}, new AdditionalQuestions(business.additional_questions || {}));
|
|
116
137
|
this.bank_accounts = business.bank_accounts;
|
|
117
138
|
this.business_type = business.business_type;
|
|
139
|
+
this.business_structure = business.business_structure;
|
|
118
140
|
this.created_at = business.created_at;
|
|
119
141
|
this.documents = business.documents;
|
|
120
142
|
this.doing_business_as = business.doing_business_as;
|
|
@@ -132,7 +154,8 @@ class Business {
|
|
|
132
154
|
this.tax_id = business.tax_id;
|
|
133
155
|
this.updated_at = business.updated_at;
|
|
134
156
|
this.website_url = business.website_url;
|
|
157
|
+
this.date_of_incorporation = business.date_of_incorporation;
|
|
135
158
|
}
|
|
136
159
|
}
|
|
137
160
|
|
|
138
|
-
export { AdditionalQuestions as A, Business as B, CoreBusinessInfo as C, Owner as O, Representative as R, BusinessType as a,
|
|
161
|
+
export { AdditionalQuestions as A, Business as B, CoreBusinessInfo as C, Owner as O, Representative as R, BusinessType as a, BusinessStructure as b, Address as c, deconstructDate as d };
|
|
@@ -10,10 +10,10 @@ const AdditionalQuestionsDetails = class {
|
|
|
10
10
|
this.additionalQuestions = undefined;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
var _a, _b
|
|
13
|
+
var _a, _b;
|
|
14
14
|
if (isEmptyObject(this.additionalQuestions))
|
|
15
15
|
return null;
|
|
16
|
-
return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Additional Questions" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Revenue", value: (_a = this.additionalQuestions.business_revenue) === null || _a === void 0 ? void 0 : _a.toString() }), h(DetailItem, { title: "Business Payment Volume", value: (_b = this.additionalQuestions.business_payment_volume) === null || _b === void 0 ? void 0 : _b.toString() }))
|
|
16
|
+
return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Additional Questions" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Revenue", value: (_a = this.additionalQuestions.business_revenue) === null || _a === void 0 ? void 0 : _a.toString() }), h(DetailItem, { title: "Business Payment Volume", value: (_b = this.additionalQuestions.business_payment_volume) === null || _b === void 0 ? void 0 : _b.toString() }))))));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
AdditionalQuestionsDetails.style = additionalQuestionsDetailsCss;
|
|
@@ -26,10 +26,10 @@ const GenericInfoDetails = class {
|
|
|
26
26
|
this.business = undefined;
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
30
30
|
if (!this.business)
|
|
31
31
|
return null;
|
|
32
|
-
return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Business Generic Info Details" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Legal Name", value: (_a = this.business) === null || _a === void 0 ? void 0 : _a.legal_name }), h(DetailItem, { title: "Doing Business As (DBA)", value: (_b = this.business) === null || _b === void 0 ? void 0 : _b.doing_business_as }), h(DetailItem, { title: "Business Type", value: snakeCaseToHumanReadable((_c = this.business) === null || _c === void 0 ? void 0 : _c.business_type) }), h(DetailItem, { title: "
|
|
32
|
+
return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Business Generic Info Details" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Legal Name", value: (_a = this.business) === null || _a === void 0 ? void 0 : _a.legal_name }), h(DetailItem, { title: "Doing Business As (DBA)", value: (_b = this.business) === null || _b === void 0 ? void 0 : _b.doing_business_as }), h(DetailItem, { title: "Business Type", value: snakeCaseToHumanReadable((_c = this.business) === null || _c === void 0 ? void 0 : _c.business_type) }), h(DetailItem, { title: "Business Structure", value: snakeCaseToHumanReadable((_d = this.business) === null || _d === void 0 ? void 0 : _d.business_structure) }), h(DetailItem, { title: "Industry", value: (_e = this.business) === null || _e === void 0 ? void 0 : _e.industry })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Tax ID", value: (_f = this.business) === null || _f === void 0 ? void 0 : _f.tax_id }), h(DetailItem, { title: "Website URL", value: (_g = this.business) === null || _g === void 0 ? void 0 : _g.website_url }), h(DetailItem, { title: "Email Address", value: (_h = this.business) === null || _h === void 0 ? void 0 : _h.email }), h(DetailItem, { title: "Phone Number", value: (_j = this.business) === null || _j === void 0 ? void 0 : _j.phone }))))));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
GenericInfoDetails.style = genericInfoDetailsCss;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { c as create$3 } from './index.esm-22b47398.js';
|
|
2
|
+
import { b as businessNameValidation, w as websiteUrlValidation, e as emailValidation, c as phoneValidation, d as doingBusinessAsValidation, f as businessTypeValidation, g as businessStructureValidation, h as industryValidation, t as taxIdValidation, j as dateOfIncorporationValidation, r as revenueValidation, k as paymentVolumeValidation, l as whenServiceReceivedValidation, m as recurringPaymentsValidation, n as recurringPaymentsPercentageValidation, s as seasonalBusinessValidation, o as otherPaymentDetailsValidation } from './payload-parsers-73c12fa2.js';
|
|
3
|
+
|
|
4
|
+
const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
5
|
+
const schema = create$3({
|
|
6
|
+
legal_name: businessNameValidation.required('Enter legal name'),
|
|
7
|
+
website_url: websiteUrlValidation.required('Enter business website url'),
|
|
8
|
+
email: emailValidation.required('Enter business email'),
|
|
9
|
+
phone: phoneValidation.required('Enter phone number'),
|
|
10
|
+
doing_business_as: doingBusinessAsValidation.required('Enter doing business as'),
|
|
11
|
+
business_type: businessTypeValidation.required('Select business type'),
|
|
12
|
+
business_structure: businessStructureValidation.required('Select business structure'),
|
|
13
|
+
industry: industryValidation.required('Enter a business industry'),
|
|
14
|
+
tax_id: taxIdValidation.required('Enter tax id'),
|
|
15
|
+
date_of_incorporation: dateOfIncorporationValidation.required('Enter date of incorporation'),
|
|
16
|
+
});
|
|
17
|
+
const easySchema = create$3({
|
|
18
|
+
legal_name: businessNameValidation.required('Enter legal name'),
|
|
19
|
+
website_url: websiteUrlValidation.nullable(),
|
|
20
|
+
email: emailValidation.nullable(),
|
|
21
|
+
phone: phoneValidation.nullable(),
|
|
22
|
+
doing_business_as: doingBusinessAsValidation.nullable(),
|
|
23
|
+
business_type: businessTypeValidation.nullable(),
|
|
24
|
+
business_structure: businessStructureValidation.nullable(),
|
|
25
|
+
industry: industryValidation.nullable(),
|
|
26
|
+
tax_id: taxIdValidation.nullable(),
|
|
27
|
+
date_of_incorporation: dateOfIncorporationValidation.nullable(),
|
|
28
|
+
});
|
|
29
|
+
return allowOptionalFields ? easySchema : schema;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const additionalQuestionsSchema = (allowOptionalFields) => {
|
|
33
|
+
const schema = create$3({
|
|
34
|
+
business_revenue: revenueValidation.required('Enter business revenue'),
|
|
35
|
+
business_payment_volume: paymentVolumeValidation.required('Enter business payment volume'),
|
|
36
|
+
business_when_service_received: whenServiceReceivedValidation.required('Select when service is received'),
|
|
37
|
+
business_recurring_payments: recurringPaymentsValidation.required('Select recurring payments'),
|
|
38
|
+
business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
|
|
39
|
+
business_seasonal: seasonalBusinessValidation.required('Select business seasonal'),
|
|
40
|
+
business_other_payment_details: otherPaymentDetailsValidation.nullable(),
|
|
41
|
+
});
|
|
42
|
+
const easySchema = create$3({
|
|
43
|
+
business_revenue: revenueValidation.nullable(),
|
|
44
|
+
business_payment_volume: paymentVolumeValidation.nullable(),
|
|
45
|
+
business_when_service_received: whenServiceReceivedValidation.nullable(),
|
|
46
|
+
business_recurring_payments: recurringPaymentsValidation.nullable(),
|
|
47
|
+
business_recurring_payments_percentage: recurringPaymentsPercentageValidation,
|
|
48
|
+
business_seasonal: seasonalBusinessValidation.nullable(),
|
|
49
|
+
business_other_payment_details: otherPaymentDetailsValidation.nullable(),
|
|
50
|
+
});
|
|
51
|
+
return allowOptionalFields ? easySchema : schema;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { additionalQuestionsSchema as a, businessCoreInfoSchema as b };
|