@justifi/webcomponents 4.19.1-rc → 4.19.1-rc-3
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-0b3db49d.js → Analytics-1ca4e47e.js} +2 -3
- package/dist/cjs/{business.service-c384784d.js → business.service-6bb7ac82.js} +5 -6
- package/dist/cjs/{get-payout-csv-51a02be7.js → get-payout-csv-1391ff3e.js} +3 -4
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +7 -8
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-business-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-card-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +11 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +1 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -5
- package/dist/cjs/{package-39dc73ed.js → package-bc2632e4.js} +2 -4
- package/dist/cjs/{payment.service-2dbfb83d.js → payment.service-dfcfa19b.js} +2 -3
- package/dist/collection/api/services/analytics.service.js +1 -2
- package/dist/collection/api/services/business.service.js +5 -6
- package/dist/collection/api/services/checkout.service.js +2 -3
- package/dist/collection/api/services/insurance.service.js +2 -3
- package/dist/collection/api/services/payment.service.js +2 -3
- package/dist/collection/api/services/payout.service.js +3 -4
- package/dist/collection/api/services/provision.service.js +2 -4
- package/dist/collection/api/services/reports.service.js +1 -2
- package/dist/collection/components/bank-account-form/bank-account-form.js +3 -4
- package/dist/collection/components/business-forms/business-form/business-form.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -3
- package/dist/collection/components/card-form/card-form.js +3 -4
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +6 -4
- package/dist/collection/components/checkout/payment-method-options.js +3 -4
- package/dist/collection/components/checkout/saved-payment-method.js +3 -4
- package/dist/collection/components/checkout/sezzle-payment-method.js +3 -4
- package/dist/collection/components/payment-form/payment-form.js +3 -4
- package/dist/collection/components/refund-form/refund-form.js +2 -3
- package/dist/docs.json +8 -8
- package/dist/esm/{Analytics-37556050.js → Analytics-c51439be.js} +2 -3
- package/dist/esm/{business.service-eee46ab1.js → business.service-f45decfc.js} +5 -6
- package/dist/esm/{get-payout-csv-4d6b29d8.js → get-payout-csv-e784a2ab.js} +3 -4
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +7 -8
- package/dist/esm/justifi-bank-account-form.entry.js +4 -5
- package/dist/esm/justifi-business-details.entry.js +3 -4
- package/dist/esm/justifi-business-form.entry.js +4 -5
- package/dist/esm/justifi-card-form.entry.js +4 -5
- package/dist/esm/justifi-checkout-core.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +4 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +11 -9
- package/dist/esm/justifi-owner-form_3.entry.js +1 -2
- package/dist/esm/justifi-payment-details.entry.js +3 -4
- package/dist/esm/justifi-payment-form.entry.js +5 -6
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +5 -6
- package/dist/esm/justifi-payments-list.entry.js +3 -4
- package/dist/esm/justifi-payout-details.entry.js +3 -4
- package/dist/esm/justifi-payouts-list.entry.js +3 -4
- package/dist/esm/justifi-refund-form.entry.js +2 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
- package/dist/esm/{package-e2a7aa3f.js → package-09a354e0.js} +2 -4
- package/dist/esm/{payment.service-9005a501.js → payment.service-dad5153b.js} +2 -3
- package/dist/globals.d.ts +2 -0
- package/dist/module/Analytics.js +1 -2
- package/dist/module/business-bank-account-form-step.js +2 -3
- package/dist/module/business-document-upload-form-step.js +2 -3
- package/dist/module/business-terms-conditions-form-step.js +2 -3
- package/dist/module/business.service.js +5 -6
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/get-payout-csv.js +3 -4
- package/dist/module/justifi-bank-account-form.js +2 -3
- package/dist/module/justifi-business-form.js +2 -3
- package/dist/module/justifi-card-form.js +2 -3
- package/dist/module/justifi-checkout.js +2 -3
- package/dist/module/justifi-gross-payment-chart.js +1 -2
- package/dist/module/justifi-payment-form.js +3 -4
- package/dist/module/justifi-payment-provisioning.js +2 -3
- package/dist/module/justifi-refund-form.js +2 -3
- package/dist/module/justifi-season-interruption-insurance.js +2 -3
- package/dist/module/new-payment-method.js +5 -3
- package/dist/module/package.js +2 -4
- package/dist/module/payment-method-options.js +2 -3
- package/dist/module/payment.service.js +2 -3
- package/dist/module/saved-payment-method.js +2 -3
- package/dist/module/sezzle-payment-method.js +2 -3
- package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-01a404ca.entry.js +44 -0
- package/dist/webcomponents/p-03d35880.entry.js +130 -0
- package/dist/webcomponents/p-06ff0429.entry.js +65 -0
- package/dist/webcomponents/p-08b0fb31.js +41 -1
- package/dist/webcomponents/p-14c91ffd.js +20 -1
- package/dist/webcomponents/p-1a17ea7d.entry.js +1684 -0
- package/dist/webcomponents/p-1ad5995e.js +3599 -1
- package/dist/webcomponents/p-1ff8810b.js +29 -1
- package/dist/webcomponents/p-21aeb013.entry.js +80 -0
- package/dist/webcomponents/p-2338affa.js +213 -1
- package/dist/webcomponents/p-258b1ee2.entry.js +149 -0
- package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
- package/dist/webcomponents/p-29c0b182.js +114 -1
- package/dist/webcomponents/p-2b6c9c4f.js +7 -1
- package/dist/webcomponents/p-2dabeb5a.js +79 -0
- package/dist/webcomponents/p-2eab3c90.js +3052 -1
- package/dist/webcomponents/p-33272d05.entry.js +94 -0
- package/dist/webcomponents/p-3642ad71.entry.js +145 -0
- package/dist/webcomponents/p-387450f6.js +77 -0
- package/dist/webcomponents/p-3e9ef4a8.js +28 -0
- package/dist/webcomponents/p-3fd13ca3.js +52 -1
- package/dist/webcomponents/p-41bc7c5c.entry.js +97 -0
- package/dist/webcomponents/p-4d8b45c6.entry.js +98 -0
- package/dist/webcomponents/p-525db3e8.js +22 -1
- package/dist/webcomponents/p-5482d030.entry.js +21 -0
- package/dist/webcomponents/p-56f6ce4c.js +10 -1
- package/dist/webcomponents/p-576826b1.entry.js +43 -0
- package/dist/webcomponents/p-5968ff8a.js +178 -1
- package/dist/webcomponents/p-5bd7b204.entry.js +75 -0
- package/dist/webcomponents/p-5cb3f0b2.entry.js +261 -0
- package/dist/webcomponents/p-5e70442b.entry.js +74 -0
- package/dist/webcomponents/p-5f835b89.entry.js +606 -0
- package/dist/webcomponents/p-6078a370.js +244 -1
- package/dist/webcomponents/p-68843186.entry.js +73 -0
- package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
- package/dist/webcomponents/p-7582b554.entry.js +18 -0
- package/dist/webcomponents/p-79646550.entry.js +61 -0
- package/dist/webcomponents/p-7c76e67c.entry.js +117 -0
- package/dist/webcomponents/p-7d85af5c.js +16 -1
- package/dist/webcomponents/p-800d31fe.entry.js +162 -0
- package/dist/webcomponents/p-8115b2f4.js +28 -1
- package/dist/webcomponents/p-83125497.js +4027 -1
- package/dist/webcomponents/p-85fc69e5.js +90 -1
- package/dist/webcomponents/p-890088fc.entry.js +298 -0
- package/dist/webcomponents/p-89887332.js +301 -1
- package/dist/webcomponents/p-8df7bde8.js +27 -1
- package/dist/webcomponents/p-8eb774df.entry.js +54 -0
- package/dist/webcomponents/p-9c9c7dac.js +24 -1
- package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
- package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
- package/dist/webcomponents/p-a5c5821e.entry.js +101 -0
- package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
- package/dist/webcomponents/p-a6d04afc.js +44 -0
- package/dist/webcomponents/p-ac086069.entry.js +58 -0
- package/dist/webcomponents/p-af244664.js +126 -1
- package/dist/webcomponents/p-b82c146f.entry.js +111 -0
- package/dist/webcomponents/p-b8a03a4b.entry.js +131 -0
- package/dist/webcomponents/p-ba4bae6f.js +12 -1
- package/dist/webcomponents/p-ba5fae28.js +90 -1
- package/dist/webcomponents/p-c636f563.entry.js +791 -0
- package/dist/webcomponents/p-c86c24d2.entry.js +94 -0
- package/dist/webcomponents/p-cb26f708.js +18 -0
- package/dist/webcomponents/p-ce733539.entry.js +99 -0
- package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
- package/dist/webcomponents/p-d5095f6c.entry.js +133 -0
- package/dist/webcomponents/p-d89bad72.js +39 -1
- package/dist/webcomponents/p-dce846bf.js +27 -1
- package/dist/webcomponents/p-df21aaad.js +120 -1
- package/dist/webcomponents/p-e1255160.js +3 -1
- package/dist/webcomponents/p-e333620e.js +34 -1
- package/dist/webcomponents/p-e356f280.entry.js +29 -0
- package/dist/webcomponents/p-e3fab0e2.js +43 -1
- package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
- package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
- package/dist/webcomponents/p-fad19d75.js +1638 -2
- package/dist/webcomponents/webcomponents.css +362 -4
- package/dist/webcomponents/webcomponents.esm.js +20 -1
- package/package.json +2 -4
- package/dist/cjs/config-037e67d0.js +0 -15
- package/dist/config.js +0 -11
- package/dist/esm/config-58e393e2.js +0 -13
- package/dist/module/config.js +0 -13
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +0 -11
- package/dist/webcomponents/p-023779ee.entry.js +0 -1
- package/dist/webcomponents/p-037763f4.entry.js +0 -1
- package/dist/webcomponents/p-07109641.entry.js +0 -1
- package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
- package/dist/webcomponents/p-17e4246f.entry.js +0 -1
- package/dist/webcomponents/p-1a43e355.entry.js +0 -19
- package/dist/webcomponents/p-1f6afff9.entry.js +0 -1
- package/dist/webcomponents/p-246a6c6a.entry.js +0 -1
- package/dist/webcomponents/p-2d3b1692.entry.js +0 -1
- package/dist/webcomponents/p-30a493cd.entry.js +0 -1
- package/dist/webcomponents/p-32286934.js +0 -1
- package/dist/webcomponents/p-3f5e7e86.js +0 -1
- package/dist/webcomponents/p-462dc522.entry.js +0 -1
- package/dist/webcomponents/p-487b72a8.entry.js +0 -1
- package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
- package/dist/webcomponents/p-52021fa1.entry.js +0 -1
- package/dist/webcomponents/p-53e64f15.entry.js +0 -1
- package/dist/webcomponents/p-57e1f2fd.js +0 -1
- package/dist/webcomponents/p-5f095525.entry.js +0 -1
- package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
- package/dist/webcomponents/p-69faef3f.entry.js +0 -1
- package/dist/webcomponents/p-6c078cd1.js +0 -1
- package/dist/webcomponents/p-8e541a32.entry.js +0 -1
- package/dist/webcomponents/p-8f325782.entry.js +0 -1
- package/dist/webcomponents/p-987b5de2.entry.js +0 -1
- package/dist/webcomponents/p-a63fc384.entry.js +0 -1
- package/dist/webcomponents/p-a8220709.entry.js +0 -1
- package/dist/webcomponents/p-ae530971.entry.js +0 -1
- package/dist/webcomponents/p-b7cf49f4.entry.js +0 -1
- package/dist/webcomponents/p-b87b27ba.js +0 -1
- package/dist/webcomponents/p-bbed6107.entry.js +0 -1
- package/dist/webcomponents/p-be39c802.entry.js +0 -1
- package/dist/webcomponents/p-c28db166.js +0 -1
- package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
- package/dist/webcomponents/p-d8355f91.entry.js +0 -1
- package/dist/webcomponents/p-e2c88817.entry.js +0 -1
- package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
- package/dist/webcomponents/p-edac2b43.entry.js +0 -1
- package/dist/webcomponents/p-ef23c091.entry.js +0 -1
- package/dist/webcomponents/p-f06910aa.entry.js +0 -1
- package/dist/webcomponents/p-f0866375.entry.js +0 -1
- package/dist/webcomponents/p-f0a06884.entry.js +0 -1
- package/dist/webcomponents/p-f2f94d9f.entry.js +0 -1
- package/dist/webcomponents/p-f49b7170.entry.js +0 -1
- package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
- package/dist/webcomponents/p-fe33151d.entry.js +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './p-fad19d75.js';
|
|
2
|
+
|
|
3
|
+
const NumberInput = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
7
|
+
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
8
|
+
this.handleFormControlInput = (event) => {
|
|
9
|
+
const target = event.target;
|
|
10
|
+
const name = target.getAttribute('name');
|
|
11
|
+
this.inputHandler(name, target.value);
|
|
12
|
+
this.formControlInput.emit({ name, value: target.value });
|
|
13
|
+
};
|
|
14
|
+
this.updateInput = (newValue) => {
|
|
15
|
+
const inputElement = this.el.querySelector('input');
|
|
16
|
+
if (inputElement) {
|
|
17
|
+
inputElement.value = newValue || '';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
this.label = undefined;
|
|
21
|
+
this.name = undefined;
|
|
22
|
+
this.helpText = undefined;
|
|
23
|
+
this.errorText = undefined;
|
|
24
|
+
this.defaultValue = undefined;
|
|
25
|
+
this.inputHandler = undefined;
|
|
26
|
+
this.disabled = undefined;
|
|
27
|
+
}
|
|
28
|
+
handleDefaultValueChange(newValue) {
|
|
29
|
+
this.updateInput(newValue);
|
|
30
|
+
}
|
|
31
|
+
componentDidLoad() {
|
|
32
|
+
this.updateInput(this.defaultValue);
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { key: 'dd43d75b327c05e75b453b954346c6ffcd85a2f5', exportparts: 'label,input,input-invalid' }, h("div", { key: '5215f62251bd89be493ddffe46bf0c466b42e314', class: 'form-group d-flex flex-column' }, h("label", { key: 'f0409970f8d43bcdef92b81363cc24aa1bb691a0', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '9c6a5899e64ba1a8af6af80c63b6a0895351da63', id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h("form-control-help-text", { key: 'cd7b4a724427383cafc04137f6feca473695b020', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '04748d3c5b1067b0312a2b7c36369e2a21a7215f', errorText: this.errorText, name: this.name }))));
|
|
36
|
+
}
|
|
37
|
+
get el() { return getElement(this); }
|
|
38
|
+
static get watchers() { return {
|
|
39
|
+
"defaultValue": ["handleDefaultValueChange"]
|
|
40
|
+
}; }
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { NumberInput as form_control_number };
|
|
@@ -1 +1,178 @@
|
|
|
1
|
-
import{C as
|
|
1
|
+
import { C as ComponentErrorSeverity } from './p-14c91ffd.js';
|
|
2
|
+
import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
|
|
3
|
+
|
|
4
|
+
// Entity API Actions
|
|
5
|
+
const makeGetBusiness = ({ authToken, businessId, service }) => async ({ onSuccess, onError, final = () => { } }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
try {
|
|
8
|
+
const response = await service.fetchBusiness(businessId, authToken);
|
|
9
|
+
if (!response.error) {
|
|
10
|
+
onSuccess(response);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
const responseError = getErrorMessage(response.error);
|
|
14
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
15
|
+
return onError({
|
|
16
|
+
error: responseError,
|
|
17
|
+
code,
|
|
18
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
24
|
+
return onError({
|
|
25
|
+
error: error.message || error,
|
|
26
|
+
code,
|
|
27
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
return final();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const makePatchBusiness = ({ authToken, businessId, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
35
|
+
var _a;
|
|
36
|
+
try {
|
|
37
|
+
const response = await service.patchBusiness(authToken, businessId, payload);
|
|
38
|
+
if (!response.error) {
|
|
39
|
+
onSuccess(response);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const responseError = getErrorMessage(response.error);
|
|
43
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
44
|
+
return onError({
|
|
45
|
+
error: responseError,
|
|
46
|
+
code,
|
|
47
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
53
|
+
return onError({
|
|
54
|
+
error: error.message || error,
|
|
55
|
+
code,
|
|
56
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
return final();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const makePostProvisioning = ({ authToken, businessId, product, service }) => async ({ onSuccess, onError }) => {
|
|
64
|
+
var _a;
|
|
65
|
+
try {
|
|
66
|
+
const response = await service.postProvisioning(authToken, businessId, product);
|
|
67
|
+
if (!response.error) {
|
|
68
|
+
onSuccess(response);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const responseError = getErrorMessage(response.error);
|
|
72
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
73
|
+
return onError({
|
|
74
|
+
error: responseError,
|
|
75
|
+
code,
|
|
76
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
82
|
+
return onError({
|
|
83
|
+
error: error.message || error,
|
|
84
|
+
code,
|
|
85
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
// Identity API Actions
|
|
90
|
+
const makeGetIdentity = ({ authToken, identityId, service }) => async ({ onSuccess, onError, final = () => { } }) => {
|
|
91
|
+
var _a;
|
|
92
|
+
try {
|
|
93
|
+
const response = await service.fetchIdentity(identityId, authToken);
|
|
94
|
+
if (!response.error) {
|
|
95
|
+
onSuccess(response);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const responseError = getErrorMessage(response.error);
|
|
99
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
100
|
+
return onError({
|
|
101
|
+
error: responseError,
|
|
102
|
+
code,
|
|
103
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
109
|
+
return onError({
|
|
110
|
+
error: error.message || error,
|
|
111
|
+
code,
|
|
112
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
return final();
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const makePatchIdentity = ({ authToken, identityId, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
120
|
+
var _a;
|
|
121
|
+
try {
|
|
122
|
+
const response = await service.patchIdentity(authToken, identityId, payload);
|
|
123
|
+
if (!response.error) {
|
|
124
|
+
onSuccess(response);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
const responseError = getErrorMessage(response.error);
|
|
128
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
129
|
+
return onError({
|
|
130
|
+
error: responseError,
|
|
131
|
+
code,
|
|
132
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
138
|
+
return onError({
|
|
139
|
+
error: error.message || error,
|
|
140
|
+
code,
|
|
141
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
finally {
|
|
145
|
+
return final();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const makePostIdentity = ({ authToken, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
149
|
+
var _a;
|
|
150
|
+
try {
|
|
151
|
+
const response = await service.postIdentity(authToken, payload);
|
|
152
|
+
if (!response.error) {
|
|
153
|
+
onSuccess(response);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
const responseError = getErrorMessage(response.error);
|
|
157
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
158
|
+
return onError({
|
|
159
|
+
error: responseError,
|
|
160
|
+
code,
|
|
161
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
167
|
+
return onError({
|
|
168
|
+
error: error.message || error,
|
|
169
|
+
code,
|
|
170
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
finally {
|
|
174
|
+
return final();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export { makePostProvisioning as a, makePatchBusiness as b, makeGetIdentity as c, makePatchIdentity as d, makePostIdentity as e, makeGetBusiness as m };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { J as JustifiAnalytics } from './p-387450f6.js';
|
|
3
|
+
import './p-2dabeb5a.js';
|
|
4
|
+
import './p-29c0b182.js';
|
|
5
|
+
|
|
6
|
+
const CardForm = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.cardFormReady = createEvent(this, "cardFormReady", 7);
|
|
10
|
+
this.ready = createEvent(this, "ready", 7);
|
|
11
|
+
this.cardFormTokenized = createEvent(this, "cardFormTokenize", 7);
|
|
12
|
+
this.cardFormValidated = createEvent(this, "cardFormValidate", 7);
|
|
13
|
+
this.validationMode = undefined;
|
|
14
|
+
this.iframeOrigin = undefined;
|
|
15
|
+
this.singleLine = false;
|
|
16
|
+
this.internalStyleOverrides = undefined;
|
|
17
|
+
}
|
|
18
|
+
readyHandler(event) {
|
|
19
|
+
console.warn(`The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'`);
|
|
20
|
+
this.cardFormReady.emit(event);
|
|
21
|
+
this.ready.emit(event);
|
|
22
|
+
}
|
|
23
|
+
tokenizeHandler(event) {
|
|
24
|
+
console.warn(`The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
|
|
25
|
+
this.cardFormTokenized.emit(event);
|
|
26
|
+
}
|
|
27
|
+
validateHandler(event) {
|
|
28
|
+
console.warn(`The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
|
|
29
|
+
this.cardFormValidated.emit(event);
|
|
30
|
+
}
|
|
31
|
+
componentWillLoad() {
|
|
32
|
+
this.analytics = new JustifiAnalytics(this);
|
|
33
|
+
}
|
|
34
|
+
disconnectedCallback() {
|
|
35
|
+
this.analytics.cleanup();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Makes a tokenization request to the iframe
|
|
39
|
+
*/
|
|
40
|
+
async tokenize(...args) {
|
|
41
|
+
if (!this.childRef) {
|
|
42
|
+
throw new Error('Cannot call tokenize');
|
|
43
|
+
}
|
|
44
|
+
return this.childRef.tokenize(...args);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Runs a validation on the form and shows errors if any
|
|
48
|
+
*/
|
|
49
|
+
async validate() {
|
|
50
|
+
if (!this.childRef) {
|
|
51
|
+
throw new Error('Cannot call validate');
|
|
52
|
+
}
|
|
53
|
+
return this.childRef.validate();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Manually resizes the iframe to fit the contents of the iframe
|
|
57
|
+
* @deprecated This method will be removed in future releases.
|
|
58
|
+
*/
|
|
59
|
+
async resize() {
|
|
60
|
+
console.warn(`The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach.`);
|
|
61
|
+
if (!this.childRef) {
|
|
62
|
+
throw new Error('Cannot call validate');
|
|
63
|
+
}
|
|
64
|
+
return this.childRef.resize();
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return (h("justifi-payment-method-form", { key: 'cc0ad5d8a262ff5c8422d247caed469a8dea3488', ref: el => {
|
|
68
|
+
if (el) {
|
|
69
|
+
this.childRef = el;
|
|
70
|
+
}
|
|
71
|
+
}, "iframe-origin": this.iframeOrigin, "payment-method-form-type": "card", "single-line": this.singleLine, "payment-method-form-ready": this.cardFormReady, "payment-method-form-validate": this.cardFormValidated, "payment-method-form-tokenize": this.cardFormTokenized, "payment-method-form-validation-mode": this.validationMode || 'onSubmit' }));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { CardForm as justifi_card_form };
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { c as makeGetIdentity, d as makePatchIdentity, e as makePostIdentity } from './p-5968ff8a.js';
|
|
3
|
+
import { I as IdentityService } from './p-3e9ef4a8.js';
|
|
4
|
+
import { F as FormController } from './p-2eab3c90.js';
|
|
5
|
+
import { O as Owner } from './p-af244664.js';
|
|
6
|
+
import { a as BusinessFormClickActions } from './p-d89bad72.js';
|
|
7
|
+
import { c as parseIdentityInfo, i as identitySchema } from './p-85fc69e5.js';
|
|
8
|
+
import { B as Button } from './p-9c9c7dac.js';
|
|
9
|
+
import { S as SSN_MASK, P as PHONE_MASKS } from './p-525db3e8.js';
|
|
10
|
+
import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './p-7d85af5c.js';
|
|
11
|
+
import './p-14c91ffd.js';
|
|
12
|
+
import './p-8115b2f4.js';
|
|
13
|
+
import './p-29c0b182.js';
|
|
14
|
+
import './p-1ff8810b.js';
|
|
15
|
+
import './p-6078a370.js';
|
|
16
|
+
import './p-89887332.js';
|
|
17
|
+
import './p-ba5fae28.js';
|
|
18
|
+
|
|
19
|
+
const BusinessOwnerForm = class {
|
|
20
|
+
constructor(hostRef) {
|
|
21
|
+
registerInstance(this, hostRef);
|
|
22
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
23
|
+
this.getOwner = undefined;
|
|
24
|
+
this.patchOwner = undefined;
|
|
25
|
+
this.postOwner = undefined;
|
|
26
|
+
this.authToken = undefined;
|
|
27
|
+
this.ownerId = undefined;
|
|
28
|
+
this.businessId = undefined;
|
|
29
|
+
this.allowOptionalFields = undefined;
|
|
30
|
+
this.removeOwner = undefined;
|
|
31
|
+
this.newFormOpen = undefined;
|
|
32
|
+
this.ownersLength = undefined;
|
|
33
|
+
}
|
|
34
|
+
async validate() {
|
|
35
|
+
return this.coreComponent.validate();
|
|
36
|
+
}
|
|
37
|
+
async submit() {
|
|
38
|
+
return this.coreComponent.submit();
|
|
39
|
+
}
|
|
40
|
+
async validateAndSubmit({ onSuccess }) {
|
|
41
|
+
this.coreComponent.validateAndSubmit({ onSuccess });
|
|
42
|
+
}
|
|
43
|
+
componentWillLoad() {
|
|
44
|
+
this.initializeApi();
|
|
45
|
+
}
|
|
46
|
+
initializeApi() {
|
|
47
|
+
if (!this.authToken) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.getOwner = makeGetIdentity({
|
|
51
|
+
authToken: this.authToken,
|
|
52
|
+
identityId: this.ownerId,
|
|
53
|
+
service: new IdentityService()
|
|
54
|
+
});
|
|
55
|
+
this.patchOwner = makePatchIdentity({
|
|
56
|
+
authToken: this.authToken,
|
|
57
|
+
identityId: this.ownerId,
|
|
58
|
+
service: new IdentityService()
|
|
59
|
+
});
|
|
60
|
+
this.postOwner = makePostIdentity({
|
|
61
|
+
authToken: this.authToken,
|
|
62
|
+
service: new IdentityService()
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h("owner-form-core", { key: '332d1e77d01886f13aba09b32b2d5f2199131619', ownerId: this.ownerId, businessId: this.businessId, getOwner: this.getOwner, patchOwner: this.patchOwner, postOwner: this.postOwner, allowOptionalFields: this.allowOptionalFields, removeOwner: this.removeOwner, newFormOpen: this.newFormOpen, ownersLength: this.ownersLength, ref: ref => this.coreComponent = ref }));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const BusinessOwnerFormCore = class {
|
|
71
|
+
loadingWatcher() {
|
|
72
|
+
this.formLoading.emit(this.isLoading);
|
|
73
|
+
}
|
|
74
|
+
constructor(hostRef) {
|
|
75
|
+
registerInstance(this, hostRef);
|
|
76
|
+
this.submitted = createEvent(this, "submitted", 7);
|
|
77
|
+
this.ownerSubmitted = createEvent(this, "ownerSubmitted", 7);
|
|
78
|
+
this.clickEvent = createEvent(this, "click-event", 7);
|
|
79
|
+
this.formLoading = createEvent(this, "formLoading", 7);
|
|
80
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
81
|
+
this.getData = () => {
|
|
82
|
+
this.isLoading = true;
|
|
83
|
+
this.getOwner({
|
|
84
|
+
onSuccess: (response) => {
|
|
85
|
+
this.instantiateOwner(response.data);
|
|
86
|
+
},
|
|
87
|
+
onError: ({ error, code, severity }) => {
|
|
88
|
+
this.errorEvent.emit({
|
|
89
|
+
message: error,
|
|
90
|
+
errorCode: code,
|
|
91
|
+
severity: severity
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
final: () => this.isLoading = false
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
this.sendData = () => {
|
|
98
|
+
this.isLoading = true;
|
|
99
|
+
return new Promise((resolve) => {
|
|
100
|
+
if (this.ownerId) {
|
|
101
|
+
this.patchOwner({
|
|
102
|
+
payload: this.payload,
|
|
103
|
+
onSuccess: (response) => {
|
|
104
|
+
this.submitted.emit({
|
|
105
|
+
data: response,
|
|
106
|
+
metadata: { ownerID: response.data.id }
|
|
107
|
+
});
|
|
108
|
+
this.ownerSubmitted.emit({ id: response.data.id });
|
|
109
|
+
this.instantiateOwner(response.data);
|
|
110
|
+
resolve(true);
|
|
111
|
+
},
|
|
112
|
+
onError: ({ error, code, severity }) => {
|
|
113
|
+
this.submitted.emit({ data: { error } });
|
|
114
|
+
this.errorEvent.emit({
|
|
115
|
+
message: error,
|
|
116
|
+
errorCode: code,
|
|
117
|
+
severity: severity
|
|
118
|
+
});
|
|
119
|
+
resolve(false);
|
|
120
|
+
},
|
|
121
|
+
final: () => this.isLoading = false
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.postOwner({
|
|
126
|
+
payload: this.payload,
|
|
127
|
+
onSuccess: (response) => {
|
|
128
|
+
this.submitted.emit({
|
|
129
|
+
data: response,
|
|
130
|
+
metadata: { ownerID: response.data.id }
|
|
131
|
+
});
|
|
132
|
+
this.ownerSubmitted.emit({ id: response.data.id });
|
|
133
|
+
this.instantiateOwner(response.data);
|
|
134
|
+
resolve(true);
|
|
135
|
+
},
|
|
136
|
+
onError: ({ error, code, severity }) => {
|
|
137
|
+
this.submitted.emit({ data: { error } });
|
|
138
|
+
this.errorEvent.emit({
|
|
139
|
+
message: error,
|
|
140
|
+
errorCode: code,
|
|
141
|
+
severity: severity
|
|
142
|
+
});
|
|
143
|
+
resolve(false);
|
|
144
|
+
},
|
|
145
|
+
final: () => this.isLoading = false
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
this.instantiateOwner = async (data) => {
|
|
151
|
+
this.owner = Object.assign({}, new Owner(data));
|
|
152
|
+
await this.formController.setInitialValues(this.owner);
|
|
153
|
+
};
|
|
154
|
+
this.handleAddOwner = () => {
|
|
155
|
+
const eventName = this.ownerId ? BusinessFormClickActions.updateOwner : BusinessFormClickActions.addOwner;
|
|
156
|
+
this.clickEvent.emit({ name: eventName });
|
|
157
|
+
};
|
|
158
|
+
this.handleRemoveOwner = () => {
|
|
159
|
+
this.removeOwner(this.ownerId);
|
|
160
|
+
this.clickEvent.emit({ name: BusinessFormClickActions.removeOwner });
|
|
161
|
+
};
|
|
162
|
+
this.isLoading = false;
|
|
163
|
+
this.formController = undefined;
|
|
164
|
+
this.errors = {};
|
|
165
|
+
this.owner = {};
|
|
166
|
+
this.ownerId = undefined;
|
|
167
|
+
this.businessId = undefined;
|
|
168
|
+
this.getOwner = undefined;
|
|
169
|
+
this.patchOwner = undefined;
|
|
170
|
+
this.postOwner = undefined;
|
|
171
|
+
this.allowOptionalFields = undefined;
|
|
172
|
+
this.removeOwner = undefined;
|
|
173
|
+
this.newFormOpen = undefined;
|
|
174
|
+
this.ownersLength = undefined;
|
|
175
|
+
this.validate = this.validate.bind(this);
|
|
176
|
+
this.submit = this.submit.bind(this);
|
|
177
|
+
this.validateAndSubmit = this.validateAndSubmit.bind(this);
|
|
178
|
+
}
|
|
179
|
+
async returnOwnerData() {
|
|
180
|
+
return this.ownerId;
|
|
181
|
+
}
|
|
182
|
+
async validate() {
|
|
183
|
+
return this.formController.validate();
|
|
184
|
+
}
|
|
185
|
+
async submit() {
|
|
186
|
+
const isValid = await this.validate();
|
|
187
|
+
if (isValid) {
|
|
188
|
+
return this.sendData();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async validateAndSubmit(event) {
|
|
192
|
+
event.preventDefault();
|
|
193
|
+
const isValid = await this.validate();
|
|
194
|
+
if (isValid) {
|
|
195
|
+
this.submit();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
get payload() {
|
|
199
|
+
let formValues = parseIdentityInfo(this.formController.values.getValue());
|
|
200
|
+
if (this.ownerId) {
|
|
201
|
+
return JSON.stringify(formValues);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
return JSON.stringify(Object.assign(Object.assign({}, formValues), { business_id: this.businessId }));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
get formTitle() {
|
|
208
|
+
return this.ownerId ? 'Edit Business Owner' : 'Add Business Owner';
|
|
209
|
+
}
|
|
210
|
+
get submitButtonText() {
|
|
211
|
+
return this.ownerId ? 'Update' : 'Add';
|
|
212
|
+
}
|
|
213
|
+
get showRemoveButton() {
|
|
214
|
+
const blankForm = !this.ownerId && this.newFormOpen;
|
|
215
|
+
if (this.ownersLength <= 1) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
if (blankForm) {
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
else if (this.ownerId && !this.newFormOpen) {
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
componentWillLoad() {
|
|
228
|
+
this.formController = new FormController(identitySchema('owner', this.allowOptionalFields));
|
|
229
|
+
this.ownerId ? this.getData() : this.instantiateOwner({});
|
|
230
|
+
}
|
|
231
|
+
componentDidLoad() {
|
|
232
|
+
this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
|
|
233
|
+
}
|
|
234
|
+
render() {
|
|
235
|
+
return (h("form", { key: 'b2e2aaced859260e9d2ef59bc3f8a0763d05872c', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2a93ddb4c945be0ec081ce31d6d9eff4b302d622' }, h("legend", { key: 'ea9859e55099e3f8263024d884edfb48b3666eaa', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'f646c1ecc544c358d87e701aba8e151fcb96c54e' }), h("div", { key: '874bf4ebd7cef0afbdee96fa4d5679b6d683b0f0', class: "row gy-3" }, h("owner-form-inputs", { key: '866dbf0002ec1ac70d7942c6011c67f8cd144960', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '15d907270ecf3d16769cedea39ba279d7ffb0748', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '84c09ef594e7fa387e64a09014de81ed713cc765', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dafd97aa7b84644c9d011224a152ad7f99ce620', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: 'f1f31da4d147afcd01ef96acd01d63ee9497dd6b' }))));
|
|
236
|
+
}
|
|
237
|
+
static get watchers() { return {
|
|
238
|
+
"isLoading": ["loadingWatcher"]
|
|
239
|
+
}; }
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const BusinessOwnerFormInputs = class {
|
|
243
|
+
constructor(hostRef) {
|
|
244
|
+
registerInstance(this, hostRef);
|
|
245
|
+
this.inputHandler = (name, value) => {
|
|
246
|
+
updateFormValues(this.formController, { [name]: value });
|
|
247
|
+
};
|
|
248
|
+
this.onAddressFormUpdate = (values) => {
|
|
249
|
+
updateAddressFormValues(this.formController, Object.assign(Object.assign({}, this.formController.values.getValue().address), values));
|
|
250
|
+
};
|
|
251
|
+
this.ownerDefaultValue = undefined;
|
|
252
|
+
this.errors = undefined;
|
|
253
|
+
this.formController = undefined;
|
|
254
|
+
}
|
|
255
|
+
render() {
|
|
256
|
+
return (h("div", { key: '6fcc165d4bc75b92403d9031ad98f05f6b1dcd34', class: 'row gy-3' }, h("div", { key: '74f1e42a13892e95497a99684ba9de64719edb72', class: 'col-12 col-md-6' }, h("form-control-text", { key: '29caea2b0b0a62822cc20c99e697f3db7c22a541', name: 'name', label: 'Full Name', defaultValue: this.ownerDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: '5b0f8da9a0512de70558baa9cb188b4d5e773dc2', class: 'col-12 col-md-4' }, h("form-control-text", { key: '5967094f115a64876f8dc943a273f5a22b193f1c', name: 'title', label: 'Title', defaultValue: this.ownerDefaultValue.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '6c05fec9b87f8ba5e3be9ce74ef727a1e4b14905', class: 'col-12 col-md-6' }, h("form-control-text", { key: '8c5b2839b6de605915d8e7c14a0ba22d3f440bda', name: 'email', label: 'Email Address', defaultValue: this.ownerDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: 'd7eae882aea84b8562e459e66bc1ba885c4be3c7', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '2d6b33f47e4008745fd65c5ef3cb60dd92b85eba', name: 'phone', label: 'Phone Number', defaultValue: this.ownerDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: '92b825163aedf052bdb89721397da69c717e595d', class: 'col-12 col-md-4' }, h("form-control-date", { key: 'cd884b773ef0eb60effc61e8cfbf42b21620cd1c', name: 'dob_full', label: 'Birth Date', defaultValue: this.ownerDefaultValue.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController) })), h("div", { key: '614ba65972946645ba5c7a299c00efd0e85abf5e', class: 'col-12 col-md-8' }, h("form-control-number-masked", { key: '7cd9fe7a1b56d351942a0b962f3c7227459406ae', name: 'identification_number', label: 'SSN', defaultValue: this.ownerDefaultValue.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { key: 'ce08f35a16de4b9be65377cde0a9daa5b4cbe876', class: 'col-12' }, h("justifi-identity-address-form", { key: '79a7f5e8c08fc57383c1975145a6b06bd4e615dd', errors: this.errors.address, defaultValues: this.ownerDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate }))));
|
|
257
|
+
}
|
|
258
|
+
;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export { BusinessOwnerForm as justifi_owner_form, BusinessOwnerFormCore as owner_form_core, BusinessOwnerFormInputs as owner_form_inputs };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { J as JustifiAnalytics } from './p-387450f6.js';
|
|
3
|
+
import './p-2dabeb5a.js';
|
|
4
|
+
import './p-29c0b182.js';
|
|
5
|
+
|
|
6
|
+
const BankAccountForm = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.bankAccountFormReady = createEvent(this, "bankAccountFormReady", 7);
|
|
10
|
+
this.ready = createEvent(this, "ready", 7);
|
|
11
|
+
this.bankAccountFormTokenized = createEvent(this, "bankAccountFormTokenize", 7);
|
|
12
|
+
this.bankAccountFormValidated = createEvent(this, "bankAccountFormValidate", 7);
|
|
13
|
+
this.validationMode = undefined;
|
|
14
|
+
this.iframeOrigin = undefined;
|
|
15
|
+
this.internalStyleOverrides = undefined;
|
|
16
|
+
}
|
|
17
|
+
readyHandler(event) {
|
|
18
|
+
console.warn(`The 'bankAccountFormReady' event is deprecated in the next major release and will be renamed to 'ready'`);
|
|
19
|
+
this.bankAccountFormReady.emit(event);
|
|
20
|
+
this.ready.emit(event);
|
|
21
|
+
}
|
|
22
|
+
tokenizeHandler(event) {
|
|
23
|
+
console.warn(`The 'bankAccountFormTokenized' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
|
|
24
|
+
this.bankAccountFormTokenized.emit(event);
|
|
25
|
+
}
|
|
26
|
+
validateHandler(event) {
|
|
27
|
+
console.warn(`The 'bankAccountFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future.`);
|
|
28
|
+
this.bankAccountFormValidated.emit(event);
|
|
29
|
+
}
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
this.analytics = new JustifiAnalytics(this);
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.analytics.cleanup();
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Makes a tokenization request to the iframe
|
|
38
|
+
*/
|
|
39
|
+
async tokenize(...args) {
|
|
40
|
+
if (!this.childRef) {
|
|
41
|
+
throw new Error('Cannot call tokenize');
|
|
42
|
+
}
|
|
43
|
+
return this.childRef.tokenize(...args);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Runs a validation on the form and shows errors if any
|
|
47
|
+
*/
|
|
48
|
+
async validate() {
|
|
49
|
+
if (!this.childRef) {
|
|
50
|
+
throw new Error('Cannot call validate');
|
|
51
|
+
}
|
|
52
|
+
return this.childRef.validate();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Manually resizes the iframe to fit the contents of the iframe
|
|
56
|
+
* @deprecated This method will be removed in future releases.
|
|
57
|
+
*/
|
|
58
|
+
async resize() {
|
|
59
|
+
console.warn(`The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach.`);
|
|
60
|
+
if (!this.childRef) {
|
|
61
|
+
throw new Error('Cannot call validate');
|
|
62
|
+
}
|
|
63
|
+
return this.childRef.resize();
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h("justifi-payment-method-form", { key: '646e392c1a9ed38e73780ed6a01b6f019767794c', ref: el => {
|
|
67
|
+
if (el) {
|
|
68
|
+
this.childRef = el;
|
|
69
|
+
}
|
|
70
|
+
}, "iframe-origin": this.iframeOrigin, "payment-method-form-type": "bankAccount", "payment-method-form-ready": this.bankAccountFormReady, "payment-method-form-validated": this.bankAccountFormValidated, "payment-method-form-tokenize": this.bankAccountFormTokenized, "payment-method-form-validation-mode": this.validationMode || 'onSubmit' }));
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { BankAccountForm as justifi_bank_account_form };
|