@justifi/webcomponents 6.13.0-rc.1 → 6.13.0
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-Be2I_aiS.js → Analytics-DaegoP5G.js} +5 -5
- package/dist/cjs/{Api-Bukk55YZ.js → Api-BioDE5he.js} +1 -1
- package/dist/cjs/{Plaid-Aw35bhCX.js → Plaid-QLOFOTeC.js} +13 -13
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/{additional-questions-form-step_14.cjs.entry.js → additional-questions-form-step_15.cjs.entry.js} +391 -175
- package/dist/cjs/additional-questions_5.cjs.entry.js +7 -7
- package/dist/cjs/additional-statement_8.cjs.entry.js +9 -9
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +10 -10
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +21 -0
- package/dist/cjs/bank-account-form.cjs.entry.js +34 -5
- package/dist/cjs/{business-form-options-D_nM7NDk.js → business-form-options-CnlrfbQ6.js} +51 -0
- package/dist/cjs/{business-identity-schema-DI9XFbaD.js → business-identity-schema-BA385xf-.js} +12 -8
- package/dist/cjs/{business.service-CylI3Qrg.js → business.service-DOGeb2O6.js} +2 -2
- package/dist/cjs/card-form.cjs.entry.js +5 -5
- package/dist/cjs/{check-pkg-version-BLLLh6v-.js → check-pkg-version-BNGOOokA.js} +1 -1
- package/dist/cjs/{checkout-actions-8-MUczKw.js → checkout-actions-CjR16i7o.js} +2 -2
- package/dist/cjs/{checkout.service-BYpinbSR.js → checkout.service-Bdr5qUHj.js} +2 -2
- package/dist/cjs/{checkout.store-CztwuCnG.js → checkout.store-CZHrIuaP.js} +9 -3
- package/dist/cjs/{country-config-D7fss2oF.js → country-config-C1bWmF8P.js} +12 -4
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/dispute-notification_2.cjs.entry.js +15 -15
- package/dist/cjs/{event-types-DptNnCEP.js → event-types-DWDQKDv4.js} +2 -2
- package/dist/cjs/form-address-fields_3.cjs.entry.js +3 -3
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
- package/dist/cjs/form-control-number_2.cjs.entry.js +7 -6
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-business-D10Tmct1.js → get-business-CrxvWZh6.js} +2 -2
- package/dist/cjs/{get-payment-details-BB5aa48u.js → get-payment-details-iCEkGDy4.js} +2 -2
- package/dist/cjs/{get-subaccounts-CSD2nAqD.js → get-subaccounts-Dgl7ECtg.js} +3 -3
- package/dist/cjs/hidden-input_2.cjs.entry.js +6 -6
- package/dist/cjs/{index.esm-C1ZPG85l.js → index.esm-BNETBIV_.js} +0 -18
- package/dist/cjs/{insurance-state-Xe2auE-N.js → insurance-state-B-XQRmMs.js} +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +63 -38
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +8 -8
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +18 -8
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +2 -2
- package/dist/cjs/justifi-billing-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-form.cjs.entry.js +15 -15
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +2 -2
- package/dist/cjs/justifi-card-form.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkout.cjs.entry.js +10 -10
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -6
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11 -11
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payment-details.cjs.entry.js +18 -18
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payout-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -15
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +9 -9
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -13
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -10
- package/dist/cjs/justifi-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +11 -11
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +14 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{lodash-CxSkBibc.js → lodash-C4mGy21w.js} +38 -27
- package/dist/cjs/{package-gx36QXN1.js → package-BKwTzSig.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
- package/dist/cjs/{payment-provisioning-actions-DimM0KGV.js → payment-provisioning-actions-B4x7lnyF.js} +9 -9
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +3 -2
- package/dist/cjs/{payment.service-fy5bXXmA.js → payment.service-a5EL3s2d.js} +2 -2
- package/dist/cjs/{payout.service-hp3PTXWI.js → payout.service-BJtGBHsQ.js} +2 -2
- package/dist/cjs/{payouts-status-CF1YT_RL.js → payouts-status-viYMBknO.js} +2 -2
- package/dist/cjs/{plaid.service-9PmS4X0g.js → plaid.service-DpiLY-5D.js} +2 -2
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/{schema-validations-_yWWnnaG.js → schema-validations-C2XsZnqK.js} +24 -10
- package/dist/cjs/styled-host-Ch0-dxF-.js +11 -0
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-D5D76Cnn.js → terminal.service-DN2A-bNx.js} +2 -2
- package/dist/cjs/{utils-Dcde8Zpt.js → utils-BVM6JCW0.js} +1 -1
- package/dist/cjs/{utils-BHi4j5rB.js → utils-D1CWnhex.js} +4 -4
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/actions/payment/get-payments.js +1 -1
- package/dist/collection/actions/refund/refund-actions.js +1 -1
- package/dist/collection/actions/terminal/get-terminal-orders.js +1 -1
- package/dist/collection/actions/void/void-actions.js +1 -1
- package/dist/collection/api/Analytics.js +2 -2
- package/dist/collection/api/Document.js +12 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/business-details/owner-details/owner-details.js +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +9 -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/business-representative/business-representative-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +433 -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 +80 -0
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +7 -7
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +3 -2
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +1 -1
- 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-helpers.js +1 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +10 -7
- package/dist/collection/components/business-forms/utils/business-form-options.js +50 -0
- package/dist/collection/components/business-forms/utils/country-config.js +11 -4
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +30 -2
- package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/billing-form-full.js +2 -2
- package/dist/collection/components/checkout/billing-form/billing-form-schema.js +1 -1
- package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
- package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
- package/dist/collection/components/checkout/card-form/card-form.js +2 -2
- package/dist/collection/components/checkout/justifi-checkout.js +21 -2
- package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
- package/dist/collection/components/dispute-management/dispute-notification.js +3 -3
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-actions.js +3 -3
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/filters/utils.js +1 -1
- package/dist/collection/components/gross-payment-chart/chart-utils.js +3 -3
- package/dist/collection/components/insurance/insurance-state.js +1 -1
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +19 -13
- package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +0 -21
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +11 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +16 -10
- package/dist/collection/components/modular-checkout/sub-components/justifi-plaid-payment-method.js +15 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
- package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +4 -4
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +4 -4
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +5 -3
- package/dist/collection/store/checkout.store.js +9 -3
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +3 -3
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +2 -2
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/collection/utils/checkout-billing-state-options.js +12 -0
- package/dist/collection/utils/utils.js +4 -4
- package/dist/docs.json +537 -106
- package/dist/esm/{Analytics-DZWGizAK.js → Analytics-D_HycaxE.js} +5 -5
- package/dist/esm/{Api-DMd8hTI-.js → Api-DjAL73GZ.js} +1 -1
- package/dist/esm/{Plaid-fhlY0CIN.js → Plaid-C8qoMZLV.js} +14 -13
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{additional-questions-form-step_14.entry.js → additional-questions-form-step_15.entry.js} +390 -175
- package/dist/esm/additional-questions_5.entry.js +8 -8
- package/dist/esm/additional-statement_8.entry.js +9 -9
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +10 -10
- package/dist/esm/bank-account-document-form-inputs.entry.js +19 -0
- package/dist/esm/bank-account-form.entry.js +34 -5
- package/dist/esm/{business-form-options-DRalxlqN.js → business-form-options-DXjZp4Rl.js} +51 -1
- package/dist/esm/{business-identity-schema-D-Nk9aGV.js → business-identity-schema-Csou60ZC.js} +12 -8
- package/dist/esm/{business.service-Crs-0Mdy.js → business.service-BGXqAyxu.js} +2 -2
- package/dist/esm/card-form.entry.js +5 -5
- package/dist/esm/{check-pkg-version-CVyuA8aH.js → check-pkg-version-BfrWk42V.js} +1 -1
- package/dist/esm/{checkout-actions-BMnp3uHK.js → checkout-actions-D8JS2l5e.js} +2 -2
- package/dist/esm/{checkout.service-BMAQVmHa.js → checkout.service-sHKaW-M0.js} +2 -2
- package/dist/esm/{checkout.store-DFnkcDZ8.js → checkout.store-DibfdUMm.js} +9 -3
- package/dist/esm/{country-config-B_fuF6JU.js → country-config-CEJVOOGe.js} +12 -5
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/dispute-notification_2.entry.js +15 -15
- package/dist/esm/{event-types-CVVB5p_Q.js → event-types-ynZLear3.js} +2 -2
- package/dist/esm/form-address-fields_3.entry.js +3 -3
- package/dist/esm/form-control-checkbox.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/form-control-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +3 -3
- package/dist/esm/form-control-number_2.entry.js +7 -6
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/{get-business-B9ZS1tVq.js → get-business-DAv_b3vf.js} +2 -2
- package/dist/esm/{get-payment-details-CiR6FrkO.js → get-payment-details-Bipad3jX.js} +2 -2
- package/dist/esm/{get-subaccounts-VpDr7yN4.js → get-subaccounts-FqCT2s3S.js} +3 -3
- package/dist/esm/hidden-input_2.entry.js +6 -6
- package/dist/esm/{index.esm-CgNcFueq.js → index.esm-KCSohgHx.js} +1 -18
- package/dist/esm/{insurance-state-CLGc1-_4.js → insurance-state-C5OZqDCT.js} +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +63 -38
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +8 -8
- package/dist/esm/justifi-bank-account-form.entry.js +18 -8
- package/dist/esm/justifi-billing-form-full.entry.js +2 -2
- package/dist/esm/justifi-billing-form.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +10 -10
- package/dist/esm/justifi-business-form.entry.js +15 -15
- package/dist/esm/justifi-card-billing-form-simple.entry.js +2 -2
- package/dist/esm/justifi-card-form.entry.js +8 -8
- package/dist/esm/justifi-checkout-qr-code.entry.js +6 -6
- package/dist/esm/justifi-checkout.entry.js +10 -10
- package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -6
- package/dist/esm/justifi-checkouts-list.entry.js +12 -12
- package/dist/esm/justifi-dispute-management.entry.js +10 -10
- package/dist/esm/justifi-gross-payment-chart.entry.js +11 -11
- package/dist/esm/justifi-order-terminals.entry.js +12 -12
- package/dist/esm/justifi-payment-details.entry.js +18 -18
- package/dist/esm/justifi-payment-provisioning.entry.js +11 -11
- package/dist/esm/justifi-payment-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payments-list-filters.entry.js +5 -5
- package/dist/esm/justifi-payments-list.entry.js +11 -11
- package/dist/esm/justifi-payout-details.entry.js +13 -13
- package/dist/esm/justifi-payout-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payouts-list-filters.entry.js +5 -5
- package/dist/esm/justifi-payouts-list.entry.js +15 -15
- package/dist/esm/justifi-qr-terminal.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +13 -13
- package/dist/esm/justifi-save-new-payment-method.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -10
- package/dist/esm/justifi-skeleton.entry.js +2 -2
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +7 -7
- package/dist/esm/justifi-terminal-orders-list.entry.js +11 -11
- package/dist/esm/justifi-terminals-list-filters.entry.js +5 -5
- package/dist/esm/justifi-terminals-list.entry.js +14 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{lodash-CrGKVSPp.js → lodash-BF_QgjtL.js} +38 -27
- package/dist/esm/{package-CZa-hHhJ.js → package-DSavNeRB.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/{payment-provisioning-actions-CcDadiRe.js → payment-provisioning-actions-DI3QUsjh.js} +9 -9
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +3 -2
- package/dist/esm/{payment.service-BiKQPL4M.js → payment.service-wSNYSRyl.js} +2 -2
- package/dist/esm/{payout.service-B9_cyUiU.js → payout.service-CTAksNmD.js} +2 -2
- package/dist/esm/{payouts-status-xOa5tT66.js → payouts-status-CeZoirpf.js} +2 -2
- package/dist/esm/{plaid.service-bU3qIoKd.js → plaid.service-5EpJEdwX.js} +2 -2
- package/dist/esm/radio-list-item.entry.js +1 -1
- package/dist/esm/save-new-payment-method.entry.js +2 -2
- package/dist/esm/{schema-validations-u9_XnlUL.js → schema-validations-CySYE883.js} +24 -11
- package/dist/esm/styled-host-D84RBv1W.js +9 -0
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-BM6BvevW.js → terminal.service-xjfU0mJT.js} +2 -2
- package/dist/esm/{utils-BTtxWI2r.js → utils-CcA8Y5hs.js} +4 -4
- package/dist/esm/{utils-BogmBHgt.js → utils-myniydlM.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Analytics.js +2 -2
- package/dist/module/Plaid.js +13 -12
- package/dist/module/additional-questions-form-step2.js +12 -6
- package/dist/module/additional-statement2.js +1 -1
- package/dist/module/bank-account-billing-form-simple2.js +1 -1
- package/dist/module/bank-account-document-form-inputs.js +55 -1
- package/dist/module/bank-account-form2.js +30 -2
- package/dist/module/billing-form-full2.js +2 -2
- package/dist/module/billing-form-schema.js +1 -1
- package/dist/module/business-address-schema.js +2 -2
- package/dist/module/business-bank-account-form-step2.js +25 -178
- package/dist/module/business-core-info-form-step2.js +3 -3
- package/dist/module/business-core-info-schema.js +2 -2
- 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 +8 -4
- package/dist/module/business-owners-form-step2.js +9 -0
- package/dist/module/business-representative-form-inputs2.js +5 -3
- package/dist/module/business-representative-form-step2.js +1 -1
- package/dist/module/business-representative2.js +6 -5
- package/dist/module/button.js +1 -1
- package/dist/module/cancellation-policy2.js +1 -1
- package/dist/module/card-billing-form-simple2.js +1 -1
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.store.js +9 -3
- package/dist/module/country-config.js +12 -5
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details2.js +1 -1
- package/dist/module/dispute-notification2.js +3 -3
- package/dist/module/dispute-response2.js +1 -1
- 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 +403 -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/duplicate-charge2.js +1 -1
- package/dist/module/electronic-evidence2.js +1 -1
- package/dist/module/event-types3.js +3 -3
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number2.js +3 -3
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +3 -3
- package/dist/module/form.js +1 -18
- package/dist/module/hidden-input2.js +3 -3
- package/dist/module/iframe-input2.js +4 -4
- package/dist/module/insurance-state.js +1 -1
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-apple-pay2.js +0 -2
- package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
- package/dist/module/justifi-bank-account-form.js +11 -1
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-billing-form.js +1 -1
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-checkouts-list-filters.js +3 -3
- package/dist/module/justifi-checkouts-list.js +4 -4
- package/dist/module/justifi-dispute-management.js +2 -2
- package/dist/module/justifi-google-pay2.js +10 -4
- package/dist/module/justifi-gross-payment-chart.js +3 -3
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +19 -13
- package/dist/module/justifi-order-terminals.js +3 -3
- package/dist/module/justifi-payment-details.js +9 -9
- package/dist/module/justifi-payment-provisioning.js +33 -27
- package/dist/module/justifi-payment-transactions-list.js +3 -3
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +3 -3
- package/dist/module/justifi-payout-details.js +4 -4
- package/dist/module/justifi-payout-transactions-list.js +3 -3
- package/dist/module/justifi-payouts-list-filters.js +3 -3
- package/dist/module/justifi-payouts-list.js +6 -6
- package/dist/module/justifi-plaid-payment-method2.js +14 -2
- package/dist/module/justifi-qr-terminal.js +1 -1
- package/dist/module/justifi-refund-payment.js +3 -3
- package/dist/module/justifi-save-new-payment-method.js +1 -1
- package/dist/module/justifi-skeleton.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
- package/dist/module/justifi-terminal-orders-list.js +5 -5
- package/dist/module/justifi-terminals-list-filters.js +2 -2
- package/dist/module/justifi-terminals-list.js +6 -6
- package/dist/module/justifi-tokenize-payment-method2.js +5 -3
- package/dist/module/legal-address-form-step2.js +1 -1
- package/dist/module/lodash.js +38 -27
- package/dist/module/owner-details2.js +1 -1
- 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-method-option.js +1 -1
- package/dist/module/payment-provisioning-actions.js +8 -8
- package/dist/module/payment-provisioning-form-steps2.js +35 -28
- package/dist/module/plaid-verification2.js +1 -1
- package/dist/module/product-or-service2.js +1 -1
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/refund-policy2.js +1 -1
- package/dist/module/save-new-payment-method2.js +1 -1
- package/dist/module/schema-validations.js +22 -9
- package/dist/module/shipping-details2.js +1 -1
- package/dist/module/skeleton.js +1 -1
- package/dist/module/styled-host.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +2 -2
- package/dist/module/utils2.js +4 -4
- package/dist/stencil.config.js +40 -0
- package/dist/types/api/Document.d.ts +13 -1
- 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 +45 -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/checkout/bank-account-form/bank-account-form.d.ts +2 -0
- package/dist/types/components/checkout/justifi-checkout.d.ts +2 -0
- package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +0 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-form.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +4 -2
- package/dist/types/components/modular-checkout/sub-components/justifi-plaid-payment-method.d.ts +1 -0
- package/dist/types/components.d.ts +86 -13
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/stencil.config.d.ts +2 -0
- package/dist/types/store/checkout.store.d.ts +2 -0
- package/dist/types/utils/checkout-billing-state-options.d.ts +9 -0
- package/dist/webcomponents/p-015288c4.entry.js +1 -0
- package/dist/webcomponents/p-055640f9.entry.js +1 -0
- package/dist/webcomponents/{p-ca87c609.entry.js → p-0a4fcb15.entry.js} +1 -1
- package/dist/webcomponents/p-0d98518e.entry.js +1 -0
- package/dist/webcomponents/p-0ea6aa9c.entry.js +1 -0
- package/dist/webcomponents/p-0ede7e82.entry.js +1 -0
- package/dist/webcomponents/p-0f2a1ac9.entry.js +1 -0
- package/dist/webcomponents/p-1068ae13.entry.js +1 -0
- package/dist/webcomponents/p-14a03ad0.entry.js +1 -0
- package/dist/webcomponents/p-1a30f2d9.entry.js +1 -0
- package/dist/webcomponents/p-1b51dea9.entry.js +1 -0
- package/dist/webcomponents/{p-89cd31f2.entry.js → p-1de248b1.entry.js} +1 -1
- package/dist/webcomponents/p-218b926a.entry.js +1 -0
- package/dist/webcomponents/p-25215ee7.entry.js +1 -0
- package/dist/webcomponents/{p-9fca25fc.entry.js → p-266870f0.entry.js} +1 -1
- package/dist/webcomponents/p-27c35a85.entry.js +1 -0
- package/dist/webcomponents/{p-DHFQtPCq.js → p-2mMMaism.js} +1 -1
- package/dist/webcomponents/p-3a2629a2.entry.js +1 -0
- package/dist/webcomponents/p-3e56bbe5.entry.js +1 -0
- package/dist/webcomponents/p-4791c6d7.entry.js +1 -0
- package/dist/webcomponents/p-49d9c0a4.entry.js +1 -0
- package/dist/webcomponents/p-4a30693b.entry.js +1 -0
- package/dist/webcomponents/p-4fab9314.entry.js +1 -0
- package/dist/webcomponents/{p-b20b8805.entry.js → p-5218bcd0.entry.js} +1 -1
- package/dist/webcomponents/{p-a80f69a9.entry.js → p-53d775b9.entry.js} +1 -1
- package/dist/webcomponents/{p-70dcd833.entry.js → p-5a58f606.entry.js} +1 -1
- package/dist/webcomponents/p-5f6bc8e7.entry.js +1 -0
- package/dist/webcomponents/p-65908b5f.entry.js +1 -0
- package/dist/webcomponents/{p-3d6b9434.entry.js → p-67364f1d.entry.js} +1 -1
- package/dist/webcomponents/{p-bd678d4a.entry.js → p-6bf4fea8.entry.js} +1 -1
- package/dist/webcomponents/p-6c3e9ebd.entry.js +1 -0
- package/dist/webcomponents/{p-a9695714.entry.js → p-6fe329d6.entry.js} +1 -1
- package/dist/webcomponents/p-70e05aec.entry.js +1 -0
- package/dist/webcomponents/p-73deced9.entry.js +1 -0
- package/dist/webcomponents/p-762b1b7b.entry.js +1 -0
- package/dist/webcomponents/p-76ded81e.entry.js +1 -0
- package/dist/webcomponents/p-77cc572d.entry.js +1 -0
- package/dist/webcomponents/p-7b6cf400.entry.js +1 -0
- package/dist/webcomponents/p-8fd18ce2.entry.js +1 -0
- package/dist/webcomponents/p-9c0760b9.entry.js +1 -0
- package/dist/webcomponents/{p-CqPcl9v7.js → p-B62JX_Dh.js} +1 -1
- package/dist/webcomponents/p-BB8Ce9rp.js +1 -0
- package/dist/webcomponents/{p-Bt4GjEWL.js → p-BBSnDYJw.js} +1 -1
- package/dist/webcomponents/{p-BRnBHsdq.js → p-BSs-2JKu.js} +1 -1
- package/dist/webcomponents/p-BUHsyQpA.js +1 -0
- package/dist/webcomponents/{p-D-zwk1J3.js → p-C-Jgmek8.js} +1 -1
- package/dist/webcomponents/p-C1gr32IS.js +1 -0
- package/dist/webcomponents/{p-D4E9P7df.js → p-C7hX61pS.js} +1 -1
- package/dist/webcomponents/p-CO8ZGkfN.js +1 -0
- package/dist/webcomponents/p-CPJC6tlj.js +1 -0
- package/dist/webcomponents/{p-Cg_3KsGO.js → p-CdwzNfP1.js} +1 -1
- package/dist/webcomponents/p-Cn7z5L7J.js +1 -0
- package/dist/webcomponents/{p-BGvaX-lJ.js → p-CxBrydeX.js} +1 -1
- package/dist/webcomponents/{p-DwoT0UoX.js → p-D9sqTVmd.js} +1 -1
- package/dist/webcomponents/p-DP9ysr2K.js +1 -0
- package/dist/webcomponents/p-DPA5TKvQ.js +1 -0
- package/dist/webcomponents/p-DSavNeRB.js +1 -0
- package/dist/webcomponents/{p-CSgcCWLS.js → p-DXTa04jn.js} +1 -1
- package/dist/webcomponents/p-DYSc8uvs.js +1 -0
- package/dist/webcomponents/p-Da3fPDxu.js +1 -0
- package/dist/webcomponents/{p-CYQvLgSs.js → p-De4Pig-y.js} +1 -1
- package/dist/webcomponents/p-DyPk4BJt.js +1 -0
- package/dist/webcomponents/p-DzEdYT8R.js +1 -0
- package/dist/webcomponents/p-NzPaWKbY.js +1 -0
- package/dist/webcomponents/p-OeJ-3w3l.js +9 -0
- package/dist/webcomponents/{p-eK8hZOMg.js → p-R_0S69Pr.js} +1 -1
- package/dist/webcomponents/{p-392f0c1c.entry.js → p-a1885b83.entry.js} +1 -1
- package/dist/webcomponents/p-a6b46f98.entry.js +1 -0
- package/dist/webcomponents/{p-0fb8fb8c.entry.js → p-a893d607.entry.js} +1 -1
- package/dist/webcomponents/p-b03e361e.entry.js +1 -0
- package/dist/webcomponents/{p-37fd1862.entry.js → p-c3a25333.entry.js} +1 -1
- package/dist/webcomponents/p-c60c4bed.entry.js +1 -0
- package/dist/webcomponents/{p-ff5c5499.entry.js → p-c885cbf6.entry.js} +4 -4
- package/dist/webcomponents/p-c8bcc54f.entry.js +1 -0
- package/dist/webcomponents/{p-8d602e60.entry.js → p-d0c889e7.entry.js} +1 -1
- package/dist/webcomponents/p-d554e0bb.entry.js +1 -0
- package/dist/webcomponents/p-d7e2ce48.entry.js +1 -0
- package/dist/webcomponents/p-ddb885c3.entry.js +1 -0
- package/dist/webcomponents/p-ddffdec9.entry.js +1 -0
- package/dist/webcomponents/{p-22d19755.entry.js → p-debc4768.entry.js} +1 -1
- package/dist/webcomponents/p-e1168904.entry.js +1 -0
- package/dist/webcomponents/p-e3021e22.entry.js +1 -0
- package/dist/webcomponents/{p-aee2295b.entry.js → p-e3f8541c.entry.js} +1 -1
- package/dist/webcomponents/{p-c1539656.entry.js → p-eccc1fc6.entry.js} +1 -1
- package/dist/webcomponents/{p-c4767c7b.entry.js → p-f3c40c22.entry.js} +1 -1
- package/dist/webcomponents/p-f4de4ac0.entry.js +1 -0
- package/dist/webcomponents/p-f953fd60.entry.js +1 -0
- package/dist/webcomponents/p-fdea8c57.entry.js +1 -0
- package/dist/webcomponents/p-z3RFjy9B.js +1 -0
- package/dist/webcomponents/{p-qju4tNG1.js → p-zZn1OXja.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +16 -16
- package/readme.md +7 -14
- 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-06e8df55.entry.js +0 -1
- package/dist/webcomponents/p-0708cb76.entry.js +0 -1
- package/dist/webcomponents/p-07f2f1bf.entry.js +0 -1
- package/dist/webcomponents/p-10087a53.entry.js +0 -1
- package/dist/webcomponents/p-12ae030d.entry.js +0 -1
- package/dist/webcomponents/p-1d7b8c21.entry.js +0 -1
- package/dist/webcomponents/p-21c89e22.entry.js +0 -1
- package/dist/webcomponents/p-2ec7cd88.entry.js +0 -1
- package/dist/webcomponents/p-2qotS5d_.js +0 -1
- package/dist/webcomponents/p-355a5c8d.entry.js +0 -1
- package/dist/webcomponents/p-37b95a11.entry.js +0 -1
- package/dist/webcomponents/p-383b8317.entry.js +0 -1
- package/dist/webcomponents/p-44cf13ac.entry.js +0 -1
- package/dist/webcomponents/p-46477dfe.entry.js +0 -1
- package/dist/webcomponents/p-4ccf9cd7.entry.js +0 -1
- package/dist/webcomponents/p-55fdab4e.entry.js +0 -1
- package/dist/webcomponents/p-5ccb46ee.entry.js +0 -1
- package/dist/webcomponents/p-5f8dfa8d.entry.js +0 -1
- package/dist/webcomponents/p-63b7abf3.entry.js +0 -1
- package/dist/webcomponents/p-6RTf1SXX.js +0 -1
- package/dist/webcomponents/p-70cd2808.entry.js +0 -1
- package/dist/webcomponents/p-769d3d93.entry.js +0 -1
- package/dist/webcomponents/p-79bd744e.entry.js +0 -1
- package/dist/webcomponents/p-7a4cd292.entry.js +0 -1
- package/dist/webcomponents/p-9153c121.entry.js +0 -1
- package/dist/webcomponents/p-94f14640.entry.js +0 -1
- package/dist/webcomponents/p-98f399ec.entry.js +0 -1
- package/dist/webcomponents/p-9b944aa4.entry.js +0 -1
- package/dist/webcomponents/p-9fc7714d.entry.js +0 -1
- package/dist/webcomponents/p-BArmtmkq.js +0 -1
- package/dist/webcomponents/p-BqNNwq6C.js +0 -1
- package/dist/webcomponents/p-CZa-hHhJ.js +0 -1
- package/dist/webcomponents/p-C_ifLmT1.js +0 -9
- package/dist/webcomponents/p-CvgL8YaH.js +0 -1
- package/dist/webcomponents/p-DD-_8sbs.js +0 -1
- package/dist/webcomponents/p-DMqJWUK2.js +0 -1
- package/dist/webcomponents/p-DZAMzLxa.js +0 -1
- package/dist/webcomponents/p-DbOUuBHs.js +0 -1
- package/dist/webcomponents/p-DyucNSA4.js +0 -1
- package/dist/webcomponents/p-Eb1f86_V.js +0 -1
- package/dist/webcomponents/p-KXLYEe1D.js +0 -1
- package/dist/webcomponents/p-XxG-t-Sl.js +0 -1
- package/dist/webcomponents/p-a7a1b168.entry.js +0 -1
- package/dist/webcomponents/p-b0b6083f.entry.js +0 -1
- package/dist/webcomponents/p-b341efd6.entry.js +0 -1
- package/dist/webcomponents/p-b62ff001.entry.js +0 -1
- package/dist/webcomponents/p-bb5de874.entry.js +0 -1
- package/dist/webcomponents/p-c8ee1e4c.entry.js +0 -1
- package/dist/webcomponents/p-ce1dde85.entry.js +0 -1
- package/dist/webcomponents/p-d253a573.entry.js +0 -1
- package/dist/webcomponents/p-d620d4b4.entry.js +0 -1
- package/dist/webcomponents/p-dcd600ca.entry.js +0 -1
- package/dist/webcomponents/p-e4cb7c21.entry.js +0 -1
- package/dist/webcomponents/p-e5c2215a.entry.js +0 -1
- package/dist/webcomponents/p-e6b9dfe1.entry.js +0 -1
- package/dist/webcomponents/p-eCeOsPHx.js +0 -1
- package/dist/webcomponents/p-f1b9cbf0.entry.js +0 -1
- package/dist/webcomponents/p-f9aafb21.entry.js +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-CV0Pyo1O.js';
|
|
2
|
-
import { C as ComponentErrorSeverity, b as ComponentErrorCodes,
|
|
3
|
-
import { m as makeGetBusiness, a as makePatchBusiness, c as makePostBankAccount, d as makePostDocumentRecord, e as makeGetIdentity, f as makePatchIdentity, g as makePostIdentity } from './payment-provisioning-actions-
|
|
4
|
-
import { B as BusinessService, a as BusinessBankAccountService, D as DocumentRecordService, I as IdentityService } from './business.service-
|
|
5
|
-
import { a as additionalQuestionsSchema, d as businessCoreInfoSchemaCAN, b as businessCoreInfoSchemaUSA, g as identitySchemaByCountry, h as addressSchemaByCountry } from './business-identity-schema-
|
|
6
|
-
import { F as FormController,
|
|
2
|
+
import { C as ComponentErrorSeverity, b as ComponentErrorCodes, B as EntityDocument, x as PLAID_ERROR_SEVERITY, y as PLAID_ERROR_MESSAGES, z as PlaidErrorCodes } from './Plaid-C8qoMZLV.js';
|
|
3
|
+
import { m as makeGetBusiness, a as makePatchBusiness, c as makePostBankAccount, d as makePostDocumentRecord, e as makeGetIdentity, f as makePatchIdentity, g as makePostIdentity } from './payment-provisioning-actions-DI3QUsjh.js';
|
|
4
|
+
import { B as BusinessService, a as BusinessBankAccountService, D as DocumentRecordService, I as IdentityService } from './business.service-BGXqAyxu.js';
|
|
5
|
+
import { a as additionalQuestionsSchema, d as businessCoreInfoSchemaCAN, b as businessCoreInfoSchemaUSA, g as identitySchemaByCountry, h as addressSchemaByCountry } from './business-identity-schema-Csou60ZC.js';
|
|
6
|
+
import { F as FormController, c as create$3, a as create$6, b as create$7 } from './index.esm-KCSohgHx.js';
|
|
7
7
|
import { A as AdditionalQuestions, C as CountryCode, e as CoreBusinessInfo, R as Representative, f as Address, O as Owner } from './Business-BcNb9bVO.js';
|
|
8
8
|
import { C as CURRENCY_MASK, P as PHONE_MASKS, I as IDENTITY_MASKS } from './form-input-masks-CVaOFfrI.js';
|
|
9
9
|
import { b as heading2, a0 as buttonSecondary, C as buttonLink, x as label, u as inputDisabled, D as card, aa as table, a6 as tableHeadCell, aj as tableCell, am as alert, A as heading3, a1 as buttonPrimary } from './parts-CPKMvyV_.js';
|
|
10
10
|
import { P as PaymentProvisioningLoading } from './payment-provisioning-loading-Dve2xQA4.js';
|
|
11
|
-
import {
|
|
11
|
+
import { a as businessServiceReceivedOptions, c as bankAccountTypeOptions, d as businessClassificationOptions, b as businessTitleOptions } from './business-form-options-DXjZp4Rl.js';
|
|
12
12
|
import { a as BusinessFormStep, B as BusinessFormClickActions } from './event-types-XYgDHrVL.js';
|
|
13
|
+
import { n as numberOnlyHandler } from './utils-BnjCmwMr.js';
|
|
13
14
|
import './config-state-kKn89dp1.js';
|
|
14
15
|
import './dinero-HXpYMWUU.js';
|
|
15
16
|
import './Pagination-CLHwhyvu.js';
|
|
16
|
-
import {
|
|
17
|
-
import { A as accountNumberValidation, B as accountTypeValidation, v as identityNameValidation, C as nicknameValidation, D as bankNameValidation, E as numbersOnlyRegex, F as routingNumberValidation } from './schema-validations-u9_XnlUL.js';
|
|
17
|
+
import { B as accountNumberValidation, C as accountTypeValidation, v as identityNameValidation, D as nicknameValidation, E as bankNameValidation, F as numbersOnlyRegex, G as routingNumberValidation } from './schema-validations-CySYE883.js';
|
|
18
18
|
import { B as Button } from './button-BvzOzV4l.js';
|
|
19
19
|
import './event-types-CZfYo5-1.js';
|
|
20
|
-
import {
|
|
21
|
-
import { s as snakeCaseToHumanReadable, b as formatDate, d as formatTime } from './utils-
|
|
20
|
+
import { c as countryLabels } from './country-config-CEJVOOGe.js';
|
|
21
|
+
import { s as snakeCaseToHumanReadable, b as formatDate, d as formatTime } from './utils-CcA8Y5hs.js';
|
|
22
22
|
import { S as Skeleton } from './skeleton-BEHo2ypu.js';
|
|
23
23
|
import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './input-handlers-1lVyzImK.js';
|
|
24
|
-
import { A as Api } from './Api-
|
|
25
|
-
import { S as StyledHost } from './styled-host-
|
|
26
|
-
import { P as PlaidService } from './plaid.service-
|
|
27
|
-
import './utils-
|
|
24
|
+
import { A as Api } from './Api-DjAL73GZ.js';
|
|
25
|
+
import { S as StyledHost } from './styled-host-D84RBv1W.js';
|
|
26
|
+
import { P as PlaidService } from './plaid.service-5EpJEdwX.js';
|
|
27
|
+
import './utils-myniydlM.js';
|
|
28
28
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
29
29
|
import './index-cDVGjRkU.js';
|
|
30
30
|
|
|
@@ -139,7 +139,7 @@ const AdditionalQuestionsFormStep = class {
|
|
|
139
139
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
140
140
|
}
|
|
141
141
|
get patchPayload() {
|
|
142
|
-
|
|
142
|
+
const formValues = new AdditionalQuestions(this.formController.values.getValue()).payload;
|
|
143
143
|
return { additional_questions: formValues };
|
|
144
144
|
}
|
|
145
145
|
componentWillLoad() {
|
|
@@ -179,7 +179,7 @@ const AdditionalQuestionsFormStep = class {
|
|
|
179
179
|
if (this.isLoading) {
|
|
180
180
|
return h(PaymentProvisioningLoading, null);
|
|
181
181
|
}
|
|
182
|
-
return (h("form", null, h("fieldset", null, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Additional Questions"), h("form-control-tooltip", { helpText: "This information helps us understand the business and identify and monitor trends to safeguard you and your customers." })), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-monetary-provisioning", { name: "business_revenue", label: "What is your business' estimated annual revenue from its primary business activities?", inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { class: "col-12 col-md-6" }, h("form-control-monetary-provisioning", { name: "business_payment_volume", label: "What is your business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { class: "col-12" }, h("form-control-
|
|
182
|
+
return (h("form", null, h("fieldset", null, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Additional Questions"), h("form-control-tooltip", { helpText: "This information helps us understand the business and identify and monitor trends to safeguard you and your customers." })), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-monetary-provisioning", { name: "business_revenue", label: "What is your business' estimated annual revenue from its primary business activities?", inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { class: "col-12 col-md-6" }, h("form-control-monetary-provisioning", { name: "business_payment_volume", label: "What is your business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { class: "col-12" }, h("form-control-number", { name: "business_average_transaction_amount", label: "What is your average transaction size?", inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_average_transaction_amount, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_average_transaction_amount })), h("div", { class: "col-12" }, h("form-control-select", { name: "business_when_service_received", label: "On average, how long after paying will your customers typically receive their goods or services?", inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { class: "col-12" }, h("form-control-text", { name: "business_other_payment_details", label: "Is there anything else you would like us to know about how your customers pay the business? (optional)", inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
|
|
183
183
|
}
|
|
184
184
|
static get watchers() { return {
|
|
185
185
|
"authToken": ["propChanged"],
|
|
@@ -188,15 +188,6 @@ const AdditionalQuestionsFormStep = class {
|
|
|
188
188
|
}; }
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
const BankAccountDocumentFormInputs = class {
|
|
192
|
-
constructor(hostRef) {
|
|
193
|
-
registerInstance(this, hostRef);
|
|
194
|
-
}
|
|
195
|
-
render() {
|
|
196
|
-
return (h("div", { key: 'd0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9', class: "row gy-3" }, h("div", { key: '02ed406f38558badf9f591e076b120d09c71f83b', class: "col-12" }, h("form-control-file", { key: '11ff1dc68264b9e5aa561ffe19b423abc1a00c78', name: "voided_check", label: "Voided Check", documentType: EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), h("div", { key: '71d26407522a75a54489155566c18af1a64c1417', class: "col-12" }, h("form-control-file", { key: '7ea42e03a44c223a5fedc273e94e635e70d54f4b', name: "bank_statement", label: "Bank Statement", documentType: EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
|
|
200
191
|
const BankAccountFormInputs = class {
|
|
201
192
|
constructor(hostRef) {
|
|
202
193
|
registerInstance(this, hostRef);
|
|
@@ -217,9 +208,6 @@ const BankAccountFormInputsCanada = class {
|
|
|
217
208
|
}
|
|
218
209
|
};
|
|
219
210
|
|
|
220
|
-
const checkExistingDocs = (documents, documentType) => {
|
|
221
|
-
return documents.some((doc) => doc.document_type === documentType);
|
|
222
|
-
};
|
|
223
211
|
const buildCommonFieldRules = (allowOptionalFields) => {
|
|
224
212
|
if (allowOptionalFields) {
|
|
225
213
|
return {
|
|
@@ -238,30 +226,6 @@ const buildCommonFieldRules = (allowOptionalFields) => {
|
|
|
238
226
|
account_number: accountNumberValidation.required('Enter account number'),
|
|
239
227
|
};
|
|
240
228
|
};
|
|
241
|
-
const buildDocumentRules = (documents, allowOptionalFields) => {
|
|
242
|
-
if (allowOptionalFields) {
|
|
243
|
-
return {
|
|
244
|
-
voided_check: create$8().nullable(),
|
|
245
|
-
bank_statement: create$8().nullable(),
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
const existingVoidedCheck = checkExistingDocs(documents, EntityDocumentType.voidedCheck);
|
|
249
|
-
const existingBankStatement = checkExistingDocs(documents, EntityDocumentType.bankStatement);
|
|
250
|
-
const existingDocument = existingVoidedCheck || existingBankStatement;
|
|
251
|
-
const documentErrorText = 'Please upload either a voided check or a bank statement. Only one is required.';
|
|
252
|
-
return {
|
|
253
|
-
voided_check: create$8().when('bank_statement', {
|
|
254
|
-
is: (val) => !val && !existingDocument,
|
|
255
|
-
then: (schema) => schema.required(documentErrorText),
|
|
256
|
-
otherwise: (schema) => schema.notRequired(),
|
|
257
|
-
}),
|
|
258
|
-
bank_statement: create$8().when('voided_check', {
|
|
259
|
-
is: (val) => !val && !existingDocument,
|
|
260
|
-
then: (schema) => schema.required(documentErrorText),
|
|
261
|
-
otherwise: (schema) => schema.notRequired(),
|
|
262
|
-
}),
|
|
263
|
-
};
|
|
264
|
-
};
|
|
265
229
|
const buildUSARules = (allowOptionalFields) => {
|
|
266
230
|
if (allowOptionalFields) {
|
|
267
231
|
return { routing_number: routingNumberValidation.nullable() };
|
|
@@ -286,17 +250,17 @@ const buildCANRules = (allowOptionalFields) => {
|
|
|
286
250
|
transit_number: transitNumberValidation.required('Enter transit number'),
|
|
287
251
|
};
|
|
288
252
|
};
|
|
289
|
-
const businessBankAccountSchemaUSA = (
|
|
290
|
-
const shape = Object.assign(Object.assign(
|
|
291
|
-
return create$3().shape(shape
|
|
253
|
+
const businessBankAccountSchemaUSA = (allowOptionalFields) => {
|
|
254
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildUSARules(allowOptionalFields));
|
|
255
|
+
return create$3().shape(shape);
|
|
292
256
|
};
|
|
293
|
-
const businessBankAccountSchemaCAN = (
|
|
294
|
-
const shape = Object.assign(Object.assign(
|
|
295
|
-
return create$3().shape(shape
|
|
257
|
+
const businessBankAccountSchemaCAN = (allowOptionalFields) => {
|
|
258
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildCANRules(allowOptionalFields));
|
|
259
|
+
return create$3().shape(shape);
|
|
296
260
|
};
|
|
297
261
|
const bankAccountSchemaByCountry = {
|
|
298
|
-
[CountryCode.USA]: (allowOptionalFields
|
|
299
|
-
[CountryCode.CAN]: (allowOptionalFields
|
|
262
|
+
[CountryCode.USA]: (allowOptionalFields) => businessBankAccountSchemaUSA(allowOptionalFields),
|
|
263
|
+
[CountryCode.CAN]: (allowOptionalFields) => businessBankAccountSchemaCAN(allowOptionalFields),
|
|
300
264
|
};
|
|
301
265
|
|
|
302
266
|
const BusinessBankAccountFormStep = class {
|
|
@@ -307,15 +271,13 @@ const BusinessBankAccountFormStep = class {
|
|
|
307
271
|
this.formLoading = createEvent(this, "formLoading", 7);
|
|
308
272
|
this.errors = {};
|
|
309
273
|
this.bankAccount = {};
|
|
310
|
-
this.existingDocuments = [];
|
|
311
|
-
this.documentData = new EntityDocumentStorage();
|
|
312
274
|
this.isLoading = false;
|
|
313
275
|
this.viewMode = 'manual';
|
|
314
276
|
this.bankAccountVerification = false;
|
|
315
277
|
this.platformAccountId = null;
|
|
316
278
|
this.getSchema = () => {
|
|
317
279
|
const schema = bankAccountSchemaByCountry[this.country];
|
|
318
|
-
return schema(this.allowOptionalFields
|
|
280
|
+
return schema(this.allowOptionalFields);
|
|
319
281
|
};
|
|
320
282
|
this.initializeFormController = () => {
|
|
321
283
|
this.formController = new FormController(this.getSchema());
|
|
@@ -332,12 +294,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
332
294
|
this.inputHandler = (name, value) => {
|
|
333
295
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
334
296
|
};
|
|
335
|
-
this.storeFiles = (e) => {
|
|
336
|
-
const fileList = Array.from(e.detail.fileList);
|
|
337
|
-
const docType = e.detail.document_type;
|
|
338
|
-
const documentList = fileList.map(file => new EntityDocument({ file, document_type: docType }, this.businessId));
|
|
339
|
-
this.documentData[docType] = documentList;
|
|
340
|
-
};
|
|
341
297
|
this.getData = () => {
|
|
342
298
|
this.isLoading = true;
|
|
343
299
|
this.getBusiness({
|
|
@@ -360,12 +316,10 @@ const BusinessBankAccountFormStep = class {
|
|
|
360
316
|
};
|
|
361
317
|
this.handleChangeBankAccount = () => {
|
|
362
318
|
this.viewMode = this.plaidAvailable ? 'plaid' : 'manual';
|
|
363
|
-
this.documentData = new EntityDocumentStorage();
|
|
364
319
|
this.initializeFormController();
|
|
365
320
|
};
|
|
366
321
|
this.handleCancel = () => {
|
|
367
322
|
this.viewMode = this.existingBankAccount ? 'readonly' : 'plaid';
|
|
368
|
-
this.documentData = new EntityDocumentStorage();
|
|
369
323
|
this.initializeFormController();
|
|
370
324
|
};
|
|
371
325
|
this.handleToggleToManualEntry = () => {
|
|
@@ -381,66 +335,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
381
335
|
});
|
|
382
336
|
});
|
|
383
337
|
};
|
|
384
|
-
this.postDocumentRecordData = async (docData) => {
|
|
385
|
-
this.isLoading = true;
|
|
386
|
-
const payload = docData.record_data;
|
|
387
|
-
return new Promise((resolve) => {
|
|
388
|
-
this.postDocumentRecord({
|
|
389
|
-
payload,
|
|
390
|
-
onSuccess: (response) => {
|
|
391
|
-
resolve(this.handleDocRecordResponse(docData, response));
|
|
392
|
-
},
|
|
393
|
-
onError: ({ error, code, severity }) => {
|
|
394
|
-
this.errorEvent.emit({
|
|
395
|
-
message: error,
|
|
396
|
-
errorCode: code,
|
|
397
|
-
severity: severity
|
|
398
|
-
});
|
|
399
|
-
resolve(false);
|
|
400
|
-
},
|
|
401
|
-
});
|
|
402
|
-
});
|
|
403
|
-
};
|
|
404
|
-
this.handleDocRecordResponse = (docData, response) => {
|
|
405
|
-
if (response.error) {
|
|
406
|
-
this.errorEvent.emit({
|
|
407
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
408
|
-
message: response.error.message,
|
|
409
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
410
|
-
data: response.error,
|
|
411
|
-
});
|
|
412
|
-
return false;
|
|
413
|
-
}
|
|
414
|
-
else {
|
|
415
|
-
docData.setPresignedUrl(response.data.presigned_url);
|
|
416
|
-
return true;
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
this.uploadDocument = async (docData) => {
|
|
420
|
-
if (!docData.presigned_url) {
|
|
421
|
-
throw new Error('Presigned URL is not set');
|
|
422
|
-
}
|
|
423
|
-
const fileData = await docData.getFileData();
|
|
424
|
-
const response = await fetch(docData.presigned_url, {
|
|
425
|
-
method: 'PUT',
|
|
426
|
-
body: fileData
|
|
427
|
-
});
|
|
428
|
-
return this.handleUploadResponse(response);
|
|
429
|
-
};
|
|
430
|
-
this.handleUploadResponse = (response) => {
|
|
431
|
-
if (response.error) {
|
|
432
|
-
this.errorEvent.emit({
|
|
433
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
434
|
-
message: response.error.message,
|
|
435
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
436
|
-
data: response.error,
|
|
437
|
-
});
|
|
438
|
-
return false;
|
|
439
|
-
}
|
|
440
|
-
else {
|
|
441
|
-
return true;
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
338
|
}
|
|
445
339
|
propChanged() {
|
|
446
340
|
this.initializeApi();
|
|
@@ -479,10 +373,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
479
373
|
authToken: this.authToken,
|
|
480
374
|
service: new BusinessBankAccountService()
|
|
481
375
|
});
|
|
482
|
-
this.postDocumentRecord = makePostDocumentRecord({
|
|
483
|
-
authToken: this.authToken,
|
|
484
|
-
service: new DocumentRecordService()
|
|
485
|
-
});
|
|
486
376
|
}
|
|
487
377
|
else {
|
|
488
378
|
this.errorEvent.emit({
|
|
@@ -508,7 +398,7 @@ const BusinessBankAccountFormStep = class {
|
|
|
508
398
|
return this.bankAccountVerification || this.existingBankAccount;
|
|
509
399
|
}
|
|
510
400
|
processBusinessResponse(data) {
|
|
511
|
-
const { bank_accounts,
|
|
401
|
+
const { bank_accounts, settings, platform_account_id } = data;
|
|
512
402
|
if (bank_accounts.length > 0) {
|
|
513
403
|
this.bankAccount = new BankAccount(bank_accounts[bank_accounts.length - 1]);
|
|
514
404
|
}
|
|
@@ -516,7 +406,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
516
406
|
this.bankAccount = new BankAccount({});
|
|
517
407
|
this.bankAccount.business_id = this.businessId;
|
|
518
408
|
}
|
|
519
|
-
this.existingDocuments = documents;
|
|
520
409
|
this.bankAccountVerification = settings.bank_account_verification === true;
|
|
521
410
|
this.platformAccountId = platform_account_id;
|
|
522
411
|
}
|
|
@@ -537,11 +426,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
537
426
|
const bankAccountPosted = await this.postBankAccountData();
|
|
538
427
|
if (!bankAccountPosted)
|
|
539
428
|
return;
|
|
540
|
-
}
|
|
541
|
-
const documentsUploaded = await this.postBusinessDocuments();
|
|
542
|
-
if (!documentsUploaded)
|
|
543
|
-
return;
|
|
544
|
-
if (this.viewMode === 'manual') {
|
|
545
429
|
this.viewMode = 'readonly';
|
|
546
430
|
await this.refreshBankAccountData();
|
|
547
431
|
}
|
|
@@ -605,27 +489,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
605
489
|
});
|
|
606
490
|
});
|
|
607
491
|
}
|
|
608
|
-
async postBusinessDocuments() {
|
|
609
|
-
this.isLoading = true;
|
|
610
|
-
try {
|
|
611
|
-
const docArray = Object.values(this.documentData).flat();
|
|
612
|
-
if (!docArray.length) {
|
|
613
|
-
return true;
|
|
614
|
-
}
|
|
615
|
-
const recordsCreated = await Promise.all(docArray.map((docData) => this.postDocumentRecordData(docData))); // Create document records
|
|
616
|
-
if (recordsCreated.includes(false)) {
|
|
617
|
-
return false;
|
|
618
|
-
} // Exit if document record creation fails
|
|
619
|
-
const uploadsCompleted = await Promise.all(docArray.map((docData) => this.uploadDocument(docData))); // Upload documents to AWS presigned URLs
|
|
620
|
-
if (uploadsCompleted.includes(false)) {
|
|
621
|
-
return false;
|
|
622
|
-
} // Exit if any upload fails
|
|
623
|
-
return true;
|
|
624
|
-
}
|
|
625
|
-
finally {
|
|
626
|
-
this.isLoading = false;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
492
|
renderBankAccountInputs(disabled) {
|
|
630
493
|
const defaultValue = this.formController.getInitialValues();
|
|
631
494
|
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 }));
|
|
@@ -642,14 +505,11 @@ const BusinessBankAccountFormStep = class {
|
|
|
642
505
|
renderManualEntryView() {
|
|
643
506
|
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"))));
|
|
644
507
|
}
|
|
645
|
-
renderDocumentUploads() {
|
|
646
|
-
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 })));
|
|
647
|
-
}
|
|
648
508
|
render() {
|
|
649
509
|
if (this.isLoading) {
|
|
650
510
|
return h(PaymentProvisioningLoading, null);
|
|
651
511
|
}
|
|
652
|
-
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())
|
|
512
|
+
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())));
|
|
653
513
|
}
|
|
654
514
|
static get watchers() { return {
|
|
655
515
|
"authToken": ["propChanged"],
|
|
@@ -736,7 +596,7 @@ const BusinessCoreInfoFormStep = class {
|
|
|
736
596
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
737
597
|
}
|
|
738
598
|
get patchPayload() {
|
|
739
|
-
|
|
599
|
+
const formValues = new CoreBusinessInfo(this.formController.values.getValue()).payload;
|
|
740
600
|
return formValues;
|
|
741
601
|
}
|
|
742
602
|
componentWillLoad() {
|
|
@@ -779,7 +639,7 @@ const BusinessCoreInfoFormStep = class {
|
|
|
779
639
|
if (this.isLoading) {
|
|
780
640
|
return h(PaymentProvisioningLoading, null);
|
|
781
641
|
}
|
|
782
|
-
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: () => {
|
|
642
|
+
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: () => {
|
|
783
643
|
this.isEditingTaxId = true;
|
|
784
644
|
// Clear last4-equivalent and current value if any future conditional validation depends on it
|
|
785
645
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { tax_id: '', tax_id_last4: null }));
|
|
@@ -901,6 +761,7 @@ const BusinessOwnersFormStep = class {
|
|
|
901
761
|
this.ownersPayload = this.ownersPayload.filter(owner => owner.id !== '');
|
|
902
762
|
this.patchBusiness({
|
|
903
763
|
payload: {
|
|
764
|
+
representative: { is_owner: true },
|
|
904
765
|
owners: [{ id: this.representative.id }, ...this.ownersPayload],
|
|
905
766
|
},
|
|
906
767
|
onSuccess: () => {
|
|
@@ -930,6 +791,14 @@ const BusinessOwnersFormStep = class {
|
|
|
930
791
|
if (!formsValid) {
|
|
931
792
|
return;
|
|
932
793
|
}
|
|
794
|
+
if (!this.allowOptionalFields) {
|
|
795
|
+
const percentages = await Promise.all(this.refs.map(ref => ref.getOwnershipPercentage()));
|
|
796
|
+
const total = percentages.reduce((sum, p) => sum + (parseFloat(p) || 0), 0);
|
|
797
|
+
if (total !== 100) {
|
|
798
|
+
await Promise.all(this.refs.map(ref => ref.setOwnershipPercentageError('Ownership percentages must total 100%')));
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
933
802
|
const formSubmissions = this.refs.map(ref => ref.submit());
|
|
934
803
|
const submissionsValid = (await Promise.all(formSubmissions)).every(result => result);
|
|
935
804
|
if (!submissionsValid) {
|
|
@@ -1007,14 +876,14 @@ const BusinessRepresentativeFormInputs = class {
|
|
|
1007
876
|
}
|
|
1008
877
|
render() {
|
|
1009
878
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1010
|
-
return (h("form", { key: '
|
|
879
|
+
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: () => {
|
|
1011
880
|
this.isEditingIdentification = true;
|
|
1012
881
|
// Clear current value to force validation
|
|
1013
882
|
updateFormValues(this.formController, {
|
|
1014
883
|
identification_number: '',
|
|
1015
884
|
ssn_last4: null
|
|
1016
885
|
});
|
|
1017
|
-
} }, "Change"))))), h("div", { key: '
|
|
886
|
+
} }, "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 }))))));
|
|
1018
887
|
}
|
|
1019
888
|
};
|
|
1020
889
|
|
|
@@ -1128,7 +997,7 @@ const BusinessRepresentativeFormStep = class {
|
|
|
1128
997
|
});
|
|
1129
998
|
}
|
|
1130
999
|
get patchPayload() {
|
|
1131
|
-
|
|
1000
|
+
const formValues = new Representative(this.formController.values.getValue()).payload;
|
|
1132
1001
|
return { representative: formValues };
|
|
1133
1002
|
}
|
|
1134
1003
|
render() {
|
|
@@ -1267,6 +1136,345 @@ const BusinessTermsConditionsFormStep = class {
|
|
|
1267
1136
|
}
|
|
1268
1137
|
};
|
|
1269
1138
|
|
|
1139
|
+
const businessDocumentOptions = [
|
|
1140
|
+
{ label: 'Select a document type', value: '' },
|
|
1141
|
+
{ label: 'Articles of Incorporation', value: 'articles_of_incorporation' },
|
|
1142
|
+
{ label: 'Business Registration', value: 'business_registration' },
|
|
1143
|
+
];
|
|
1144
|
+
const financialDocumentOptions = [
|
|
1145
|
+
{ label: 'Select a document type', value: '' },
|
|
1146
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
1147
|
+
{ label: 'Bank Statement', value: 'bank_statement' },
|
|
1148
|
+
];
|
|
1149
|
+
const financialDocumentOptionsCAN = [
|
|
1150
|
+
{ label: 'Select a document type', value: '' },
|
|
1151
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
1152
|
+
{ label: 'Bank Letter', value: 'bank_statement' },
|
|
1153
|
+
];
|
|
1154
|
+
const personalDocGroup1Options = [
|
|
1155
|
+
{ label: 'Select a document type', value: '' },
|
|
1156
|
+
{ label: 'Canadian Passport', value: 'passport' },
|
|
1157
|
+
{ label: 'Canadian Driver\'s License', value: 'driver_license' },
|
|
1158
|
+
{ label: 'Canadian Government Issued ID Card', value: 'government_id' },
|
|
1159
|
+
{ label: 'Permanent Resident Card', value: 'resident_card' },
|
|
1160
|
+
{ label: 'Certificate of Indian Status', value: 'status_card' },
|
|
1161
|
+
{ label: 'US State Issued Driver\'s License', value: 'driver_license' },
|
|
1162
|
+
];
|
|
1163
|
+
const personalDocGroup2Options = [
|
|
1164
|
+
{ label: 'Select a document type', value: '' },
|
|
1165
|
+
{ label: 'Nexus Card (Photo ID)', value: 'nexus_card' },
|
|
1166
|
+
{ label: 'Canadian Citizenship/Naturalization Card or Certificate', value: 'citizenship_card' },
|
|
1167
|
+
{ label: 'Foreign Passport', value: 'foreign_passport' },
|
|
1168
|
+
{ label: 'Canadian Birth Certificate', value: 'birth_certificate' },
|
|
1169
|
+
{ label: 'Social Insurance Number (SIN) Card', value: 'sin_card' },
|
|
1170
|
+
{ label: 'Social Security Number (SSN) Card', value: 'ssn_card' },
|
|
1171
|
+
];
|
|
1172
|
+
function buildStaticCategories(country) {
|
|
1173
|
+
const financialOptions = country === CountryCode.CAN
|
|
1174
|
+
? financialDocumentOptionsCAN
|
|
1175
|
+
: financialDocumentOptions;
|
|
1176
|
+
return [
|
|
1177
|
+
{
|
|
1178
|
+
label: 'Business Document',
|
|
1179
|
+
value: 'business_document',
|
|
1180
|
+
docTypeOptions: businessDocumentOptions,
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
label: 'Financial Document',
|
|
1184
|
+
value: 'financial_document',
|
|
1185
|
+
docTypeOptions: financialOptions,
|
|
1186
|
+
},
|
|
1187
|
+
];
|
|
1188
|
+
}
|
|
1189
|
+
function buildPersonalDocumentCategories() {
|
|
1190
|
+
return [
|
|
1191
|
+
{
|
|
1192
|
+
label: 'Identity Document - Group 1',
|
|
1193
|
+
value: 'personal_group1',
|
|
1194
|
+
docTypeOptions: personalDocGroup1Options,
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
label: 'Identity Document - Group 2',
|
|
1198
|
+
value: 'personal_group2',
|
|
1199
|
+
docTypeOptions: personalDocGroup2Options,
|
|
1200
|
+
},
|
|
1201
|
+
];
|
|
1202
|
+
}
|
|
1203
|
+
const financialOnlyCategories = [
|
|
1204
|
+
{
|
|
1205
|
+
label: 'Financial Document',
|
|
1206
|
+
value: 'financial_document',
|
|
1207
|
+
docTypeOptions: financialDocumentOptions,
|
|
1208
|
+
},
|
|
1209
|
+
];
|
|
1210
|
+
function buildAllCategories(country) {
|
|
1211
|
+
if (country === CountryCode.USA) {
|
|
1212
|
+
return financialOnlyCategories;
|
|
1213
|
+
}
|
|
1214
|
+
return [...buildStaticCategories(country), ...buildPersonalDocumentCategories()];
|
|
1215
|
+
}
|
|
1216
|
+
const personalDocGroup1Types = new Set(personalDocGroup1Options.filter(o => o.value).map(o => o.value));
|
|
1217
|
+
const personalDocGroup2Types = new Set(personalDocGroup2Options.filter(o => o.value).map(o => o.value));
|
|
1218
|
+
|
|
1219
|
+
const DocumentUploadFormStep = class {
|
|
1220
|
+
constructor(hostRef) {
|
|
1221
|
+
registerInstance(this, hostRef);
|
|
1222
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
1223
|
+
this.stepCompleteEvent = createEvent(this, "complete-form-step-event", 7);
|
|
1224
|
+
this.formLoading = createEvent(this, "formLoading", 7);
|
|
1225
|
+
this.owners = [];
|
|
1226
|
+
this.existingDocuments = [];
|
|
1227
|
+
this.selectedCategory = '';
|
|
1228
|
+
this.selectedDocType = '';
|
|
1229
|
+
this.uploadQueue = [];
|
|
1230
|
+
this.isLoading = false;
|
|
1231
|
+
this.errors = {};
|
|
1232
|
+
this.fileInputKey = 0;
|
|
1233
|
+
this.categories = [];
|
|
1234
|
+
this.getData = () => {
|
|
1235
|
+
this.isLoading = true;
|
|
1236
|
+
this.getBusiness({
|
|
1237
|
+
onSuccess: (response) => {
|
|
1238
|
+
const { owners, documents } = response.data;
|
|
1239
|
+
this.owners = owners || [];
|
|
1240
|
+
this.existingDocuments = documents || [];
|
|
1241
|
+
this.categories = buildAllCategories(this.country);
|
|
1242
|
+
},
|
|
1243
|
+
onError: ({ error, code, severity }) => {
|
|
1244
|
+
this.errorEvent.emit({
|
|
1245
|
+
message: error,
|
|
1246
|
+
errorCode: code,
|
|
1247
|
+
severity: severity,
|
|
1248
|
+
});
|
|
1249
|
+
},
|
|
1250
|
+
final: () => {
|
|
1251
|
+
this.isLoading = false;
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
};
|
|
1255
|
+
this.handleCategoryChange = (_name, value) => {
|
|
1256
|
+
this.selectedCategory = value;
|
|
1257
|
+
this.selectedDocType = '';
|
|
1258
|
+
};
|
|
1259
|
+
this.handleDocTypeChange = (_name, value) => {
|
|
1260
|
+
if (value.startsWith('_') && value.endsWith('_header'))
|
|
1261
|
+
return;
|
|
1262
|
+
this.selectedDocType = value;
|
|
1263
|
+
};
|
|
1264
|
+
this.handleFileSelected = async (e) => {
|
|
1265
|
+
const fileList = Array.from(e.detail.fileList);
|
|
1266
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
1267
|
+
if (!category)
|
|
1268
|
+
return;
|
|
1269
|
+
const docTypeOption = category.docTypeOptions.find(o => o.value === this.selectedDocType);
|
|
1270
|
+
const docTypeLabel = (docTypeOption === null || docTypeOption === void 0 ? void 0 : docTypeOption.label) || this.selectedDocType;
|
|
1271
|
+
const newEntries = fileList.map(file => ({
|
|
1272
|
+
categoryLabel: category.label,
|
|
1273
|
+
categoryValue: category.value,
|
|
1274
|
+
docTypeLabel,
|
|
1275
|
+
docTypeValue: this.selectedDocType,
|
|
1276
|
+
fileName: file.name,
|
|
1277
|
+
file,
|
|
1278
|
+
status: 'uploading',
|
|
1279
|
+
}));
|
|
1280
|
+
const startIndex = this.uploadQueue.length;
|
|
1281
|
+
this.uploadQueue = [...this.uploadQueue, ...newEntries];
|
|
1282
|
+
this.selectedCategory = '';
|
|
1283
|
+
this.selectedDocType = '';
|
|
1284
|
+
this.fileInputKey++;
|
|
1285
|
+
await Promise.all(newEntries.map(async (entry, i) => {
|
|
1286
|
+
const index = startIndex + i;
|
|
1287
|
+
try {
|
|
1288
|
+
const docData = new EntityDocument({ file: entry.file, document_type: entry.docTypeValue }, this.businessId);
|
|
1289
|
+
const recordCreated = await this.postDocumentRecordData(docData);
|
|
1290
|
+
if (!recordCreated) {
|
|
1291
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
const uploaded = await this.uploadDocument(docData);
|
|
1295
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: uploaded ? 'uploaded' : 'error' }) : e);
|
|
1296
|
+
}
|
|
1297
|
+
catch (_a) {
|
|
1298
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
1299
|
+
}
|
|
1300
|
+
}));
|
|
1301
|
+
};
|
|
1302
|
+
this.postDocumentRecordData = async (docData) => {
|
|
1303
|
+
const payload = docData.record_data;
|
|
1304
|
+
return new Promise((resolve) => {
|
|
1305
|
+
this.postDocumentRecord({
|
|
1306
|
+
payload,
|
|
1307
|
+
onSuccess: (response) => {
|
|
1308
|
+
resolve(this.handleDocRecordResponse(docData, response));
|
|
1309
|
+
},
|
|
1310
|
+
onError: ({ error, code, severity }) => {
|
|
1311
|
+
this.errorEvent.emit({
|
|
1312
|
+
message: error,
|
|
1313
|
+
errorCode: code,
|
|
1314
|
+
severity: severity,
|
|
1315
|
+
});
|
|
1316
|
+
resolve(false);
|
|
1317
|
+
},
|
|
1318
|
+
});
|
|
1319
|
+
});
|
|
1320
|
+
};
|
|
1321
|
+
this.handleDocRecordResponse = (docData, response) => {
|
|
1322
|
+
if (response.error) {
|
|
1323
|
+
this.errorEvent.emit({
|
|
1324
|
+
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
1325
|
+
message: response.error.message,
|
|
1326
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
1327
|
+
data: response.error,
|
|
1328
|
+
});
|
|
1329
|
+
return false;
|
|
1330
|
+
}
|
|
1331
|
+
else {
|
|
1332
|
+
docData.setPresignedUrl(response.data.presigned_url);
|
|
1333
|
+
return true;
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
this.uploadDocument = async (docData) => {
|
|
1337
|
+
if (!docData.presigned_url) {
|
|
1338
|
+
throw new Error('Presigned URL is not set');
|
|
1339
|
+
}
|
|
1340
|
+
const fileData = await docData.getFileData();
|
|
1341
|
+
const response = await fetch(docData.presigned_url, {
|
|
1342
|
+
method: 'PUT',
|
|
1343
|
+
body: fileData,
|
|
1344
|
+
});
|
|
1345
|
+
if (!response.ok) {
|
|
1346
|
+
this.errorEvent.emit({
|
|
1347
|
+
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
1348
|
+
message: 'Failed to upload document',
|
|
1349
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
1350
|
+
});
|
|
1351
|
+
return false;
|
|
1352
|
+
}
|
|
1353
|
+
return true;
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
propChanged() {
|
|
1357
|
+
this.initializeApi();
|
|
1358
|
+
}
|
|
1359
|
+
watchHandler(newValue) {
|
|
1360
|
+
this.formLoading.emit(newValue);
|
|
1361
|
+
}
|
|
1362
|
+
async validateAndSubmit({ onSuccess }) {
|
|
1363
|
+
const validationErrors = this.validate();
|
|
1364
|
+
if (Object.keys(validationErrors).length > 0) {
|
|
1365
|
+
this.errors = validationErrors;
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
this.errors = {};
|
|
1369
|
+
this.stepCompleteEvent.emit({ response: null, formStep: BusinessFormStep.documentUpload });
|
|
1370
|
+
onSuccess();
|
|
1371
|
+
}
|
|
1372
|
+
componentWillLoad() {
|
|
1373
|
+
this.initializeApi();
|
|
1374
|
+
if (this.getBusiness) {
|
|
1375
|
+
this.getData();
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
initializeApi() {
|
|
1379
|
+
if (this.authToken && this.businessId) {
|
|
1380
|
+
this.getBusiness = makeGetBusiness({
|
|
1381
|
+
authToken: this.authToken,
|
|
1382
|
+
businessId: this.businessId,
|
|
1383
|
+
service: new BusinessService()
|
|
1384
|
+
});
|
|
1385
|
+
this.postDocumentRecord = makePostDocumentRecord({
|
|
1386
|
+
authToken: this.authToken,
|
|
1387
|
+
service: new DocumentRecordService()
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
this.errorEvent.emit({
|
|
1392
|
+
message: 'Missing required props',
|
|
1393
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
1394
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
get categoryOptions() {
|
|
1399
|
+
return [
|
|
1400
|
+
{ label: 'Select a category', value: '' },
|
|
1401
|
+
...this.categories.map(c => ({ label: c.label, value: c.value })),
|
|
1402
|
+
];
|
|
1403
|
+
}
|
|
1404
|
+
get docTypeOptions() {
|
|
1405
|
+
if (!this.selectedCategory) {
|
|
1406
|
+
return [{ label: 'Select a category first', value: '' }];
|
|
1407
|
+
}
|
|
1408
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
1409
|
+
return (category === null || category === void 0 ? void 0 : category.docTypeOptions) || [{ label: 'Select a category first', value: '' }];
|
|
1410
|
+
}
|
|
1411
|
+
validate() {
|
|
1412
|
+
if (this.allowOptionalFields)
|
|
1413
|
+
return {};
|
|
1414
|
+
const errors = {};
|
|
1415
|
+
const financialDocTypes = ['voided_check', 'bank_statement'];
|
|
1416
|
+
const hasExistingDoc = (types) => this.existingDocuments.some(doc => types.includes(doc.document_type));
|
|
1417
|
+
const hasUploadedDoc = (categoryValue) => this.uploadQueue.some(entry => entry.categoryValue === categoryValue && entry.status === 'uploaded');
|
|
1418
|
+
if (!hasUploadedDoc('financial_document') && !hasExistingDoc(financialDocTypes)) {
|
|
1419
|
+
errors['financial_document'] = 'Please upload a financial document';
|
|
1420
|
+
}
|
|
1421
|
+
if (this.country === CountryCode.CAN) {
|
|
1422
|
+
const businessDocTypes = ['articles_of_incorporation', 'business_registration'];
|
|
1423
|
+
if (!hasUploadedDoc('business_document') && !hasExistingDoc(businessDocTypes)) {
|
|
1424
|
+
errors['business_document'] = 'Please upload a business document';
|
|
1425
|
+
}
|
|
1426
|
+
const requiredCount = this.owners.length;
|
|
1427
|
+
const group1Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group1' && entry.status === 'uploaded').length;
|
|
1428
|
+
const group1Existing = this.existingDocuments.filter(doc => personalDocGroup1Types.has(doc.document_type)).length;
|
|
1429
|
+
if (group1Uploaded + group1Existing < requiredCount) {
|
|
1430
|
+
errors['personal_group1'] =
|
|
1431
|
+
`Please upload ${requiredCount} Group 1 identity document(s) (${group1Uploaded + group1Existing} of ${requiredCount} provided)`;
|
|
1432
|
+
}
|
|
1433
|
+
const group2Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group2' && entry.status === 'uploaded').length;
|
|
1434
|
+
const group2Existing = this.existingDocuments.filter(doc => personalDocGroup2Types.has(doc.document_type)).length;
|
|
1435
|
+
if (group2Uploaded + group2Existing < requiredCount) {
|
|
1436
|
+
errors['personal_group2'] =
|
|
1437
|
+
`Please upload ${requiredCount} Group 2 identity document(s) (${group2Uploaded + group2Existing} of ${requiredCount} provided)`;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
return errors;
|
|
1441
|
+
}
|
|
1442
|
+
render() {
|
|
1443
|
+
if (this.isLoading) {
|
|
1444
|
+
return h(PaymentProvisioningLoading, null);
|
|
1445
|
+
}
|
|
1446
|
+
return (h("form", null, h("fieldset", null, h("legend", { class: "mb-0", part: heading2 }, "Document Uploads"), h("hr", { class: "mt-2" }), h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading })), this.country === CountryCode.CAN && this.owners.length > 0 && (h("div", { class: "alert alert-info mt-3" }, "One document from each group (Group 1 and Group 2) is required for each owner (", this.owners.length, " owner(s)).")), h("fieldset", { class: "mt-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Add Document"), h("form-control-tooltip", { helpText: "Upload documents one at a time. Select the category and type, then choose a file. For Canadian businesses, one Group 1 and one Group 2 identity document is required for each owner." })), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_category", label: "Document Category", options: this.categoryOptions, defaultValue: this.selectedCategory, inputHandler: this.handleCategoryChange })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_type", label: "Document Type", options: this.docTypeOptions, defaultValue: this.selectedDocType, inputHandler: this.handleDocTypeChange, disabled: !this.selectedCategory })), h("div", { class: "col-12" }, h("form-control-file", { key: this.fileInputKey, name: "document_file", label: "Upload Document", documentType: this.selectedDocType, onFileSelected: this.handleFileSelected, disabled: !this.selectedDocType, multiple: false })))), h("document-upload-list", { documents: this.uploadQueue }), Object.keys(this.errors).length > 0 && (h("div", { class: "alert alert-danger mt-3" }, h("ul", { class: "mb-0" }, Object.values(this.errors).map(err => h("li", null, err)))))));
|
|
1447
|
+
}
|
|
1448
|
+
static get watchers() { return {
|
|
1449
|
+
"authToken": ["propChanged"],
|
|
1450
|
+
"businessId": ["propChanged"],
|
|
1451
|
+
"isLoading": ["watchHandler"]
|
|
1452
|
+
}; }
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1455
|
+
const DocumentUploadList = class {
|
|
1456
|
+
constructor(hostRef) {
|
|
1457
|
+
registerInstance(this, hostRef);
|
|
1458
|
+
this.documents = [];
|
|
1459
|
+
}
|
|
1460
|
+
renderStatus(status) {
|
|
1461
|
+
switch (status) {
|
|
1462
|
+
case 'uploading':
|
|
1463
|
+
return h("span", { class: "badge bg-info" }, "Uploading...");
|
|
1464
|
+
case 'uploaded':
|
|
1465
|
+
return h("span", { class: "badge bg-success" }, "Uploaded");
|
|
1466
|
+
case 'error':
|
|
1467
|
+
return h("span", { class: "badge bg-danger" }, "Error");
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
render() {
|
|
1471
|
+
if (!this.documents.length) {
|
|
1472
|
+
return null;
|
|
1473
|
+
}
|
|
1474
|
+
return (h("div", { class: "mt-4" }, h("div", { class: "card", part: card }, h("div", { class: "card-body" }, h("h5", { class: "card-title", part: heading2 }, "Uploaded Documents"), h("div", { class: "table-responsive" }, h("table", { class: "table table-sm table-borderless", part: table }, h("thead", null, h("tr", null, h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Category"), h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Document Type"), h("th", { style: { width: '30%' }, part: tableHeadCell, scope: "col" }, "File Name"), h("th", { style: { width: '20%' }, part: tableHeadCell, scope: "col" }, "Status"))), h("tbody", null, this.documents.map((doc, index) => (h("tr", { class: index === 0 ? 'border-bottom border-top' : 'border-bottom' }, h("td", { part: tableCell }, doc.categoryLabel), h("td", { part: tableCell }, doc.docTypeLabel), h("td", { part: tableCell }, doc.fileName), h("td", { part: tableCell }, this.renderStatus(doc.status))))))))))));
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1270
1478
|
const LegalAddressFormStep = class {
|
|
1271
1479
|
constructor(hostRef) {
|
|
1272
1480
|
registerInstance(this, hostRef);
|
|
@@ -1335,7 +1543,7 @@ const LegalAddressFormStep = class {
|
|
|
1335
1543
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
1336
1544
|
}
|
|
1337
1545
|
get patchPayload() {
|
|
1338
|
-
|
|
1546
|
+
const formValues = new Address(this.formController.values.getValue()).payload;
|
|
1339
1547
|
return { legal_address: formValues };
|
|
1340
1548
|
}
|
|
1341
1549
|
componentWillLoad() {
|
|
@@ -1478,6 +1686,13 @@ const OwnerForm = class {
|
|
|
1478
1686
|
async returnOwnerData() {
|
|
1479
1687
|
return this.ownerId;
|
|
1480
1688
|
}
|
|
1689
|
+
async getOwnershipPercentage() {
|
|
1690
|
+
var _a;
|
|
1691
|
+
return ((_a = this.formController.values.getValue()) === null || _a === void 0 ? void 0 : _a.ownership_percentage) || null;
|
|
1692
|
+
}
|
|
1693
|
+
async setOwnershipPercentageError(message) {
|
|
1694
|
+
this.formController.setFieldError('ownership_percentage', message);
|
|
1695
|
+
}
|
|
1481
1696
|
async validate() {
|
|
1482
1697
|
return this.formController.validate();
|
|
1483
1698
|
}
|
|
@@ -1552,7 +1767,7 @@ const OwnerForm = class {
|
|
|
1552
1767
|
});
|
|
1553
1768
|
}
|
|
1554
1769
|
render() {
|
|
1555
|
-
return (h(Host, { key: '
|
|
1770
|
+
return (h(Host, { key: 'b168e9f5a52416984e6a04ab5f0771b63ee28b2e', style: { display: 'block' } }, h("form", { key: 'd22a6aae3f5debd30d87b3bd37c67390a46c4590', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '30597bc1f4983bddbdc0ed45e6be7e715d0b9b8e' }, h("legend", { key: '055ca2b6bbfa4e86591411668eaead3bd0d95ea8', class: "fw-semibold fs-5 w-100", part: heading3 }, this.formTitle), h("br", { key: 'f0d2d9624611ee888ff318ec1525281bf007e346' }), h("div", { key: '2c38a166f681404c2ab303630217e54c15f1e5f2', class: "row gy-3" }, h("owner-form-inputs", { key: '05253624d3d79f0ba7a4ec49b387e252e796e5b6', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController, country: this.country }), h("div", { key: '8e0e67966f047c3f9a4b30f28983f67db2372c0c', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: 'e33368a968efe5faf52a08e36bb2bef215625c4a', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '7bb79b0624dfb3a8645182432c484f288cc73692', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: 'ef4f86dd1b1878e92c98e4a826f9fbad808e15b7' })))));
|
|
1556
1771
|
}
|
|
1557
1772
|
static get watchers() { return {
|
|
1558
1773
|
"isLoading": ["loadingWatcher"]
|
|
@@ -1871,4 +2086,4 @@ const PlaidVerification = class {
|
|
|
1871
2086
|
}
|
|
1872
2087
|
};
|
|
1873
2088
|
|
|
1874
|
-
export { AdditionalQuestionsFormStep as additional_questions_form_step,
|
|
2089
|
+
export { AdditionalQuestionsFormStep as additional_questions_form_step, BankAccountFormInputs as bank_account_form_inputs, BankAccountFormInputsCanada as bank_account_form_inputs_canada, BusinessBankAccountFormStep as business_bank_account_form_step, BusinessCoreInfoFormStep as business_core_info_form_step, BusinessDocumentsOnFile as business_documents_on_file, BusinessOwnersFormStep as business_owners_form_step, BusinessRepresentativeFormInputs as business_representative_form_inputs, BusinessRepresentativeFormStep as business_representative_form_step, BusinessTermsConditionsFormStep as business_terms_conditions_form_step, DocumentUploadFormStep as document_upload_form_step, DocumentUploadList as document_upload_list, LegalAddressFormStep as legal_address_form_step, OwnerForm as owner_form, PlaidVerification as plaid_verification };
|