@justifi/webcomponents 4.19.1-rc → 4.19.1-rc-4
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-985bc298.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-cbc08fe3.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-79e20e2d.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-cf64a48c.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-02c58e00.entry.js +97 -0
- package/dist/webcomponents/p-03d35880.entry.js +130 -0
- package/dist/webcomponents/p-05f46d63.entry.js +99 -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-1ad5995e.js +3599 -1
- package/dist/webcomponents/p-1ff8810b.js +29 -1
- 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-2eab3c90.js +3052 -1
- package/dist/webcomponents/p-3e9ef4a8.js +28 -0
- package/dist/webcomponents/p-3fd13ca3.js +52 -1
- package/dist/webcomponents/p-492588bf.js +79 -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-5cb3f0b2.entry.js +261 -0
- package/dist/webcomponents/p-5f835b89.entry.js +606 -0
- package/dist/webcomponents/p-6053809a.entry.js +80 -0
- package/dist/webcomponents/p-6078a370.js +244 -1
- package/dist/webcomponents/p-66e4869f.entry.js +75 -0
- package/dist/webcomponents/p-6f1c56d4.entry.js +94 -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-7a70ff09.entry.js +133 -0
- package/dist/webcomponents/p-7bbf73bd.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-9282eab8.js +77 -0
- package/dist/webcomponents/p-96c12fef.entry.js +73 -0
- package/dist/webcomponents/p-9c9c7dac.js +24 -1
- package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
- package/dist/webcomponents/p-9fd108be.entry.js +74 -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-acbac8b8.entry.js +131 -0
- package/dist/webcomponents/p-adc30a61.entry.js +145 -0
- package/dist/webcomponents/p-af244664.js +126 -1
- package/dist/webcomponents/p-b6e3d7ed.entry.js +94 -0
- package/dist/webcomponents/p-b82c146f.entry.js +111 -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-cb26f708.js +18 -0
- package/dist/webcomponents/p-d17aee2b.entry.js +26 -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-e3e5f95f.entry.js +98 -0
- package/dist/webcomponents/p-e3fab0e2.js +43 -1
- package/dist/webcomponents/p-eb5dbd23.entry.js +1684 -0
- 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
|
@@ -1 +1,301 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { a as create$6, b as create$8 } from './p-2eab3c90.js';
|
|
2
|
+
import { S as StateOptions } from './p-6078a370.js';
|
|
3
|
+
import { b as businessClassificationOptions, a as businessServiceReceivedOptions, r as recurringPaymentsOptions, s as seasonalBusinessOptions, c as bankAccountTypeOptions } from './p-ba5fae28.js';
|
|
4
|
+
|
|
5
|
+
const transformEmptyString = (value) => {
|
|
6
|
+
return value === '' ? null : value;
|
|
7
|
+
};
|
|
8
|
+
const validateRoutingNumber = (routingNumber) => {
|
|
9
|
+
if (!routingNumber)
|
|
10
|
+
return false;
|
|
11
|
+
const integers = Array.from(String(routingNumber), Number);
|
|
12
|
+
if (integers.length === 9) {
|
|
13
|
+
const checksum = ((3 * (integers[0] + integers[3] + integers[6])) +
|
|
14
|
+
(7 * (integers[1] + integers[4] + integers[7])) +
|
|
15
|
+
(integers[2] + integers[5] + integers[8])) % 10;
|
|
16
|
+
if (checksum === 0)
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
};
|
|
21
|
+
const businessNameRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
|
|
22
|
+
const phoneRegex = /^\d{10}$/;
|
|
23
|
+
const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
24
|
+
const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
|
|
25
|
+
const numbersOnlyRegex = /^\d+$/;
|
|
26
|
+
const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
|
|
27
|
+
const streetAddressRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
|
|
28
|
+
const poBoxRegex = /P\.?\s?O\.?\s?Box|Postal\sBox/i;
|
|
29
|
+
|
|
30
|
+
var EntityDocumentType;
|
|
31
|
+
(function (EntityDocumentType) {
|
|
32
|
+
EntityDocumentType["voidedCheck"] = "voided_check";
|
|
33
|
+
EntityDocumentType["balanceSheet"] = "balance_sheet";
|
|
34
|
+
EntityDocumentType["bankStatement"] = "bank_statement";
|
|
35
|
+
EntityDocumentType["governmentId"] = "government_id";
|
|
36
|
+
EntityDocumentType["profitAndLossStatement"] = "profit_and_loss_statement";
|
|
37
|
+
EntityDocumentType["taxReturn"] = "tax_return";
|
|
38
|
+
EntityDocumentType["other"] = "other";
|
|
39
|
+
})(EntityDocumentType || (EntityDocumentType = {}));
|
|
40
|
+
var EntityDocumentStatus;
|
|
41
|
+
(function (EntityDocumentStatus) {
|
|
42
|
+
EntityDocumentStatus["pending"] = "pending";
|
|
43
|
+
EntityDocumentStatus["uploaded"] = "uploaded";
|
|
44
|
+
EntityDocumentStatus["canceled"] = "canceled";
|
|
45
|
+
EntityDocumentStatus["needed"] = "needed";
|
|
46
|
+
})(EntityDocumentStatus || (EntityDocumentStatus = {}));
|
|
47
|
+
class EntityDocumentStorage {
|
|
48
|
+
constructor() {
|
|
49
|
+
this.voided_check = [];
|
|
50
|
+
this.balance_sheet = [];
|
|
51
|
+
this.bank_statement = [];
|
|
52
|
+
this.government_id = [];
|
|
53
|
+
this.profit_and_loss_statement = [];
|
|
54
|
+
this.tax_return = [];
|
|
55
|
+
this.other = [];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class EntityDocument {
|
|
59
|
+
constructor(fileData, business_id) {
|
|
60
|
+
this.file = fileData.file;
|
|
61
|
+
this.fileString = this.getFileString();
|
|
62
|
+
this.document_type = fileData.document_type;
|
|
63
|
+
this.presigned_url = null;
|
|
64
|
+
this.record_data = {
|
|
65
|
+
business_id: business_id,
|
|
66
|
+
document_type: this.document_type,
|
|
67
|
+
file_name: this.file.name,
|
|
68
|
+
file_type: this.file.type,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
getFileString() {
|
|
72
|
+
let reader = new FileReader();
|
|
73
|
+
reader.onload = (e) => {
|
|
74
|
+
this.fileString = e.target.result;
|
|
75
|
+
};
|
|
76
|
+
reader.readAsDataURL(this.file);
|
|
77
|
+
return this.fileString;
|
|
78
|
+
}
|
|
79
|
+
setPresignedUrl(url) {
|
|
80
|
+
this.presigned_url = url;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Common Validations
|
|
85
|
+
const emailValidation = create$6()
|
|
86
|
+
.email('Enter valid email')
|
|
87
|
+
.transform(transformEmptyString);
|
|
88
|
+
const phoneValidation = create$6()
|
|
89
|
+
.matches(phoneRegex, 'Enter valid phone number')
|
|
90
|
+
.transform(transformEmptyString);
|
|
91
|
+
// Core Info Validations
|
|
92
|
+
const businessNameValidation = create$6()
|
|
93
|
+
.min(2, 'Name must be at least 2 characters')
|
|
94
|
+
.max(100, 'Name must be less than 100 characters')
|
|
95
|
+
.matches(businessNameRegex, 'Enter valid business name')
|
|
96
|
+
.transform(transformEmptyString);
|
|
97
|
+
const doingBusinessAsValidation = create$6()
|
|
98
|
+
.min(2, 'Name must be at least 2 characters')
|
|
99
|
+
.max(100, 'Name must be less than 100 characters')
|
|
100
|
+
.matches(businessNameRegex, 'Enter valid doing business as')
|
|
101
|
+
.transform(transformEmptyString);
|
|
102
|
+
const websiteUrlValidation = create$6()
|
|
103
|
+
.matches(urlRegex, 'Enter valid website url')
|
|
104
|
+
.transform(transformEmptyString);
|
|
105
|
+
const businessClassificationValidation = create$6()
|
|
106
|
+
.oneOf(businessClassificationOptions.map((option) => option.value), 'Select business classification')
|
|
107
|
+
.transform(transformEmptyString);
|
|
108
|
+
const industryValidation = create$6()
|
|
109
|
+
.min(2, 'Industry must be at least 2 characters')
|
|
110
|
+
.max(50, 'Industry must be less than 50 characters')
|
|
111
|
+
.matches(stringLettersOnlyRegex, 'Enter valid industry')
|
|
112
|
+
.transform(transformEmptyString);
|
|
113
|
+
const taxIdValidation = create$6()
|
|
114
|
+
.matches(numbersOnlyRegex, 'Enter valid tax id, SSN, or EIN')
|
|
115
|
+
.test('not-repeat', 'Enter valid tax id, SSN, or EIN', (value) => {
|
|
116
|
+
return !/^(\d)\1+$/.test(value);
|
|
117
|
+
})
|
|
118
|
+
.test('not-seq', 'Enter valid tax id, SSN, or EIN', (value) => {
|
|
119
|
+
return value !== '123456789';
|
|
120
|
+
})
|
|
121
|
+
.transform(transformEmptyString);
|
|
122
|
+
const dateOfIncorporationValidation = create$6()
|
|
123
|
+
.test('not-future', 'Date of incorporation cannot be in the future', (value) => {
|
|
124
|
+
const inputDate = new Date(value);
|
|
125
|
+
const today = new Date();
|
|
126
|
+
return inputDate <= today;
|
|
127
|
+
})
|
|
128
|
+
.transform(transformEmptyString);
|
|
129
|
+
// Identity Validations
|
|
130
|
+
const identityNameValidation = create$6()
|
|
131
|
+
.min(2, 'Name must be at least 2 characters')
|
|
132
|
+
.max(100, 'Name must be less than 100 characters')
|
|
133
|
+
.matches(stringLettersOnlyRegex, 'Enter valid name')
|
|
134
|
+
.transform(transformEmptyString);
|
|
135
|
+
const identityTitleValidation = create$6()
|
|
136
|
+
.min(2, 'Title must be at least 2 characters')
|
|
137
|
+
.max(50, 'Title must be less than 50 characters')
|
|
138
|
+
.matches(stringLettersOnlyRegex, 'Enter valid title')
|
|
139
|
+
.transform(transformEmptyString);
|
|
140
|
+
const dobValidation = (role) => {
|
|
141
|
+
return (create$6()
|
|
142
|
+
.test('min', 'Enter a valid date', (value) => {
|
|
143
|
+
const date = new Date(value);
|
|
144
|
+
const minDate = new Date('1902-01-01');
|
|
145
|
+
return date >= minDate;
|
|
146
|
+
})
|
|
147
|
+
.test('age', `${role} must be at least 18 years old`, (value) => {
|
|
148
|
+
const date = new Date(value);
|
|
149
|
+
const minAgeDate = new Date();
|
|
150
|
+
minAgeDate.setFullYear(minAgeDate.getFullYear() - 18);
|
|
151
|
+
return date <= minAgeDate;
|
|
152
|
+
})
|
|
153
|
+
.transform(transformEmptyString));
|
|
154
|
+
};
|
|
155
|
+
const ssnValidation = create$6()
|
|
156
|
+
.matches(ssnRegex, 'Enter valid SSN')
|
|
157
|
+
.when('ssn_last4', {
|
|
158
|
+
is: (val) => !val || val.length === 0,
|
|
159
|
+
then: (schema) => schema.required('Enter SSN'),
|
|
160
|
+
otherwise: (schema) => schema.nullable(),
|
|
161
|
+
})
|
|
162
|
+
.test('not-repeat', 'Enter valid SSN', (value) => {
|
|
163
|
+
return !/^(\d)\1+$/.test(value);
|
|
164
|
+
})
|
|
165
|
+
.test('not-seq', 'Enter valid SSN', (value) => {
|
|
166
|
+
return value !== '123456789';
|
|
167
|
+
})
|
|
168
|
+
.transform(transformEmptyString);
|
|
169
|
+
// Address Validations
|
|
170
|
+
const lineOneValidation = create$6()
|
|
171
|
+
.min(5, 'Address must be at least 5 characters')
|
|
172
|
+
.max(100, 'Address must be less than 100 characters')
|
|
173
|
+
.matches(streetAddressRegex, 'Enter valid address line 1')
|
|
174
|
+
.test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
|
|
175
|
+
return !poBoxRegex.test(value);
|
|
176
|
+
})
|
|
177
|
+
.transform(transformEmptyString);
|
|
178
|
+
const lineTwoValidation = create$6()
|
|
179
|
+
.max(100, 'Address must be less than 100 characters')
|
|
180
|
+
.matches(streetAddressRegex, 'Enter valid address line 2')
|
|
181
|
+
.test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
|
|
182
|
+
return !poBoxRegex.test(value);
|
|
183
|
+
})
|
|
184
|
+
.transform(transformEmptyString);
|
|
185
|
+
const cityValidation = create$6()
|
|
186
|
+
.min(2, 'City must be at least 2 characters')
|
|
187
|
+
.max(50, 'City must be less than 50 characters')
|
|
188
|
+
.matches(stringLettersOnlyRegex, 'Enter valid city')
|
|
189
|
+
.transform(transformEmptyString);
|
|
190
|
+
const stateValidation = create$6()
|
|
191
|
+
.oneOf(StateOptions.map((option) => option.value), 'Select state')
|
|
192
|
+
.transform(transformEmptyString);
|
|
193
|
+
const postalValidation = create$6()
|
|
194
|
+
.matches(/^[0-9]{5}$/, 'Enter valid postal code')
|
|
195
|
+
.transform(transformEmptyString);
|
|
196
|
+
// Additional Questions Validations
|
|
197
|
+
const revenueValidation = create$6()
|
|
198
|
+
.matches(numbersOnlyRegex, 'Enter valid revenue')
|
|
199
|
+
.transform(transformEmptyString);
|
|
200
|
+
const paymentVolumeValidation = create$6()
|
|
201
|
+
.matches(numbersOnlyRegex, 'Enter valid payment volume')
|
|
202
|
+
.transform(transformEmptyString);
|
|
203
|
+
const whenServiceReceivedValidation = create$6()
|
|
204
|
+
.oneOf(businessServiceReceivedOptions.map((option) => option.value), 'Select when service is received')
|
|
205
|
+
.transform(transformEmptyString);
|
|
206
|
+
const recurringPaymentsValidation = create$6()
|
|
207
|
+
.oneOf(recurringPaymentsOptions.map((option) => option.value), 'Select recurring payments')
|
|
208
|
+
.transform(transformEmptyString);
|
|
209
|
+
const recurringPaymentsPercentageValidation = create$6()
|
|
210
|
+
.when('business_recurring_payments', {
|
|
211
|
+
is: (val) => val === 'Yes',
|
|
212
|
+
then: (schema) => schema.required('Enter recurring payments percentage'),
|
|
213
|
+
otherwise: (schema) => schema.nullable(),
|
|
214
|
+
})
|
|
215
|
+
.transform(transformEmptyString);
|
|
216
|
+
const seasonalBusinessValidation = create$6()
|
|
217
|
+
.oneOf(seasonalBusinessOptions.map((option) => option.value), 'Select seasonal business')
|
|
218
|
+
.transform(transformEmptyString);
|
|
219
|
+
const otherPaymentDetailsValidation = create$6()
|
|
220
|
+
.transform(transformEmptyString);
|
|
221
|
+
// Bank Account Validations
|
|
222
|
+
const bankNameValidation = create$6()
|
|
223
|
+
.min(2, 'Name must be at least 2 characters')
|
|
224
|
+
.max(50, 'Name must be less than 50 characters')
|
|
225
|
+
.matches(stringLettersOnlyRegex, 'Enter valid bank name')
|
|
226
|
+
.transform(transformEmptyString);
|
|
227
|
+
const nicknameValidation = create$6()
|
|
228
|
+
.min(2, 'Name must be at least 2 characters')
|
|
229
|
+
.max(50, 'Name must be less than 50 characters')
|
|
230
|
+
.matches(stringLettersOnlyRegex, 'Enter valid nickname')
|
|
231
|
+
.transform(transformEmptyString);
|
|
232
|
+
const accountTypeValidation = create$6()
|
|
233
|
+
.oneOf(bankAccountTypeOptions.map((option) => option.value), 'Select account type')
|
|
234
|
+
.transform(transformEmptyString);
|
|
235
|
+
const accountNumberValidation = create$6()
|
|
236
|
+
.min(8, 'Account number must be at least 8 digits')
|
|
237
|
+
.max(17, 'Account number must be less than 17 digits')
|
|
238
|
+
.matches(numbersOnlyRegex, 'Enter valid account number')
|
|
239
|
+
.test('not-repeat', 'Enter valid account number', (value) => {
|
|
240
|
+
return !/^(\d)\1+$/.test(value);
|
|
241
|
+
})
|
|
242
|
+
.transform(transformEmptyString);
|
|
243
|
+
const routingNumberValidation = create$6()
|
|
244
|
+
.length(9, 'Routing number must be 9 digits')
|
|
245
|
+
.matches(numbersOnlyRegex, 'Enter valid routing number')
|
|
246
|
+
.test('not-repeat', 'Enter valid routing number', (value) => {
|
|
247
|
+
return !/^(\d)\1+$/.test(value);
|
|
248
|
+
})
|
|
249
|
+
.test('valid', 'Enter valid routing number', (value) => {
|
|
250
|
+
return validateRoutingNumber(value);
|
|
251
|
+
})
|
|
252
|
+
.transform(transformEmptyString);
|
|
253
|
+
// Document Upload Validations
|
|
254
|
+
const documentUploadValidation = create$8();
|
|
255
|
+
const ss4Validation = documentUploadValidation;
|
|
256
|
+
const governmentIdValidation = documentUploadValidation;
|
|
257
|
+
const otherDocumentValidation = documentUploadValidation;
|
|
258
|
+
const voidedCheckValidation = (documents, allowOptionalFields) => {
|
|
259
|
+
const existingDoc = documents.some((doc) => doc.document_type === EntityDocumentType.voidedCheck);
|
|
260
|
+
if (existingDoc || allowOptionalFields) {
|
|
261
|
+
return documentUploadValidation.nullable();
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
return documentUploadValidation.required('Please select one or more files');
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const bankStatementValidation = (volume, documents, allowOptionalFields) => {
|
|
268
|
+
const vol = parseInt(volume);
|
|
269
|
+
const bankStatementRequiredAmount = 250000;
|
|
270
|
+
const existingDoc = documents.some((doc) => doc.document_type === EntityDocumentType.bankStatement);
|
|
271
|
+
if (existingDoc || allowOptionalFields) {
|
|
272
|
+
return documentUploadValidation.nullable();
|
|
273
|
+
}
|
|
274
|
+
else if (vol >= bankStatementRequiredAmount && !allowOptionalFields) {
|
|
275
|
+
return documentUploadValidation.required('Please select one or more files');
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
const balanceSheetValidation = (volume, documents, allowOptionalFields) => {
|
|
279
|
+
const vol = parseInt(volume);
|
|
280
|
+
const balanceSheetRequiredAmount = 1000000;
|
|
281
|
+
const existingDoc = documents.some((doc) => doc.document_type === EntityDocumentType.balanceSheet);
|
|
282
|
+
if (existingDoc || allowOptionalFields) {
|
|
283
|
+
return documentUploadValidation.nullable();
|
|
284
|
+
}
|
|
285
|
+
else if (vol >= balanceSheetRequiredAmount && !allowOptionalFields) {
|
|
286
|
+
return documentUploadValidation.required('Please select one or more files');
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
const profitAndLossStatementValidation = (volume, documents, allowOptionalFields) => {
|
|
290
|
+
const vol = parseInt(volume);
|
|
291
|
+
const profitLossRequiredAmount = 1000000;
|
|
292
|
+
const existingDoc = documents.some((doc) => doc.document_type === EntityDocumentType.profitAndLossStatement);
|
|
293
|
+
if (existingDoc || allowOptionalFields) {
|
|
294
|
+
return documentUploadValidation.nullable();
|
|
295
|
+
}
|
|
296
|
+
else if (vol >= profitLossRequiredAmount && !allowOptionalFields) {
|
|
297
|
+
return documentUploadValidation.required('Please select one or more files');
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export { nicknameValidation as A, accountTypeValidation as B, accountNumberValidation as C, routingNumberValidation as D, voidedCheckValidation as E, governmentIdValidation as F, ss4Validation as G, otherDocumentValidation as H, balanceSheetValidation as I, bankStatementValidation as J, profitAndLossStatementValidation as K, EntityDocument as L, EntityDocumentStorage as M, EntityDocumentType as N, lineTwoValidation as a, identityTitleValidation as b, cityValidation as c, phoneValidation as d, emailValidation as e, dobValidation as f, ssnValidation as g, businessNameValidation as h, identityNameValidation as i, doingBusinessAsValidation as j, businessClassificationValidation as k, lineOneValidation as l, industryValidation as m, dateOfIncorporationValidation as n, paymentVolumeValidation as o, postalValidation as p, whenServiceReceivedValidation as q, revenueValidation as r, stateValidation as s, taxIdValidation as t, recurringPaymentsValidation as u, recurringPaymentsPercentageValidation as v, websiteUrlValidation as w, seasonalBusinessValidation as x, otherPaymentDetailsValidation as y, bankNameValidation as z };
|
|
@@ -1 +1,27 @@
|
|
|
1
|
-
const
|
|
1
|
+
const numberOnlyHandler = (e) => {
|
|
2
|
+
var _a;
|
|
3
|
+
const specialKeys = ['Backspace', 'Tab', 'Enter', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Delete'];
|
|
4
|
+
// Check if the key is a special key
|
|
5
|
+
if (e instanceof KeyboardEvent && specialKeys.includes(e.key)) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
// Allow Ctrl+V / Command+V for pasting
|
|
9
|
+
const isPaste = e instanceof KeyboardEvent && (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'v';
|
|
10
|
+
if (isPaste) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
// Handle paste event
|
|
14
|
+
if (e instanceof ClipboardEvent) {
|
|
15
|
+
const clipboardData = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
|
|
16
|
+
if (clipboardData && !/^\d+$/.test(clipboardData)) {
|
|
17
|
+
e.preventDefault();
|
|
18
|
+
}
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
// Prevent default action if the key is not a digit
|
|
22
|
+
if (e instanceof KeyboardEvent && !/^\d$/.test(e.key)) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { numberOnlyHandler as n };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { L as LoadingState, E as ErrorState } from './p-dce846bf.js';
|
|
3
|
+
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
4
|
+
|
|
5
|
+
var RENDER_STATES;
|
|
6
|
+
(function (RENDER_STATES) {
|
|
7
|
+
RENDER_STATES["LOADING"] = "loading";
|
|
8
|
+
RENDER_STATES["READY"] = "ready";
|
|
9
|
+
RENDER_STATES["ERROR"] = "error";
|
|
10
|
+
})(RENDER_STATES || (RENDER_STATES = {}));
|
|
11
|
+
const BusinessDetailsCore = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
registerInstance(this, hostRef);
|
|
14
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
15
|
+
this.getBusiness = undefined;
|
|
16
|
+
this.business = undefined;
|
|
17
|
+
this.renderState = RENDER_STATES.LOADING;
|
|
18
|
+
this.errorMessage = 'An error ocurred.';
|
|
19
|
+
}
|
|
20
|
+
async componentWillLoad() {
|
|
21
|
+
if (this.getBusiness) {
|
|
22
|
+
this.fetchData();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
fetchData() {
|
|
26
|
+
this.renderState = RENDER_STATES.LOADING;
|
|
27
|
+
this.getBusiness({
|
|
28
|
+
onSuccess: ({ business }) => {
|
|
29
|
+
this.business = business;
|
|
30
|
+
this.renderState = RENDER_STATES.READY;
|
|
31
|
+
},
|
|
32
|
+
onError: ({ error, code, severity }) => {
|
|
33
|
+
this.errorMessage = error;
|
|
34
|
+
this.renderState = RENDER_STATES.ERROR;
|
|
35
|
+
this.errorEvent.emit({
|
|
36
|
+
errorCode: code,
|
|
37
|
+
message: error,
|
|
38
|
+
severity,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
if (this.renderState === RENDER_STATES.LOADING) {
|
|
45
|
+
return h(StyledHost, null, LoadingState());
|
|
46
|
+
}
|
|
47
|
+
if (this.renderState === RENDER_STATES.ERROR) {
|
|
48
|
+
return h(StyledHost, null, ErrorState(this.errorMessage));
|
|
49
|
+
}
|
|
50
|
+
return (h(StyledHost, null, h("generic-info-details", { business: this.business }), h("legal-address-details", { legalAddress: this.business.legal_address }), h("representative-details", { representative: this.business.representative }), h("owner-details", { owners: this.business.owners }), h("additional-questions-details", { additionalQuestions: this.business.additional_questions })));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { BusinessDetailsCore as business_details_core };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { p as packageJson } from './p-492588bf.js';
|
|
2
|
+
import { A as Api } from './p-29c0b182.js';
|
|
3
|
+
|
|
4
|
+
class AnalyticsService {
|
|
5
|
+
async record(body) {
|
|
6
|
+
const endpoint = 'analytics';
|
|
7
|
+
return Api({ apiOrigin: undefined }).post(endpoint, JSON.stringify(body));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @class JustifiAnalytics
|
|
13
|
+
* @description A class to track analytics for a component
|
|
14
|
+
* @param { component } ComponentInterface - The component to track
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
class JustifiAnalytics {
|
|
18
|
+
constructor(component) {
|
|
19
|
+
this.handleCustomEvent = async (data) => {
|
|
20
|
+
// Track the event
|
|
21
|
+
await this.service.record(data);
|
|
22
|
+
};
|
|
23
|
+
this.service = new AnalyticsService();
|
|
24
|
+
this.componentInstance = component;
|
|
25
|
+
this.setUpBasicData();
|
|
26
|
+
this.setupLifecycleTracking();
|
|
27
|
+
this.trackCustomEvents();
|
|
28
|
+
}
|
|
29
|
+
get resourceId() {
|
|
30
|
+
return (this.componentInstance.accountId ||
|
|
31
|
+
this.componentInstance.businessId ||
|
|
32
|
+
this.componentInstance.paymentId ||
|
|
33
|
+
this.componentInstance.payoutId ||
|
|
34
|
+
this.componentInstance.checkoutId);
|
|
35
|
+
}
|
|
36
|
+
setUpBasicData() {
|
|
37
|
+
this.basicData = {
|
|
38
|
+
component_name: this.componentInstance.tagName,
|
|
39
|
+
component_version: packageJson.version,
|
|
40
|
+
client_user_agent: navigator.userAgent,
|
|
41
|
+
// navigator.platform is deprecated, use navigator.userAgent instead
|
|
42
|
+
client_platform: navigator.userAgent,
|
|
43
|
+
client_origin: window.location.origin,
|
|
44
|
+
resource_id: this.resourceId,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
trackCustomEvents() {
|
|
48
|
+
this.eventEmitters = ['submitted', 'error-event'];
|
|
49
|
+
// for each event, add an event listener
|
|
50
|
+
this.eventEmitters.forEach((eventName) => {
|
|
51
|
+
// if this.componentInstance.addEventListener is a function add the event listener
|
|
52
|
+
if (typeof this.componentInstance.addEventListener === 'function') {
|
|
53
|
+
this.componentInstance.addEventListener(eventName, (event) => this.handleCustomEvent({
|
|
54
|
+
event_type: eventName,
|
|
55
|
+
data: Object.assign(Object.assign({}, this.basicData), { error: event.detail }),
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
setupLifecycleTracking() {
|
|
61
|
+
const originalComponentDidLoad = this.componentInstance.componentDidLoad;
|
|
62
|
+
this.componentInstance.componentDidLoad = () => {
|
|
63
|
+
this.service.record({ event_type: 'init', data: this.basicData });
|
|
64
|
+
if (originalComponentDidLoad) {
|
|
65
|
+
return originalComponentDidLoad.apply(this.componentInstance);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
cleanup() {
|
|
70
|
+
// Remove event listeners
|
|
71
|
+
this.eventEmitters.forEach((event) => {
|
|
72
|
+
this.componentInstance.removeEventListener(event, this.handleCustomEvent);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { JustifiAnalytics as J };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
+
import { J as JustifiAnalytics } from './p-9282eab8.js';
|
|
3
|
+
import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './p-14c91ffd.js';
|
|
4
|
+
import { m as makeGetBusiness, a as makePostProvisioning } from './p-5968ff8a.js';
|
|
5
|
+
import { B as BusinessService } from './p-3e9ef4a8.js';
|
|
6
|
+
import { A as Api } from './p-29c0b182.js';
|
|
7
|
+
import './p-492588bf.js';
|
|
8
|
+
import './p-8115b2f4.js';
|
|
9
|
+
|
|
10
|
+
class ProvisionService {
|
|
11
|
+
async postProvisioning(authToken, businessId, product) {
|
|
12
|
+
const endpoint = `entities/provisioning`;
|
|
13
|
+
const payload = {
|
|
14
|
+
business_id: businessId,
|
|
15
|
+
product_category: product,
|
|
16
|
+
};
|
|
17
|
+
return Api({ authToken, apiOrigin: undefined }).post(endpoint, JSON.stringify(payload));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const PaymentProvisioning = class {
|
|
22
|
+
constructor(hostRef) {
|
|
23
|
+
registerInstance(this, hostRef);
|
|
24
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
25
|
+
this.postProvisioning = undefined;
|
|
26
|
+
this.getBusiness = undefined;
|
|
27
|
+
this.businessId = undefined;
|
|
28
|
+
this.authToken = undefined;
|
|
29
|
+
this.allowOptionalFields = false;
|
|
30
|
+
this.formTitle = 'Business Information';
|
|
31
|
+
}
|
|
32
|
+
propChanged() {
|
|
33
|
+
this.initializeApi();
|
|
34
|
+
}
|
|
35
|
+
componentWillLoad() {
|
|
36
|
+
this.analytics = new JustifiAnalytics(this);
|
|
37
|
+
this.initializeApi();
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
this.analytics.cleanup();
|
|
41
|
+
}
|
|
42
|
+
initializeApi() {
|
|
43
|
+
if (this.authToken && this.businessId) {
|
|
44
|
+
this.getBusiness = makeGetBusiness({
|
|
45
|
+
authToken: this.authToken,
|
|
46
|
+
businessId: this.businessId,
|
|
47
|
+
service: new BusinessService()
|
|
48
|
+
});
|
|
49
|
+
this.postProvisioning = makePostProvisioning({
|
|
50
|
+
authToken: this.authToken,
|
|
51
|
+
businessId: this.businessId,
|
|
52
|
+
product: 'payment',
|
|
53
|
+
service: new ProvisionService()
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.errorEvent.emit({
|
|
58
|
+
message: 'auth-token and business-id are required',
|
|
59
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
60
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return (h("justifi-payment-provisioning-core", { key: 'a93ee23fabf4bdeb381e924bfdf684ddd183075a', businessId: this.businessId, authToken: this.authToken, allowOptionalFields: this.allowOptionalFields, formTitle: this.formTitle, getBusiness: this.getBusiness, postProvisioning: this.postProvisioning }));
|
|
66
|
+
}
|
|
67
|
+
static get watchers() { return {
|
|
68
|
+
"authToken": ["propChanged"],
|
|
69
|
+
"businessId": ["propChanged"]
|
|
70
|
+
}; }
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { PaymentProvisioning as justifi_payment_provisioning };
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
import{h
|
|
1
|
+
import { h } from './p-fad19d75.js';
|
|
2
|
+
|
|
3
|
+
const ButtonSpinner = () => (h("div", { class: "spinner-border spinner-border-sm", role: "status", part: "button-spinner" },
|
|
4
|
+
h("span", { class: "visually-hidden" }, "Loading...")));
|
|
5
|
+
|
|
6
|
+
const Button = (props, children) => {
|
|
7
|
+
const classMap = {
|
|
8
|
+
primary: 'btn btn-primary',
|
|
9
|
+
secondary: 'btn btn-secondary',
|
|
10
|
+
};
|
|
11
|
+
const exportPartMapping = {
|
|
12
|
+
primary: ['button', 'button-primary'],
|
|
13
|
+
secondary: ['button', 'button-secondary'],
|
|
14
|
+
};
|
|
15
|
+
const getCSSParts = () => {
|
|
16
|
+
const baseCSSParts = exportPartMapping[props.variant];
|
|
17
|
+
if (props.isLoading)
|
|
18
|
+
baseCSSParts.push('button-loading');
|
|
19
|
+
return baseCSSParts.join(' ');
|
|
20
|
+
};
|
|
21
|
+
return (h("button", Object.assign({ class: classMap[props.variant], onClick: props.clickHandler, part: getCSSParts() }, props), props.isLoading ? ButtonSpinner() : children));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Button as B };
|