@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,32 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-p7cvUYAE.js');
|
|
4
|
-
var Plaid = require('./Plaid-
|
|
5
|
-
var paymentProvisioningActions = require('./payment-provisioning-actions-
|
|
6
|
-
var business_service = require('./business.service-
|
|
7
|
-
var businessIdentitySchema = require('./business-identity-schema-
|
|
8
|
-
var index_esm = require('./index.esm-
|
|
4
|
+
var Plaid = require('./Plaid-QLOFOTeC.js');
|
|
5
|
+
var paymentProvisioningActions = require('./payment-provisioning-actions-B4x7lnyF.js');
|
|
6
|
+
var business_service = require('./business.service-DOGeb2O6.js');
|
|
7
|
+
var businessIdentitySchema = require('./business-identity-schema-BA385xf-.js');
|
|
8
|
+
var index_esm = require('./index.esm-BNETBIV_.js');
|
|
9
9
|
var Business = require('./Business-oBifyXkW.js');
|
|
10
10
|
var formInputMasks = require('./form-input-masks-BnNFJ3IJ.js');
|
|
11
11
|
var parts = require('./parts-BXshb_S-.js');
|
|
12
12
|
var paymentProvisioningLoading = require('./payment-provisioning-loading-tM9WWmxv.js');
|
|
13
|
-
var businessFormOptions = require('./business-form-options-
|
|
13
|
+
var businessFormOptions = require('./business-form-options-CnlrfbQ6.js');
|
|
14
14
|
var eventTypes = require('./event-types-DNOUef41.js');
|
|
15
|
+
var utils = require('./utils-DAyWinG2.js');
|
|
15
16
|
require('./config-state-BIgGhhe9.js');
|
|
16
17
|
require('./dinero-BwNN_k7x.js');
|
|
17
18
|
require('./Pagination-Dediz133.js');
|
|
18
|
-
var
|
|
19
|
-
var schemaValidations = require('./schema-validations-_yWWnnaG.js');
|
|
19
|
+
var schemaValidations = require('./schema-validations-C2XsZnqK.js');
|
|
20
20
|
var button = require('./button-CR9Rl1-o.js');
|
|
21
21
|
require('./event-types-YOY5TKUN.js');
|
|
22
|
-
var countryConfig = require('./country-config-
|
|
23
|
-
var utils$1 = require('./utils-
|
|
22
|
+
var countryConfig = require('./country-config-C1bWmF8P.js');
|
|
23
|
+
var utils$1 = require('./utils-D1CWnhex.js');
|
|
24
24
|
var skeleton = require('./skeleton-DvRCiQlA.js');
|
|
25
25
|
var inputHandlers = require('./input-handlers-_51J5q7J.js');
|
|
26
|
-
var Api = require('./Api-
|
|
27
|
-
var styledHost = require('./styled-host-
|
|
28
|
-
var plaid_service = require('./plaid.service-
|
|
29
|
-
require('./utils-
|
|
26
|
+
var Api = require('./Api-BioDE5he.js');
|
|
27
|
+
var styledHost = require('./styled-host-Ch0-dxF-.js');
|
|
28
|
+
var plaid_service = require('./plaid.service-DpiLY-5D.js');
|
|
29
|
+
require('./utils-BVM6JCW0.js');
|
|
30
30
|
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
31
31
|
require('./index-W-zoNiyM.js');
|
|
32
32
|
|
|
@@ -141,7 +141,7 @@ const AdditionalQuestionsFormStep = class {
|
|
|
141
141
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
142
142
|
}
|
|
143
143
|
get patchPayload() {
|
|
144
|
-
|
|
144
|
+
const formValues = new Business.AdditionalQuestions(this.formController.values.getValue()).payload;
|
|
145
145
|
return { additional_questions: formValues };
|
|
146
146
|
}
|
|
147
147
|
componentWillLoad() {
|
|
@@ -181,7 +181,7 @@ const AdditionalQuestionsFormStep = class {
|
|
|
181
181
|
if (this.isLoading) {
|
|
182
182
|
return index.h(paymentProvisioningLoading.PaymentProvisioningLoading, null);
|
|
183
183
|
}
|
|
184
|
-
return (index.h("form", null, index.h("fieldset", null, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Additional Questions"), index.h("form-control-tooltip", { helpText: "This information helps us understand the business and identify and monitor trends to safeguard you and your customers." })), index.h("hr", { class: "mt-2" }), index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.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: formInputMasks.CURRENCY_MASK.WHOLE })), index.h("div", { class: "col-12 col-md-6" }, index.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: formInputMasks.CURRENCY_MASK.WHOLE })), index.h("div", { class: "col-12" }, index.h("form-control-
|
|
184
|
+
return (index.h("form", null, index.h("fieldset", null, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Additional Questions"), index.h("form-control-tooltip", { helpText: "This information helps us understand the business and identify and monitor trends to safeguard you and your customers." })), index.h("hr", { class: "mt-2" }), index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.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: formInputMasks.CURRENCY_MASK.WHOLE })), index.h("div", { class: "col-12 col-md-6" }, index.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: formInputMasks.CURRENCY_MASK.WHOLE })), index.h("div", { class: "col-12" }, index.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 })), index.h("div", { class: "col-12" }, index.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: businessFormOptions.businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), index.h("div", { class: "col-12" }, index.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 }))))));
|
|
185
185
|
}
|
|
186
186
|
static get watchers() { return {
|
|
187
187
|
"authToken": ["propChanged"],
|
|
@@ -190,15 +190,6 @@ const AdditionalQuestionsFormStep = class {
|
|
|
190
190
|
}; }
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
const BankAccountDocumentFormInputs = class {
|
|
194
|
-
constructor(hostRef) {
|
|
195
|
-
index.registerInstance(this, hostRef);
|
|
196
|
-
}
|
|
197
|
-
render() {
|
|
198
|
-
return (index.h("div", { key: 'd0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9', class: "row gy-3" }, index.h("div", { key: '02ed406f38558badf9f591e076b120d09c71f83b', class: "col-12" }, index.h("form-control-file", { key: '11ff1dc68264b9e5aa561ffe19b423abc1a00c78', name: "voided_check", label: "Voided Check", documentType: Plaid.EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), index.h("div", { key: '71d26407522a75a54489155566c18af1a64c1417', class: "col-12" }, index.h("form-control-file", { key: '7ea42e03a44c223a5fedc273e94e635e70d54f4b', name: "bank_statement", label: "Bank Statement", documentType: Plaid.EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
|
|
202
193
|
const BankAccountFormInputs = class {
|
|
203
194
|
constructor(hostRef) {
|
|
204
195
|
index.registerInstance(this, hostRef);
|
|
@@ -219,9 +210,6 @@ const BankAccountFormInputsCanada = class {
|
|
|
219
210
|
}
|
|
220
211
|
};
|
|
221
212
|
|
|
222
|
-
const checkExistingDocs = (documents, documentType) => {
|
|
223
|
-
return documents.some((doc) => doc.document_type === documentType);
|
|
224
|
-
};
|
|
225
213
|
const buildCommonFieldRules = (allowOptionalFields) => {
|
|
226
214
|
if (allowOptionalFields) {
|
|
227
215
|
return {
|
|
@@ -240,30 +228,6 @@ const buildCommonFieldRules = (allowOptionalFields) => {
|
|
|
240
228
|
account_number: schemaValidations.accountNumberValidation.required('Enter account number'),
|
|
241
229
|
};
|
|
242
230
|
};
|
|
243
|
-
const buildDocumentRules = (documents, allowOptionalFields) => {
|
|
244
|
-
if (allowOptionalFields) {
|
|
245
|
-
return {
|
|
246
|
-
voided_check: index_esm.create$8().nullable(),
|
|
247
|
-
bank_statement: index_esm.create$8().nullable(),
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
const existingVoidedCheck = checkExistingDocs(documents, Plaid.EntityDocumentType.voidedCheck);
|
|
251
|
-
const existingBankStatement = checkExistingDocs(documents, Plaid.EntityDocumentType.bankStatement);
|
|
252
|
-
const existingDocument = existingVoidedCheck || existingBankStatement;
|
|
253
|
-
const documentErrorText = 'Please upload either a voided check or a bank statement. Only one is required.';
|
|
254
|
-
return {
|
|
255
|
-
voided_check: index_esm.create$8().when('bank_statement', {
|
|
256
|
-
is: (val) => !val && !existingDocument,
|
|
257
|
-
then: (schema) => schema.required(documentErrorText),
|
|
258
|
-
otherwise: (schema) => schema.notRequired(),
|
|
259
|
-
}),
|
|
260
|
-
bank_statement: index_esm.create$8().when('voided_check', {
|
|
261
|
-
is: (val) => !val && !existingDocument,
|
|
262
|
-
then: (schema) => schema.required(documentErrorText),
|
|
263
|
-
otherwise: (schema) => schema.notRequired(),
|
|
264
|
-
}),
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
231
|
const buildUSARules = (allowOptionalFields) => {
|
|
268
232
|
if (allowOptionalFields) {
|
|
269
233
|
return { routing_number: schemaValidations.routingNumberValidation.nullable() };
|
|
@@ -288,17 +252,17 @@ const buildCANRules = (allowOptionalFields) => {
|
|
|
288
252
|
transit_number: transitNumberValidation.required('Enter transit number'),
|
|
289
253
|
};
|
|
290
254
|
};
|
|
291
|
-
const businessBankAccountSchemaUSA = (
|
|
292
|
-
const shape = Object.assign(Object.assign(
|
|
293
|
-
return index_esm.create$3().shape(shape
|
|
255
|
+
const businessBankAccountSchemaUSA = (allowOptionalFields) => {
|
|
256
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildUSARules(allowOptionalFields));
|
|
257
|
+
return index_esm.create$3().shape(shape);
|
|
294
258
|
};
|
|
295
|
-
const businessBankAccountSchemaCAN = (
|
|
296
|
-
const shape = Object.assign(Object.assign(
|
|
297
|
-
return index_esm.create$3().shape(shape
|
|
259
|
+
const businessBankAccountSchemaCAN = (allowOptionalFields) => {
|
|
260
|
+
const shape = Object.assign(Object.assign({}, buildCommonFieldRules(allowOptionalFields)), buildCANRules(allowOptionalFields));
|
|
261
|
+
return index_esm.create$3().shape(shape);
|
|
298
262
|
};
|
|
299
263
|
const bankAccountSchemaByCountry = {
|
|
300
|
-
[Business.CountryCode.USA]: (allowOptionalFields
|
|
301
|
-
[Business.CountryCode.CAN]: (allowOptionalFields
|
|
264
|
+
[Business.CountryCode.USA]: (allowOptionalFields) => businessBankAccountSchemaUSA(allowOptionalFields),
|
|
265
|
+
[Business.CountryCode.CAN]: (allowOptionalFields) => businessBankAccountSchemaCAN(allowOptionalFields),
|
|
302
266
|
};
|
|
303
267
|
|
|
304
268
|
const BusinessBankAccountFormStep = class {
|
|
@@ -309,15 +273,13 @@ const BusinessBankAccountFormStep = class {
|
|
|
309
273
|
this.formLoading = index.createEvent(this, "formLoading", 7);
|
|
310
274
|
this.errors = {};
|
|
311
275
|
this.bankAccount = {};
|
|
312
|
-
this.existingDocuments = [];
|
|
313
|
-
this.documentData = new Plaid.EntityDocumentStorage();
|
|
314
276
|
this.isLoading = false;
|
|
315
277
|
this.viewMode = 'manual';
|
|
316
278
|
this.bankAccountVerification = false;
|
|
317
279
|
this.platformAccountId = null;
|
|
318
280
|
this.getSchema = () => {
|
|
319
281
|
const schema = bankAccountSchemaByCountry[this.country];
|
|
320
|
-
return schema(this.allowOptionalFields
|
|
282
|
+
return schema(this.allowOptionalFields);
|
|
321
283
|
};
|
|
322
284
|
this.initializeFormController = () => {
|
|
323
285
|
this.formController = new index_esm.FormController(this.getSchema());
|
|
@@ -334,12 +296,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
334
296
|
this.inputHandler = (name, value) => {
|
|
335
297
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
|
|
336
298
|
};
|
|
337
|
-
this.storeFiles = (e) => {
|
|
338
|
-
const fileList = Array.from(e.detail.fileList);
|
|
339
|
-
const docType = e.detail.document_type;
|
|
340
|
-
const documentList = fileList.map(file => new Plaid.EntityDocument({ file, document_type: docType }, this.businessId));
|
|
341
|
-
this.documentData[docType] = documentList;
|
|
342
|
-
};
|
|
343
299
|
this.getData = () => {
|
|
344
300
|
this.isLoading = true;
|
|
345
301
|
this.getBusiness({
|
|
@@ -362,12 +318,10 @@ const BusinessBankAccountFormStep = class {
|
|
|
362
318
|
};
|
|
363
319
|
this.handleChangeBankAccount = () => {
|
|
364
320
|
this.viewMode = this.plaidAvailable ? 'plaid' : 'manual';
|
|
365
|
-
this.documentData = new Plaid.EntityDocumentStorage();
|
|
366
321
|
this.initializeFormController();
|
|
367
322
|
};
|
|
368
323
|
this.handleCancel = () => {
|
|
369
324
|
this.viewMode = this.existingBankAccount ? 'readonly' : 'plaid';
|
|
370
|
-
this.documentData = new Plaid.EntityDocumentStorage();
|
|
371
325
|
this.initializeFormController();
|
|
372
326
|
};
|
|
373
327
|
this.handleToggleToManualEntry = () => {
|
|
@@ -383,66 +337,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
383
337
|
});
|
|
384
338
|
});
|
|
385
339
|
};
|
|
386
|
-
this.postDocumentRecordData = async (docData) => {
|
|
387
|
-
this.isLoading = true;
|
|
388
|
-
const payload = docData.record_data;
|
|
389
|
-
return new Promise((resolve) => {
|
|
390
|
-
this.postDocumentRecord({
|
|
391
|
-
payload,
|
|
392
|
-
onSuccess: (response) => {
|
|
393
|
-
resolve(this.handleDocRecordResponse(docData, response));
|
|
394
|
-
},
|
|
395
|
-
onError: ({ error, code, severity }) => {
|
|
396
|
-
this.errorEvent.emit({
|
|
397
|
-
message: error,
|
|
398
|
-
errorCode: code,
|
|
399
|
-
severity: severity
|
|
400
|
-
});
|
|
401
|
-
resolve(false);
|
|
402
|
-
},
|
|
403
|
-
});
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
this.handleDocRecordResponse = (docData, response) => {
|
|
407
|
-
if (response.error) {
|
|
408
|
-
this.errorEvent.emit({
|
|
409
|
-
errorCode: Plaid.ComponentErrorCodes.POST_ERROR,
|
|
410
|
-
message: response.error.message,
|
|
411
|
-
severity: Plaid.ComponentErrorSeverity.ERROR,
|
|
412
|
-
data: response.error,
|
|
413
|
-
});
|
|
414
|
-
return false;
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
docData.setPresignedUrl(response.data.presigned_url);
|
|
418
|
-
return true;
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
this.uploadDocument = async (docData) => {
|
|
422
|
-
if (!docData.presigned_url) {
|
|
423
|
-
throw new Error('Presigned URL is not set');
|
|
424
|
-
}
|
|
425
|
-
const fileData = await docData.getFileData();
|
|
426
|
-
const response = await fetch(docData.presigned_url, {
|
|
427
|
-
method: 'PUT',
|
|
428
|
-
body: fileData
|
|
429
|
-
});
|
|
430
|
-
return this.handleUploadResponse(response);
|
|
431
|
-
};
|
|
432
|
-
this.handleUploadResponse = (response) => {
|
|
433
|
-
if (response.error) {
|
|
434
|
-
this.errorEvent.emit({
|
|
435
|
-
errorCode: Plaid.ComponentErrorCodes.POST_ERROR,
|
|
436
|
-
message: response.error.message,
|
|
437
|
-
severity: Plaid.ComponentErrorSeverity.ERROR,
|
|
438
|
-
data: response.error,
|
|
439
|
-
});
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
else {
|
|
443
|
-
return true;
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
340
|
}
|
|
447
341
|
propChanged() {
|
|
448
342
|
this.initializeApi();
|
|
@@ -481,10 +375,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
481
375
|
authToken: this.authToken,
|
|
482
376
|
service: new business_service.BusinessBankAccountService()
|
|
483
377
|
});
|
|
484
|
-
this.postDocumentRecord = paymentProvisioningActions.makePostDocumentRecord({
|
|
485
|
-
authToken: this.authToken,
|
|
486
|
-
service: new business_service.DocumentRecordService()
|
|
487
|
-
});
|
|
488
378
|
}
|
|
489
379
|
else {
|
|
490
380
|
this.errorEvent.emit({
|
|
@@ -510,7 +400,7 @@ const BusinessBankAccountFormStep = class {
|
|
|
510
400
|
return this.bankAccountVerification || this.existingBankAccount;
|
|
511
401
|
}
|
|
512
402
|
processBusinessResponse(data) {
|
|
513
|
-
const { bank_accounts,
|
|
403
|
+
const { bank_accounts, settings, platform_account_id } = data;
|
|
514
404
|
if (bank_accounts.length > 0) {
|
|
515
405
|
this.bankAccount = new BankAccount(bank_accounts[bank_accounts.length - 1]);
|
|
516
406
|
}
|
|
@@ -518,7 +408,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
518
408
|
this.bankAccount = new BankAccount({});
|
|
519
409
|
this.bankAccount.business_id = this.businessId;
|
|
520
410
|
}
|
|
521
|
-
this.existingDocuments = documents;
|
|
522
411
|
this.bankAccountVerification = settings.bank_account_verification === true;
|
|
523
412
|
this.platformAccountId = platform_account_id;
|
|
524
413
|
}
|
|
@@ -539,11 +428,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
539
428
|
const bankAccountPosted = await this.postBankAccountData();
|
|
540
429
|
if (!bankAccountPosted)
|
|
541
430
|
return;
|
|
542
|
-
}
|
|
543
|
-
const documentsUploaded = await this.postBusinessDocuments();
|
|
544
|
-
if (!documentsUploaded)
|
|
545
|
-
return;
|
|
546
|
-
if (this.viewMode === 'manual') {
|
|
547
431
|
this.viewMode = 'readonly';
|
|
548
432
|
await this.refreshBankAccountData();
|
|
549
433
|
}
|
|
@@ -607,27 +491,6 @@ const BusinessBankAccountFormStep = class {
|
|
|
607
491
|
});
|
|
608
492
|
});
|
|
609
493
|
}
|
|
610
|
-
async postBusinessDocuments() {
|
|
611
|
-
this.isLoading = true;
|
|
612
|
-
try {
|
|
613
|
-
const docArray = Object.values(this.documentData).flat();
|
|
614
|
-
if (!docArray.length) {
|
|
615
|
-
return true;
|
|
616
|
-
}
|
|
617
|
-
const recordsCreated = await Promise.all(docArray.map((docData) => this.postDocumentRecordData(docData))); // Create document records
|
|
618
|
-
if (recordsCreated.includes(false)) {
|
|
619
|
-
return false;
|
|
620
|
-
} // Exit if document record creation fails
|
|
621
|
-
const uploadsCompleted = await Promise.all(docArray.map((docData) => this.uploadDocument(docData))); // Upload documents to AWS presigned URLs
|
|
622
|
-
if (uploadsCompleted.includes(false)) {
|
|
623
|
-
return false;
|
|
624
|
-
} // Exit if any upload fails
|
|
625
|
-
return true;
|
|
626
|
-
}
|
|
627
|
-
finally {
|
|
628
|
-
this.isLoading = false;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
494
|
renderBankAccountInputs(disabled) {
|
|
632
495
|
const defaultValue = this.formController.getInitialValues();
|
|
633
496
|
return this.country === Business.CountryCode.CAN ? (index.h("bank-account-form-inputs-canada", { defaultValue: defaultValue, errors: this.errors, inputHandler: this.inputHandler, formDisabled: disabled })) : (index.h("bank-account-form-inputs", { defaultValue: defaultValue, errors: this.errors, inputHandler: this.inputHandler, formDisabled: disabled }));
|
|
@@ -644,14 +507,11 @@ const BusinessBankAccountFormStep = class {
|
|
|
644
507
|
renderManualEntryView() {
|
|
645
508
|
return (index.h("div", null, this.plaidAvailable && (index.h("div", { class: "mb-3" }, index.h(button.Button, { type: "button", variant: "secondary", onClick: this.handleToggleToPlaidVerification, disabled: this.isLoading, part: parts.buttonSecondary }, "Link bank account with Plaid instead"))), this.renderBankAccountInputs(false), index.h("div", { class: "mt-3 d-flex gap-2" }, this.showCancel && (index.h(button.Button, { variant: "secondary", type: "button", onClick: this.handleCancel, disabled: this.isLoading, part: parts.buttonSecondary }, "Cancel")), index.h(button.Button, { variant: "primary", type: "button", onClick: this.handleSaveBankAccount, disabled: this.isLoading, isLoading: this.isLoading }, "Save Bank Account"))));
|
|
646
509
|
}
|
|
647
|
-
renderDocumentUploads() {
|
|
648
|
-
return (index.h("fieldset", { class: "mt-4" }, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Document Uploads"), index.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." })), index.h("hr", { class: "mt-2" }), index.h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading }), index.h("bank-account-document-form-inputs", { inputHandler: this.inputHandler, errors: this.errors, storeFiles: this.storeFiles })));
|
|
649
|
-
}
|
|
650
510
|
render() {
|
|
651
511
|
if (this.isLoading) {
|
|
652
512
|
return index.h(paymentProvisioningLoading.PaymentProvisioningLoading, null);
|
|
653
513
|
}
|
|
654
|
-
return (index.h("form", null, index.h("fieldset", { class: "mb-4" }, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Bank Account Info"), index.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." })), index.h("hr", { class: "mt-2" }), this.viewMode === 'readonly' && this.renderReadonlyView(), this.viewMode === 'plaid' && this.renderPlaidView(), this.viewMode === 'manual' && this.renderManualEntryView())
|
|
514
|
+
return (index.h("form", null, index.h("fieldset", { class: "mb-4" }, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Bank Account Info"), index.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." })), index.h("hr", { class: "mt-2" }), this.viewMode === 'readonly' && this.renderReadonlyView(), this.viewMode === 'plaid' && this.renderPlaidView(), this.viewMode === 'manual' && this.renderManualEntryView())));
|
|
655
515
|
}
|
|
656
516
|
static get watchers() { return {
|
|
657
517
|
"authToken": ["propChanged"],
|
|
@@ -738,7 +598,7 @@ const BusinessCoreInfoFormStep = class {
|
|
|
738
598
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
739
599
|
}
|
|
740
600
|
get patchPayload() {
|
|
741
|
-
|
|
601
|
+
const formValues = new Business.CoreBusinessInfo(this.formController.values.getValue()).payload;
|
|
742
602
|
return formValues;
|
|
743
603
|
}
|
|
744
604
|
componentWillLoad() {
|
|
@@ -781,7 +641,7 @@ const BusinessCoreInfoFormStep = class {
|
|
|
781
641
|
if (this.isLoading) {
|
|
782
642
|
return index.h(paymentProvisioningLoading.PaymentProvisioningLoading, null);
|
|
783
643
|
}
|
|
784
|
-
return (index.h("form", null, index.h("fieldset", null, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Business Information")), index.h("hr", { class: "mt-2" }), index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.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)." })), index.h("div", { class: "col-12 col-md-6" }, index.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)" })), index.h("div", { class: "col-12 col-md-8" }, index.h("form-control-select", { name: "classification", label: "Business Classification", options: businessFormOptions.businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), index.h("div", { class: "col-12 col-md-4" }, index.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 })), index.h("div", { class: "col-12 col-md-6" }, index.h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler, helpText: "Describe what you sell" })), index.h("div", { class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (index.h("form-control-number-masked", { name: "tax_id", label: countryConfig.countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: '000000000', helpText: countryConfig.countryLabels[this.country].taxIdHelpText })) : (index.h("div", null, index.h("label", { class: "form-label", part: parts.label }, countryConfig.countryLabels[this.country].taxIdLabel), index.h("div", { class: "input-group mb-3" }, index.h("input", { type: "text", class: "form-control", part: parts.inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), index.h("button", { class: "btn btn-secondary", type: "button", part: parts.buttonSecondary, onClick: () => {
|
|
644
|
+
return (index.h("form", null, index.h("fieldset", null, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Business Information")), index.h("hr", { class: "mt-2" }), index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.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)." })), index.h("div", { class: "col-12 col-md-6" }, index.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)" })), index.h("div", { class: "col-12 col-md-8" }, index.h("form-control-select", { name: "classification", label: "Business Classification", options: businessFormOptions.businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), index.h("div", { class: "col-12 col-md-4" }, index.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 })), index.h("div", { class: "col-12 col-md-6" }, index.h("form-control-text", { name: "industry", label: "Industry", defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler, helpText: "Describe what you sell" })), index.h("div", { class: "col-12 col-md-6" }, (!((_a = this.coreInfo) === null || _a === void 0 ? void 0 : _a.tax_id_last4) || this.isEditingTaxId) ? (index.h("form-control-number-masked", { name: "tax_id", label: countryConfig.countryLabels[this.country].taxIdLabelOptional || countryConfig.countryLabels[this.country].taxIdLabel, defaultValue: this.isEditingTaxId ? '' : coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, mask: '000000000', helpText: countryConfig.countryLabels[this.country].taxIdHelpText })) : (index.h("div", null, index.h("label", { class: "form-label", part: parts.label }, countryConfig.countryLabels[this.country].taxIdLabel), index.h("div", { class: "input-group mb-3" }, index.h("input", { type: "text", class: "form-control", part: parts.inputDisabled, value: `****${(_b = this.coreInfo) === null || _b === void 0 ? void 0 : _b.tax_id_last4}`, disabled: true }), index.h("button", { class: "btn btn-secondary", type: "button", part: parts.buttonSecondary, onClick: () => {
|
|
785
645
|
this.isEditingTaxId = true;
|
|
786
646
|
// Clear last4-equivalent and current value if any future conditional validation depends on it
|
|
787
647
|
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { tax_id: '', tax_id_last4: null }));
|
|
@@ -903,6 +763,7 @@ const BusinessOwnersFormStep = class {
|
|
|
903
763
|
this.ownersPayload = this.ownersPayload.filter(owner => owner.id !== '');
|
|
904
764
|
this.patchBusiness({
|
|
905
765
|
payload: {
|
|
766
|
+
representative: { is_owner: true },
|
|
906
767
|
owners: [{ id: this.representative.id }, ...this.ownersPayload],
|
|
907
768
|
},
|
|
908
769
|
onSuccess: () => {
|
|
@@ -932,6 +793,14 @@ const BusinessOwnersFormStep = class {
|
|
|
932
793
|
if (!formsValid) {
|
|
933
794
|
return;
|
|
934
795
|
}
|
|
796
|
+
if (!this.allowOptionalFields) {
|
|
797
|
+
const percentages = await Promise.all(this.refs.map(ref => ref.getOwnershipPercentage()));
|
|
798
|
+
const total = percentages.reduce((sum, p) => sum + (parseFloat(p) || 0), 0);
|
|
799
|
+
if (total !== 100) {
|
|
800
|
+
await Promise.all(this.refs.map(ref => ref.setOwnershipPercentageError('Ownership percentages must total 100%')));
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
935
804
|
const formSubmissions = this.refs.map(ref => ref.submit());
|
|
936
805
|
const submissionsValid = (await Promise.all(formSubmissions)).every(result => result);
|
|
937
806
|
if (!submissionsValid) {
|
|
@@ -1009,14 +878,14 @@ const BusinessRepresentativeFormInputs = class {
|
|
|
1009
878
|
}
|
|
1010
879
|
render() {
|
|
1011
880
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1012
|
-
return (index.h("form", { key: '
|
|
881
|
+
return (index.h("form", { key: '2346f250e4e2982b5b5b2624d039f551b5b5ed4e' }, index.h("fieldset", { key: '7b496e6157e5eec02ef0d263c68fbd1e001c75ac' }, index.h("div", { key: 'b86d993c7fbee2269e48c7d4ea51826f199fecd4', class: "d-flex align-items-center gap-2" }, index.h("legend", { key: '2b013e6068bbbca54a0852093ab4a2fae4ce64d2', class: "mb-0", part: parts.heading2 }, "Representative"), index.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." })), index.h("hr", { key: '4bec34756ec7081e01809175bc3d2b6af0532537', class: "mt-2" }), index.h("div", { key: '6965720fabb1f12c6bb3c5a81f74ae12f44037b2', class: "row gy-3" }, index.h("div", { key: 'efbb768ba1e66d5ef47f792c39a17921b40e0eba', class: "col-12 col-md-8" }, index.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 })), index.h("div", { key: '28f17ccbe4da476256acd9c5a4e78a6a641ba6e9', class: "col-12 col-md-4" }, index.h("form-control-select", { key: 'dae6a93a0bc057abb97024277be0f10de01514e2', name: "title", label: "Title", options: businessFormOptions.businessTitleOptions, defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler })), index.h("div", { key: '2f9a45774adaa0040df2da1a8000d1ee61e16bf5', class: "col-12 col-md-6" }, index.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 })), index.h("div", { key: '3b34f0cb11d358db2220c01aac90e8b7ba3cc01b', class: "col-12 col-md-6" }, index.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: formInputMasks.PHONE_MASKS.US })), index.h("div", { key: 'd287ec225af1541cca227d3b8bc54466cbb86b07', class: "col-12 col-md-4" }, index.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) => inputHandlers.updateDateOfBirthFormValues(e, this.formController), helpText: "Must be 18 or older." })), index.h("div", { key: '283b09c845f1a12f4974f82a26fffbf7c5f608ba', class: "col-12 col-md-8" }, (!((_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.ssn_last4) || this.isEditingIdentification) ? (index.h("form-control-number-masked", { name: "identification_number", label: this.country === Business.CountryCode.CAN ? countryConfig.countryLabels[this.country].idNumberLabelOptional : countryConfig.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: formInputMasks.IDENTITY_MASKS[this.country], helpText: countryConfig.countryLabels[this.country].identityHelpText })) : (index.h("div", null, index.h("label", { class: "form-label", part: parts.label }, this.country === Business.CountryCode.CAN ? countryConfig.countryLabels[this.country].idNumberLabelOptional : countryConfig.countryLabels[this.country].idNumberLabel), index.h("div", { class: "input-group mb-3" }, index.h("input", { type: "text", class: "form-control", part: parts.inputDisabled, value: `****${(_h = this.representativeDefaultValue) === null || _h === void 0 ? void 0 : _h.ssn_last4}`, disabled: true }), index.h("button", { class: "btn btn-secondary", type: "button", part: parts.buttonSecondary, onClick: () => {
|
|
1013
882
|
this.isEditingIdentification = true;
|
|
1014
883
|
// Clear current value to force validation
|
|
1015
884
|
inputHandlers.updateFormValues(this.formController, {
|
|
1016
885
|
identification_number: '',
|
|
1017
886
|
ssn_last4: null
|
|
1018
887
|
});
|
|
1019
|
-
} }, "Change"))))), index.h("div", { key: '
|
|
888
|
+
} }, "Change"))))), index.h("div", { key: '0a40679570df7b85faa7530797ebc21ca8794263', class: "col-12" }, index.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 }))))));
|
|
1020
889
|
}
|
|
1021
890
|
};
|
|
1022
891
|
|
|
@@ -1130,7 +999,7 @@ const BusinessRepresentativeFormStep = class {
|
|
|
1130
999
|
});
|
|
1131
1000
|
}
|
|
1132
1001
|
get patchPayload() {
|
|
1133
|
-
|
|
1002
|
+
const formValues = new Business.Representative(this.formController.values.getValue()).payload;
|
|
1134
1003
|
return { representative: formValues };
|
|
1135
1004
|
}
|
|
1136
1005
|
render() {
|
|
@@ -1269,6 +1138,345 @@ const BusinessTermsConditionsFormStep = class {
|
|
|
1269
1138
|
}
|
|
1270
1139
|
};
|
|
1271
1140
|
|
|
1141
|
+
const businessDocumentOptions = [
|
|
1142
|
+
{ label: 'Select a document type', value: '' },
|
|
1143
|
+
{ label: 'Articles of Incorporation', value: 'articles_of_incorporation' },
|
|
1144
|
+
{ label: 'Business Registration', value: 'business_registration' },
|
|
1145
|
+
];
|
|
1146
|
+
const financialDocumentOptions = [
|
|
1147
|
+
{ label: 'Select a document type', value: '' },
|
|
1148
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
1149
|
+
{ label: 'Bank Statement', value: 'bank_statement' },
|
|
1150
|
+
];
|
|
1151
|
+
const financialDocumentOptionsCAN = [
|
|
1152
|
+
{ label: 'Select a document type', value: '' },
|
|
1153
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
1154
|
+
{ label: 'Bank Letter', value: 'bank_statement' },
|
|
1155
|
+
];
|
|
1156
|
+
const personalDocGroup1Options = [
|
|
1157
|
+
{ label: 'Select a document type', value: '' },
|
|
1158
|
+
{ label: 'Canadian Passport', value: 'passport' },
|
|
1159
|
+
{ label: 'Canadian Driver\'s License', value: 'driver_license' },
|
|
1160
|
+
{ label: 'Canadian Government Issued ID Card', value: 'government_id' },
|
|
1161
|
+
{ label: 'Permanent Resident Card', value: 'resident_card' },
|
|
1162
|
+
{ label: 'Certificate of Indian Status', value: 'status_card' },
|
|
1163
|
+
{ label: 'US State Issued Driver\'s License', value: 'driver_license' },
|
|
1164
|
+
];
|
|
1165
|
+
const personalDocGroup2Options = [
|
|
1166
|
+
{ label: 'Select a document type', value: '' },
|
|
1167
|
+
{ label: 'Nexus Card (Photo ID)', value: 'nexus_card' },
|
|
1168
|
+
{ label: 'Canadian Citizenship/Naturalization Card or Certificate', value: 'citizenship_card' },
|
|
1169
|
+
{ label: 'Foreign Passport', value: 'foreign_passport' },
|
|
1170
|
+
{ label: 'Canadian Birth Certificate', value: 'birth_certificate' },
|
|
1171
|
+
{ label: 'Social Insurance Number (SIN) Card', value: 'sin_card' },
|
|
1172
|
+
{ label: 'Social Security Number (SSN) Card', value: 'ssn_card' },
|
|
1173
|
+
];
|
|
1174
|
+
function buildStaticCategories(country) {
|
|
1175
|
+
const financialOptions = country === Business.CountryCode.CAN
|
|
1176
|
+
? financialDocumentOptionsCAN
|
|
1177
|
+
: financialDocumentOptions;
|
|
1178
|
+
return [
|
|
1179
|
+
{
|
|
1180
|
+
label: 'Business Document',
|
|
1181
|
+
value: 'business_document',
|
|
1182
|
+
docTypeOptions: businessDocumentOptions,
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
label: 'Financial Document',
|
|
1186
|
+
value: 'financial_document',
|
|
1187
|
+
docTypeOptions: financialOptions,
|
|
1188
|
+
},
|
|
1189
|
+
];
|
|
1190
|
+
}
|
|
1191
|
+
function buildPersonalDocumentCategories() {
|
|
1192
|
+
return [
|
|
1193
|
+
{
|
|
1194
|
+
label: 'Identity Document - Group 1',
|
|
1195
|
+
value: 'personal_group1',
|
|
1196
|
+
docTypeOptions: personalDocGroup1Options,
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
label: 'Identity Document - Group 2',
|
|
1200
|
+
value: 'personal_group2',
|
|
1201
|
+
docTypeOptions: personalDocGroup2Options,
|
|
1202
|
+
},
|
|
1203
|
+
];
|
|
1204
|
+
}
|
|
1205
|
+
const financialOnlyCategories = [
|
|
1206
|
+
{
|
|
1207
|
+
label: 'Financial Document',
|
|
1208
|
+
value: 'financial_document',
|
|
1209
|
+
docTypeOptions: financialDocumentOptions,
|
|
1210
|
+
},
|
|
1211
|
+
];
|
|
1212
|
+
function buildAllCategories(country) {
|
|
1213
|
+
if (country === Business.CountryCode.USA) {
|
|
1214
|
+
return financialOnlyCategories;
|
|
1215
|
+
}
|
|
1216
|
+
return [...buildStaticCategories(country), ...buildPersonalDocumentCategories()];
|
|
1217
|
+
}
|
|
1218
|
+
const personalDocGroup1Types = new Set(personalDocGroup1Options.filter(o => o.value).map(o => o.value));
|
|
1219
|
+
const personalDocGroup2Types = new Set(personalDocGroup2Options.filter(o => o.value).map(o => o.value));
|
|
1220
|
+
|
|
1221
|
+
const DocumentUploadFormStep = class {
|
|
1222
|
+
constructor(hostRef) {
|
|
1223
|
+
index.registerInstance(this, hostRef);
|
|
1224
|
+
this.errorEvent = index.createEvent(this, "error-event", 7);
|
|
1225
|
+
this.stepCompleteEvent = index.createEvent(this, "complete-form-step-event", 7);
|
|
1226
|
+
this.formLoading = index.createEvent(this, "formLoading", 7);
|
|
1227
|
+
this.owners = [];
|
|
1228
|
+
this.existingDocuments = [];
|
|
1229
|
+
this.selectedCategory = '';
|
|
1230
|
+
this.selectedDocType = '';
|
|
1231
|
+
this.uploadQueue = [];
|
|
1232
|
+
this.isLoading = false;
|
|
1233
|
+
this.errors = {};
|
|
1234
|
+
this.fileInputKey = 0;
|
|
1235
|
+
this.categories = [];
|
|
1236
|
+
this.getData = () => {
|
|
1237
|
+
this.isLoading = true;
|
|
1238
|
+
this.getBusiness({
|
|
1239
|
+
onSuccess: (response) => {
|
|
1240
|
+
const { owners, documents } = response.data;
|
|
1241
|
+
this.owners = owners || [];
|
|
1242
|
+
this.existingDocuments = documents || [];
|
|
1243
|
+
this.categories = buildAllCategories(this.country);
|
|
1244
|
+
},
|
|
1245
|
+
onError: ({ error, code, severity }) => {
|
|
1246
|
+
this.errorEvent.emit({
|
|
1247
|
+
message: error,
|
|
1248
|
+
errorCode: code,
|
|
1249
|
+
severity: severity,
|
|
1250
|
+
});
|
|
1251
|
+
},
|
|
1252
|
+
final: () => {
|
|
1253
|
+
this.isLoading = false;
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
};
|
|
1257
|
+
this.handleCategoryChange = (_name, value) => {
|
|
1258
|
+
this.selectedCategory = value;
|
|
1259
|
+
this.selectedDocType = '';
|
|
1260
|
+
};
|
|
1261
|
+
this.handleDocTypeChange = (_name, value) => {
|
|
1262
|
+
if (value.startsWith('_') && value.endsWith('_header'))
|
|
1263
|
+
return;
|
|
1264
|
+
this.selectedDocType = value;
|
|
1265
|
+
};
|
|
1266
|
+
this.handleFileSelected = async (e) => {
|
|
1267
|
+
const fileList = Array.from(e.detail.fileList);
|
|
1268
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
1269
|
+
if (!category)
|
|
1270
|
+
return;
|
|
1271
|
+
const docTypeOption = category.docTypeOptions.find(o => o.value === this.selectedDocType);
|
|
1272
|
+
const docTypeLabel = (docTypeOption === null || docTypeOption === void 0 ? void 0 : docTypeOption.label) || this.selectedDocType;
|
|
1273
|
+
const newEntries = fileList.map(file => ({
|
|
1274
|
+
categoryLabel: category.label,
|
|
1275
|
+
categoryValue: category.value,
|
|
1276
|
+
docTypeLabel,
|
|
1277
|
+
docTypeValue: this.selectedDocType,
|
|
1278
|
+
fileName: file.name,
|
|
1279
|
+
file,
|
|
1280
|
+
status: 'uploading',
|
|
1281
|
+
}));
|
|
1282
|
+
const startIndex = this.uploadQueue.length;
|
|
1283
|
+
this.uploadQueue = [...this.uploadQueue, ...newEntries];
|
|
1284
|
+
this.selectedCategory = '';
|
|
1285
|
+
this.selectedDocType = '';
|
|
1286
|
+
this.fileInputKey++;
|
|
1287
|
+
await Promise.all(newEntries.map(async (entry, i) => {
|
|
1288
|
+
const index = startIndex + i;
|
|
1289
|
+
try {
|
|
1290
|
+
const docData = new Plaid.EntityDocument({ file: entry.file, document_type: entry.docTypeValue }, this.businessId);
|
|
1291
|
+
const recordCreated = await this.postDocumentRecordData(docData);
|
|
1292
|
+
if (!recordCreated) {
|
|
1293
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
const uploaded = await this.uploadDocument(docData);
|
|
1297
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: uploaded ? 'uploaded' : 'error' }) : e);
|
|
1298
|
+
}
|
|
1299
|
+
catch (_a) {
|
|
1300
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
1301
|
+
}
|
|
1302
|
+
}));
|
|
1303
|
+
};
|
|
1304
|
+
this.postDocumentRecordData = async (docData) => {
|
|
1305
|
+
const payload = docData.record_data;
|
|
1306
|
+
return new Promise((resolve) => {
|
|
1307
|
+
this.postDocumentRecord({
|
|
1308
|
+
payload,
|
|
1309
|
+
onSuccess: (response) => {
|
|
1310
|
+
resolve(this.handleDocRecordResponse(docData, response));
|
|
1311
|
+
},
|
|
1312
|
+
onError: ({ error, code, severity }) => {
|
|
1313
|
+
this.errorEvent.emit({
|
|
1314
|
+
message: error,
|
|
1315
|
+
errorCode: code,
|
|
1316
|
+
severity: severity,
|
|
1317
|
+
});
|
|
1318
|
+
resolve(false);
|
|
1319
|
+
},
|
|
1320
|
+
});
|
|
1321
|
+
});
|
|
1322
|
+
};
|
|
1323
|
+
this.handleDocRecordResponse = (docData, response) => {
|
|
1324
|
+
if (response.error) {
|
|
1325
|
+
this.errorEvent.emit({
|
|
1326
|
+
errorCode: Plaid.ComponentErrorCodes.POST_ERROR,
|
|
1327
|
+
message: response.error.message,
|
|
1328
|
+
severity: Plaid.ComponentErrorSeverity.ERROR,
|
|
1329
|
+
data: response.error,
|
|
1330
|
+
});
|
|
1331
|
+
return false;
|
|
1332
|
+
}
|
|
1333
|
+
else {
|
|
1334
|
+
docData.setPresignedUrl(response.data.presigned_url);
|
|
1335
|
+
return true;
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
this.uploadDocument = async (docData) => {
|
|
1339
|
+
if (!docData.presigned_url) {
|
|
1340
|
+
throw new Error('Presigned URL is not set');
|
|
1341
|
+
}
|
|
1342
|
+
const fileData = await docData.getFileData();
|
|
1343
|
+
const response = await fetch(docData.presigned_url, {
|
|
1344
|
+
method: 'PUT',
|
|
1345
|
+
body: fileData,
|
|
1346
|
+
});
|
|
1347
|
+
if (!response.ok) {
|
|
1348
|
+
this.errorEvent.emit({
|
|
1349
|
+
errorCode: Plaid.ComponentErrorCodes.POST_ERROR,
|
|
1350
|
+
message: 'Failed to upload document',
|
|
1351
|
+
severity: Plaid.ComponentErrorSeverity.ERROR,
|
|
1352
|
+
});
|
|
1353
|
+
return false;
|
|
1354
|
+
}
|
|
1355
|
+
return true;
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
propChanged() {
|
|
1359
|
+
this.initializeApi();
|
|
1360
|
+
}
|
|
1361
|
+
watchHandler(newValue) {
|
|
1362
|
+
this.formLoading.emit(newValue);
|
|
1363
|
+
}
|
|
1364
|
+
async validateAndSubmit({ onSuccess }) {
|
|
1365
|
+
const validationErrors = this.validate();
|
|
1366
|
+
if (Object.keys(validationErrors).length > 0) {
|
|
1367
|
+
this.errors = validationErrors;
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1370
|
+
this.errors = {};
|
|
1371
|
+
this.stepCompleteEvent.emit({ response: null, formStep: eventTypes.BusinessFormStep.documentUpload });
|
|
1372
|
+
onSuccess();
|
|
1373
|
+
}
|
|
1374
|
+
componentWillLoad() {
|
|
1375
|
+
this.initializeApi();
|
|
1376
|
+
if (this.getBusiness) {
|
|
1377
|
+
this.getData();
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
initializeApi() {
|
|
1381
|
+
if (this.authToken && this.businessId) {
|
|
1382
|
+
this.getBusiness = paymentProvisioningActions.makeGetBusiness({
|
|
1383
|
+
authToken: this.authToken,
|
|
1384
|
+
businessId: this.businessId,
|
|
1385
|
+
service: new business_service.BusinessService()
|
|
1386
|
+
});
|
|
1387
|
+
this.postDocumentRecord = paymentProvisioningActions.makePostDocumentRecord({
|
|
1388
|
+
authToken: this.authToken,
|
|
1389
|
+
service: new business_service.DocumentRecordService()
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
else {
|
|
1393
|
+
this.errorEvent.emit({
|
|
1394
|
+
message: 'Missing required props',
|
|
1395
|
+
errorCode: Plaid.ComponentErrorCodes.MISSING_PROPS,
|
|
1396
|
+
severity: Plaid.ComponentErrorSeverity.ERROR,
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
get categoryOptions() {
|
|
1401
|
+
return [
|
|
1402
|
+
{ label: 'Select a category', value: '' },
|
|
1403
|
+
...this.categories.map(c => ({ label: c.label, value: c.value })),
|
|
1404
|
+
];
|
|
1405
|
+
}
|
|
1406
|
+
get docTypeOptions() {
|
|
1407
|
+
if (!this.selectedCategory) {
|
|
1408
|
+
return [{ label: 'Select a category first', value: '' }];
|
|
1409
|
+
}
|
|
1410
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
1411
|
+
return (category === null || category === void 0 ? void 0 : category.docTypeOptions) || [{ label: 'Select a category first', value: '' }];
|
|
1412
|
+
}
|
|
1413
|
+
validate() {
|
|
1414
|
+
if (this.allowOptionalFields)
|
|
1415
|
+
return {};
|
|
1416
|
+
const errors = {};
|
|
1417
|
+
const financialDocTypes = ['voided_check', 'bank_statement'];
|
|
1418
|
+
const hasExistingDoc = (types) => this.existingDocuments.some(doc => types.includes(doc.document_type));
|
|
1419
|
+
const hasUploadedDoc = (categoryValue) => this.uploadQueue.some(entry => entry.categoryValue === categoryValue && entry.status === 'uploaded');
|
|
1420
|
+
if (!hasUploadedDoc('financial_document') && !hasExistingDoc(financialDocTypes)) {
|
|
1421
|
+
errors['financial_document'] = 'Please upload a financial document';
|
|
1422
|
+
}
|
|
1423
|
+
if (this.country === Business.CountryCode.CAN) {
|
|
1424
|
+
const businessDocTypes = ['articles_of_incorporation', 'business_registration'];
|
|
1425
|
+
if (!hasUploadedDoc('business_document') && !hasExistingDoc(businessDocTypes)) {
|
|
1426
|
+
errors['business_document'] = 'Please upload a business document';
|
|
1427
|
+
}
|
|
1428
|
+
const requiredCount = this.owners.length;
|
|
1429
|
+
const group1Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group1' && entry.status === 'uploaded').length;
|
|
1430
|
+
const group1Existing = this.existingDocuments.filter(doc => personalDocGroup1Types.has(doc.document_type)).length;
|
|
1431
|
+
if (group1Uploaded + group1Existing < requiredCount) {
|
|
1432
|
+
errors['personal_group1'] =
|
|
1433
|
+
`Please upload ${requiredCount} Group 1 identity document(s) (${group1Uploaded + group1Existing} of ${requiredCount} provided)`;
|
|
1434
|
+
}
|
|
1435
|
+
const group2Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group2' && entry.status === 'uploaded').length;
|
|
1436
|
+
const group2Existing = this.existingDocuments.filter(doc => personalDocGroup2Types.has(doc.document_type)).length;
|
|
1437
|
+
if (group2Uploaded + group2Existing < requiredCount) {
|
|
1438
|
+
errors['personal_group2'] =
|
|
1439
|
+
`Please upload ${requiredCount} Group 2 identity document(s) (${group2Uploaded + group2Existing} of ${requiredCount} provided)`;
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
return errors;
|
|
1443
|
+
}
|
|
1444
|
+
render() {
|
|
1445
|
+
if (this.isLoading) {
|
|
1446
|
+
return index.h(paymentProvisioningLoading.PaymentProvisioningLoading, null);
|
|
1447
|
+
}
|
|
1448
|
+
return (index.h("form", null, index.h("fieldset", null, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Document Uploads"), index.h("hr", { class: "mt-2" }), index.h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading })), this.country === Business.CountryCode.CAN && this.owners.length > 0 && (index.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)).")), index.h("fieldset", { class: "mt-4" }, index.h("div", { class: "d-flex align-items-center gap-2" }, index.h("legend", { class: "mb-0", part: parts.heading2 }, "Add Document"), index.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." })), index.h("hr", { class: "mt-2" }), index.h("div", { class: "row gy-3" }, index.h("div", { class: "col-12 col-md-6" }, index.h("form-control-select", { name: "document_category", label: "Document Category", options: this.categoryOptions, defaultValue: this.selectedCategory, inputHandler: this.handleCategoryChange })), index.h("div", { class: "col-12 col-md-6" }, index.h("form-control-select", { name: "document_type", label: "Document Type", options: this.docTypeOptions, defaultValue: this.selectedDocType, inputHandler: this.handleDocTypeChange, disabled: !this.selectedCategory })), index.h("div", { class: "col-12" }, index.h("form-control-file", { key: this.fileInputKey, name: "document_file", label: "Upload Document", documentType: this.selectedDocType, onFileSelected: this.handleFileSelected, disabled: !this.selectedDocType, multiple: false })))), index.h("document-upload-list", { documents: this.uploadQueue }), Object.keys(this.errors).length > 0 && (index.h("div", { class: "alert alert-danger mt-3" }, index.h("ul", { class: "mb-0" }, Object.values(this.errors).map(err => index.h("li", null, err)))))));
|
|
1449
|
+
}
|
|
1450
|
+
static get watchers() { return {
|
|
1451
|
+
"authToken": ["propChanged"],
|
|
1452
|
+
"businessId": ["propChanged"],
|
|
1453
|
+
"isLoading": ["watchHandler"]
|
|
1454
|
+
}; }
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
const DocumentUploadList = class {
|
|
1458
|
+
constructor(hostRef) {
|
|
1459
|
+
index.registerInstance(this, hostRef);
|
|
1460
|
+
this.documents = [];
|
|
1461
|
+
}
|
|
1462
|
+
renderStatus(status) {
|
|
1463
|
+
switch (status) {
|
|
1464
|
+
case 'uploading':
|
|
1465
|
+
return index.h("span", { class: "badge bg-info" }, "Uploading...");
|
|
1466
|
+
case 'uploaded':
|
|
1467
|
+
return index.h("span", { class: "badge bg-success" }, "Uploaded");
|
|
1468
|
+
case 'error':
|
|
1469
|
+
return index.h("span", { class: "badge bg-danger" }, "Error");
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
render() {
|
|
1473
|
+
if (!this.documents.length) {
|
|
1474
|
+
return null;
|
|
1475
|
+
}
|
|
1476
|
+
return (index.h("div", { class: "mt-4" }, index.h("div", { class: "card", part: parts.card }, index.h("div", { class: "card-body" }, index.h("h5", { class: "card-title", part: parts.heading2 }, "Uploaded Documents"), index.h("div", { class: "table-responsive" }, index.h("table", { class: "table table-sm table-borderless", part: parts.table }, index.h("thead", null, index.h("tr", null, index.h("th", { style: { width: '25%' }, part: parts.tableHeadCell, scope: "col" }, "Category"), index.h("th", { style: { width: '25%' }, part: parts.tableHeadCell, scope: "col" }, "Document Type"), index.h("th", { style: { width: '30%' }, part: parts.tableHeadCell, scope: "col" }, "File Name"), index.h("th", { style: { width: '20%' }, part: parts.tableHeadCell, scope: "col" }, "Status"))), index.h("tbody", null, this.documents.map((doc, index$1) => (index.h("tr", { class: index$1 === 0 ? 'border-bottom border-top' : 'border-bottom' }, index.h("td", { part: parts.tableCell }, doc.categoryLabel), index.h("td", { part: parts.tableCell }, doc.docTypeLabel), index.h("td", { part: parts.tableCell }, doc.fileName), index.h("td", { part: parts.tableCell }, this.renderStatus(doc.status))))))))))));
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1272
1480
|
const LegalAddressFormStep = class {
|
|
1273
1481
|
constructor(hostRef) {
|
|
1274
1482
|
index.registerInstance(this, hostRef);
|
|
@@ -1337,7 +1545,7 @@ const LegalAddressFormStep = class {
|
|
|
1337
1545
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
1338
1546
|
}
|
|
1339
1547
|
get patchPayload() {
|
|
1340
|
-
|
|
1548
|
+
const formValues = new Business.Address(this.formController.values.getValue()).payload;
|
|
1341
1549
|
return { legal_address: formValues };
|
|
1342
1550
|
}
|
|
1343
1551
|
componentWillLoad() {
|
|
@@ -1480,6 +1688,13 @@ const OwnerForm = class {
|
|
|
1480
1688
|
async returnOwnerData() {
|
|
1481
1689
|
return this.ownerId;
|
|
1482
1690
|
}
|
|
1691
|
+
async getOwnershipPercentage() {
|
|
1692
|
+
var _a;
|
|
1693
|
+
return ((_a = this.formController.values.getValue()) === null || _a === void 0 ? void 0 : _a.ownership_percentage) || null;
|
|
1694
|
+
}
|
|
1695
|
+
async setOwnershipPercentageError(message) {
|
|
1696
|
+
this.formController.setFieldError('ownership_percentage', message);
|
|
1697
|
+
}
|
|
1483
1698
|
async validate() {
|
|
1484
1699
|
return this.formController.validate();
|
|
1485
1700
|
}
|
|
@@ -1554,7 +1769,7 @@ const OwnerForm = class {
|
|
|
1554
1769
|
});
|
|
1555
1770
|
}
|
|
1556
1771
|
render() {
|
|
1557
|
-
return (index.h(index.Host, { key: '
|
|
1772
|
+
return (index.h(index.Host, { key: 'b168e9f5a52416984e6a04ab5f0771b63ee28b2e', style: { display: 'block' } }, index.h("form", { key: 'd22a6aae3f5debd30d87b3bd37c67390a46c4590', onSubmit: this.validateAndSubmit }, index.h("fieldset", { key: '30597bc1f4983bddbdc0ed45e6be7e715d0b9b8e' }, index.h("legend", { key: '055ca2b6bbfa4e86591411668eaead3bd0d95ea8', class: "fw-semibold fs-5 w-100", part: parts.heading3 }, this.formTitle), index.h("br", { key: 'f0d2d9624611ee888ff318ec1525281bf007e346' }), index.h("div", { key: '2c38a166f681404c2ab303630217e54c15f1e5f2', class: "row gy-3" }, index.h("owner-form-inputs", { key: '05253624d3d79f0ba7a4ec49b387e252e796e5b6', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController, country: this.country }), index.h("div", { key: '8e0e67966f047c3f9a4b30f28983f67db2372c0c', class: "d-flex gap-2 justify-content-start" }, index.h(button.Button, { key: 'e33368a968efe5faf52a08e36bb2bef215625c4a', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), index.h(button.Button, { key: '7bb79b0624dfb3a8645182432c484f288cc73692', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), index.h("hr", { key: 'ef4f86dd1b1878e92c98e4a826f9fbad808e15b7' })))));
|
|
1558
1773
|
}
|
|
1559
1774
|
static get watchers() { return {
|
|
1560
1775
|
"isLoading": ["loadingWatcher"]
|
|
@@ -1874,7 +2089,6 @@ const PlaidVerification = class {
|
|
|
1874
2089
|
};
|
|
1875
2090
|
|
|
1876
2091
|
exports.additional_questions_form_step = AdditionalQuestionsFormStep;
|
|
1877
|
-
exports.bank_account_document_form_inputs = BankAccountDocumentFormInputs;
|
|
1878
2092
|
exports.bank_account_form_inputs = BankAccountFormInputs;
|
|
1879
2093
|
exports.bank_account_form_inputs_canada = BankAccountFormInputsCanada;
|
|
1880
2094
|
exports.business_bank_account_form_step = BusinessBankAccountFormStep;
|
|
@@ -1884,6 +2098,8 @@ exports.business_owners_form_step = BusinessOwnersFormStep;
|
|
|
1884
2098
|
exports.business_representative_form_inputs = BusinessRepresentativeFormInputs;
|
|
1885
2099
|
exports.business_representative_form_step = BusinessRepresentativeFormStep;
|
|
1886
2100
|
exports.business_terms_conditions_form_step = BusinessTermsConditionsFormStep;
|
|
2101
|
+
exports.document_upload_form_step = DocumentUploadFormStep;
|
|
2102
|
+
exports.document_upload_list = DocumentUploadList;
|
|
1887
2103
|
exports.legal_address_form_step = LegalAddressFormStep;
|
|
1888
2104
|
exports.owner_form = OwnerForm;
|
|
1889
2105
|
exports.plaid_verification = PlaidVerification;
|