@justifi/webcomponents 4.12.0 → 4.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Business-f8e37adb.js → Business-21cef37d.js} +20 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/business-additional-questions-schema-f5f303fb.js +49 -0
- package/dist/cjs/{business-form-types-61b8196a.js → business-form-types-a3cc374d.js} +60 -1
- package/dist/cjs/{form-control-date_4.cjs.entry.js → form-control-date_3.cjs.entry.js} +0 -44
- package/dist/cjs/{form-control-datepart.cjs.entry.js → form-control-datepart_2.cjs.entry.js} +46 -2
- package/dist/cjs/{form-input-masks-baa06faf.js → form-input-masks-efd44b8e.js} +2 -0
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +7 -7
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-list.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
- package/dist/cjs/justifi-owner-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{payload-parsers-32c43c76.js → payload-parsers-74693a97.js} +97 -36
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Business.js +18 -0
- package/dist/collection/api/Identity.js +2 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +2 -2
- package/dist/collection/components/business-forms/owner-form/owner-form.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +2 -2
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +1 -22
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +6 -35
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +15 -32
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +1 -0
- package/dist/collection/components/business-forms/schemas/schema-validations.js +95 -0
- package/dist/collection/components/business-forms/utils/business-form-types.js +59 -1
- package/dist/collection/components/business-forms/utils/payload-parsers.js +1 -0
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/utils/form-input-masks.js +1 -0
- package/dist/docs.json +4 -26
- package/dist/esm/{Business-2410f7e3.js → Business-0e8a9a3a.js} +21 -1
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{business-additional-questions-schema-5571d40f.js → business-additional-questions-schema-a84dd641.js} +6 -35
- package/dist/esm/{business-form-types-46ecd908.js → business-form-types-7420dc96.js} +60 -2
- package/dist/esm/{form-control-date_4.entry.js → form-control-date_3.entry.js} +2 -45
- package/dist/esm/{form-control-datepart.entry.js → form-control-datepart_2.entry.js} +47 -4
- package/dist/esm/{form-input-masks-850c8cd4.js → form-input-masks-84875967.js} +2 -1
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +7 -7
- package/dist/esm/justifi-additional-questions_4.entry.js +5 -5
- package/dist/esm/justifi-billing-form_4.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +1 -1
- package/dist/esm/justifi-business-form.entry.js +4 -4
- package/dist/esm/justifi-business-list.entry.js +1 -1
- package/dist/esm/justifi-business-owners.entry.js +1 -1
- package/dist/esm/justifi-owner-form.entry.js +5 -5
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{payload-parsers-192e0c3e.js → payload-parsers-0c4fc2b1.js} +89 -31
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +21 -1
- package/dist/module/business-address-schema.js +2 -23
- package/dist/module/business-core-info-form-step.js +2 -2
- package/dist/module/business-core-info-schema.js +6 -35
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-form-types.js +60 -2
- package/dist/module/business-identity-schema.js +15 -32
- package/dist/module/business-owners-form-step.js +2 -8
- package/dist/module/business-representative-form-step.js +5 -11
- package/dist/module/business-representative.js +4 -10
- package/dist/module/form-input-masks.js +2 -1
- package/dist/module/generic-info-details2.js +2 -2
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +7 -13
- package/dist/module/justifi-business-list.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +5 -11
- package/dist/module/legal-address-form-step.js +2 -2
- package/dist/module/owner-form.js +6 -12
- package/dist/module/payload-parsers.js +99 -1
- package/dist/module/payment-method-form.js +2 -2
- package/dist/types/api/Business.d.ts +19 -0
- package/dist/types/api/Identity.d.ts +3 -0
- package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +2 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +4 -0
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +3 -1
- package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +1 -0
- package/dist/types/components/business-forms/schemas/schema-validations.d.ts +18 -0
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +5 -1
- package/dist/types/utils/form-input-masks.d.ts +1 -0
- package/dist/webcomponents/p-01913426.js +1 -0
- package/dist/webcomponents/{p-3fe05c4a.entry.js → p-18cf5a16.entry.js} +1 -1
- package/dist/webcomponents/p-2fbe8823.entry.js +1 -0
- package/dist/webcomponents/{p-8c9d9812.entry.js → p-51ee396f.entry.js} +1 -1
- package/dist/webcomponents/p-52e4cc27.js +1 -0
- package/dist/webcomponents/{p-9f3facf1.entry.js → p-5f5e730c.entry.js} +1 -1
- package/dist/webcomponents/p-602a1588.entry.js +1 -0
- package/dist/webcomponents/p-6ec77980.entry.js +1 -0
- package/dist/webcomponents/{p-99d6b67e.entry.js → p-81c43ba5.entry.js} +1 -1
- package/dist/webcomponents/{p-56780f10.entry.js → p-9e35b0f6.entry.js} +1 -1
- package/dist/webcomponents/p-9ec89299.entry.js +1 -0
- package/dist/webcomponents/{p-84b9ffc9.entry.js → p-b38baa84.entry.js} +1 -1
- package/dist/webcomponents/p-b9f04fb0.entry.js +1 -0
- package/dist/webcomponents/p-bfc634c6.entry.js +1 -0
- package/dist/webcomponents/p-cb86b2fd.js +1 -0
- package/dist/webcomponents/p-d2b7beac.js +1 -0
- package/dist/webcomponents/p-e3946c2b.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/business-additional-questions-schema-bdfd29c3.js +0 -78
- package/dist/webcomponents/p-0315876e.entry.js +0 -1
- package/dist/webcomponents/p-26fe62d6.entry.js +0 -1
- package/dist/webcomponents/p-41b1ad3a.entry.js +0 -1
- package/dist/webcomponents/p-5c269619.js +0 -1
- package/dist/webcomponents/p-910bb656.js +0 -1
- package/dist/webcomponents/p-96cebc8b.entry.js +0 -1
- package/dist/webcomponents/p-b318b899.js +0 -1
- package/dist/webcomponents/p-e2ba8d84.entry.js +0 -1
- package/dist/webcomponents/p-f4ae621e.entry.js +0 -1
- package/dist/webcomponents/p-fd60d5af.js +0 -1
- package/dist/webcomponents/p-ff211f76.js +0 -1
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy(JSON.parse("[[\"justifi-payment-provisioning.cjs\",[[0,\"justifi-payment-provisioning\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"testMode\":[4,\"test-mode\"],\"hideErrors\":[4,\"hide-errors\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formTitle\":[1,\"form-title\"],\"removeTitle\":[4,\"remove-title\"],\"formLoading\":[32],\"errorMessage\":[32],\"currentStep\":[32],\"totalSteps\":[32]}]]],[\"justifi-business-form.cjs\",[[0,\"justifi-business-form\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"hideErrors\":[4,\"hide-errors\"],\"formTitle\":[1,\"form-title\"],\"removeTitle\":[4,\"remove-title\"],\"isLoading\":[32],\"errorMessage\":[32]}]]],[\"justifi-checkout.cjs\",[[1,\"justifi-checkout\",{\"iframeOrigin\":[1,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"checkoutId\":[1,\"checkout-id\"],\"getCheckout\":[32],\"complete\":[32],\"errorMessage\":[32]},null,{\"authToken\":[\"propChanged\"],\"checkoutId\":[\"propChanged\"]}]]],[\"justifi-business-details.cjs\",[[1,\"justifi-business-details\",{\"businessId\":[1,\"business-id\"],\"authToken\":[1,\"auth-token\"],\"errorMessage\":[32],\"getBusiness\":[32]}]]],[\"justifi-payment-form.cjs\",[[1,\"justifi-payment-form\",{\"bankAccount\":[4,\"bank-account\"],\"card\":[4],\"email\":[1],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"submitButtonText\":[1,\"submit-button-text\"],\"submitButtonEnabled\":[32],\"isLoading\":[32],\"selectedPaymentMethodType\":[32],\"fillBillingForm\":[64],\"enableSubmitButton\":[64],\"disableSubmitButton\":[64]}]]],[\"justifi-subaccount-details.cjs\",[[1,\"justifi-subaccount-details\",{\"accountId\":[1,\"account-id\"],\"subaccountId\":[1,\"subaccount-id\"],\"authToken\":[1,\"auth-token\"],\"onboardingData\":[32],\"subaccount\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"subaccountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"]}]]],[\"justifi-business-owners.cjs\",[[0,\"justifi-business-owners\",{\"formController\":[16],\"errors\":[32],\"owners\":[32]}]]],[\"justifi-payments-list.cjs\",[[1,\"justifi-payments-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayments\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payouts-list.cjs\",[[1,\"justifi-payouts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayouts\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-business-list.cjs\",[[1,\"justifi-business-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"businesses\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-balance-transactions.cjs\",[[1,\"justifi-payment-balance-transactions\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"balanceTransactions\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-details.cjs\",[[1,\"justifi-payment-details\",{\"paymentId\":[1,\"payment-id\"],\"authToken\":[1,\"auth-token\"],\"getPaymentDetails\":[32],\"errorMessage\":[32]},null,{\"paymentId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payout-details.cjs\",[[1,\"justifi-payout-details\",{\"payoutId\":[1,\"payout-id\"],\"authToken\":[1,\"auth-token\"],\"getPayout\":[32],\"errorMessage\":[32]},null,{\"payoutId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-proceeds-list.cjs\",[[1,\"justifi-proceeds-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"proceeds\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-refund-form.cjs\",[[1,\"justifi-refund-form\",{\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"amount\":[2],\"submitButtonText\":[1,\"submit-button-text\"],\"withButton\":[4,\"with-button\"],\"refundInfoText\":[1,\"refund-info-text\"],\"errors\":[32],\"isSubmitting\":[32]}]]],[\"justifi-subaccounts-list.cjs\",[[1,\"justifi-subaccounts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"subaccounts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-bank-account-form.cjs\",[[0,\"justifi-bank-account-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-card-form.cjs\",[[0,\"justifi-card-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-gross-payment-chart.cjs\",[[1,\"justifi-gross-payment-chart\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getGrossPayment\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"subaccount-bank-details.cjs\",[[1,\"subaccount-bank-details\",{\"data\":[16]}]]],[\"subaccount-terms-details.cjs\",[[1,\"subaccount-terms-details\",{\"data\":[16]}]]],[\"justifi-checkout-core.cjs\",[[1,\"justifi-checkout-core\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"getCheckout\":[16],\"complete\":[16],\"checkoutId\":[1,\"checkout-id\"],\"hasLoadedFonts\":[32],\"isLoading\":[32],\"checkout\":[32],\"serverError\":[32],\"errorMessage\":[32],\"creatingNewPaymentMethod\":[32],\"selectedPaymentMethodToken\":[32],\"loadFontsOnParent\":[64]}]]],[\"business-details-core.cjs\",[[0,\"business-details-core\",{\"getBusiness\":[16],\"business\":[32],\"renderState\":[32],\"errorMessage\":[32]}]]],[\"payments-list-core.cjs\",[[0,\"payments-list-core\",{\"getPayments\":[16],\"payments\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayments\":[\"updateOnPropChange\"]}]]],[\"payouts-list-core.cjs\",[[0,\"payouts-list-core\",{\"getPayouts\":[16],\"payouts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayouts\":[\"updateOnPropChange\"]}]]],[\"payment-details-core.cjs\",[[0,\"payment-details-core\",{\"getPaymentDetails\":[16],\"payment\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPaymentDetails\":[\"updateOnPropChange\"]}]]],[\"payout-details-core.cjs\",[[0,\"payout-details-core\",{\"getPayout\":[16],\"payout\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPayout\":[\"getPayoutWatcher\"]}]]],[\"form-control-datepart.cjs\",[[1,\"form-control-datepart\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"type\":[1],\"inputHandler\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"gross-payment-chart-core.cjs\",[[0,\"gross-payment-chart-core\",{\"getGrossPayment\":[16],\"grossVolumeReport\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getGrossPayment\":[\"propChanged\"],\"grossVolumeReport\":[\"grossVolumeReportChanged\"]}]]],[\"justifi-payment-method-selector.cjs\",[[1,\"justifi-payment-method-selector\",{\"selectedPaymentMethodType\":[1,\"selected-payment-method-type\"]}]]],[\"form-control-select_2.cjs\",[[1,\"form-control-select\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"options\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-text\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"keyDownHandler\":[16],\"maxLength\":[2,\"max-length\"],\"disabled\":[4],\"inputHandler\":[16],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-owner-form.cjs\",[[1,\"justifi-owner-form\",{\"authToken\":[1,\"auth-token\"],\"ownerId\":[1,\"owner-id\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"removeOwner\":[16],\"newFormOpen\":[4,\"new-form-open\"],\"ownersLength\":[2,\"owners-length\"],\"isLoading\":[32],\"formController\":[32],\"errors\":[32],\"owner\":[32],\"validate\":[64],\"submit\":[64]},null,{\"isLoading\":[\"loadingWatcher\"]}]]],[\"justifi-additional-questions_4.cjs\",[[0,\"justifi-business-representative\",{\"formController\":[16],\"errors\":[32],\"representative\":[32]}],[0,\"justifi-business-core-info\",{\"formController\":[16],\"errors\":[32],\"coreInfo\":[32]}],[0,\"justifi-legal-address-form\",{\"formController\":[16],\"errors\":[32],\"legal_address\":[32]}],[0,\"justifi-additional-questions\",{\"formController\":[16],\"errors\":[32],\"additional_questions\":[32]}]]],[\"subaccount-account-details_4.cjs\",[[1,\"subaccount-account-details\",{\"subaccount\":[16],\"onboardingData\":[16]}],[1,\"subaccount-merchant-details\",{\"onboardingData\":[16]}],[1,\"subaccount-owners-details\",{\"data\":[16]}],[1,\"subaccount-representative-details\",{\"data\":[16]}]]],[\"form-control-monetary.cjs\",[[1,\"form-control-monetary\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"form-control-date_4.cjs\",[[1,\"justifi-identity-address-form\",{\"handleFormUpdate\":[16],\"errors\":[8],\"defaultValues\":[8,\"default-values\"],\"address\":[32]},null,{\"address\":[\"handleAddressChange\"]}],[1,\"form-control-date\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[8,\"input-handler\"],\"disabled\":[4],\"date\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"disabled\":[4],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number-masked\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"mask\":[1],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-additional-questions-form-step_5.cjs\",[[0,\"justifi-business-owners-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"owners\":[32],\"newFormOpen\":[32],\"refs\":[32],\"validateAndSubmit\":[64]},null,{\"owners\":[\"onOwnersUpdated\"]}],[0,\"justifi-business-representative-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"representative\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-business-core-info-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"coreInfo\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-legal-address-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"legal_address\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-additional-questions-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"additional_questions\":[32],\"validateAndSubmit\":[64]}]]],[\"justifi-details.cjs\",[[1,\"justifi-details\",{\"errorMessage\":[1,\"error-message\"]}]]],[\"additional-questions-details_5.cjs\",[[1,\"additional-questions-details\",{\"additionalQuestions\":[16]}],[1,\"generic-info-details\",{\"business\":[16]}],[1,\"legal-address-details\",{\"legalAddress\":[16]}],[1,\"owner-details\",{\"owners\":[16]}],[1,\"representative-details\",{\"representative\":[16]}]]],[\"justifi-table_2.cjs\",[[1,\"justifi-table\",{\"loading\":[4],\"errorMessage\":[1,\"error-message\"],\"rowData\":[16],\"columnData\":[16],\"paging\":[16],\"params\":[8],\"entityId\":[16],\"rowClickHandler\":[16]}],[1,\"pagination-menu\",{\"paging\":[16],\"params\":[16]}]]],[\"justifi-billing-form_4.cjs\",[[1,\"justifi-billing-form\",{\"legend\":[1025],\"billingFields\":[32],\"billingFieldsErrors\":[32],\"fill\":[64],\"validate\":[64],\"getValues\":[64]},[[0,\"fieldReceivedInput\",\"setFormValue\"]]],[1,\"select-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"options\":[16],\"internalValue\":[32]}],[1,\"text-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"internalValue\":[32]}],[0,\"justifi-payment-method-form\",{\"paymentMethodFormType\":[1,\"payment-method-form-type\"],\"paymentMethodFormValidationMode\":[1025,\"payment-method-form-validation-mode\"],\"iframeOrigin\":[1,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"resize\":[64],\"tokenize\":[64],\"validate\":[64]}]]],[\"justifi-new-payment-method_4.cjs\",[[0,\"justifi-payment-method-options\",{\"showCard\":[4,\"show-card\"],\"showAch\":[4,\"show-ach\"],\"bnpl\":[16],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"savedPaymentMethods\":[16],\"selectedPaymentMethodId\":[1,\"selected-payment-method-id\"],\"paymentAmount\":[1,\"payment-amount\"],\"paymentMethodOptions\":[32],\"resolvePaymentMethod\":[64]},[[0,\"paymentMethodOptionSelected\",\"paymentMethodOptionSelected\"]],{\"savedPaymentMethods\":[\"paymentMethodsChanged\"]}],[0,\"justifi-new-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"resolvePaymentMethod\":[64]}],[0,\"justifi-saved-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"resolvePaymentMethod\":[64]}],[0,\"justifi-sezzel-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"bnpl\":[8],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"paymentAmount\":[1,\"payment-amount\"],\"installmentPlan\":[32],\"sezzleCheckout\":[32],\"sezzlePromise\":[32],\"resolvePaymentMethod\":[64]}]]]]"), options);
|
|
20
|
+
return index.bootstrapLazy(JSON.parse("[[\"justifi-payment-provisioning.cjs\",[[0,\"justifi-payment-provisioning\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"testMode\":[4,\"test-mode\"],\"hideErrors\":[4,\"hide-errors\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formTitle\":[1,\"form-title\"],\"removeTitle\":[4,\"remove-title\"],\"formLoading\":[32],\"errorMessage\":[32],\"currentStep\":[32],\"totalSteps\":[32]}]]],[\"justifi-business-form.cjs\",[[0,\"justifi-business-form\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"hideErrors\":[4,\"hide-errors\"],\"formTitle\":[1,\"form-title\"],\"removeTitle\":[4,\"remove-title\"],\"isLoading\":[32],\"errorMessage\":[32]}]]],[\"justifi-checkout.cjs\",[[1,\"justifi-checkout\",{\"iframeOrigin\":[1,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"checkoutId\":[1,\"checkout-id\"],\"getCheckout\":[32],\"complete\":[32],\"errorMessage\":[32]},null,{\"authToken\":[\"propChanged\"],\"checkoutId\":[\"propChanged\"]}]]],[\"justifi-business-details.cjs\",[[1,\"justifi-business-details\",{\"businessId\":[1,\"business-id\"],\"authToken\":[1,\"auth-token\"],\"errorMessage\":[32],\"getBusiness\":[32]}]]],[\"justifi-payment-form.cjs\",[[1,\"justifi-payment-form\",{\"bankAccount\":[4,\"bank-account\"],\"card\":[4],\"email\":[1],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"submitButtonText\":[1,\"submit-button-text\"],\"submitButtonEnabled\":[32],\"isLoading\":[32],\"selectedPaymentMethodType\":[32],\"fillBillingForm\":[64],\"enableSubmitButton\":[64],\"disableSubmitButton\":[64]}]]],[\"justifi-subaccount-details.cjs\",[[1,\"justifi-subaccount-details\",{\"accountId\":[1,\"account-id\"],\"subaccountId\":[1,\"subaccount-id\"],\"authToken\":[1,\"auth-token\"],\"onboardingData\":[32],\"subaccount\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"subaccountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"]}]]],[\"justifi-business-owners.cjs\",[[0,\"justifi-business-owners\",{\"formController\":[16],\"errors\":[32],\"owners\":[32]}]]],[\"justifi-payments-list.cjs\",[[1,\"justifi-payments-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayments\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payouts-list.cjs\",[[1,\"justifi-payouts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayouts\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-business-list.cjs\",[[1,\"justifi-business-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"businesses\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-balance-transactions.cjs\",[[1,\"justifi-payment-balance-transactions\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"balanceTransactions\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-details.cjs\",[[1,\"justifi-payment-details\",{\"paymentId\":[1,\"payment-id\"],\"authToken\":[1,\"auth-token\"],\"getPaymentDetails\":[32],\"errorMessage\":[32]},null,{\"paymentId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payout-details.cjs\",[[1,\"justifi-payout-details\",{\"payoutId\":[1,\"payout-id\"],\"authToken\":[1,\"auth-token\"],\"getPayout\":[32],\"errorMessage\":[32]},null,{\"payoutId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-proceeds-list.cjs\",[[1,\"justifi-proceeds-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"proceeds\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-refund-form.cjs\",[[1,\"justifi-refund-form\",{\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"amount\":[2],\"submitButtonText\":[1,\"submit-button-text\"],\"withButton\":[4,\"with-button\"],\"refundInfoText\":[1,\"refund-info-text\"],\"errors\":[32],\"isSubmitting\":[32]}]]],[\"justifi-subaccounts-list.cjs\",[[1,\"justifi-subaccounts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"subaccounts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-bank-account-form.cjs\",[[0,\"justifi-bank-account-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-card-form.cjs\",[[0,\"justifi-card-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-gross-payment-chart.cjs\",[[1,\"justifi-gross-payment-chart\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getGrossPayment\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"subaccount-bank-details.cjs\",[[1,\"subaccount-bank-details\",{\"data\":[16]}]]],[\"subaccount-terms-details.cjs\",[[1,\"subaccount-terms-details\",{\"data\":[16]}]]],[\"justifi-checkout-core.cjs\",[[1,\"justifi-checkout-core\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"getCheckout\":[16],\"complete\":[16],\"checkoutId\":[1,\"checkout-id\"],\"hasLoadedFonts\":[32],\"isLoading\":[32],\"checkout\":[32],\"serverError\":[32],\"errorMessage\":[32],\"creatingNewPaymentMethod\":[32],\"selectedPaymentMethodToken\":[32],\"loadFontsOnParent\":[64]}]]],[\"business-details-core.cjs\",[[0,\"business-details-core\",{\"getBusiness\":[16],\"business\":[32],\"renderState\":[32],\"errorMessage\":[32]}]]],[\"payments-list-core.cjs\",[[0,\"payments-list-core\",{\"getPayments\":[16],\"payments\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayments\":[\"updateOnPropChange\"]}]]],[\"payouts-list-core.cjs\",[[0,\"payouts-list-core\",{\"getPayouts\":[16],\"payouts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayouts\":[\"updateOnPropChange\"]}]]],[\"payment-details-core.cjs\",[[0,\"payment-details-core\",{\"getPaymentDetails\":[16],\"payment\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPaymentDetails\":[\"updateOnPropChange\"]}]]],[\"payout-details-core.cjs\",[[0,\"payout-details-core\",{\"getPayout\":[16],\"payout\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPayout\":[\"getPayoutWatcher\"]}]]],[\"gross-payment-chart-core.cjs\",[[0,\"gross-payment-chart-core\",{\"getGrossPayment\":[16],\"grossVolumeReport\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getGrossPayment\":[\"propChanged\"],\"grossVolumeReport\":[\"grossVolumeReportChanged\"]}]]],[\"justifi-payment-method-selector.cjs\",[[1,\"justifi-payment-method-selector\",{\"selectedPaymentMethodType\":[1,\"selected-payment-method-type\"]}]]],[\"form-control-date_3.cjs\",[[1,\"justifi-identity-address-form\",{\"handleFormUpdate\":[16],\"errors\":[8],\"defaultValues\":[8,\"default-values\"],\"address\":[32]},null,{\"address\":[\"handleAddressChange\"]}],[1,\"form-control-date\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[8,\"input-handler\"],\"disabled\":[4],\"date\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number-masked\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"mask\":[1],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-owner-form.cjs\",[[1,\"justifi-owner-form\",{\"authToken\":[1,\"auth-token\"],\"ownerId\":[1,\"owner-id\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"removeOwner\":[16],\"newFormOpen\":[4,\"new-form-open\"],\"ownersLength\":[2,\"owners-length\"],\"isLoading\":[32],\"formController\":[32],\"errors\":[32],\"owner\":[32],\"validate\":[64],\"submit\":[64]},null,{\"isLoading\":[\"loadingWatcher\"]}]]],[\"form-control-datepart_2.cjs\",[[1,\"form-control-datepart\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"type\":[1],\"inputHandler\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"disabled\":[4],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-additional-questions_4.cjs\",[[0,\"justifi-business-representative\",{\"formController\":[16],\"errors\":[32],\"representative\":[32]}],[0,\"justifi-business-core-info\",{\"formController\":[16],\"errors\":[32],\"coreInfo\":[32]}],[0,\"justifi-legal-address-form\",{\"formController\":[16],\"errors\":[32],\"legal_address\":[32]}],[0,\"justifi-additional-questions\",{\"formController\":[16],\"errors\":[32],\"additional_questions\":[32]}]]],[\"subaccount-account-details_4.cjs\",[[1,\"subaccount-account-details\",{\"subaccount\":[16],\"onboardingData\":[16]}],[1,\"subaccount-merchant-details\",{\"onboardingData\":[16]}],[1,\"subaccount-owners-details\",{\"data\":[16]}],[1,\"subaccount-representative-details\",{\"data\":[16]}]]],[\"form-control-monetary.cjs\",[[1,\"form-control-monetary\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-additional-questions-form-step_5.cjs\",[[0,\"justifi-business-owners-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"owners\":[32],\"newFormOpen\":[32],\"refs\":[32],\"validateAndSubmit\":[64]},null,{\"owners\":[\"onOwnersUpdated\"]}],[0,\"justifi-business-representative-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"representative\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-business-core-info-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"coreInfo\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-legal-address-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"legal_address\":[32],\"validateAndSubmit\":[64]}],[0,\"justifi-additional-questions-form-step\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"allowOptionalFields\":[4,\"allow-optional-fields\"],\"formController\":[32],\"errors\":[32],\"additional_questions\":[32],\"validateAndSubmit\":[64]}]]],[\"justifi-details.cjs\",[[1,\"justifi-details\",{\"errorMessage\":[1,\"error-message\"]}]]],[\"additional-questions-details_5.cjs\",[[1,\"additional-questions-details\",{\"additionalQuestions\":[16]}],[1,\"generic-info-details\",{\"business\":[16]}],[1,\"legal-address-details\",{\"legalAddress\":[16]}],[1,\"owner-details\",{\"owners\":[16]}],[1,\"representative-details\",{\"representative\":[16]}]]],[\"justifi-table_2.cjs\",[[1,\"justifi-table\",{\"loading\":[4],\"errorMessage\":[1,\"error-message\"],\"rowData\":[16],\"columnData\":[16],\"paging\":[16],\"params\":[8],\"entityId\":[16],\"rowClickHandler\":[16]}],[1,\"pagination-menu\",{\"paging\":[16],\"params\":[16]}]]],[\"justifi-billing-form_4.cjs\",[[1,\"justifi-billing-form\",{\"legend\":[1025],\"billingFields\":[32],\"billingFieldsErrors\":[32],\"fill\":[64],\"validate\":[64],\"getValues\":[64]},[[0,\"fieldReceivedInput\",\"setFormValue\"]]],[1,\"select-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"options\":[16],\"internalValue\":[32]}],[1,\"text-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"internalValue\":[32]}],[0,\"justifi-payment-method-form\",{\"paymentMethodFormType\":[1,\"payment-method-form-type\"],\"paymentMethodFormValidationMode\":[1025,\"payment-method-form-validation-mode\"],\"iframeOrigin\":[1,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"resize\":[64],\"tokenize\":[64],\"validate\":[64]}]]],[\"justifi-new-payment-method_4.cjs\",[[0,\"justifi-payment-method-options\",{\"showCard\":[4,\"show-card\"],\"showAch\":[4,\"show-ach\"],\"bnpl\":[16],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"savedPaymentMethods\":[16],\"selectedPaymentMethodId\":[1,\"selected-payment-method-id\"],\"paymentAmount\":[1,\"payment-amount\"],\"paymentMethodOptions\":[32],\"resolvePaymentMethod\":[64]},[[0,\"paymentMethodOptionSelected\",\"paymentMethodOptionSelected\"]],{\"savedPaymentMethods\":[\"paymentMethodsChanged\"]}],[0,\"justifi-new-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"resolvePaymentMethod\":[64]}],[0,\"justifi-saved-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"resolvePaymentMethod\":[64]}],[0,\"justifi-sezzel-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"bnpl\":[8],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"paymentAmount\":[1,\"payment-amount\"],\"installmentPlan\":[32],\"sezzleCheckout\":[32],\"sezzlePromise\":[32],\"resolvePaymentMethod\":[64]}]]],[\"form-control-select_2.cjs\",[[1,\"form-control-select\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"options\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-text\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"keyDownHandler\":[16],\"maxLength\":[2,\"max-length\"],\"disabled\":[4],\"inputHandler\":[16],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -7,6 +7,22 @@ export var BusinessType;
|
|
|
7
7
|
BusinessType["non_profit"] = "non_profit";
|
|
8
8
|
BusinessType["government_entity"] = "government_entity";
|
|
9
9
|
})(BusinessType || (BusinessType = {}));
|
|
10
|
+
export var BusinessStructure;
|
|
11
|
+
(function (BusinessStructure) {
|
|
12
|
+
BusinessStructure["sole_proprietorship"] = "sole_proprietorship";
|
|
13
|
+
BusinessStructure["single_llc"] = "single_llc";
|
|
14
|
+
BusinessStructure["multi_llc"] = "multi_llc";
|
|
15
|
+
BusinessStructure["private_partnership"] = "private_partnership";
|
|
16
|
+
BusinessStructure["private_corporation"] = "private_corporation";
|
|
17
|
+
BusinessStructure["unincorporated_association"] = "unincorporated_association";
|
|
18
|
+
BusinessStructure["public_partnership"] = "public_partnership";
|
|
19
|
+
BusinessStructure["public_corporation"] = "public_corporation";
|
|
20
|
+
BusinessStructure["incorporated"] = "incorporated";
|
|
21
|
+
BusinessStructure["unincorporated"] = "unincorporated";
|
|
22
|
+
BusinessStructure["government_unit"] = "government_unit";
|
|
23
|
+
BusinessStructure["government_instrumentality"] = "government_instrumentality";
|
|
24
|
+
BusinessStructure["tax_exempt_government_instrumentality"] = "tax_exempt_government_instrumentality";
|
|
25
|
+
})(BusinessStructure || (BusinessStructure = {}));
|
|
10
26
|
export class Address {
|
|
11
27
|
constructor(address) {
|
|
12
28
|
this.id = address.id;
|
|
@@ -32,6 +48,7 @@ export class AdditionalQuestions {
|
|
|
32
48
|
export class CoreBusinessInfo {
|
|
33
49
|
constructor(coreBusinessInfo) {
|
|
34
50
|
this.business_type = coreBusinessInfo.business_type;
|
|
51
|
+
this.business_structure = coreBusinessInfo.business_structure;
|
|
35
52
|
this.legal_name = coreBusinessInfo.legal_name;
|
|
36
53
|
this.doing_business_as = coreBusinessInfo.doing_business_as;
|
|
37
54
|
this.industry = coreBusinessInfo.industry;
|
|
@@ -46,6 +63,7 @@ export class Business {
|
|
|
46
63
|
this.additional_questions = business.additional_questions || {};
|
|
47
64
|
this.bank_accounts = business.bank_accounts;
|
|
48
65
|
this.business_type = business.business_type;
|
|
66
|
+
this.business_structure = business.business_structure;
|
|
49
67
|
this.created_at = business.created_at;
|
|
50
68
|
this.documents = business.documents;
|
|
51
69
|
this.doing_business_as = business.doing_business_as;
|
|
@@ -17,6 +17,7 @@ export class Owner {
|
|
|
17
17
|
this.name = owner.name;
|
|
18
18
|
this.phone = owner.phone;
|
|
19
19
|
this.platform_account_id = owner.platform_account_id;
|
|
20
|
+
this.identification_number = owner.identification_number;
|
|
20
21
|
this.ssn_last4 = owner.ssn_last4;
|
|
21
22
|
this.title = owner.title;
|
|
22
23
|
this.updated_at = owner.updated_at;
|
|
@@ -39,6 +40,7 @@ export class Representative {
|
|
|
39
40
|
this.name = representative.name;
|
|
40
41
|
this.phone = representative.phone;
|
|
41
42
|
this.platform_account_id = representative.platform_account_id;
|
|
43
|
+
this.identification_number = representative.identification_number;
|
|
42
44
|
this.ssn_last4 = representative.ssn_last4;
|
|
43
45
|
this.title = representative.title;
|
|
44
46
|
this.updated_at = representative.updated_at;
|
package/dist/collection/components/business-details/generic-info-details/generic-info-details.js
CHANGED
|
@@ -6,10 +6,10 @@ export class GenericInfoDetails {
|
|
|
6
6
|
this.business = undefined;
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
10
10
|
if (!this.business)
|
|
11
11
|
return null;
|
|
12
|
-
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: "
|
|
12
|
+
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 }))))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "generic-info-details"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { BusinessTypeOptions } from "../../utils/business-form-types";
|
|
2
|
+
import { BusinessStructureOptions, BusinessTypeOptions } from "../../utils/business-form-types";
|
|
3
3
|
import { PHONE_MASKS, TAX_ID_MASKS } from "../../../../utils/form-input-masks";
|
|
4
4
|
import { CoreBusinessInfo } from "../../../../api/Business";
|
|
5
5
|
/**
|
|
@@ -30,7 +30,7 @@ export class BusinessCoreInfo {
|
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
const coreInfoDefaultValue = this.formController.getInitialValues();
|
|
33
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, h("legend", null, "General Info"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, error: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, error: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_type", label: "Business Type", options: BusinessTypeOptions, defaultValue: coreInfoDefaultValue.business_type, error: this.errors.business_type, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, error: this.errors.industry, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-number-masked", { name: "tax_id", label: "Tax ID", defaultValue: coreInfoDefaultValue.tax_id, error: this.errors.tax_id, inputHandler: this.inputHandler, mask: TAX_ID_MASKS.US })), h("div", { class: "col-12" }, h("form-control-text", { name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, error: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: coreInfoDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
|
|
33
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, h("legend", null, "General Info"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, error: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, error: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_type", label: "Business Type", options: BusinessTypeOptions, defaultValue: coreInfoDefaultValue.business_type, error: this.errors.business_type, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_structure", label: "Business Structure", options: BusinessStructureOptions, defaultValue: coreInfoDefaultValue.business_structure, error: this.errors.business_structure, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, error: this.errors.industry, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "tax_id", label: "Tax ID", defaultValue: coreInfoDefaultValue.tax_id, error: this.errors.tax_id, inputHandler: this.inputHandler, mask: TAX_ID_MASKS.US })), h("div", { class: "col-12" }, h("form-control-text", { name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, error: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: coreInfoDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "justifi-business-core-info"; }
|
|
36
36
|
static get originalStyleUrls() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { PHONE_MASKS } from "../../../../utils/form-input-masks";
|
|
2
|
+
import { PHONE_MASKS, SSN_MASK } from "../../../../utils/form-input-masks";
|
|
3
3
|
import { deconstructDate } from "../../utils/helpers";
|
|
4
4
|
export class BusinessRepresentative {
|
|
5
5
|
constructor() {
|
|
@@ -23,7 +23,7 @@ export class BusinessRepresentative {
|
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
25
|
const representativeDefaultValue = this.formController.getInitialValues().representative;
|
|
26
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, h("legend", null, "Representative"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-8" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number", { name: "identification_number", label: "SSN", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate }))))));
|
|
26
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, h("legend", null, "Representative"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-8" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number-masked", { name: "identification_number", label: "SSN", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate }))))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "justifi-business-representative"; }
|
|
29
29
|
static get originalStyleUrls() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { FormController } from "../../form/form";
|
|
3
|
-
import { PHONE_MASKS } from "../../../utils/form-input-masks";
|
|
3
|
+
import { PHONE_MASKS, SSN_MASK } from "../../../utils/form-input-masks";
|
|
4
4
|
import { Api } from "../../../api";
|
|
5
5
|
import { Owner } from "../../../api/Identity";
|
|
6
6
|
import { parseIdentityInfo } from "../utils/payload-parsers";
|
|
@@ -157,7 +157,7 @@ export class BusinessOwnerForm {
|
|
|
157
157
|
}
|
|
158
158
|
render() {
|
|
159
159
|
const ownerDefaultValue = this.formController.getInitialValues();
|
|
160
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", { onSubmit: this.validateAndSubmit }, h("fieldset", null, h("legend", null, this.formTitle), h("div", { class: 'row gy-3' }, h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number", { name: "identification_number", label: "SSN", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate })), h("div", { class: "container d-flex gap-2" }, h("button", { type: "submit", class: `btn btn-primary jfi-submit-button${this.isLoading ? ' jfi-submit-button-loading' : ''}`, onClick: () => this.handleAddOwner(), disabled: this.isLoading }, this.isLoading ? LoadingSpinner() : this.submitButtonText), this.showRemoveButton &&
|
|
160
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", { onSubmit: this.validateAndSubmit }, h("fieldset", null, h("legend", null, this.formTitle), h("div", { class: 'row gy-3' }, h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number-masked", { name: "identification_number", label: "SSN", defaultValue: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: ownerDefaultValue === null || ownerDefaultValue === void 0 ? void 0 : ownerDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate })), h("div", { class: "container d-flex gap-2" }, h("button", { type: "submit", class: `btn btn-primary jfi-submit-button${this.isLoading ? ' jfi-submit-button-loading' : ''}`, onClick: () => this.handleAddOwner(), disabled: this.isLoading }, this.isLoading ? LoadingSpinner() : this.submitButtonText), this.showRemoveButton &&
|
|
161
161
|
h("button", { type: "button", class: "btn btn-danger", onClick: () => this.handleRemoveOwner() }, "Remove owner"))), h("hr", null)))));
|
|
162
162
|
}
|
|
163
163
|
static get is() { return "justifi-owner-form"; }
|
|
@@ -7,7 +7,7 @@ import { businessCoreInfoSchema } from "../../schemas/business-core-info-schema"
|
|
|
7
7
|
import { config } from "../../../../../config";
|
|
8
8
|
import { parseCoreInfo } from "../../utils/payload-parsers";
|
|
9
9
|
import { flattenNestedObject } from "../../../../utils/utils";
|
|
10
|
-
import { BusinessFormServerErrors, BusinessTypeOptions } from "../../utils/business-form-types";
|
|
10
|
+
import { BusinessFormServerErrors, BusinessStructureOptions, BusinessTypeOptions } from "../../utils/business-form-types";
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
* The difference between this component and business-generic-info-details
|
|
@@ -93,7 +93,7 @@ export class BusinessCoreInfoFormStep {
|
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
95
|
const coreInfoDefaultValue = this.formController.getInitialValues();
|
|
96
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", null, h("fieldset", null, h("legend", null, "General Info"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, error: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, error: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_type", label: "Business Type", options: BusinessTypeOptions, defaultValue: coreInfoDefaultValue.business_type, error: this.errors.business_type, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, error: this.errors.industry, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-number-masked", { name: "tax_id", label: "Tax ID", defaultValue: coreInfoDefaultValue.tax_id, error: this.errors.tax_id, inputHandler: this.inputHandler, mask: TAX_ID_MASKS.US })), h("div", { class: "col-12" }, h("form-control-text", { name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, error: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: coreInfoDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })))))));
|
|
96
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", null, h("fieldset", null, h("legend", null, "General Info"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, error: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, error: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_type", label: "Business Type", options: BusinessTypeOptions, defaultValue: coreInfoDefaultValue.business_type, error: this.errors.business_type, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "business_structure", label: "Business Structure", options: BusinessStructureOptions, defaultValue: coreInfoDefaultValue.business_structure, error: this.errors.business_structure, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, error: this.errors.industry, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "tax_id", label: "Tax ID", defaultValue: coreInfoDefaultValue.tax_id, error: this.errors.tax_id, inputHandler: this.inputHandler, mask: TAX_ID_MASKS.US })), h("div", { class: "col-12" }, h("form-control-text", { name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, error: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: coreInfoDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })))))));
|
|
97
97
|
}
|
|
98
98
|
static get is() { return "justifi-business-core-info-form-step"; }
|
|
99
99
|
static get originalStyleUrls() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { FormController } from "../../../form/form";
|
|
3
|
-
import { PHONE_MASKS } from "../../../../utils/form-input-masks";
|
|
3
|
+
import { PHONE_MASKS, SSN_MASK } from "../../../../utils/form-input-masks";
|
|
4
4
|
import Api from "../../../../api/Api";
|
|
5
5
|
import { parseIdentityInfo } from "../../utils/payload-parsers";
|
|
6
6
|
import { identitySchema } from "../../schemas/business-identity-schema";
|
|
@@ -93,7 +93,7 @@ export class BusinessRepresentativeFormStep {
|
|
|
93
93
|
}
|
|
94
94
|
render() {
|
|
95
95
|
const representativeDefaultValue = this.formController.getInitialValues();
|
|
96
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", null, h("fieldset", null, h("legend", null, "Representative"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-8" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number", { name: "identification_number", label: "SSN", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate })))))));
|
|
96
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("form", null, h("fieldset", null, h("legend", null, "Representative"), h("hr", null), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-8" }, h("form-control-text", { name: "name", label: "Full Name", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.name, error: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "title", label: "Title", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.title, error: this.errors.title, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "email", label: "Email Address", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.email, error: this.errors.email, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-number-masked", { name: "phone", label: "Phone Number", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.phone, error: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "dob_full", label: "Birth Date", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.dob_full, error: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: this.onDateOfBirthUpdate })), h("div", { class: "col-12 col-md-8" }, h("form-control-number-masked", { name: "identification_number", label: "SSN", defaultValue: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.identification_number, error: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { class: "col-12" }, h("justifi-identity-address-form", { errors: this.errors.address, defaultValues: representativeDefaultValue === null || representativeDefaultValue === void 0 ? void 0 : representativeDefaultValue.address, handleFormUpdate: this.onAddressFormUpdate })))))));
|
|
97
97
|
}
|
|
98
98
|
static get is() { return "justifi-business-representative-form-step"; }
|
|
99
99
|
static get originalStyleUrls() {
|
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
import { object, string } from "yup";
|
|
2
|
-
import
|
|
3
|
-
import { transformEmptyString } from "./schema-helpers";
|
|
4
|
-
const lineOneValidation = string()
|
|
5
|
-
.min(5, 'Address must be at least 5 characters')
|
|
6
|
-
.max(100, 'Address must be less than 100 characters')
|
|
7
|
-
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 1')
|
|
8
|
-
.transform(transformEmptyString);
|
|
9
|
-
const lineTwoValidation = string()
|
|
10
|
-
.max(100, 'Address must be less than 100 characters')
|
|
11
|
-
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 2')
|
|
12
|
-
.transform(transformEmptyString);
|
|
13
|
-
const cityValidation = string()
|
|
14
|
-
.min(2, 'City must be at least 2 characters')
|
|
15
|
-
.max(50, 'City must be less than 50 characters')
|
|
16
|
-
.matches(/^(?!^\s+$)[a-zA-Z\s]*$/, 'Enter valid city')
|
|
17
|
-
.transform(transformEmptyString);
|
|
18
|
-
const stateValidation = string()
|
|
19
|
-
.oneOf(StateOptions.map((option) => option.value), 'Select state')
|
|
20
|
-
.transform(transformEmptyString);
|
|
21
|
-
const postalValidation = string()
|
|
22
|
-
.matches(/^[0-9]{5}$/, 'Enter valid postal code')
|
|
23
|
-
.transform(transformEmptyString);
|
|
2
|
+
import { cityValidation, lineOneValidation, lineTwoValidation, postalValidation, stateValidation } from "./schema-validations";
|
|
24
3
|
export const addressSchema = (allowOptionalFields) => {
|
|
25
4
|
const schema = object({
|
|
26
5
|
line1: lineOneValidation.required('Enter street address'),
|
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
import { object
|
|
2
|
-
import {
|
|
3
|
-
import { businessNameRegex, phoneRegex, stringLettersOnlyRegex, taxIdRegex, transformEmptyString, urlRegex } from "./schema-helpers";
|
|
4
|
-
const nameValidation = string()
|
|
5
|
-
.min(2, 'Name must be at least 2 characters')
|
|
6
|
-
.max(100, 'Name must be less than 100 characters')
|
|
7
|
-
.matches(businessNameRegex, 'Enter valid business name')
|
|
8
|
-
.transform(transformEmptyString);
|
|
9
|
-
const doingBusinessAsValidation = string()
|
|
10
|
-
.min(2, 'Name must be at least 2 characters')
|
|
11
|
-
.max(100, 'Name must be less than 100 characters')
|
|
12
|
-
.matches(businessNameRegex, 'Enter valid doing business as')
|
|
13
|
-
.transform(transformEmptyString);
|
|
14
|
-
const websiteUrlValidation = string()
|
|
15
|
-
.matches(urlRegex, 'Enter valid website url')
|
|
16
|
-
.transform(transformEmptyString);
|
|
17
|
-
const emailValidation = string()
|
|
18
|
-
.email('Enter valid email')
|
|
19
|
-
.transform(transformEmptyString);
|
|
20
|
-
const phoneValidation = string()
|
|
21
|
-
.matches(phoneRegex, 'Enter valid phone number')
|
|
22
|
-
.transform(transformEmptyString);
|
|
23
|
-
const businessTypeValidation = string()
|
|
24
|
-
.oneOf(BusinessTypeOptions.map((option) => option.value), 'Select business type')
|
|
25
|
-
.transform(transformEmptyString);
|
|
26
|
-
const industryValidation = string()
|
|
27
|
-
.min(2, 'Industry must be at least 2 characters')
|
|
28
|
-
.max(50, 'Industry must be less than 50 characters')
|
|
29
|
-
.matches(stringLettersOnlyRegex, 'Enter valid industry')
|
|
30
|
-
.transform(transformEmptyString);
|
|
31
|
-
const taxIdValidation = string()
|
|
32
|
-
.matches(taxIdRegex, 'Enter valid tax id')
|
|
33
|
-
.transform(transformEmptyString);
|
|
1
|
+
import { object } from "yup";
|
|
2
|
+
import { businessTypeValidation, doingBusinessAsValidation, emailValidation, industryValidation, businessNameValidation, phoneValidation, taxIdValidation, websiteUrlValidation, businessStructureValidation } from "./schema-validations";
|
|
34
3
|
export const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
35
4
|
const schema = object({
|
|
36
|
-
legal_name:
|
|
5
|
+
legal_name: businessNameValidation.required('Enter legal name'),
|
|
37
6
|
website_url: websiteUrlValidation.required('Enter business website url'),
|
|
38
7
|
email: emailValidation.required('Enter business email'),
|
|
39
8
|
phone: phoneValidation.required('Enter phone number'),
|
|
40
9
|
doing_business_as: doingBusinessAsValidation.required('Enter doing business as'),
|
|
41
10
|
business_type: businessTypeValidation.required('Select business type'),
|
|
11
|
+
business_structure: businessStructureValidation.required('Select business structure'),
|
|
42
12
|
industry: industryValidation.required('Enter a business industry'),
|
|
43
13
|
tax_id: taxIdValidation.required('Enter tax id'),
|
|
44
14
|
});
|
|
45
15
|
const easySchema = object({
|
|
46
|
-
legal_name:
|
|
16
|
+
legal_name: businessNameValidation.required('Enter legal name'),
|
|
47
17
|
website_url: websiteUrlValidation.nullable(),
|
|
48
18
|
email: emailValidation.nullable(),
|
|
49
19
|
phone: phoneValidation.nullable(),
|
|
50
20
|
doing_business_as: doingBusinessAsValidation.nullable(),
|
|
51
21
|
business_type: businessTypeValidation.nullable(),
|
|
22
|
+
business_structure: businessStructureValidation.nullable(),
|
|
52
23
|
industry: industryValidation.nullable(),
|
|
53
24
|
tax_id: taxIdValidation.nullable(),
|
|
54
25
|
});
|
|
@@ -1,40 +1,23 @@
|
|
|
1
|
-
import { object
|
|
1
|
+
import { object } from "yup";
|
|
2
2
|
import { addressSchema } from "./business-address-schema";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
return (string()
|
|
6
|
-
.test('min', 'Enter a valid date', (value) => {
|
|
7
|
-
const date = new Date(value);
|
|
8
|
-
const minDate = new Date('1902-01-01');
|
|
9
|
-
return date >= minDate;
|
|
10
|
-
})
|
|
11
|
-
.test('age', `${title} must be at least 18 years old`, (value) => {
|
|
12
|
-
const date = new Date(value);
|
|
13
|
-
const minAgeDate = new Date();
|
|
14
|
-
minAgeDate.setFullYear(minAgeDate.getFullYear() - 18);
|
|
15
|
-
return date <= minAgeDate;
|
|
16
|
-
})
|
|
17
|
-
.transform(transformEmptyString));
|
|
18
|
-
};
|
|
19
|
-
export const identitySchema = (title, allowOptionalFields) => {
|
|
3
|
+
import { dobValidation, emailValidation, identityNameValidation, identityTitleValidation, phoneValidation, ssnValidation } from "./schema-validations";
|
|
4
|
+
export const identitySchema = (role, allowOptionalFields) => {
|
|
20
5
|
const schema = object({
|
|
21
|
-
name:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
identification_number: string(),
|
|
6
|
+
name: identityNameValidation.required(`Enter ${role} name`),
|
|
7
|
+
title: identityTitleValidation.required(`Enter ${role} title`),
|
|
8
|
+
email: emailValidation.required(`Enter ${role} email`),
|
|
9
|
+
phone: phoneValidation.required('Enter phone number'),
|
|
10
|
+
dob_full: dobValidation(role).required('Enter date of birth'),
|
|
11
|
+
identification_number: ssnValidation.required('Enter SSN'),
|
|
28
12
|
address: addressSchema(allowOptionalFields),
|
|
29
13
|
});
|
|
30
14
|
const easySchema = object({
|
|
31
|
-
name:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
identification_number: string().nullable(),
|
|
15
|
+
name: identityNameValidation.required(`Enter ${role} name`),
|
|
16
|
+
title: identityTitleValidation.nullable(),
|
|
17
|
+
email: emailValidation.nullable(),
|
|
18
|
+
phone: phoneValidation.nullable(),
|
|
19
|
+
dob_full: dobValidation(role).nullable(),
|
|
20
|
+
identification_number: ssnValidation.nullable(),
|
|
38
21
|
address: addressSchema(allowOptionalFields),
|
|
39
22
|
});
|
|
40
23
|
return allowOptionalFields ? easySchema : schema;
|
|
@@ -6,3 +6,4 @@ export const phoneRegex = /^\d{10}$/;
|
|
|
6
6
|
export const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
|
|
7
7
|
export const taxIdRegex = /^\d{9}$/;
|
|
8
8
|
export const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
|
|
9
|
+
export const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { string } from "yup";
|
|
2
|
+
import { BusinessStructureOptions, BusinessTypeOptions } from "../utils/business-form-types";
|
|
3
|
+
import StateOptions from "../../../utils/state-options";
|
|
4
|
+
import { businessNameRegex, phoneRegex, ssnRegex, stringLettersOnlyRegex, taxIdRegex, transformEmptyString, urlRegex } from "./schema-helpers";
|
|
5
|
+
// Common Validations
|
|
6
|
+
export const emailValidation = string()
|
|
7
|
+
.email('Enter valid email')
|
|
8
|
+
.transform(transformEmptyString);
|
|
9
|
+
export const phoneValidation = string()
|
|
10
|
+
.matches(phoneRegex, 'Enter valid phone number')
|
|
11
|
+
.transform(transformEmptyString);
|
|
12
|
+
// Core Info Validations
|
|
13
|
+
export const businessNameValidation = string()
|
|
14
|
+
.min(2, 'Name must be at least 2 characters')
|
|
15
|
+
.max(100, 'Name must be less than 100 characters')
|
|
16
|
+
.matches(businessNameRegex, 'Enter valid business name')
|
|
17
|
+
.transform(transformEmptyString);
|
|
18
|
+
export const doingBusinessAsValidation = string()
|
|
19
|
+
.min(2, 'Name must be at least 2 characters')
|
|
20
|
+
.max(100, 'Name must be less than 100 characters')
|
|
21
|
+
.matches(businessNameRegex, 'Enter valid doing business as')
|
|
22
|
+
.transform(transformEmptyString);
|
|
23
|
+
export const websiteUrlValidation = string()
|
|
24
|
+
.matches(urlRegex, 'Enter valid website url')
|
|
25
|
+
.transform(transformEmptyString);
|
|
26
|
+
export const businessTypeValidation = string()
|
|
27
|
+
.oneOf(BusinessTypeOptions.map((option) => option.value), 'Select business type')
|
|
28
|
+
.transform(transformEmptyString);
|
|
29
|
+
export const businessStructureValidation = string()
|
|
30
|
+
.oneOf(BusinessStructureOptions.map((option) => option.value), 'Select business structure')
|
|
31
|
+
.transform(transformEmptyString);
|
|
32
|
+
export const industryValidation = string()
|
|
33
|
+
.min(2, 'Industry must be at least 2 characters')
|
|
34
|
+
.max(50, 'Industry must be less than 50 characters')
|
|
35
|
+
.matches(stringLettersOnlyRegex, 'Enter valid industry')
|
|
36
|
+
.transform(transformEmptyString);
|
|
37
|
+
export const taxIdValidation = string()
|
|
38
|
+
.matches(taxIdRegex, 'Enter valid tax id')
|
|
39
|
+
.transform(transformEmptyString);
|
|
40
|
+
// Identity Validations
|
|
41
|
+
export const identityNameValidation = string()
|
|
42
|
+
.min(2, 'Name must be at least 2 characters')
|
|
43
|
+
.max(100, 'Name must be less than 100 characters')
|
|
44
|
+
.matches(stringLettersOnlyRegex, 'Enter valid name')
|
|
45
|
+
.transform(transformEmptyString);
|
|
46
|
+
export const identityTitleValidation = string()
|
|
47
|
+
.min(2, 'Title must be at least 2 characters')
|
|
48
|
+
.max(50, 'Title must be less than 50 characters')
|
|
49
|
+
.matches(stringLettersOnlyRegex, 'Enter valid title')
|
|
50
|
+
.transform(transformEmptyString);
|
|
51
|
+
export const dobValidation = (role) => {
|
|
52
|
+
return (string()
|
|
53
|
+
.test('min', 'Enter a valid date', (value) => {
|
|
54
|
+
const date = new Date(value);
|
|
55
|
+
const minDate = new Date('1902-01-01');
|
|
56
|
+
return date >= minDate;
|
|
57
|
+
})
|
|
58
|
+
.test('age', `${role} must be at least 18 years old`, (value) => {
|
|
59
|
+
const date = new Date(value);
|
|
60
|
+
const minAgeDate = new Date();
|
|
61
|
+
minAgeDate.setFullYear(minAgeDate.getFullYear() - 18);
|
|
62
|
+
return date <= minAgeDate;
|
|
63
|
+
})
|
|
64
|
+
.transform(transformEmptyString));
|
|
65
|
+
};
|
|
66
|
+
export const ssnValidation = string()
|
|
67
|
+
.matches(ssnRegex, 'Enter valid SSN')
|
|
68
|
+
.test('not-repeat', 'Enter valid SSN', (value) => {
|
|
69
|
+
return !/^(\d)\1+$/.test(value);
|
|
70
|
+
})
|
|
71
|
+
.test('not-seq', 'Enter valid SSN', (value) => {
|
|
72
|
+
return value !== '123456789';
|
|
73
|
+
})
|
|
74
|
+
.transform(transformEmptyString);
|
|
75
|
+
// Address Validations
|
|
76
|
+
export const lineOneValidation = string()
|
|
77
|
+
.min(5, 'Address must be at least 5 characters')
|
|
78
|
+
.max(100, 'Address must be less than 100 characters')
|
|
79
|
+
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 1')
|
|
80
|
+
.transform(transformEmptyString);
|
|
81
|
+
export const lineTwoValidation = string()
|
|
82
|
+
.max(100, 'Address must be less than 100 characters')
|
|
83
|
+
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Enter valid address line 2')
|
|
84
|
+
.transform(transformEmptyString);
|
|
85
|
+
export const cityValidation = string()
|
|
86
|
+
.min(2, 'City must be at least 2 characters')
|
|
87
|
+
.max(50, 'City must be less than 50 characters')
|
|
88
|
+
.matches(/^(?!^\s+$)[a-zA-Z\s]*$/, 'Enter valid city')
|
|
89
|
+
.transform(transformEmptyString);
|
|
90
|
+
export const stateValidation = string()
|
|
91
|
+
.oneOf(StateOptions.map((option) => option.value), 'Select state')
|
|
92
|
+
.transform(transformEmptyString);
|
|
93
|
+
export const postalValidation = string()
|
|
94
|
+
.matches(/^[0-9]{5}$/, 'Enter valid postal code')
|
|
95
|
+
.transform(transformEmptyString);
|