@justifi/webcomponents 6.12.6 → 6.12.7-rc.1
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-CuYtRPw5.js → Analytics-GZGMuFW6.js} +2 -2
- package/dist/cjs/{Plaid-BRSyOOuw.js → Plaid-KasiL5mp.js} +14 -19
- package/dist/cjs/{additional-questions-form-step_14.cjs.entry.js → additional-questions-form-step_15.cjs.entry.js} +378 -169
- package/dist/cjs/additional-questions_5.cjs.entry.js +7 -7
- package/dist/cjs/additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +21 -0
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-form-options-D_nM7NDk.js → business-form-options-CnlrfbQ6.js} +51 -0
- package/dist/cjs/{business-identity-schema-DuFGX6_i.js → business-identity-schema-CC1wOwXd.js} +11 -7
- package/dist/cjs/{business.service-Z9OACEQL.js → business.service-BBovho58.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-CPWLIT6P.js → check-pkg-version-FPtenLmp.js} +1 -1
- package/dist/cjs/{checkout.service-BZOyqXgW.js → checkout.service-C0M9hmsL.js} +1 -1
- package/dist/cjs/{country-config-aJp8ScEs.js → country-config-Ck-eEeZZ.js} +2 -0
- package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
- package/dist/cjs/{event-types-AU1B76Vm.js → event-types-DDNVjmfR.js} +1 -1
- package/dist/cjs/form-address-fields_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_2.cjs.entry.js +5 -4
- package/dist/cjs/{get-business-aR-C83KX.js → get-business-Ggw-UjXj.js} +2 -2
- package/dist/cjs/{get-payment-details-dwhA02Zl.js → get-payment-details-BVKRwME1.js} +2 -2
- package/dist/cjs/{get-subaccounts-B1jmSa2d.js → get-subaccounts-RRmcS9xU.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{index.esm-C1ZPG85l.js → index.esm-BNETBIV_.js} +0 -18
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +8 -8
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-Dxjq_cJI.js → package-C7Z9XAuc.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-BiSpysjW.js → payment-provisioning-actions-Cn8bgHKu.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +3 -2
- package/dist/cjs/{payment.service-ByrgA_QZ.js → payment.service-CbIxt30x.js} +1 -1
- package/dist/cjs/{payout.service-CnQm_BpU.js → payout.service-DVMvsdAf.js} +1 -1
- package/dist/cjs/{payouts-status-AuS3Mp0V.js → payouts-status-CzS2CLGW.js} +2 -2
- package/dist/cjs/{plaid.service-Dlb8EUR8.js → plaid.service-DNT_DX6z.js} +1 -1
- package/dist/cjs/{schema-validations-DNPcvDh5.js → schema-validations-DackMxv7.js} +11 -8
- package/dist/cjs/styled-host-Ch0-dxF-.js +11 -0
- package/dist/cjs/{terminal.service-BdwHQ3Vv.js → terminal.service-BBHixg-d.js} +1 -1
- package/dist/cjs/{utils-FVGp6se3.js → utils-kDsk4nqH.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Document.js +14 -7
- package/dist/collection/collection-manifest.json +2 -0
- 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 +5 -3
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +4 -2
- package/dist/collection/components/business-forms/owner-form/owner-form.js +46 -1
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +6 -114
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +8 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +4 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +435 -0
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-list.js +52 -0
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +72 -0
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +3 -2
- package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +10 -38
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +7 -3
- package/dist/collection/components/business-forms/schemas/schema-validations.js +8 -5
- package/dist/collection/components/business-forms/utils/business-form-options.js +50 -0
- package/dist/collection/components/business-forms/utils/country-config.js +2 -0
- package/dist/collection/ui-components/form/form-control-file.js +1 -1
- package/dist/docs.json +496 -64
- package/dist/esm/{Analytics-CwckfiSK.js → Analytics-D-apOWeY.js} +2 -2
- package/dist/esm/{Plaid-l6nNIjab.js → Plaid-BM3JUIG5.js} +15 -19
- package/dist/esm/{additional-questions-form-step_14.entry.js → additional-questions-form-step_15.entry.js} +377 -169
- package/dist/esm/additional-questions_5.entry.js +8 -8
- package/dist/esm/additional-statement_8.entry.js +1 -1
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
- package/dist/esm/bank-account-document-form-inputs.entry.js +19 -0
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business-form-options-DRalxlqN.js → business-form-options-DXjZp4Rl.js} +51 -1
- package/dist/esm/{business-identity-schema-0Q3kck3C.js → business-identity-schema-D8L_UfWl.js} +11 -7
- package/dist/esm/{business.service-C31wbMVs.js → business.service-C4BD3pf7.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-Dy2NK3Nn.js → check-pkg-version-Bn8HCDRp.js} +1 -1
- package/dist/esm/{checkout.service-cVdOGDuI.js → checkout.service-DmWeKNQs.js} +1 -1
- package/dist/esm/{country-config-CdvhLcnT.js → country-config-BW2dUoTJ.js} +2 -0
- package/dist/esm/dispute-notification_2.entry.js +6 -6
- package/dist/esm/{event-types-DalU_6SB.js → event-types-eIqsrwmW.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +1 -1
- package/dist/esm/form-control-number_2.entry.js +5 -4
- package/dist/esm/{get-business-Gg6qn5on.js → get-business-DtFHdc37.js} +2 -2
- package/dist/esm/{get-payment-details-BiWgSJau.js → get-payment-details-26GxiYgv.js} +2 -2
- package/dist/esm/{get-subaccounts-CkjZeR9U.js → get-subaccounts-xkGMPstt.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/{index.esm-BHdVU4hV.js → index.esm-KCSohgHx.js} +1 -18
- package/dist/esm/justifi-apple-pay_11.entry.js +8 -8
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -5
- package/dist/esm/justifi-bank-account-form.entry.js +5 -5
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +8 -8
- package/dist/esm/justifi-business-form.entry.js +13 -13
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +8 -8
- package/dist/esm/justifi-dispute-management.entry.js +7 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
- package/dist/esm/justifi-order-terminals.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +8 -8
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +8 -8
- package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +9 -9
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-DAZd_gFd.js → package-D6Pw5qJ5.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-cl5xIYnF.js → payment-provisioning-actions-fWdNDUdq.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +3 -2
- package/dist/esm/{payment.service-5_u-UzTY.js → payment.service-CWR7jF-K.js} +1 -1
- package/dist/esm/{payout.service-D2zS5y8N.js → payout.service-CFU362cH.js} +1 -1
- package/dist/esm/{payouts-status-DCjCGTaa.js → payouts-status-D2G7FKu1.js} +2 -2
- package/dist/esm/{plaid.service-BiJ65YG8.js → plaid.service-0hd1i5Ga.js} +1 -1
- package/dist/esm/{schema-validations-A1o1biOB.js → schema-validations-CjqWFLKt.js} +11 -8
- package/dist/esm/styled-host-D84RBv1W.js +9 -0
- package/dist/esm/{terminal.service-CIxDfM7V.js → terminal.service-Dr6dERcJ.js} +1 -1
- package/dist/esm/{utils-C1B2hVAB.js → utils-q7KOrlSX.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +15 -19
- package/dist/module/additional-questions-form-step2.js +11 -5
- package/dist/module/bank-account-document-form-inputs.js +55 -1
- package/dist/module/business-bank-account-form-step2.js +24 -177
- package/dist/module/business-core-info-form-step2.js +2 -2
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-core-info2.js +3 -3
- package/dist/module/business-documents-on-file2.js +1 -1
- package/dist/module/business-form-options.js +51 -1
- package/dist/module/business-identity-schema.js +7 -3
- package/dist/module/business-owners-form-step2.js +8 -0
- package/dist/module/business-representative-form-inputs2.js +5 -3
- package/dist/module/business-representative2.js +6 -5
- package/dist/module/button.js +1 -1
- package/dist/module/country-config.js +2 -0
- package/dist/module/document-upload-form-step.d.ts +11 -0
- package/dist/module/document-upload-form-step.js +6 -0
- package/dist/module/document-upload-form-step2.js +397 -0
- package/dist/module/document-upload-list.d.ts +11 -0
- package/dist/module/document-upload-list.js +6 -0
- package/dist/module/document-upload-list2.js +46 -0
- package/dist/module/form-control-number2.js +1 -1
- package/dist/module/form-control-textarea2.js +1 -1
- package/dist/module/form.js +1 -18
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +1 -1
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +33 -27
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +2 -2
- package/dist/module/justifi-payouts-list-filters.js +1 -1
- package/dist/module/justifi-payouts-list.js +2 -2
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list.js +2 -2
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +2 -2
- package/dist/module/owner-form-inputs2.js +5 -3
- package/dist/module/owner-form2.js +10 -1
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-provisioning-actions.js +1 -1
- package/dist/module/payment-provisioning-form-steps2.js +35 -28
- package/dist/module/plaid-verification2.js +1 -1
- package/dist/module/schema-validations.js +8 -5
- package/dist/module/skeleton.js +1 -1
- package/dist/module/styled-host.js +1 -1
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/types/api/Document.d.ts +15 -2
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +1 -12
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.d.ts +44 -0
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-list.d.ts +6 -0
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +44 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +1 -0
- package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +4 -4
- package/dist/types/components/business-forms/utils/business-form-options.d.ts +1 -0
- package/dist/types/components.d.ts +67 -0
- package/dist/webcomponents/{p-oTtn8xDw.js → p--RbNhyet.js} +1 -1
- package/dist/webcomponents/{p-4b39a470.entry.js → p-01ed8fb5.entry.js} +1 -1
- package/dist/webcomponents/{p-07eaee91.entry.js → p-0290ca0f.entry.js} +1 -1
- package/dist/webcomponents/{p-e02d7751.entry.js → p-0a2be2e2.entry.js} +4 -4
- package/dist/webcomponents/{p-ca87c609.entry.js → p-0a4fcb15.entry.js} +1 -1
- package/dist/webcomponents/{p-b0b6083f.entry.js → p-0b169fac.entry.js} +1 -1
- package/dist/webcomponents/{p-f1b9cbf0.entry.js → p-0e4cda77.entry.js} +1 -1
- package/dist/webcomponents/{p-9d676f54.entry.js → p-1006ab39.entry.js} +1 -1
- package/dist/webcomponents/{p-d5edbea3.entry.js → p-164a4e64.entry.js} +1 -1
- package/dist/webcomponents/{p-bc2dddf3.entry.js → p-1841ee76.entry.js} +1 -1
- package/dist/webcomponents/{p-d01a1076.entry.js → p-188a7ebd.entry.js} +1 -1
- package/dist/webcomponents/{p-b62ff001.entry.js → p-1e34c488.entry.js} +1 -1
- package/dist/webcomponents/{p-a56e43a1.entry.js → p-1e5c96f3.entry.js} +1 -1
- package/dist/webcomponents/{p-b21010cb.entry.js → p-233fef57.entry.js} +1 -1
- package/dist/webcomponents/p-2e5ec91e.entry.js +1 -0
- package/dist/webcomponents/{p-41637e4a.entry.js → p-374ce853.entry.js} +1 -1
- package/dist/webcomponents/p-37676092.entry.js +1 -0
- package/dist/webcomponents/{p-78c4668b.entry.js → p-3c3fbcca.entry.js} +1 -1
- package/dist/webcomponents/{p-c4767c7b.entry.js → p-3e10a0de.entry.js} +1 -1
- package/dist/webcomponents/{p-e07506b7.entry.js → p-4673d7d3.entry.js} +1 -1
- package/dist/webcomponents/{p-3cefb032.entry.js → p-4b14b7e7.entry.js} +1 -1
- package/dist/webcomponents/p-54ee2a30.entry.js +1 -0
- package/dist/webcomponents/{p-38209a25.entry.js → p-5ceeaa73.entry.js} +1 -1
- package/dist/webcomponents/{p-a9e82502.entry.js → p-6089f91c.entry.js} +1 -1
- package/dist/webcomponents/{p-b8351983.entry.js → p-60a0bf1e.entry.js} +1 -1
- package/dist/webcomponents/{p-cf3e3394.entry.js → p-63a35210.entry.js} +1 -1
- package/dist/webcomponents/{p-08ab97ce.entry.js → p-641c9bdb.entry.js} +1 -1
- package/dist/webcomponents/{p-8e56430a.entry.js → p-74aeb76a.entry.js} +1 -1
- package/dist/webcomponents/{p-1f34b2f7.entry.js → p-80fdd013.entry.js} +1 -1
- package/dist/webcomponents/{p-3ef07f42.entry.js → p-84aaf298.entry.js} +1 -1
- package/dist/webcomponents/{p-4ee55e7d.entry.js → p-8a5f0d71.entry.js} +1 -1
- package/dist/webcomponents/{p-9153c121.entry.js → p-947950cc.entry.js} +1 -1
- package/dist/webcomponents/p-98476956.entry.js +1 -0
- package/dist/webcomponents/{p-a2c25cc4.entry.js → p-99792da6.entry.js} +1 -1
- package/dist/webcomponents/p-B1yVkh15.js +1 -0
- package/dist/webcomponents/{p-Bt4GjEWL.js → p-BBSnDYJw.js} +1 -1
- package/dist/webcomponents/{p-av6jyzyC.js → p-BSyTbuZy.js} +1 -1
- package/dist/webcomponents/{p-APOabprT.js → p-BrFax4_P.js} +1 -1
- package/dist/webcomponents/p-BzXQDB0t.js +1 -0
- package/dist/webcomponents/{p-BxKbnILQ.js → p-C-zuQNNP.js} +1 -1
- package/dist/webcomponents/{p-Cm9f5fyh.js → p-CDu7TeCZ.js} +1 -1
- package/dist/webcomponents/{p-BJu1-9kE.js → p-CL8LyqRI.js} +1 -1
- package/dist/webcomponents/{p-fE5A37L5.js → p-Cz0yhyYu.js} +1 -1
- package/dist/webcomponents/p-D6Pw5qJ5.js +1 -0
- package/dist/webcomponents/p-D9ZHVy-j.js +1 -0
- package/dist/webcomponents/{p-BdpSLMs7.js → p-D9rCHoO4.js} +1 -1
- package/dist/webcomponents/{p-CKiAlBsU.js → p-D9sqTVmd.js} +1 -1
- package/dist/webcomponents/p-DV4n8kZd.js +1 -0
- package/dist/webcomponents/{p-Dk26hk5T.js → p-DdeBubpX.js} +1 -1
- package/dist/webcomponents/p-DzEdYT8R.js +1 -0
- package/dist/webcomponents/{p-NZS8uCtH.js → p-Dzv0P2Ly.js} +1 -1
- package/dist/webcomponents/{p-Axa3cgnH.js → p-H0ILKMD2.js} +1 -1
- package/dist/webcomponents/{p-a7a1b168.entry.js → p-a3b48ba3.entry.js} +1 -1
- package/dist/webcomponents/{p-ebb7b693.entry.js → p-a3fe126f.entry.js} +1 -1
- package/dist/webcomponents/p-a9976353.entry.js +1 -0
- package/dist/webcomponents/{p-7377f7d1.entry.js → p-ab89cb46.entry.js} +1 -1
- package/dist/webcomponents/{p-d79c5ee4.entry.js → p-b17ce21d.entry.js} +1 -1
- package/dist/webcomponents/{p-2a5ee558.entry.js → p-b5aa3937.entry.js} +1 -1
- package/dist/webcomponents/p-cab840bd.entry.js +1 -0
- package/dist/webcomponents/{p-e17b92ec.entry.js → p-cc558e25.entry.js} +1 -1
- package/dist/webcomponents/{p-BXyADlAH.js → p-czJ2qSU1.js} +1 -1
- package/dist/webcomponents/p-d7ec0b54.entry.js +1 -0
- package/dist/webcomponents/{p-6904c62c.entry.js → p-e737077f.entry.js} +1 -1
- package/dist/webcomponents/p-eb1b4ead.entry.js +1 -0
- package/dist/webcomponents/{p-279c17ac.entry.js → p-f6be288f.entry.js} +1 -1
- package/dist/webcomponents/p-n_pmf4AT.js +1 -0
- package/dist/webcomponents/p-vUN_uvAi.js +1 -0
- package/dist/webcomponents/{p-Ba8jdOkX.js → p-xWuaNtJy.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -21
- package/dist/cjs/styled-host-DAi5SuFa.js +0 -11
- package/dist/esm/styled-host-D6byRazK.js +0 -9
- package/dist/module/bank-account-document-form-inputs2.js +0 -57
- package/dist/webcomponents/p-034fa691.entry.js +0 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +0 -1
- package/dist/webcomponents/p-37254105.entry.js +0 -1
- package/dist/webcomponents/p-5G1OMxZz.js +0 -1
- package/dist/webcomponents/p-9b5ca32c.entry.js +0 -1
- package/dist/webcomponents/p-Aacb4jqT.js +0 -1
- package/dist/webcomponents/p-BqNNwq6C.js +0 -1
- package/dist/webcomponents/p-D8ytux5N.js +0 -1
- package/dist/webcomponents/p-DAZd_gFd.js +0 -1
- package/dist/webcomponents/p-DrMJliVY.js +0 -1
- package/dist/webcomponents/p-XIWgia4J.js +0 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +0 -1
- package/dist/webcomponents/p-ea254f14.entry.js +0 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +0 -1
- package/dist/webcomponents/p-nb_LhbJq.js +0 -1
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import './config-state.js';
|
|
3
3
|
import './dinero.js';
|
|
4
|
-
import {
|
|
4
|
+
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
|
|
5
5
|
import './Pagination.js';
|
|
6
6
|
import { a as CountryCode } from './Business.js';
|
|
7
7
|
import './ApplePay.js';
|
|
8
|
-
import { m as makeGetBusiness,
|
|
9
|
-
import { B as BusinessService, a as BusinessBankAccountService
|
|
10
|
-
import { c as create$3, a as create$6,
|
|
8
|
+
import { m as makeGetBusiness, f as makePostBankAccount } from './payment-provisioning-actions.js';
|
|
9
|
+
import { B as BusinessService, a as BusinessBankAccountService } from './business.service.js';
|
|
10
|
+
import { c as create$3, a as create$6, F as FormController } from './form.js';
|
|
11
11
|
import { B as accountNumberValidation, C as accountTypeValidation, i as identityNameValidation, D as nicknameValidation, E as bankNameValidation, F as numbersOnlyRegex, G as routingNumberValidation } from './schema-validations.js';
|
|
12
12
|
import { B as BusinessFormStep } from './event-types2.js';
|
|
13
|
-
import {
|
|
13
|
+
import { A as buttonSecondary, a1 as buttonLink, h as heading2 } from './parts.js';
|
|
14
14
|
import { P as PaymentProvisioningLoading } from './payment-provisioning-loading.js';
|
|
15
15
|
import { B as Button } from './button.js';
|
|
16
16
|
import './justifi-details2.js';
|
|
17
17
|
import './event-types.js';
|
|
18
18
|
import './justifi-radio-list-item2.js';
|
|
19
|
-
import { d as defineCustomElement$
|
|
20
|
-
import { d as defineCustomElement$
|
|
21
|
-
import { d as defineCustomElement$
|
|
22
|
-
import { d as defineCustomElement$
|
|
23
|
-
import { d as defineCustomElement$7 } from './business-documents-on-file2.js';
|
|
24
|
-
import { d as defineCustomElement$6 } from './custom-popper2.js';
|
|
25
|
-
import { d as defineCustomElement$5 } from './form-control-file2.js';
|
|
19
|
+
import { d as defineCustomElement$8 } from './bank-account-form-inputs2.js';
|
|
20
|
+
import { d as defineCustomElement$7 } from './bank-account-form-inputs-canada2.js';
|
|
21
|
+
import { d as defineCustomElement$6 } from './bank-account-read-only-value2.js';
|
|
22
|
+
import { d as defineCustomElement$5 } from './custom-popper2.js';
|
|
26
23
|
import { d as defineCustomElement$4 } from './form-control-select2.js';
|
|
27
24
|
import { d as defineCustomElement$3 } from './form-control-text2.js';
|
|
28
25
|
import { d as defineCustomElement$2 } from './form-control-tooltip2.js';
|
|
@@ -65,9 +62,6 @@ class BankAccount {
|
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
const checkExistingDocs = (documents, documentType) => {
|
|
69
|
-
return documents.some((doc) => doc.document_type === documentType);
|
|
70
|
-
};
|
|
71
65
|
const buildCommonFieldRules = (allowOptionalFields) => {
|
|
72
66
|
if (allowOptionalFields) {
|
|
73
67
|
return {
|
|
@@ -86,30 +80,6 @@ const buildCommonFieldRules = (allowOptionalFields) => {
|
|
|
86
80
|
account_number: accountNumberValidation.required('Enter account number'),
|
|
87
81
|
};
|
|
88
82
|
};
|
|
89
|
-
const buildDocumentRules = (documents, allowOptionalFields) => {
|
|
90
|
-
if (allowOptionalFields) {
|
|
91
|
-
return {
|
|
92
|
-
voided_check: create$8().nullable(),
|
|
93
|
-
bank_statement: create$8().nullable(),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
const existingVoidedCheck = checkExistingDocs(documents, EntityDocumentType.voidedCheck);
|
|
97
|
-
const existingBankStatement = checkExistingDocs(documents, EntityDocumentType.bankStatement);
|
|
98
|
-
const existingDocument = existingVoidedCheck || existingBankStatement;
|
|
99
|
-
const documentErrorText = 'Please upload either a voided check or a bank statement. Only one is required.';
|
|
100
|
-
return {
|
|
101
|
-
voided_check: create$8().when('bank_statement', {
|
|
102
|
-
is: (val) => !val && !existingDocument,
|
|
103
|
-
then: (schema) => schema.required(documentErrorText),
|
|
104
|
-
otherwise: (schema) => schema.notRequired(),
|
|
105
|
-
}),
|
|
106
|
-
bank_statement: create$8().when('voided_check', {
|
|
107
|
-
is: (val) => !val && !existingDocument,
|
|
108
|
-
then: (schema) => schema.required(documentErrorText),
|
|
109
|
-
otherwise: (schema) => schema.notRequired(),
|
|
110
|
-
}),
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
83
|
const buildUSARules = (allowOptionalFields) => {
|
|
114
84
|
if (allowOptionalFields) {
|
|
115
85
|
return { routing_number: routingNumberValidation.nullable() };
|
|
@@ -134,17 +104,17 @@ const buildCANRules = (allowOptionalFields) => {
|
|
|
134
104
|
transit_number: transitNumberValidation.required('Enter transit number'),
|
|
135
105
|
};
|
|
136
106
|
};
|
|
137
|
-
const businessBankAccountSchemaUSA = (
|
|
138
|
-
const shape = Object.assign(Object.assign(
|
|
139
|
-
return create$3().shape(shape
|
|
107
|
+
const businessBankAccountSchemaUSA = (allowOptionalFields) => {
|
|
108
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildUSARules(allowOptionalFields));
|
|
109
|
+
return create$3().shape(shape);
|
|
140
110
|
};
|
|
141
|
-
const businessBankAccountSchemaCAN = (
|
|
142
|
-
const shape = Object.assign(Object.assign(
|
|
143
|
-
return create$3().shape(shape
|
|
111
|
+
const businessBankAccountSchemaCAN = (allowOptionalFields) => {
|
|
112
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildCANRules(allowOptionalFields));
|
|
113
|
+
return create$3().shape(shape);
|
|
144
114
|
};
|
|
145
115
|
const bankAccountSchemaByCountry = {
|
|
146
|
-
[CountryCode.USA]: (allowOptionalFields
|
|
147
|
-
[CountryCode.CAN]: (allowOptionalFields
|
|
116
|
+
[CountryCode.USA]: (allowOptionalFields) => businessBankAccountSchemaUSA(allowOptionalFields),
|
|
117
|
+
[CountryCode.CAN]: (allowOptionalFields) => businessBankAccountSchemaCAN(allowOptionalFields),
|
|
148
118
|
};
|
|
149
119
|
|
|
150
120
|
const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class BusinessBankAccountFormStep extends HTMLElement {
|
|
@@ -158,15 +128,13 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
158
128
|
this.formLoading = createEvent(this, "formLoading", 7);
|
|
159
129
|
this.errors = {};
|
|
160
130
|
this.bankAccount = {};
|
|
161
|
-
this.existingDocuments = [];
|
|
162
|
-
this.documentData = new EntityDocumentStorage();
|
|
163
131
|
this.isLoading = false;
|
|
164
132
|
this.viewMode = 'manual';
|
|
165
133
|
this.bankAccountVerification = false;
|
|
166
134
|
this.platformAccountId = null;
|
|
167
135
|
this.getSchema = () => {
|
|
168
136
|
const schema = bankAccountSchemaByCountry[this.country];
|
|
169
|
-
return schema(this.allowOptionalFields
|
|
137
|
+
return schema(this.allowOptionalFields);
|
|
170
138
|
};
|
|
171
139
|
this.initializeFormController = () => {
|
|
172
140
|
this.formController = new FormController(this.getSchema());
|
|
@@ -183,12 +151,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
183
151
|
this.inputHandler = (name, value) => {
|
|
184
152
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
185
153
|
};
|
|
186
|
-
this.storeFiles = (e) => {
|
|
187
|
-
const fileList = Array.from(e.detail.fileList);
|
|
188
|
-
const docType = e.detail.document_type;
|
|
189
|
-
const documentList = fileList.map(file => new EntityDocument({ file, document_type: docType }, this.businessId));
|
|
190
|
-
this.documentData[docType] = documentList;
|
|
191
|
-
};
|
|
192
154
|
this.getData = () => {
|
|
193
155
|
this.isLoading = true;
|
|
194
156
|
this.getBusiness({
|
|
@@ -211,12 +173,10 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
211
173
|
};
|
|
212
174
|
this.handleChangeBankAccount = () => {
|
|
213
175
|
this.viewMode = this.plaidAvailable ? 'plaid' : 'manual';
|
|
214
|
-
this.documentData = new EntityDocumentStorage();
|
|
215
176
|
this.initializeFormController();
|
|
216
177
|
};
|
|
217
178
|
this.handleCancel = () => {
|
|
218
179
|
this.viewMode = this.existingBankAccount ? 'readonly' : 'plaid';
|
|
219
|
-
this.documentData = new EntityDocumentStorage();
|
|
220
180
|
this.initializeFormController();
|
|
221
181
|
};
|
|
222
182
|
this.handleToggleToManualEntry = () => {
|
|
@@ -232,66 +192,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
232
192
|
});
|
|
233
193
|
});
|
|
234
194
|
};
|
|
235
|
-
this.postDocumentRecordData = async (docData) => {
|
|
236
|
-
this.isLoading = true;
|
|
237
|
-
const payload = docData.record_data;
|
|
238
|
-
return new Promise((resolve) => {
|
|
239
|
-
this.postDocumentRecord({
|
|
240
|
-
payload,
|
|
241
|
-
onSuccess: (response) => {
|
|
242
|
-
resolve(this.handleDocRecordResponse(docData, response));
|
|
243
|
-
},
|
|
244
|
-
onError: ({ error, code, severity }) => {
|
|
245
|
-
this.errorEvent.emit({
|
|
246
|
-
message: error,
|
|
247
|
-
errorCode: code,
|
|
248
|
-
severity: severity
|
|
249
|
-
});
|
|
250
|
-
resolve(false);
|
|
251
|
-
},
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
};
|
|
255
|
-
this.handleDocRecordResponse = (docData, response) => {
|
|
256
|
-
if (response.error) {
|
|
257
|
-
this.errorEvent.emit({
|
|
258
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
259
|
-
message: response.error.message,
|
|
260
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
261
|
-
data: response.error,
|
|
262
|
-
});
|
|
263
|
-
return false;
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
docData.setPresignedUrl(response.data.presigned_url);
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
this.uploadDocument = async (docData) => {
|
|
271
|
-
if (!docData.presigned_url) {
|
|
272
|
-
throw new Error('Presigned URL is not set');
|
|
273
|
-
}
|
|
274
|
-
const fileData = await docData.getFileData();
|
|
275
|
-
const response = await fetch(docData.presigned_url, {
|
|
276
|
-
method: 'PUT',
|
|
277
|
-
body: fileData
|
|
278
|
-
});
|
|
279
|
-
return this.handleUploadResponse(response);
|
|
280
|
-
};
|
|
281
|
-
this.handleUploadResponse = (response) => {
|
|
282
|
-
if (response.error) {
|
|
283
|
-
this.errorEvent.emit({
|
|
284
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
285
|
-
message: response.error.message,
|
|
286
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
287
|
-
data: response.error,
|
|
288
|
-
});
|
|
289
|
-
return false;
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
return true;
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
195
|
}
|
|
296
196
|
propChanged() {
|
|
297
197
|
this.initializeApi();
|
|
@@ -330,10 +230,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
330
230
|
authToken: this.authToken,
|
|
331
231
|
service: new BusinessBankAccountService()
|
|
332
232
|
});
|
|
333
|
-
this.postDocumentRecord = makePostDocumentRecord({
|
|
334
|
-
authToken: this.authToken,
|
|
335
|
-
service: new DocumentRecordService()
|
|
336
|
-
});
|
|
337
233
|
}
|
|
338
234
|
else {
|
|
339
235
|
this.errorEvent.emit({
|
|
@@ -359,7 +255,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
359
255
|
return this.bankAccountVerification || this.existingBankAccount;
|
|
360
256
|
}
|
|
361
257
|
processBusinessResponse(data) {
|
|
362
|
-
const { bank_accounts,
|
|
258
|
+
const { bank_accounts, settings, platform_account_id } = data;
|
|
363
259
|
if (bank_accounts.length > 0) {
|
|
364
260
|
this.bankAccount = new BankAccount(bank_accounts[bank_accounts.length - 1]);
|
|
365
261
|
}
|
|
@@ -367,7 +263,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
367
263
|
this.bankAccount = new BankAccount({});
|
|
368
264
|
this.bankAccount.business_id = this.businessId;
|
|
369
265
|
}
|
|
370
|
-
this.existingDocuments = documents;
|
|
371
266
|
this.bankAccountVerification = settings.bank_account_verification === true;
|
|
372
267
|
this.platformAccountId = platform_account_id;
|
|
373
268
|
}
|
|
@@ -388,11 +283,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
388
283
|
const bankAccountPosted = await this.postBankAccountData();
|
|
389
284
|
if (!bankAccountPosted)
|
|
390
285
|
return;
|
|
391
|
-
}
|
|
392
|
-
const documentsUploaded = await this.postBusinessDocuments();
|
|
393
|
-
if (!documentsUploaded)
|
|
394
|
-
return;
|
|
395
|
-
if (this.viewMode === 'manual') {
|
|
396
286
|
this.viewMode = 'readonly';
|
|
397
287
|
await this.refreshBankAccountData();
|
|
398
288
|
}
|
|
@@ -456,27 +346,6 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
456
346
|
});
|
|
457
347
|
});
|
|
458
348
|
}
|
|
459
|
-
async postBusinessDocuments() {
|
|
460
|
-
this.isLoading = true;
|
|
461
|
-
try {
|
|
462
|
-
const docArray = Object.values(this.documentData).flat();
|
|
463
|
-
if (!docArray.length) {
|
|
464
|
-
return true;
|
|
465
|
-
}
|
|
466
|
-
const recordsCreated = await Promise.all(docArray.map((docData) => this.postDocumentRecordData(docData))); // Create document records
|
|
467
|
-
if (recordsCreated.includes(false)) {
|
|
468
|
-
return false;
|
|
469
|
-
} // Exit if document record creation fails
|
|
470
|
-
const uploadsCompleted = await Promise.all(docArray.map((docData) => this.uploadDocument(docData))); // Upload documents to AWS presigned URLs
|
|
471
|
-
if (uploadsCompleted.includes(false)) {
|
|
472
|
-
return false;
|
|
473
|
-
} // Exit if any upload fails
|
|
474
|
-
return true;
|
|
475
|
-
}
|
|
476
|
-
finally {
|
|
477
|
-
this.isLoading = false;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
349
|
renderBankAccountInputs(disabled) {
|
|
481
350
|
const defaultValue = this.formController.getInitialValues();
|
|
482
351
|
return this.country === CountryCode.CAN ? (h("bank-account-form-inputs-canada", { defaultValue: defaultValue, errors: this.errors, inputHandler: this.inputHandler, formDisabled: disabled })) : (h("bank-account-form-inputs", { defaultValue: defaultValue, errors: this.errors, inputHandler: this.inputHandler, formDisabled: disabled }));
|
|
@@ -493,14 +362,11 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
493
362
|
renderManualEntryView() {
|
|
494
363
|
return (h("div", null, this.plaidAvailable && (h("div", { class: "mb-3" }, h(Button, { type: "button", variant: "secondary", onClick: this.handleToggleToPlaidVerification, disabled: this.isLoading, part: buttonSecondary }, "Link bank account with Plaid instead"))), this.renderBankAccountInputs(false), h("div", { class: "mt-3 d-flex gap-2" }, this.showCancel && (h(Button, { variant: "secondary", type: "button", onClick: this.handleCancel, disabled: this.isLoading, part: buttonSecondary }, "Cancel")), h(Button, { variant: "primary", type: "button", onClick: this.handleSaveBankAccount, disabled: this.isLoading, isLoading: this.isLoading }, "Save Bank Account"))));
|
|
495
364
|
}
|
|
496
|
-
renderDocumentUploads() {
|
|
497
|
-
return (h("fieldset", { class: "mt-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Document Uploads"), h("form-control-tooltip", { helpText: "One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category." })), h("hr", { class: "mt-2" }), h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading }), h("bank-account-document-form-inputs", { inputHandler: this.inputHandler, errors: this.errors, storeFiles: this.storeFiles })));
|
|
498
|
-
}
|
|
499
365
|
render() {
|
|
500
366
|
if (this.isLoading) {
|
|
501
367
|
return h(PaymentProvisioningLoading, null);
|
|
502
368
|
}
|
|
503
|
-
return (h("form", null, h("fieldset", { class: "mb-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Bank Account Info"), h("form-control-tooltip", { helpText: "This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship." })), h("hr", { class: "mt-2" }), this.viewMode === 'readonly' && this.renderReadonlyView(), this.viewMode === 'plaid' && this.renderPlaidView(), this.viewMode === 'manual' && this.renderManualEntryView())
|
|
369
|
+
return (h("form", null, h("fieldset", { class: "mb-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Bank Account Info"), h("form-control-tooltip", { helpText: "This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship." })), h("hr", { class: "mt-2" }), this.viewMode === 'readonly' && this.renderReadonlyView(), this.viewMode === 'plaid' && this.renderPlaidView(), this.viewMode === 'manual' && this.renderManualEntryView())));
|
|
504
370
|
}
|
|
505
371
|
static get watchers() { return {
|
|
506
372
|
"authToken": ["propChanged"],
|
|
@@ -515,14 +381,10 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
515
381
|
"formController": [32],
|
|
516
382
|
"errors": [32],
|
|
517
383
|
"bankAccount": [32],
|
|
518
|
-
"existingDocuments": [32],
|
|
519
|
-
"documentData": [32],
|
|
520
384
|
"isLoading": [32],
|
|
521
385
|
"viewMode": [32],
|
|
522
386
|
"getBusiness": [32],
|
|
523
387
|
"postBankAccount": [32],
|
|
524
|
-
"postDocumentRecord": [32],
|
|
525
|
-
"postDocument": [32],
|
|
526
388
|
"bankAccountVerification": [32],
|
|
527
389
|
"platformAccountId": [32],
|
|
528
390
|
"validateAndSubmit": [64]
|
|
@@ -535,44 +397,29 @@ function defineCustomElement() {
|
|
|
535
397
|
if (typeof customElements === "undefined") {
|
|
536
398
|
return;
|
|
537
399
|
}
|
|
538
|
-
const components = ["business-bank-account-form-step", "bank-account-
|
|
400
|
+
const components = ["business-bank-account-form-step", "bank-account-form-inputs", "bank-account-form-inputs-canada", "bank-account-read-only-value", "custom-popper", "form-control-select", "form-control-text", "form-control-tooltip", "plaid-verification"];
|
|
539
401
|
components.forEach(tagName => { switch (tagName) {
|
|
540
402
|
case "business-bank-account-form-step":
|
|
541
403
|
if (!customElements.get(tagName)) {
|
|
542
404
|
customElements.define(tagName, BusinessBankAccountFormStep);
|
|
543
405
|
}
|
|
544
406
|
break;
|
|
545
|
-
case "bank-account-document-form-inputs":
|
|
546
|
-
if (!customElements.get(tagName)) {
|
|
547
|
-
defineCustomElement$b();
|
|
548
|
-
}
|
|
549
|
-
break;
|
|
550
407
|
case "bank-account-form-inputs":
|
|
551
|
-
if (!customElements.get(tagName)) {
|
|
552
|
-
defineCustomElement$a();
|
|
553
|
-
}
|
|
554
|
-
break;
|
|
555
|
-
case "bank-account-form-inputs-canada":
|
|
556
|
-
if (!customElements.get(tagName)) {
|
|
557
|
-
defineCustomElement$9();
|
|
558
|
-
}
|
|
559
|
-
break;
|
|
560
|
-
case "bank-account-read-only-value":
|
|
561
408
|
if (!customElements.get(tagName)) {
|
|
562
409
|
defineCustomElement$8();
|
|
563
410
|
}
|
|
564
411
|
break;
|
|
565
|
-
case "
|
|
412
|
+
case "bank-account-form-inputs-canada":
|
|
566
413
|
if (!customElements.get(tagName)) {
|
|
567
414
|
defineCustomElement$7();
|
|
568
415
|
}
|
|
569
416
|
break;
|
|
570
|
-
case "
|
|
417
|
+
case "bank-account-read-only-value":
|
|
571
418
|
if (!customElements.get(tagName)) {
|
|
572
419
|
defineCustomElement$6();
|
|
573
420
|
}
|
|
574
421
|
break;
|
|
575
|
-
case "
|
|
422
|
+
case "custom-popper":
|
|
576
423
|
if (!customElements.get(tagName)) {
|
|
577
424
|
defineCustomElement$5();
|
|
578
425
|
}
|
|
@@ -8,7 +8,7 @@ import { F as FormController } from './form.js';
|
|
|
8
8
|
import { c as businessClassificationOptions } from './business-form-options.js';
|
|
9
9
|
import { B as BusinessFormStep } from './event-types2.js';
|
|
10
10
|
import { P as PHONE_MASKS } from './form-input-masks.js';
|
|
11
|
-
import { h as heading2, l as label, c as inputDisabled,
|
|
11
|
+
import { h as heading2, l as label, c as inputDisabled, A as buttonSecondary } from './parts.js';
|
|
12
12
|
import { P as PaymentProvisioningLoading } from './payment-provisioning-loading.js';
|
|
13
13
|
import { c as countryLabels } from './country-config.js';
|
|
14
14
|
import { d as defineCustomElement$6 } from './custom-popper2.js';
|
|
@@ -142,7 +142,7 @@ const BusinessCoreInfoFormStep = /*@__PURE__*/ proxyCustomElement(class Business
|
|
|
142
142
|
if (this.isLoading) {
|
|
143
143
|
return h(PaymentProvisioningLoading, null);
|
|
144
144
|
}
|
|
145
|
-
return (h("form", null, h("fieldset", null, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Business Information")), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "legal_name", label: "Business Name", defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler, helpText: "Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)." })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler, helpText: "Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)" })), h("div", { class: "col-12 col-md-8" }, h("form-control-select", { name: "classification", label: "Business Classification", options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "date_of_incorporation", label: "Date of Registration", defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler, helpText: "Describe what you sell" })), h("div", { class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (h("form-control-number-masked", { name: "tax_id", label: countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: '000000000', helpText: countryLabels[this.country].taxIdHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, countryLabels[this.country].taxIdLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
|
|
145
|
+
return (h("form", null, h("fieldset", null, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Business Information")), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "legal_name", label: "Business Name", defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler, helpText: "Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)." })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler, helpText: "Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)" })), h("div", { class: "col-12 col-md-8" }, h("form-control-select", { name: "classification", label: "Business Classification", options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-4" }, h("form-control-date", { name: "date_of_incorporation", label: "Date of Registration", defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { class: "col-12 col-md-6" }, h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler, helpText: "Describe what you sell" })), h("div", { class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (h("form-control-number-masked", { name: "tax_id", label: countryLabels[this.country].taxIdLabelOptional || countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: '000000000', helpText: countryLabels[this.country].taxIdHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, countryLabels[this.country].taxIdLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
|
|
146
146
|
this.isEditingTaxId = true;
|
|
147
147
|
// Clear last4-equivalent and current value if any future conditional validation depends on it
|
|
148
148
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { tax_id: '', tax_id_last4: null }));
|
|
@@ -43,7 +43,7 @@ const businessCoreInfoSchemaCAN = (allowOptionalFields) => baseBusinessCoreInfoS
|
|
|
43
43
|
tax_id: makeTaxIdValidation(CountryCode.CAN)
|
|
44
44
|
.when('tax_id_last4', {
|
|
45
45
|
is: (val) => !val,
|
|
46
|
-
then: (schema) => schema.
|
|
46
|
+
then: (schema) => schema.notRequired().nullable(),
|
|
47
47
|
otherwise: (schema) => schema.nullable(),
|
|
48
48
|
}),
|
|
49
49
|
}));
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { c as businessClassificationOptions } from './business-form-options.js';
|
|
3
3
|
import { I as IDENTITY_MASKS, P as PHONE_MASKS } from './form-input-masks.js';
|
|
4
4
|
import { C as CoreBusinessInfo } from './Business.js';
|
|
5
|
-
import { h as heading2, l as label, c as inputDisabled,
|
|
5
|
+
import { h as heading2, l as label, c as inputDisabled, A as buttonSecondary } from './parts.js';
|
|
6
6
|
import { c as countryLabels } from './country-config.js';
|
|
7
7
|
import { d as defineCustomElement$6 } from './custom-popper2.js';
|
|
8
8
|
import { d as defineCustomElement$5 } from './form-control-date2.js';
|
|
@@ -34,10 +34,10 @@ const BusinessCoreInfo = /*@__PURE__*/ proxyCustomElement(class BusinessCoreInfo
|
|
|
34
34
|
render() {
|
|
35
35
|
var _a, _b;
|
|
36
36
|
const coreInfoDefaultValue = this.formController.getInitialValues();
|
|
37
|
-
return (h(Host, { key: '9c73706505c1fa0a56d7eb68fc1c4c0a6fffd1dc' }, h("fieldset", { key: 'd30bae9bab7ffd0e385ce276e7797cfd606e5a42' }, h("legend", { key: '5792db95cbbc080f3c990b4b9cea84484f374ec3', part: heading2 }, "General Info"), h("div", { key: 'ae7fa3c788d625d60cfc83b270312946dce97f0b', class: "row gy-3" }, h("div", { key: 'f7e5ab1ec57a8ce8de5ef8591ecad8b2fbd2f030', class: "col-12" }, h("form-control-text", { key: 'fa96501ceca053263029489a74bddd31222b1462', name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '21e14d0c13017376d7e74e84169f30fe05fa13af', class: "col-12" }, h("form-control-text", { key: '266187ec2209299a4b0ebc4c7d600c670de3b21f', name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: 'd9bbb19b4ec15a18a0467444e964512114e74031', class: "col-12 col-md-8" }, h("form-control-select", { key: 'fe490b4abb4a1e07392db9ad4e4c15b02d928f4c', name: "classification", label: "Business Classification", options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'fc5dafdace199fd34d22f22d629d87fc8ff7cc3e', class: "col-12 col-md-4" }, h("form-control-date", { key: '0263cdef27d1b36c22bde16dbdb3777ad9ef62e3', name: "date_of_incorporation", label: "Date of Incorporation", defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '2ae2b710d615e5314d4b836b9a498fc9140b749a', class: "col-12 col-md-6" }, h("form-control-text", { key: 'f6e738254ff7ead5680b895b6df77dc58efbc393', name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '8a01de0514d495b103aa43070d268070f57af62a', class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (h("form-control-number-masked", { name: "tax_id", label: countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: IDENTITY_MASKS[this.country], helpText: countryLabels[this.country].taxIdHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, countryLabels[this.country].taxIdLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
|
|
37
|
+
return (h(Host, { key: '9c73706505c1fa0a56d7eb68fc1c4c0a6fffd1dc' }, h("fieldset", { key: 'd30bae9bab7ffd0e385ce276e7797cfd606e5a42' }, h("legend", { key: '5792db95cbbc080f3c990b4b9cea84484f374ec3', part: heading2 }, "General Info"), h("div", { key: 'ae7fa3c788d625d60cfc83b270312946dce97f0b', class: "row gy-3" }, h("div", { key: 'f7e5ab1ec57a8ce8de5ef8591ecad8b2fbd2f030', class: "col-12" }, h("form-control-text", { key: 'fa96501ceca053263029489a74bddd31222b1462', name: "legal_name", label: "Legal Name", defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '21e14d0c13017376d7e74e84169f30fe05fa13af', class: "col-12" }, h("form-control-text", { key: '266187ec2209299a4b0ebc4c7d600c670de3b21f', name: "doing_business_as", label: "Doing Business As (DBA)", defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: 'd9bbb19b4ec15a18a0467444e964512114e74031', class: "col-12 col-md-8" }, h("form-control-select", { key: 'fe490b4abb4a1e07392db9ad4e4c15b02d928f4c', name: "classification", label: "Business Classification", options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'fc5dafdace199fd34d22f22d629d87fc8ff7cc3e', class: "col-12 col-md-4" }, h("form-control-date", { key: '0263cdef27d1b36c22bde16dbdb3777ad9ef62e3', name: "date_of_incorporation", label: "Date of Incorporation", defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '2ae2b710d615e5314d4b836b9a498fc9140b749a', class: "col-12 col-md-6" }, h("form-control-text", { key: 'f6e738254ff7ead5680b895b6df77dc58efbc393', name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '8a01de0514d495b103aa43070d268070f57af62a', class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (h("form-control-number-masked", { name: "tax_id", label: countryLabels[this.country].taxIdLabelOptional || countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: IDENTITY_MASKS[this.country], helpText: countryLabels[this.country].taxIdHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, countryLabels[this.country].taxIdLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
|
|
38
38
|
this.isEditingTaxId = true;
|
|
39
39
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { tax_id: '' }));
|
|
40
|
-
} }, "Change"))))), h("div", { key: '
|
|
40
|
+
} }, "Change"))))), h("div", { key: 'a82eb6e652eb36fd57cd4a6c413e896aebfefce6', class: "col-12" }, h("form-control-text", { key: '930f882235d7c4902ae6daf54d644a0cd9d23daf', name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: 'b2e819e6dfd97229e81e1860e1debe3ab95e3dc0', class: "col-12 col-md-6" }, h("form-control-text", { key: '7a4a158a1c64adfe90b825ff54c9f1f607c25bb7', name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '948c4f98a4a7a8b898058adb0957b7251d8c9fe4', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: 'dc5804f3c9254c859f5e6a78487dae423c9689f1', name: "phone", label: "Phone Number", defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
|
|
41
41
|
}
|
|
42
42
|
}, [256, "business-core-info", {
|
|
43
43
|
"formController": [16],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as snakeCaseToHumanReadable, f as formatDate, a as formatTime } from './utils2.js';
|
|
3
|
-
import {
|
|
3
|
+
import { B as card, h as heading2, C as table, D as tableHeadCell, E as tableCell } from './parts.js';
|
|
4
4
|
import { S as Skeleton } from './skeleton.js';
|
|
5
5
|
import './justifi-details2.js';
|
|
6
6
|
import './event-types.js';
|
|
@@ -76,6 +76,56 @@ const seasonalBusinessOptions = [
|
|
|
76
76
|
value: 'No',
|
|
77
77
|
}
|
|
78
78
|
];
|
|
79
|
+
const businessTitleOptions = [
|
|
80
|
+
{
|
|
81
|
+
label: 'Choose title',
|
|
82
|
+
value: '',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Vice President',
|
|
86
|
+
value: 'Vice President',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'President',
|
|
90
|
+
value: 'President',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'Treasurer',
|
|
94
|
+
value: 'Treasurer',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Owner',
|
|
98
|
+
value: 'Owner',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'Partner',
|
|
102
|
+
value: 'Partner',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'CEO',
|
|
106
|
+
value: 'CEO',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: 'Member LLC',
|
|
110
|
+
value: 'Member LLC',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: 'Secretary',
|
|
114
|
+
value: 'Secretary',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: 'Director',
|
|
118
|
+
value: 'Director',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
label: 'COO',
|
|
122
|
+
value: 'COO',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'CFO',
|
|
126
|
+
value: 'CFO',
|
|
127
|
+
},
|
|
128
|
+
];
|
|
79
129
|
const bankAccountTypeOptions = [
|
|
80
130
|
{
|
|
81
131
|
label: 'Checking',
|
|
@@ -87,4 +137,4 @@ const bankAccountTypeOptions = [
|
|
|
87
137
|
}
|
|
88
138
|
];
|
|
89
139
|
|
|
90
|
-
export { bankAccountTypeOptions as a, businessServiceReceivedOptions as b, businessClassificationOptions as c, recurringPaymentsOptions as r, seasonalBusinessOptions as s };
|
|
140
|
+
export { bankAccountTypeOptions as a, businessServiceReceivedOptions as b, businessClassificationOptions as c, businessTitleOptions as d, recurringPaymentsOptions as r, seasonalBusinessOptions as s };
|
|
@@ -24,7 +24,9 @@ const strictSchemaUSA = (role) => create$3({
|
|
|
24
24
|
ssn_last4: create$6().nullable(),
|
|
25
25
|
// ssn required unless last4 provided (handled inside ssnValidation)
|
|
26
26
|
identification_number: ssnValidation,
|
|
27
|
-
ownership_percentage:
|
|
27
|
+
ownership_percentage: role === 'owner'
|
|
28
|
+
? ownershipPercentageValidation.required('Enter ownership percentage')
|
|
29
|
+
: ownershipPercentageValidation.nullable(),
|
|
28
30
|
address: addressSchemaUSA(false),
|
|
29
31
|
});
|
|
30
32
|
// Internal CAN schemas
|
|
@@ -46,8 +48,10 @@ const strictSchemaCAN = (role) => create$3({
|
|
|
46
48
|
phone: phoneValidation.required('Enter phone number'),
|
|
47
49
|
dob_full: dobValidation(role).required('Enter date of birth'),
|
|
48
50
|
ssn_last4: create$6().nullable(),
|
|
49
|
-
identification_number: makeIdentityNumberValidation(CountryCode.CAN),
|
|
50
|
-
ownership_percentage:
|
|
51
|
+
identification_number: makeIdentityNumberValidation(CountryCode.CAN).nullable(),
|
|
52
|
+
ownership_percentage: role === 'owner'
|
|
53
|
+
? ownershipPercentageValidation.required('Enter ownership percentage')
|
|
54
|
+
: ownershipPercentageValidation.nullable(),
|
|
51
55
|
address: addressSchemaCAN(false),
|
|
52
56
|
});
|
|
53
57
|
const identitySchemaUSA = (role, allowOptionalFields) => allowOptionalFields ? schemaUSA(role) : strictSchemaUSA(role);
|
|
@@ -145,6 +145,14 @@ const BusinessOwnersFormStep = /*@__PURE__*/ proxyCustomElement(class BusinessOw
|
|
|
145
145
|
if (!formsValid) {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
+
if (!this.allowOptionalFields) {
|
|
149
|
+
const percentages = await Promise.all(this.refs.map(ref => ref.getOwnershipPercentage()));
|
|
150
|
+
const total = percentages.reduce((sum, p) => sum + (parseFloat(p) || 0), 0);
|
|
151
|
+
if (total !== 100) {
|
|
152
|
+
await Promise.all(this.refs.map(ref => ref.setOwnershipPercentageError('Ownership percentages must total 100%')));
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
148
156
|
const formSubmissions = this.refs.map(ref => ref.submit());
|
|
149
157
|
const submissionsValid = (await Promise.all(formSubmissions)).every(result => result);
|
|
150
158
|
if (!submissionsValid) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './input-handlers.js';
|
|
3
3
|
import { P as PHONE_MASKS, I as IDENTITY_MASKS } from './form-input-masks.js';
|
|
4
|
-
import { h as heading2, l as label, c as inputDisabled,
|
|
4
|
+
import { h as heading2, l as label, c as inputDisabled, A as buttonSecondary } from './parts.js';
|
|
5
|
+
import { a as CountryCode } from './Business.js';
|
|
5
6
|
import { c as countryLabels } from './country-config.js';
|
|
7
|
+
import { d as businessTitleOptions } from './business-form-options.js';
|
|
6
8
|
import { d as defineCustomElement$8 } from './custom-popper2.js';
|
|
7
9
|
import { d as defineCustomElement$7 } from './form-address-fields2.js';
|
|
8
10
|
import { d as defineCustomElement$6 } from './form-control-date2.js';
|
|
@@ -28,14 +30,14 @@ const BusinessRepresentativeFormInputs = /*@__PURE__*/ proxyCustomElement(class
|
|
|
28
30
|
}
|
|
29
31
|
render() {
|
|
30
32
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
31
|
-
return (h("form", { key: '
|
|
33
|
+
return (h("form", { key: '2346f250e4e2982b5b5b2624d039f551b5b5ed4e' }, h("fieldset", { key: '7b496e6157e5eec02ef0d263c68fbd1e001c75ac' }, h("div", { key: 'b86d993c7fbee2269e48c7d4ea51826f199fecd4', class: "d-flex align-items-center gap-2" }, h("legend", { key: '2b013e6068bbbca54a0852093ab4a2fae4ce64d2', class: "mb-0", part: heading2 }, "Representative"), h("form-control-tooltip", { key: '01e0f1d6ba2d5ee852593f7015a3ba7e0d980df9', helpText: "The representative for your business needs to be someone who has significant control over managing your business's finance. You will have an opportunity to add owners later in the form." })), h("hr", { key: '4bec34756ec7081e01809175bc3d2b6af0532537', class: "mt-2" }), h("div", { key: '6965720fabb1f12c6bb3c5a81f74ae12f44037b2', class: "row gy-3" }, h("div", { key: 'efbb768ba1e66d5ef47f792c39a17921b40e0eba', class: "col-12 col-md-8" }, h("form-control-text", { key: '28477d3798ba7d14aee9201e84b276d8e85a21df', name: "name", label: "Full Name", defaultValue: (_a = this.representativeDefaultValue) === null || _a === void 0 ? void 0 : _a.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: '28f17ccbe4da476256acd9c5a4e78a6a641ba6e9', class: "col-12 col-md-4" }, h("form-control-select", { key: 'dae6a93a0bc057abb97024277be0f10de01514e2', name: "title", label: "Title", options: businessTitleOptions, defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '2f9a45774adaa0040df2da1a8000d1ee61e16bf5', class: "col-12 col-md-6" }, h("form-control-text", { key: '66a2a1ea8b54c03c012d76a74654ee19a9f958a7', name: "email", label: "Email Address", defaultValue: (_c = this.representativeDefaultValue) === null || _c === void 0 ? void 0 : _c.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '3b34f0cb11d358db2220c01aac90e8b7ba3cc01b', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '52c62ec653fb917a248a302f7cb5ad46dc7bcc23', name: "phone", label: "Phone Number", defaultValue: (_d = this.representativeDefaultValue) === null || _d === void 0 ? void 0 : _d.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: 'd287ec225af1541cca227d3b8bc54466cbb86b07', class: "col-12 col-md-4" }, h("form-control-date", { key: '7e1ff6cc40b01dc7f6ad0ad84d73c0e59eea0d6f', name: "dob_full", label: "Birth Date", defaultValue: (_e = this.representativeDefaultValue) === null || _e === void 0 ? void 0 : _e.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController), helpText: "Must be 18 or older." })), h("div", { key: '283b09c845f1a12f4974f82a26fffbf7c5f608ba', class: "col-12 col-md-8" }, (!((_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.ssn_last4) || this.isEditingIdentification) ? (h("form-control-number-masked", { name: "identification_number", label: this.country === CountryCode.CAN ? countryLabels[this.country].idNumberLabelOptional : countryLabels[this.country].idNumberLabel, defaultValue: this.isEditingIdentification ? '' : (_g = this.representativeDefaultValue) === null || _g === void 0 ? void 0 : _g.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: IDENTITY_MASKS[this.country], helpText: countryLabels[this.country].identityHelpText })) : (h("div", null, h("label", { class: "form-label", part: label }, this.country === CountryCode.CAN ? countryLabels[this.country].idNumberLabelOptional : countryLabels[this.country].idNumberLabel), h("div", { class: "input-group mb-3" }, h("input", { type: "text", class: "form-control", part: inputDisabled, value: `****${(_h = this.representativeDefaultValue) === null || _h === void 0 ? void 0 : _h.ssn_last4}`, disabled: true }), h("button", { class: "btn btn-secondary", type: "button", part: buttonSecondary, onClick: () => {
|
|
32
34
|
this.isEditingIdentification = true;
|
|
33
35
|
// Clear current value to force validation
|
|
34
36
|
updateFormValues(this.formController, {
|
|
35
37
|
identification_number: '',
|
|
36
38
|
ssn_last4: null
|
|
37
39
|
});
|
|
38
|
-
} }, "Change"))))), h("div", { key: '
|
|
40
|
+
} }, "Change"))))), h("div", { key: '0a40679570df7b85faa7530797ebc21ca8794263', class: "col-12" }, h("identity-address-form", { key: '5a1590251365260413ab63ce9a417d3d71c71e84', errors: this.errors.address, defaultValues: (_j = this.representativeDefaultValue) === null || _j === void 0 ? void 0 : _j.address, handleFormUpdate: this.onAddressFormUpdate, country: this.country }))))));
|
|
39
41
|
}
|
|
40
42
|
}, [256, "business-representative-form-inputs", {
|
|
41
43
|
"representativeDefaultValue": [8, "representative-default-value"],
|