@justifi/webcomponents 6.12.5 → 6.12.6-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-CITnMj7H.js → Analytics-CexlbLRl.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-CZMgXZID.js → check-pkg-version-jeIQGJ8A.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-DOiqjXmm.js → package-CDegPd7E.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-Cg17Xhj_.js → Analytics-5J6H0ALl.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-D-rHqtUI.js → check-pkg-version-C7cHTIM0.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-B6YPrwyC.js → package-8R9xLun-.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-d5e7291a.entry.js → p-04d6d725.entry.js} +1 -1
- package/dist/webcomponents/{p-8e821593.entry.js → p-086f7eea.entry.js} +1 -1
- 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-b62ff001.entry.js → p-1e34c488.entry.js} +1 -1
- package/dist/webcomponents/{p-c4415366.entry.js → p-29b82954.entry.js} +1 -1
- package/dist/webcomponents/{p-89844a98.entry.js → p-2e063c5d.entry.js} +1 -1
- package/dist/webcomponents/p-37676092.entry.js +1 -0
- package/dist/webcomponents/p-3960e6b7.entry.js +1 -0
- package/dist/webcomponents/{p-e322dcba.entry.js → p-3bcac405.entry.js} +1 -1
- package/dist/webcomponents/{p-c4767c7b.entry.js → p-3e10a0de.entry.js} +1 -1
- package/dist/webcomponents/{p-8964f4ca.entry.js → p-48a866ae.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-397b28ba.entry.js → p-562447ad.entry.js} +4 -4
- package/dist/webcomponents/p-58adef16.entry.js +1 -0
- package/dist/webcomponents/{p-afe714cb.entry.js → p-5f071ee0.entry.js} +1 -1
- package/dist/webcomponents/{p-d1eabad2.entry.js → p-6b21947c.entry.js} +1 -1
- package/dist/webcomponents/{p-1f34b2f7.entry.js → p-80fdd013.entry.js} +1 -1
- package/dist/webcomponents/{p-7ff9ce05.entry.js → p-85c0abdb.entry.js} +1 -1
- package/dist/webcomponents/{p-0708cb76.entry.js → p-86eb32d8.entry.js} +1 -1
- package/dist/webcomponents/p-8R9xLun-.js +1 -0
- package/dist/webcomponents/{p-60c65da4.entry.js → p-8db8d7e7.entry.js} +1 -1
- package/dist/webcomponents/{p-65281b33.entry.js → p-8ed1bc07.entry.js} +1 -1
- package/dist/webcomponents/p-92d8a14b.entry.js +1 -0
- package/dist/webcomponents/{p-63e88b48.entry.js → p-92e7ce54.entry.js} +1 -1
- package/dist/webcomponents/{p-9153c121.entry.js → p-947950cc.entry.js} +1 -1
- package/dist/webcomponents/{p-c108cd71.entry.js → p-9ce2a98a.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-DO9lqnbB.js → p-CeW0EPHy.js} +1 -1
- package/dist/webcomponents/{p-fE5A37L5.js → p-Cz0yhyYu.js} +1 -1
- package/dist/webcomponents/p-D9ZHVy-j.js +1 -0
- 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-DjjAx7PF.js → p-DvnFba1A.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-a2ed63df.entry.js +1 -0
- package/dist/webcomponents/{p-a7a1b168.entry.js → p-a3b48ba3.entry.js} +1 -1
- package/dist/webcomponents/{p-1f7f2436.entry.js → p-a4520dba.entry.js} +1 -1
- package/dist/webcomponents/{p-7ebed752.entry.js → p-a5ad9183.entry.js} +1 -1
- package/dist/webcomponents/{p-95317547.entry.js → p-a7e0ab9b.entry.js} +1 -1
- package/dist/webcomponents/p-a9976353.entry.js +1 -0
- package/dist/webcomponents/{p-d79c5ee4.entry.js → p-b17ce21d.entry.js} +1 -1
- package/dist/webcomponents/{p-45668f01.entry.js → p-ba2ab989.entry.js} +1 -1
- package/dist/webcomponents/{p-bde7fe69.entry.js → p-c1b48216.entry.js} +1 -1
- package/dist/webcomponents/{p-1d294e34.entry.js → p-c2e09203.entry.js} +1 -1
- package/dist/webcomponents/{p-90f2f71d.entry.js → p-c3cc4ad6.entry.js} +1 -1
- package/dist/webcomponents/p-c9599fc7.entry.js +1 -0
- package/dist/webcomponents/{p-58b5e08e.entry.js → p-ca1c2048.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-91940d05.entry.js → p-de1ccbea.entry.js} +1 -1
- package/dist/webcomponents/{p-0ce6c1b1.entry.js → p-e0e6c2df.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-137a36a4.entry.js +0 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +0 -1
- package/dist/webcomponents/p-5G1OMxZz.js +0 -1
- package/dist/webcomponents/p-8d6856e7.entry.js +0 -1
- package/dist/webcomponents/p-Aacb4jqT.js +0 -1
- package/dist/webcomponents/p-B6YPrwyC.js +0 -1
- package/dist/webcomponents/p-BqNNwq6C.js +0 -1
- package/dist/webcomponents/p-D8ytux5N.js +0 -1
- package/dist/webcomponents/p-DrMJliVY.js +0 -1
- package/dist/webcomponents/p-XIWgia4J.js +0 -1
- package/dist/webcomponents/p-b192f251.entry.js +0 -1
- package/dist/webcomponents/p-b436a7d2.entry.js +0 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +0 -1
- package/dist/webcomponents/p-e6ec9e6d.entry.js +0 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +0 -1
- package/dist/webcomponents/p-nb_LhbJq.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { ComponentErrorCodes, ComponentErrorSeverity, BankAccount
|
|
3
|
-
import { makeGetBusiness, makePostBankAccount
|
|
4
|
-
import { BusinessService, BusinessBankAccountService
|
|
2
|
+
import { ComponentErrorCodes, ComponentErrorSeverity, BankAccount } from "../../../../api";
|
|
3
|
+
import { makeGetBusiness, makePostBankAccount } from "../payment-provisioning-actions";
|
|
4
|
+
import { BusinessService, BusinessBankAccountService } from "../../../../api/services/business.service";
|
|
5
5
|
import { CountryCode } from "../../../../utils/country-codes";
|
|
6
6
|
import { bankAccountSchemaByCountry } from "../../schemas/business-bank-account-schema";
|
|
7
7
|
import { FormController } from "../../../../ui-components/form/form";
|
|
@@ -13,15 +13,13 @@ export class BusinessBankAccountFormStep {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
this.errors = {};
|
|
15
15
|
this.bankAccount = {};
|
|
16
|
-
this.existingDocuments = [];
|
|
17
|
-
this.documentData = new EntityDocumentStorage();
|
|
18
16
|
this.isLoading = false;
|
|
19
17
|
this.viewMode = 'manual';
|
|
20
18
|
this.bankAccountVerification = false;
|
|
21
19
|
this.platformAccountId = null;
|
|
22
20
|
this.getSchema = () => {
|
|
23
21
|
const schema = bankAccountSchemaByCountry[this.country];
|
|
24
|
-
return schema(this.allowOptionalFields
|
|
22
|
+
return schema(this.allowOptionalFields);
|
|
25
23
|
};
|
|
26
24
|
this.initializeFormController = () => {
|
|
27
25
|
this.formController = new FormController(this.getSchema());
|
|
@@ -38,12 +36,6 @@ export class BusinessBankAccountFormStep {
|
|
|
38
36
|
this.inputHandler = (name, value) => {
|
|
39
37
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
40
38
|
};
|
|
41
|
-
this.storeFiles = (e) => {
|
|
42
|
-
const fileList = Array.from(e.detail.fileList);
|
|
43
|
-
const docType = e.detail.document_type;
|
|
44
|
-
const documentList = fileList.map(file => new EntityDocument({ file, document_type: docType }, this.businessId));
|
|
45
|
-
this.documentData[docType] = documentList;
|
|
46
|
-
};
|
|
47
39
|
this.getData = () => {
|
|
48
40
|
this.isLoading = true;
|
|
49
41
|
this.getBusiness({
|
|
@@ -66,12 +58,10 @@ export class BusinessBankAccountFormStep {
|
|
|
66
58
|
};
|
|
67
59
|
this.handleChangeBankAccount = () => {
|
|
68
60
|
this.viewMode = this.plaidAvailable ? 'plaid' : 'manual';
|
|
69
|
-
this.documentData = new EntityDocumentStorage();
|
|
70
61
|
this.initializeFormController();
|
|
71
62
|
};
|
|
72
63
|
this.handleCancel = () => {
|
|
73
64
|
this.viewMode = this.existingBankAccount ? 'readonly' : 'plaid';
|
|
74
|
-
this.documentData = new EntityDocumentStorage();
|
|
75
65
|
this.initializeFormController();
|
|
76
66
|
};
|
|
77
67
|
this.handleToggleToManualEntry = () => {
|
|
@@ -87,66 +77,6 @@ export class BusinessBankAccountFormStep {
|
|
|
87
77
|
});
|
|
88
78
|
});
|
|
89
79
|
};
|
|
90
|
-
this.postDocumentRecordData = async (docData) => {
|
|
91
|
-
this.isLoading = true;
|
|
92
|
-
const payload = docData.record_data;
|
|
93
|
-
return new Promise((resolve) => {
|
|
94
|
-
this.postDocumentRecord({
|
|
95
|
-
payload,
|
|
96
|
-
onSuccess: (response) => {
|
|
97
|
-
resolve(this.handleDocRecordResponse(docData, response));
|
|
98
|
-
},
|
|
99
|
-
onError: ({ error, code, severity }) => {
|
|
100
|
-
this.errorEvent.emit({
|
|
101
|
-
message: error,
|
|
102
|
-
errorCode: code,
|
|
103
|
-
severity: severity
|
|
104
|
-
});
|
|
105
|
-
resolve(false);
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
this.handleDocRecordResponse = (docData, response) => {
|
|
111
|
-
if (response.error) {
|
|
112
|
-
this.errorEvent.emit({
|
|
113
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
114
|
-
message: response.error.message,
|
|
115
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
116
|
-
data: response.error,
|
|
117
|
-
});
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
docData.setPresignedUrl(response.data.presigned_url);
|
|
122
|
-
return true;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
this.uploadDocument = async (docData) => {
|
|
126
|
-
if (!docData.presigned_url) {
|
|
127
|
-
throw new Error('Presigned URL is not set');
|
|
128
|
-
}
|
|
129
|
-
const fileData = await docData.getFileData();
|
|
130
|
-
const response = await fetch(docData.presigned_url, {
|
|
131
|
-
method: 'PUT',
|
|
132
|
-
body: fileData
|
|
133
|
-
});
|
|
134
|
-
return this.handleUploadResponse(response);
|
|
135
|
-
};
|
|
136
|
-
this.handleUploadResponse = (response) => {
|
|
137
|
-
if (response.error) {
|
|
138
|
-
this.errorEvent.emit({
|
|
139
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
140
|
-
message: response.error.message,
|
|
141
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
142
|
-
data: response.error,
|
|
143
|
-
});
|
|
144
|
-
return false;
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
80
|
}
|
|
151
81
|
propChanged() {
|
|
152
82
|
this.initializeApi();
|
|
@@ -185,10 +115,6 @@ export class BusinessBankAccountFormStep {
|
|
|
185
115
|
authToken: this.authToken,
|
|
186
116
|
service: new BusinessBankAccountService()
|
|
187
117
|
});
|
|
188
|
-
this.postDocumentRecord = makePostDocumentRecord({
|
|
189
|
-
authToken: this.authToken,
|
|
190
|
-
service: new DocumentRecordService()
|
|
191
|
-
});
|
|
192
118
|
}
|
|
193
119
|
else {
|
|
194
120
|
this.errorEvent.emit({
|
|
@@ -214,7 +140,7 @@ export class BusinessBankAccountFormStep {
|
|
|
214
140
|
return this.bankAccountVerification || this.existingBankAccount;
|
|
215
141
|
}
|
|
216
142
|
processBusinessResponse(data) {
|
|
217
|
-
const { bank_accounts,
|
|
143
|
+
const { bank_accounts, settings, platform_account_id } = data;
|
|
218
144
|
if (bank_accounts.length > 0) {
|
|
219
145
|
this.bankAccount = new BankAccount(bank_accounts[bank_accounts.length - 1]);
|
|
220
146
|
}
|
|
@@ -222,7 +148,6 @@ export class BusinessBankAccountFormStep {
|
|
|
222
148
|
this.bankAccount = new BankAccount({});
|
|
223
149
|
this.bankAccount.business_id = this.businessId;
|
|
224
150
|
}
|
|
225
|
-
this.existingDocuments = documents;
|
|
226
151
|
this.bankAccountVerification = settings.bank_account_verification === true;
|
|
227
152
|
this.platformAccountId = platform_account_id;
|
|
228
153
|
}
|
|
@@ -243,11 +168,6 @@ export class BusinessBankAccountFormStep {
|
|
|
243
168
|
const bankAccountPosted = await this.postBankAccountData();
|
|
244
169
|
if (!bankAccountPosted)
|
|
245
170
|
return;
|
|
246
|
-
}
|
|
247
|
-
const documentsUploaded = await this.postBusinessDocuments();
|
|
248
|
-
if (!documentsUploaded)
|
|
249
|
-
return;
|
|
250
|
-
if (this.viewMode === 'manual') {
|
|
251
171
|
this.viewMode = 'readonly';
|
|
252
172
|
await this.refreshBankAccountData();
|
|
253
173
|
}
|
|
@@ -311,27 +231,6 @@ export class BusinessBankAccountFormStep {
|
|
|
311
231
|
});
|
|
312
232
|
});
|
|
313
233
|
}
|
|
314
|
-
async postBusinessDocuments() {
|
|
315
|
-
this.isLoading = true;
|
|
316
|
-
try {
|
|
317
|
-
const docArray = Object.values(this.documentData).flat();
|
|
318
|
-
if (!docArray.length) {
|
|
319
|
-
return true;
|
|
320
|
-
}
|
|
321
|
-
const recordsCreated = await Promise.all(docArray.map((docData) => this.postDocumentRecordData(docData))); // Create document records
|
|
322
|
-
if (recordsCreated.includes(false)) {
|
|
323
|
-
return false;
|
|
324
|
-
} // Exit if document record creation fails
|
|
325
|
-
const uploadsCompleted = await Promise.all(docArray.map((docData) => this.uploadDocument(docData))); // Upload documents to AWS presigned URLs
|
|
326
|
-
if (uploadsCompleted.includes(false)) {
|
|
327
|
-
return false;
|
|
328
|
-
} // Exit if any upload fails
|
|
329
|
-
return true;
|
|
330
|
-
}
|
|
331
|
-
finally {
|
|
332
|
-
this.isLoading = false;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
234
|
renderBankAccountInputs(disabled) {
|
|
336
235
|
const defaultValue = this.formController.getInitialValues();
|
|
337
236
|
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 }));
|
|
@@ -348,14 +247,11 @@ export class BusinessBankAccountFormStep {
|
|
|
348
247
|
renderManualEntryView() {
|
|
349
248
|
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"))));
|
|
350
249
|
}
|
|
351
|
-
renderDocumentUploads() {
|
|
352
|
-
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 })));
|
|
353
|
-
}
|
|
354
250
|
render() {
|
|
355
251
|
if (this.isLoading) {
|
|
356
252
|
return h(PaymentProvisioningLoading, null);
|
|
357
253
|
}
|
|
358
|
-
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())
|
|
254
|
+
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())));
|
|
359
255
|
}
|
|
360
256
|
static get is() { return "business-bank-account-form-step"; }
|
|
361
257
|
static get properties() {
|
|
@@ -449,14 +345,10 @@ export class BusinessBankAccountFormStep {
|
|
|
449
345
|
"formController": {},
|
|
450
346
|
"errors": {},
|
|
451
347
|
"bankAccount": {},
|
|
452
|
-
"existingDocuments": {},
|
|
453
|
-
"documentData": {},
|
|
454
348
|
"isLoading": {},
|
|
455
349
|
"viewMode": {},
|
|
456
350
|
"getBusiness": {},
|
|
457
351
|
"postBankAccount": {},
|
|
458
|
-
"postDocumentRecord": {},
|
|
459
|
-
"postDocument": {},
|
|
460
352
|
"bankAccountVerification": {},
|
|
461
353
|
"platformAccountId": {}
|
|
462
354
|
};
|
|
@@ -128,7 +128,7 @@ export class BusinessCoreInfoFormStep {
|
|
|
128
128
|
if (this.isLoading) {
|
|
129
129
|
return h(PaymentProvisioningLoading, null);
|
|
130
130
|
}
|
|
131
|
-
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: () => {
|
|
131
|
+
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: () => {
|
|
132
132
|
this.isEditingTaxId = true;
|
|
133
133
|
// Clear last4-equivalent and current value if any future conditional validation depends on it
|
|
134
134
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { tax_id: '', tax_id_last4: null }));
|
|
@@ -122,6 +122,14 @@ export class BusinessOwnersFormStep {
|
|
|
122
122
|
if (!formsValid) {
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
+
if (!this.allowOptionalFields) {
|
|
126
|
+
const percentages = await Promise.all(this.refs.map(ref => ref.getOwnershipPercentage()));
|
|
127
|
+
const total = percentages.reduce((sum, p) => sum + (parseFloat(p) || 0), 0);
|
|
128
|
+
if (total !== 100) {
|
|
129
|
+
await Promise.all(this.refs.map(ref => ref.setOwnershipPercentageError('Ownership percentages must total 100%')));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
125
133
|
const formSubmissions = this.refs.map(ref => ref.submit());
|
|
126
134
|
const submissionsValid = (await Promise.all(formSubmissions)).every(result => result);
|
|
127
135
|
if (!submissionsValid) {
|
|
@@ -2,7 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { updateAddressFormValues, updateDateOfBirthFormValues, updateFormValues } from "../../utils/input-handlers";
|
|
3
3
|
import { PHONE_MASKS, IDENTITY_MASKS } from "../../../../utils/form-input-masks";
|
|
4
4
|
import { heading2, label, inputDisabled, buttonSecondary } from "../../../../styles/parts";
|
|
5
|
+
import { CountryCode } from "../../../../utils/country-codes";
|
|
5
6
|
import { countryLabels } from "../../utils/country-config";
|
|
7
|
+
import { businessTitleOptions } from "../../utils/business-form-options";
|
|
6
8
|
export class BusinessRepresentativeFormInputs {
|
|
7
9
|
constructor() {
|
|
8
10
|
this.isEditingIdentification = false;
|
|
@@ -15,14 +17,14 @@ export class BusinessRepresentativeFormInputs {
|
|
|
15
17
|
}
|
|
16
18
|
render() {
|
|
17
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
18
|
-
return (h("form", { key: '
|
|
20
|
+
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: () => {
|
|
19
21
|
this.isEditingIdentification = true;
|
|
20
22
|
// Clear current value to force validation
|
|
21
23
|
updateFormValues(this.formController, {
|
|
22
24
|
identification_number: '',
|
|
23
25
|
ssn_last4: null
|
|
24
26
|
});
|
|
25
|
-
} }, "Change"))))), h("div", { key: '
|
|
27
|
+
} }, "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 }))))));
|
|
26
28
|
}
|
|
27
29
|
static get is() { return "business-representative-form-inputs"; }
|
|
28
30
|
static get properties() {
|