@justifi/webcomponents 6.12.6-rc.1 → 6.12.6
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/LICENSE +21 -0
- package/dist/cjs/{Analytics-CexlbLRl.js → Analytics-CuYtRPw5.js} +2 -2
- package/dist/cjs/{Plaid-KasiL5mp.js → Plaid-BRSyOOuw.js} +19 -14
- package/dist/cjs/{additional-questions-form-step_15.cjs.entry.js → additional-questions-form-step_14.cjs.entry.js} +169 -378
- 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-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-form-options-CnlrfbQ6.js → business-form-options-D_nM7NDk.js} +0 -51
- package/dist/cjs/{business-identity-schema-CC1wOwXd.js → business-identity-schema-DuFGX6_i.js} +7 -11
- package/dist/cjs/{business.service-BBovho58.js → business.service-Z9OACEQL.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-jeIQGJ8A.js → check-pkg-version-CPWLIT6P.js} +1 -1
- package/dist/cjs/{checkout.service-C0M9hmsL.js → checkout.service-BZOyqXgW.js} +1 -1
- package/dist/cjs/{country-config-Ck-eEeZZ.js → country-config-aJp8ScEs.js} +0 -2
- package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
- package/dist/cjs/{event-types-DDNVjmfR.js → event-types-AU1B76Vm.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 +4 -5
- package/dist/cjs/{get-business-Ggw-UjXj.js → get-business-aR-C83KX.js} +2 -2
- package/dist/cjs/{get-payment-details-BVKRwME1.js → get-payment-details-dwhA02Zl.js} +2 -2
- package/dist/cjs/{get-subaccounts-RRmcS9xU.js → get-subaccounts-B1jmSa2d.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{index.esm-BNETBIV_.js → index.esm-C1ZPG85l.js} +18 -0
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +11 -10
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{lodash-CxSkBibc.js → lodash-C4mGy21w.js} +38 -27
- package/dist/cjs/{package-CDegPd7E.js → package-Dxjq_cJI.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-Cn8bgHKu.js → payment-provisioning-actions-BiSpysjW.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +2 -3
- package/dist/cjs/{payment.service-CbIxt30x.js → payment.service-ByrgA_QZ.js} +1 -1
- package/dist/cjs/{payout.service-DVMvsdAf.js → payout.service-CnQm_BpU.js} +1 -1
- package/dist/cjs/{payouts-status-CzS2CLGW.js → payouts-status-AuS3Mp0V.js} +2 -2
- package/dist/cjs/{plaid.service-DNT_DX6z.js → plaid.service-Dlb8EUR8.js} +1 -1
- package/dist/cjs/{schema-validations-DackMxv7.js → schema-validations-DNPcvDh5.js} +8 -11
- package/dist/cjs/styled-host-DAi5SuFa.js +11 -0
- package/dist/cjs/{terminal.service-BBHixg-d.js → terminal.service-BdwHQ3Vv.js} +1 -1
- package/dist/cjs/{utils-kDsk4nqH.js → utils-FVGp6se3.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Document.js +7 -14
- package/dist/collection/collection-manifest.json +0 -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 +3 -5
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -4
- package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -46
- 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 +114 -6
- 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 +0 -8
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -4
- 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 +2 -3
- package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +38 -10
- 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 +3 -7
- package/dist/collection/components/business-forms/schemas/schema-validations.js +5 -8
- package/dist/collection/components/business-forms/utils/business-form-options.js +0 -50
- package/dist/collection/components/business-forms/utils/country-config.js +0 -2
- package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +8 -6
- package/dist/collection/ui-components/form/form-control-file.js +1 -1
- package/dist/docs.json +76 -502
- package/dist/esm/{Analytics-5J6H0ALl.js → Analytics-CwckfiSK.js} +2 -2
- package/dist/esm/{Plaid-BM3JUIG5.js → Plaid-l6nNIjab.js} +19 -15
- package/dist/esm/{additional-questions-form-step_15.entry.js → additional-questions-form-step_14.entry.js} +169 -377
- 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-form.entry.js +2 -2
- package/dist/esm/{business-form-options-DXjZp4Rl.js → business-form-options-DRalxlqN.js} +1 -51
- package/dist/esm/{business-identity-schema-D8L_UfWl.js → business-identity-schema-0Q3kck3C.js} +7 -11
- package/dist/esm/{business.service-C4BD3pf7.js → business.service-C31wbMVs.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-C7cHTIM0.js → check-pkg-version-Dy2NK3Nn.js} +1 -1
- package/dist/esm/{checkout.service-DmWeKNQs.js → checkout.service-cVdOGDuI.js} +1 -1
- package/dist/esm/{country-config-BW2dUoTJ.js → country-config-CdvhLcnT.js} +0 -2
- package/dist/esm/dispute-notification_2.entry.js +6 -6
- package/dist/esm/{event-types-eIqsrwmW.js → event-types-DalU_6SB.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +1 -1
- package/dist/esm/form-control-number_2.entry.js +4 -5
- package/dist/esm/{get-business-DtFHdc37.js → get-business-Gg6qn5on.js} +2 -2
- package/dist/esm/{get-payment-details-26GxiYgv.js → get-payment-details-BiWgSJau.js} +2 -2
- package/dist/esm/{get-subaccounts-xkGMPstt.js → get-subaccounts-CkjZeR9U.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/{index.esm-KCSohgHx.js → index.esm-BHdVU4hV.js} +18 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +11 -10
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{lodash-CrGKVSPp.js → lodash-BF_QgjtL.js} +38 -27
- package/dist/esm/{package-8R9xLun-.js → package-DAZd_gFd.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-fWdNDUdq.js → payment-provisioning-actions-cl5xIYnF.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +2 -3
- package/dist/esm/{payment.service-CWR7jF-K.js → payment.service-5_u-UzTY.js} +1 -1
- package/dist/esm/{payout.service-CFU362cH.js → payout.service-D2zS5y8N.js} +1 -1
- package/dist/esm/{payouts-status-D2G7FKu1.js → payouts-status-DCjCGTaa.js} +2 -2
- package/dist/esm/{plaid.service-0hd1i5Ga.js → plaid.service-BiJ65YG8.js} +1 -1
- package/dist/esm/{schema-validations-CjqWFLKt.js → schema-validations-A1o1biOB.js} +8 -11
- package/dist/esm/styled-host-D6byRazK.js +9 -0
- package/dist/esm/{terminal.service-Dr6dERcJ.js → terminal.service-CIxDfM7V.js} +1 -1
- package/dist/esm/{utils-q7KOrlSX.js → utils-C1B2hVAB.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +19 -15
- package/dist/module/additional-questions-form-step2.js +5 -11
- package/dist/module/bank-account-document-form-inputs.js +1 -55
- package/dist/module/bank-account-document-form-inputs2.js +57 -0
- package/dist/module/business-bank-account-form-step2.js +177 -24
- 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 +1 -51
- package/dist/module/business-identity-schema.js +3 -7
- package/dist/module/business-owners-form-step2.js +0 -8
- package/dist/module/business-representative-form-inputs2.js +3 -5
- package/dist/module/business-representative2.js +5 -6
- package/dist/module/button.js +1 -1
- package/dist/module/country-config.js +0 -2
- package/dist/module/form-control-number2.js +1 -1
- package/dist/module/form-control-textarea2.js +1 -1
- package/dist/module/form.js +18 -1
- 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-google-pay2.js +4 -3
- 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 +27 -33
- 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/lodash.js +38 -27
- package/dist/module/owner-form-inputs2.js +3 -5
- package/dist/module/owner-form2.js +1 -10
- 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 +28 -35
- package/dist/module/plaid-verification2.js +1 -1
- package/dist/module/schema-validations.js +5 -8
- 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 +2 -15
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +0 -2
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +12 -1
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +0 -1
- 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 +0 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +1 -1
- package/dist/types/components.d.ts +10 -71
- package/dist/webcomponents/p-034fa691.entry.js +1 -0
- package/dist/webcomponents/{p-086f7eea.entry.js → p-07eaee91.entry.js} +1 -1
- package/dist/webcomponents/{p-2e063c5d.entry.js → p-08ab97ce.entry.js} +1 -1
- package/dist/webcomponents/{p-80fdd013.entry.js → p-1f34b2f7.entry.js} +1 -1
- package/dist/webcomponents/{p-3bcac405.entry.js → p-279c17ac.entry.js} +1 -1
- package/dist/webcomponents/{p-29b82954.entry.js → p-2a5ee558.entry.js} +1 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +1 -0
- package/dist/webcomponents/p-37254105.entry.js +1 -0
- package/dist/webcomponents/{p-a7e0ab9b.entry.js → p-38209a25.entry.js} +1 -1
- package/dist/webcomponents/{p-4b14b7e7.entry.js → p-3cefb032.entry.js} +1 -1
- package/dist/webcomponents/{p-8ed1bc07.entry.js → p-3ef07f42.entry.js} +1 -1
- package/dist/webcomponents/{p-a5ad9183.entry.js → p-41637e4a.entry.js} +1 -1
- package/dist/webcomponents/{p-92d8a14b.entry.js → p-4b39a470.entry.js} +1 -1
- package/dist/webcomponents/{p-6b21947c.entry.js → p-4ee55e7d.entry.js} +1 -1
- package/dist/webcomponents/p-5G1OMxZz.js +1 -0
- package/dist/webcomponents/p-6904c62c.entry.js +1 -0
- package/dist/webcomponents/{p-5f071ee0.entry.js → p-7377f7d1.entry.js} +1 -1
- package/dist/webcomponents/{p-48a866ae.entry.js → p-78c4668b.entry.js} +1 -1
- package/dist/webcomponents/{p-c2e09203.entry.js → p-8e56430a.entry.js} +1 -1
- package/dist/webcomponents/{p-947950cc.entry.js → p-9153c121.entry.js} +1 -1
- package/dist/webcomponents/p-9b5ca32c.entry.js +1 -0
- package/dist/webcomponents/{p-04d6d725.entry.js → p-9d676f54.entry.js} +1 -1
- package/dist/webcomponents/{p-BrFax4_P.js → p-APOabprT.js} +1 -1
- package/dist/webcomponents/p-Aacb4jqT.js +1 -0
- package/dist/webcomponents/{p-CeW0EPHy.js → p-Axa3cgnH.js} +1 -1
- package/dist/webcomponents/{p-CL8LyqRI.js → p-BJu1-9kE.js} +1 -1
- package/dist/webcomponents/{p-czJ2qSU1.js → p-BXyADlAH.js} +1 -1
- package/dist/webcomponents/{p-xWuaNtJy.js → p-Ba8jdOkX.js} +1 -1
- package/dist/webcomponents/{p-DvnFba1A.js → p-BdpSLMs7.js} +1 -1
- package/dist/webcomponents/p-BqNNwq6C.js +1 -0
- package/dist/webcomponents/{p-BBSnDYJw.js → p-Bt4GjEWL.js} +1 -1
- package/dist/webcomponents/{p-C-zuQNNP.js → p-BxKbnILQ.js} +1 -1
- package/dist/webcomponents/{p-D9sqTVmd.js → p-CKiAlBsU.js} +1 -1
- package/dist/webcomponents/{p-CDu7TeCZ.js → p-Cm9f5fyh.js} +1 -1
- package/dist/webcomponents/p-D8ytux5N.js +1 -0
- package/dist/webcomponents/p-DAZd_gFd.js +1 -0
- package/dist/webcomponents/{p-DdeBubpX.js → p-Dk26hk5T.js} +1 -1
- package/dist/webcomponents/p-DrMJliVY.js +1 -0
- package/dist/webcomponents/{p-Dzv0P2Ly.js → p-NZS8uCtH.js} +1 -1
- package/dist/webcomponents/p-OeJ-3w3l.js +9 -0
- package/dist/webcomponents/p-XIWgia4J.js +1 -0
- package/dist/webcomponents/{p-8db8d7e7.entry.js → p-a2c25cc4.entry.js} +1 -1
- package/dist/webcomponents/{p-de1ccbea.entry.js → p-a56e43a1.entry.js} +1 -1
- package/dist/webcomponents/{p-a3b48ba3.entry.js → p-a7a1b168.entry.js} +1 -1
- package/dist/webcomponents/{p-85c0abdb.entry.js → p-a9e82502.entry.js} +1 -1
- package/dist/webcomponents/{p-BSyTbuZy.js → p-av6jyzyC.js} +1 -1
- package/dist/webcomponents/{p-0b169fac.entry.js → p-b0b6083f.entry.js} +1 -1
- package/dist/webcomponents/{p-86eb32d8.entry.js → p-b21010cb.entry.js} +1 -1
- package/dist/webcomponents/{p-1e34c488.entry.js → p-b62ff001.entry.js} +1 -1
- package/dist/webcomponents/{p-c1b48216.entry.js → p-b8351983.entry.js} +1 -1
- package/dist/webcomponents/{p-3960e6b7.entry.js → p-bc2dddf3.entry.js} +1 -1
- package/dist/webcomponents/{p-3e10a0de.entry.js → p-c4767c7b.entry.js} +1 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +1 -0
- package/dist/webcomponents/{p-0a4fcb15.entry.js → p-ca87c609.entry.js} +1 -1
- package/dist/webcomponents/{p-ba2ab989.entry.js → p-cf3e3394.entry.js} +1 -1
- package/dist/webcomponents/{p-e0e6c2df.entry.js → p-d01a1076.entry.js} +1 -1
- package/dist/webcomponents/{p-a4520dba.entry.js → p-d5edbea3.entry.js} +1 -1
- package/dist/webcomponents/{p-b17ce21d.entry.js → p-d79c5ee4.entry.js} +1 -1
- package/dist/webcomponents/{p-562447ad.entry.js → p-e02d7751.entry.js} +4 -4
- package/dist/webcomponents/{p-c3cc4ad6.entry.js → p-e07506b7.entry.js} +1 -1
- package/dist/webcomponents/{p-cc558e25.entry.js → p-e17b92ec.entry.js} +1 -1
- package/dist/webcomponents/p-ea254f14.entry.js +1 -0
- package/dist/webcomponents/{p-ca1c2048.entry.js → p-ebb7b693.entry.js} +1 -1
- package/dist/webcomponents/{p-0e4cda77.entry.js → p-f1b9cbf0.entry.js} +1 -1
- package/dist/webcomponents/{p-Cz0yhyYu.js → p-fE5A37L5.js} +1 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +1 -0
- package/dist/webcomponents/p-nb_LhbJq.js +1 -0
- package/dist/webcomponents/{p--RbNhyet.js → p-oTtn8xDw.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +0 -21
- package/dist/cjs/styled-host-Ch0-dxF-.js +0 -11
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +0 -435
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-list.js +0 -52
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +0 -72
- package/dist/esm/bank-account-document-form-inputs.entry.js +0 -19
- package/dist/esm/styled-host-D84RBv1W.js +0 -9
- package/dist/module/document-upload-form-step.d.ts +0 -11
- package/dist/module/document-upload-form-step.js +0 -6
- package/dist/module/document-upload-form-step2.js +0 -397
- package/dist/module/document-upload-list.d.ts +0 -11
- package/dist/module/document-upload-list.js +0 -6
- package/dist/module/document-upload-list2.js +0 -46
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.d.ts +0 -44
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-list.d.ts +0 -6
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +0 -44
- package/dist/webcomponents/p-37676092.entry.js +0 -1
- package/dist/webcomponents/p-54ee2a30.entry.js +0 -1
- package/dist/webcomponents/p-58adef16.entry.js +0 -1
- package/dist/webcomponents/p-8R9xLun-.js +0 -1
- package/dist/webcomponents/p-92e7ce54.entry.js +0 -1
- package/dist/webcomponents/p-9ce2a98a.entry.js +0 -1
- package/dist/webcomponents/p-B1yVkh15.js +0 -1
- package/dist/webcomponents/p-BzXQDB0t.js +0 -1
- package/dist/webcomponents/p-C_ifLmT1.js +0 -9
- package/dist/webcomponents/p-D9ZHVy-j.js +0 -1
- package/dist/webcomponents/p-DV4n8kZd.js +0 -1
- package/dist/webcomponents/p-DzEdYT8R.js +0 -1
- package/dist/webcomponents/p-a2ed63df.entry.js +0 -1
- package/dist/webcomponents/p-a9976353.entry.js +0 -1
- package/dist/webcomponents/p-c9599fc7.entry.js +0 -1
- package/dist/webcomponents/p-cab840bd.entry.js +0 -1
- package/dist/webcomponents/p-n_pmf4AT.js +0 -1
- package/dist/webcomponents/p-vUN_uvAi.js +0 -1
|
@@ -1,25 +1,28 @@
|
|
|
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 { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './Plaid.js';
|
|
4
|
+
import { E as EntityDocumentType, j as EntityDocumentStorage, k as EntityDocument, 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 } from './business.service.js';
|
|
10
|
-
import { c as create$3, a as create$6, F as FormController } from './form.js';
|
|
8
|
+
import { m as makeGetBusiness, e as makePostBankAccount, f as makePostDocumentRecord } from './payment-provisioning-actions.js';
|
|
9
|
+
import { B as BusinessService, a as BusinessBankAccountService, D as DocumentRecordService } from './business.service.js';
|
|
10
|
+
import { c as create$3, a as create$6, d as create$8, 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 { E 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$
|
|
19
|
+
import { d as defineCustomElement$b } from './bank-account-document-form-inputs2.js';
|
|
20
|
+
import { d as defineCustomElement$a } from './bank-account-form-inputs2.js';
|
|
21
|
+
import { d as defineCustomElement$9 } from './bank-account-form-inputs-canada2.js';
|
|
22
|
+
import { d as defineCustomElement$8 } from './bank-account-read-only-value2.js';
|
|
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';
|
|
23
26
|
import { d as defineCustomElement$4 } from './form-control-select2.js';
|
|
24
27
|
import { d as defineCustomElement$3 } from './form-control-text2.js';
|
|
25
28
|
import { d as defineCustomElement$2 } from './form-control-tooltip2.js';
|
|
@@ -62,6 +65,9 @@ class BankAccount {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
|
|
68
|
+
const checkExistingDocs = (documents, documentType) => {
|
|
69
|
+
return documents.some((doc) => doc.document_type === documentType);
|
|
70
|
+
};
|
|
65
71
|
const buildCommonFieldRules = (allowOptionalFields) => {
|
|
66
72
|
if (allowOptionalFields) {
|
|
67
73
|
return {
|
|
@@ -80,6 +86,30 @@ const buildCommonFieldRules = (allowOptionalFields) => {
|
|
|
80
86
|
account_number: accountNumberValidation.required('Enter account number'),
|
|
81
87
|
};
|
|
82
88
|
};
|
|
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
|
+
};
|
|
83
113
|
const buildUSARules = (allowOptionalFields) => {
|
|
84
114
|
if (allowOptionalFields) {
|
|
85
115
|
return { routing_number: routingNumberValidation.nullable() };
|
|
@@ -104,17 +134,17 @@ const buildCANRules = (allowOptionalFields) => {
|
|
|
104
134
|
transit_number: transitNumberValidation.required('Enter transit number'),
|
|
105
135
|
};
|
|
106
136
|
};
|
|
107
|
-
const businessBankAccountSchemaUSA = (allowOptionalFields) => {
|
|
108
|
-
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildUSARules(allowOptionalFields));
|
|
109
|
-
return create$3().shape(shape);
|
|
137
|
+
const businessBankAccountSchemaUSA = (documents, allowOptionalFields) => {
|
|
138
|
+
const shape = Object.assign(Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildUSARules(allowOptionalFields)), buildDocumentRules(documents, allowOptionalFields));
|
|
139
|
+
return create$3().shape(shape, [['voided_check', 'bank_statement']]);
|
|
110
140
|
};
|
|
111
|
-
const businessBankAccountSchemaCAN = (allowOptionalFields) => {
|
|
112
|
-
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildCANRules(allowOptionalFields));
|
|
113
|
-
return create$3().shape(shape);
|
|
141
|
+
const businessBankAccountSchemaCAN = (documents, allowOptionalFields) => {
|
|
142
|
+
const shape = Object.assign(Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildCANRules(allowOptionalFields)), buildDocumentRules(documents, allowOptionalFields));
|
|
143
|
+
return create$3().shape(shape, [['voided_check', 'bank_statement']]);
|
|
114
144
|
};
|
|
115
145
|
const bankAccountSchemaByCountry = {
|
|
116
|
-
[CountryCode.USA]: (allowOptionalFields) => businessBankAccountSchemaUSA(allowOptionalFields),
|
|
117
|
-
[CountryCode.CAN]: (allowOptionalFields) => businessBankAccountSchemaCAN(allowOptionalFields),
|
|
146
|
+
[CountryCode.USA]: (allowOptionalFields, documents = []) => businessBankAccountSchemaUSA(documents, allowOptionalFields),
|
|
147
|
+
[CountryCode.CAN]: (allowOptionalFields, documents = []) => businessBankAccountSchemaCAN(documents, allowOptionalFields),
|
|
118
148
|
};
|
|
119
149
|
|
|
120
150
|
const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class BusinessBankAccountFormStep extends HTMLElement {
|
|
@@ -128,13 +158,15 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
128
158
|
this.formLoading = createEvent(this, "formLoading", 7);
|
|
129
159
|
this.errors = {};
|
|
130
160
|
this.bankAccount = {};
|
|
161
|
+
this.existingDocuments = [];
|
|
162
|
+
this.documentData = new EntityDocumentStorage();
|
|
131
163
|
this.isLoading = false;
|
|
132
164
|
this.viewMode = 'manual';
|
|
133
165
|
this.bankAccountVerification = false;
|
|
134
166
|
this.platformAccountId = null;
|
|
135
167
|
this.getSchema = () => {
|
|
136
168
|
const schema = bankAccountSchemaByCountry[this.country];
|
|
137
|
-
return schema(this.allowOptionalFields);
|
|
169
|
+
return schema(this.allowOptionalFields, this.existingDocuments);
|
|
138
170
|
};
|
|
139
171
|
this.initializeFormController = () => {
|
|
140
172
|
this.formController = new FormController(this.getSchema());
|
|
@@ -151,6 +183,12 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
151
183
|
this.inputHandler = (name, value) => {
|
|
152
184
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
153
185
|
};
|
|
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
|
+
};
|
|
154
192
|
this.getData = () => {
|
|
155
193
|
this.isLoading = true;
|
|
156
194
|
this.getBusiness({
|
|
@@ -173,10 +211,12 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
173
211
|
};
|
|
174
212
|
this.handleChangeBankAccount = () => {
|
|
175
213
|
this.viewMode = this.plaidAvailable ? 'plaid' : 'manual';
|
|
214
|
+
this.documentData = new EntityDocumentStorage();
|
|
176
215
|
this.initializeFormController();
|
|
177
216
|
};
|
|
178
217
|
this.handleCancel = () => {
|
|
179
218
|
this.viewMode = this.existingBankAccount ? 'readonly' : 'plaid';
|
|
219
|
+
this.documentData = new EntityDocumentStorage();
|
|
180
220
|
this.initializeFormController();
|
|
181
221
|
};
|
|
182
222
|
this.handleToggleToManualEntry = () => {
|
|
@@ -192,6 +232,66 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
192
232
|
});
|
|
193
233
|
});
|
|
194
234
|
};
|
|
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
|
+
};
|
|
195
295
|
}
|
|
196
296
|
propChanged() {
|
|
197
297
|
this.initializeApi();
|
|
@@ -230,6 +330,10 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
230
330
|
authToken: this.authToken,
|
|
231
331
|
service: new BusinessBankAccountService()
|
|
232
332
|
});
|
|
333
|
+
this.postDocumentRecord = makePostDocumentRecord({
|
|
334
|
+
authToken: this.authToken,
|
|
335
|
+
service: new DocumentRecordService()
|
|
336
|
+
});
|
|
233
337
|
}
|
|
234
338
|
else {
|
|
235
339
|
this.errorEvent.emit({
|
|
@@ -255,7 +359,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
255
359
|
return this.bankAccountVerification || this.existingBankAccount;
|
|
256
360
|
}
|
|
257
361
|
processBusinessResponse(data) {
|
|
258
|
-
const { bank_accounts, settings, platform_account_id } = data;
|
|
362
|
+
const { bank_accounts, documents, settings, platform_account_id } = data;
|
|
259
363
|
if (bank_accounts.length > 0) {
|
|
260
364
|
this.bankAccount = new BankAccount(bank_accounts[bank_accounts.length - 1]);
|
|
261
365
|
}
|
|
@@ -263,6 +367,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
263
367
|
this.bankAccount = new BankAccount({});
|
|
264
368
|
this.bankAccount.business_id = this.businessId;
|
|
265
369
|
}
|
|
370
|
+
this.existingDocuments = documents;
|
|
266
371
|
this.bankAccountVerification = settings.bank_account_verification === true;
|
|
267
372
|
this.platformAccountId = platform_account_id;
|
|
268
373
|
}
|
|
@@ -283,6 +388,11 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
283
388
|
const bankAccountPosted = await this.postBankAccountData();
|
|
284
389
|
if (!bankAccountPosted)
|
|
285
390
|
return;
|
|
391
|
+
}
|
|
392
|
+
const documentsUploaded = await this.postBusinessDocuments();
|
|
393
|
+
if (!documentsUploaded)
|
|
394
|
+
return;
|
|
395
|
+
if (this.viewMode === 'manual') {
|
|
286
396
|
this.viewMode = 'readonly';
|
|
287
397
|
await this.refreshBankAccountData();
|
|
288
398
|
}
|
|
@@ -346,6 +456,27 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
346
456
|
});
|
|
347
457
|
});
|
|
348
458
|
}
|
|
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
|
+
}
|
|
349
480
|
renderBankAccountInputs(disabled) {
|
|
350
481
|
const defaultValue = this.formController.getInitialValues();
|
|
351
482
|
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 }));
|
|
@@ -362,11 +493,14 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
362
493
|
renderManualEntryView() {
|
|
363
494
|
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"))));
|
|
364
495
|
}
|
|
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
|
+
}
|
|
365
499
|
render() {
|
|
366
500
|
if (this.isLoading) {
|
|
367
501
|
return h(PaymentProvisioningLoading, null);
|
|
368
502
|
}
|
|
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())));
|
|
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()), this.viewMode !== 'plaid' && this.renderDocumentUploads()));
|
|
370
504
|
}
|
|
371
505
|
static get watchers() { return {
|
|
372
506
|
"authToken": ["propChanged"],
|
|
@@ -381,10 +515,14 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
|
|
|
381
515
|
"formController": [32],
|
|
382
516
|
"errors": [32],
|
|
383
517
|
"bankAccount": [32],
|
|
518
|
+
"existingDocuments": [32],
|
|
519
|
+
"documentData": [32],
|
|
384
520
|
"isLoading": [32],
|
|
385
521
|
"viewMode": [32],
|
|
386
522
|
"getBusiness": [32],
|
|
387
523
|
"postBankAccount": [32],
|
|
524
|
+
"postDocumentRecord": [32],
|
|
525
|
+
"postDocument": [32],
|
|
388
526
|
"bankAccountVerification": [32],
|
|
389
527
|
"platformAccountId": [32],
|
|
390
528
|
"validateAndSubmit": [64]
|
|
@@ -397,29 +535,44 @@ function defineCustomElement() {
|
|
|
397
535
|
if (typeof customElements === "undefined") {
|
|
398
536
|
return;
|
|
399
537
|
}
|
|
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"];
|
|
538
|
+
const components = ["business-bank-account-form-step", "bank-account-document-form-inputs", "bank-account-form-inputs", "bank-account-form-inputs-canada", "bank-account-read-only-value", "business-documents-on-file", "custom-popper", "form-control-file", "form-control-select", "form-control-text", "form-control-tooltip", "plaid-verification"];
|
|
401
539
|
components.forEach(tagName => { switch (tagName) {
|
|
402
540
|
case "business-bank-account-form-step":
|
|
403
541
|
if (!customElements.get(tagName)) {
|
|
404
542
|
customElements.define(tagName, BusinessBankAccountFormStep);
|
|
405
543
|
}
|
|
406
544
|
break;
|
|
545
|
+
case "bank-account-document-form-inputs":
|
|
546
|
+
if (!customElements.get(tagName)) {
|
|
547
|
+
defineCustomElement$b();
|
|
548
|
+
}
|
|
549
|
+
break;
|
|
407
550
|
case "bank-account-form-inputs":
|
|
408
551
|
if (!customElements.get(tagName)) {
|
|
409
|
-
defineCustomElement$
|
|
552
|
+
defineCustomElement$a();
|
|
410
553
|
}
|
|
411
554
|
break;
|
|
412
555
|
case "bank-account-form-inputs-canada":
|
|
413
556
|
if (!customElements.get(tagName)) {
|
|
414
|
-
defineCustomElement$
|
|
557
|
+
defineCustomElement$9();
|
|
415
558
|
}
|
|
416
559
|
break;
|
|
417
560
|
case "bank-account-read-only-value":
|
|
418
561
|
if (!customElements.get(tagName)) {
|
|
419
|
-
defineCustomElement$
|
|
562
|
+
defineCustomElement$8();
|
|
563
|
+
}
|
|
564
|
+
break;
|
|
565
|
+
case "business-documents-on-file":
|
|
566
|
+
if (!customElements.get(tagName)) {
|
|
567
|
+
defineCustomElement$7();
|
|
420
568
|
}
|
|
421
569
|
break;
|
|
422
570
|
case "custom-popper":
|
|
571
|
+
if (!customElements.get(tagName)) {
|
|
572
|
+
defineCustomElement$6();
|
|
573
|
+
}
|
|
574
|
+
break;
|
|
575
|
+
case "form-control-file":
|
|
423
576
|
if (!customElements.get(tagName)) {
|
|
424
577
|
defineCustomElement$5();
|
|
425
578
|
}
|
|
@@ -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, E 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].
|
|
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: () => {
|
|
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.required(`Enter valid ${countryLabels.CAN.taxIdLabel} without dashes`),
|
|
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, E 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].
|
|
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: () => {
|
|
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: '66292d95dd8ead1367c1eef3a96aa1fb9e707810', class: "col-12" }, h("form-control-text", { key: 'de144c99e186470c37d0d330c8aa480fb00ef037', name: "website_url", label: "Website URL", defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: 'c43095be28c660a2312c37c6856abeae7f952299', class: "col-12 col-md-6" }, h("form-control-text", { key: 'e4afa2d37cd5dc26006b116c7d574e1c7dd4a0ef', name: "email", label: "Email Address", defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: 'a68760b724c42da71a93ab7944152a8137d51cc8', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '6532f13f43391e8752f625296fb3685d7d68e084', 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 { z as card, h as heading2, A as table, B as tableHeadCell, C 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,56 +76,6 @@ 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
|
-
];
|
|
129
79
|
const bankAccountTypeOptions = [
|
|
130
80
|
{
|
|
131
81
|
label: 'Checking',
|
|
@@ -137,4 +87,4 @@ const bankAccountTypeOptions = [
|
|
|
137
87
|
}
|
|
138
88
|
];
|
|
139
89
|
|
|
140
|
-
export { bankAccountTypeOptions as a, businessServiceReceivedOptions as b, businessClassificationOptions as c,
|
|
90
|
+
export { bankAccountTypeOptions as a, businessServiceReceivedOptions as b, businessClassificationOptions as c, recurringPaymentsOptions as r, seasonalBusinessOptions as s };
|
|
@@ -24,9 +24,7 @@ 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:
|
|
28
|
-
? ownershipPercentageValidation.required('Enter ownership percentage')
|
|
29
|
-
: ownershipPercentageValidation.nullable(),
|
|
27
|
+
ownership_percentage: ownershipPercentageValidation.nullable(),
|
|
30
28
|
address: addressSchemaUSA(false),
|
|
31
29
|
});
|
|
32
30
|
// Internal CAN schemas
|
|
@@ -48,10 +46,8 @@ const strictSchemaCAN = (role) => create$3({
|
|
|
48
46
|
phone: phoneValidation.required('Enter phone number'),
|
|
49
47
|
dob_full: dobValidation(role).required('Enter date of birth'),
|
|
50
48
|
ssn_last4: create$6().nullable(),
|
|
51
|
-
identification_number: makeIdentityNumberValidation(CountryCode.CAN)
|
|
52
|
-
ownership_percentage:
|
|
53
|
-
? ownershipPercentageValidation.required('Enter ownership percentage')
|
|
54
|
-
: ownershipPercentageValidation.nullable(),
|
|
49
|
+
identification_number: makeIdentityNumberValidation(CountryCode.CAN),
|
|
50
|
+
ownership_percentage: ownershipPercentageValidation.nullable(),
|
|
55
51
|
address: addressSchemaCAN(false),
|
|
56
52
|
});
|
|
57
53
|
const identitySchemaUSA = (role, allowOptionalFields) => allowOptionalFields ? schemaUSA(role) : strictSchemaUSA(role);
|
|
@@ -145,14 +145,6 @@ 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
|
-
}
|
|
156
148
|
const formSubmissions = this.refs.map(ref => ref.submit());
|
|
157
149
|
const submissionsValid = (await Promise.all(formSubmissions)).every(result => result);
|
|
158
150
|
if (!submissionsValid) {
|
|
@@ -1,10 +1,8 @@
|
|
|
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,
|
|
5
|
-
import { a as CountryCode } from './Business.js';
|
|
4
|
+
import { h as heading2, l as label, c as inputDisabled, E as buttonSecondary } from './parts.js';
|
|
6
5
|
import { c as countryLabels } from './country-config.js';
|
|
7
|
-
import { d as businessTitleOptions } from './business-form-options.js';
|
|
8
6
|
import { d as defineCustomElement$8 } from './custom-popper2.js';
|
|
9
7
|
import { d as defineCustomElement$7 } from './form-address-fields2.js';
|
|
10
8
|
import { d as defineCustomElement$6 } from './form-control-date2.js';
|
|
@@ -30,14 +28,14 @@ const BusinessRepresentativeFormInputs = /*@__PURE__*/ proxyCustomElement(class
|
|
|
30
28
|
}
|
|
31
29
|
render() {
|
|
32
30
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
33
|
-
return (h("form", { key: '
|
|
31
|
+
return (h("form", { key: 'ef49167cc726b3d4efa128503553a77a7627ebee' }, h("fieldset", { key: '3714ce7eab6e9cee062911564d1c2635b68dfc8b' }, h("div", { key: '4f27236b0438e29d7449bf5e9f71c00c7245effa', class: "d-flex align-items-center gap-2" }, h("legend", { key: 'adc144da314549264571b245c5388ab56c1dbbf1', class: "mb-0", part: heading2 }, "Representative"), h("form-control-tooltip", { key: 'bcc76add04febe984427103a594aa63cab17bd27', 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: '98bfed19989ee57e451a7005f3e60af16cc5d3b5', class: "mt-2" }), h("div", { key: '8f5e0e3deed2627ecf9f77290f268c0e2ee68bfa', class: "row gy-3" }, h("div", { key: 'b1205284a54a608b9c3b6be386e134849c9c6b25', class: "col-12 col-md-8" }, h("form-control-text", { key: '36fcd91ca263adfd9fb69dc88f15404f93a8bc13', 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: '879337d3c6a120f5dc9de3cd3364b34b9c4689df', class: "col-12 col-md-4" }, h("form-control-text", { key: 'ff2e4d29e76b93693735b35cbaca4416f0cd28a0', name: "title", label: "Title", defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler, helpText: "Role at your business, e.g. President, CEO, Treasurer." })), h("div", { key: '2a011b74b4c203ae4a309d7d76ea8fd0631a5f2c', class: "col-12 col-md-6" }, h("form-control-text", { key: '1ef20c59829ed3abe81cc53355bbafd5d4894360', 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: '460dad175238fdfea8c79666343943a95aac0fd5', class: "col-12 col-md-6" }, h("form-control-number-masked", { key: '7bd3ad79f6da1d33e38c2246d9c0378c2ef8b7d7', 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: 'cda84bfc9f88a35177a42b7f9ec4c58292600c0b', class: "col-12 col-md-4" }, h("form-control-date", { key: '5ed66fabc97afc94a5839135add25dbcb5237900', 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: '0e19619fd081ea9dacd0eb25388a4c7b2c993312', 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: 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 }, 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: () => {
|
|
34
32
|
this.isEditingIdentification = true;
|
|
35
33
|
// Clear current value to force validation
|
|
36
34
|
updateFormValues(this.formController, {
|
|
37
35
|
identification_number: '',
|
|
38
36
|
ssn_last4: null
|
|
39
37
|
});
|
|
40
|
-
} }, "Change"))))), h("div", { key: '
|
|
38
|
+
} }, "Change"))))), h("div", { key: '6647390b209f5a630bf60e8952a7b0e70c92ca8a', class: "col-12" }, h("identity-address-form", { key: '9755d0450fc8d83ba0a98a304455df346ff33e7f', errors: this.errors.address, defaultValues: (_j = this.representativeDefaultValue) === null || _j === void 0 ? void 0 : _j.address, handleFormUpdate: this.onAddressFormUpdate, country: this.country }))))));
|
|
41
39
|
}
|
|
42
40
|
}, [256, "business-representative-form-inputs", {
|
|
43
41
|
"representativeDefaultValue": [8, "representative-default-value"],
|