@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
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { ComponentErrorCodes, ComponentErrorSeverity, EntityDocument, } from "../../../../api";
|
|
3
|
+
import { makeGetBusiness, makePostDocumentRecord } from "../payment-provisioning-actions";
|
|
4
|
+
import { BusinessService, DocumentRecordService } from "../../../../api/services/business.service";
|
|
5
|
+
import { CountryCode } from "../../../../utils/country-codes";
|
|
6
|
+
import { BusinessFormStep } from "../../utils";
|
|
7
|
+
import { heading2 } from "../../../../styles/parts";
|
|
8
|
+
import { PaymentProvisioningLoading } from "../payment-provisioning-loading";
|
|
9
|
+
import { buildAllCategories, personalDocGroup1Types, personalDocGroup2Types, } from "./document-upload-options";
|
|
10
|
+
export class DocumentUploadFormStep {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.owners = [];
|
|
13
|
+
this.existingDocuments = [];
|
|
14
|
+
this.selectedCategory = '';
|
|
15
|
+
this.selectedDocType = '';
|
|
16
|
+
this.uploadQueue = [];
|
|
17
|
+
this.isLoading = false;
|
|
18
|
+
this.errors = {};
|
|
19
|
+
this.fileInputKey = 0;
|
|
20
|
+
this.categories = [];
|
|
21
|
+
this.getData = () => {
|
|
22
|
+
this.isLoading = true;
|
|
23
|
+
this.getBusiness({
|
|
24
|
+
onSuccess: (response) => {
|
|
25
|
+
const { owners, documents } = response.data;
|
|
26
|
+
this.owners = owners || [];
|
|
27
|
+
this.existingDocuments = documents || [];
|
|
28
|
+
this.categories = buildAllCategories(this.country);
|
|
29
|
+
},
|
|
30
|
+
onError: ({ error, code, severity }) => {
|
|
31
|
+
this.errorEvent.emit({
|
|
32
|
+
message: error,
|
|
33
|
+
errorCode: code,
|
|
34
|
+
severity: severity,
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
final: () => {
|
|
38
|
+
this.isLoading = false;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
this.handleCategoryChange = (_name, value) => {
|
|
43
|
+
this.selectedCategory = value;
|
|
44
|
+
this.selectedDocType = '';
|
|
45
|
+
};
|
|
46
|
+
this.handleDocTypeChange = (_name, value) => {
|
|
47
|
+
if (value.startsWith('_') && value.endsWith('_header'))
|
|
48
|
+
return;
|
|
49
|
+
this.selectedDocType = value;
|
|
50
|
+
};
|
|
51
|
+
this.handleFileSelected = async (e) => {
|
|
52
|
+
const fileList = Array.from(e.detail.fileList);
|
|
53
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
54
|
+
if (!category)
|
|
55
|
+
return;
|
|
56
|
+
const docTypeOption = category.docTypeOptions.find(o => o.value === this.selectedDocType);
|
|
57
|
+
const docTypeLabel = (docTypeOption === null || docTypeOption === void 0 ? void 0 : docTypeOption.label) || this.selectedDocType;
|
|
58
|
+
const newEntries = fileList.map(file => ({
|
|
59
|
+
categoryLabel: category.label,
|
|
60
|
+
categoryValue: category.value,
|
|
61
|
+
docTypeLabel,
|
|
62
|
+
docTypeValue: this.selectedDocType,
|
|
63
|
+
fileName: file.name,
|
|
64
|
+
file,
|
|
65
|
+
status: 'uploading',
|
|
66
|
+
}));
|
|
67
|
+
const startIndex = this.uploadQueue.length;
|
|
68
|
+
this.uploadQueue = [...this.uploadQueue, ...newEntries];
|
|
69
|
+
this.selectedCategory = '';
|
|
70
|
+
this.selectedDocType = '';
|
|
71
|
+
this.fileInputKey++;
|
|
72
|
+
await Promise.all(newEntries.map(async (entry, i) => {
|
|
73
|
+
const index = startIndex + i;
|
|
74
|
+
try {
|
|
75
|
+
const docData = new EntityDocument({ file: entry.file, document_type: entry.docTypeValue }, this.businessId);
|
|
76
|
+
const recordCreated = await this.postDocumentRecordData(docData);
|
|
77
|
+
if (!recordCreated) {
|
|
78
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const uploaded = await this.uploadDocument(docData);
|
|
82
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: uploaded ? 'uploaded' : 'error' }) : e);
|
|
83
|
+
}
|
|
84
|
+
catch (_a) {
|
|
85
|
+
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
this.postDocumentRecordData = async (docData) => {
|
|
90
|
+
const payload = docData.record_data;
|
|
91
|
+
return new Promise((resolve) => {
|
|
92
|
+
this.postDocumentRecord({
|
|
93
|
+
payload,
|
|
94
|
+
onSuccess: (response) => {
|
|
95
|
+
resolve(this.handleDocRecordResponse(docData, response));
|
|
96
|
+
},
|
|
97
|
+
onError: ({ error, code, severity }) => {
|
|
98
|
+
this.errorEvent.emit({
|
|
99
|
+
message: error,
|
|
100
|
+
errorCode: code,
|
|
101
|
+
severity: severity,
|
|
102
|
+
});
|
|
103
|
+
resolve(false);
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
this.handleDocRecordResponse = (docData, response) => {
|
|
109
|
+
if (response.error) {
|
|
110
|
+
this.errorEvent.emit({
|
|
111
|
+
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
112
|
+
message: response.error.message,
|
|
113
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
114
|
+
data: response.error,
|
|
115
|
+
});
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
docData.setPresignedUrl(response.data.presigned_url);
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
this.uploadDocument = async (docData) => {
|
|
124
|
+
if (!docData.presigned_url) {
|
|
125
|
+
throw new Error('Presigned URL is not set');
|
|
126
|
+
}
|
|
127
|
+
const fileData = await docData.getFileData();
|
|
128
|
+
const response = await fetch(docData.presigned_url, {
|
|
129
|
+
method: 'PUT',
|
|
130
|
+
body: fileData,
|
|
131
|
+
});
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
this.errorEvent.emit({
|
|
134
|
+
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
135
|
+
message: 'Failed to upload document',
|
|
136
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
137
|
+
});
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
return true;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
propChanged() {
|
|
144
|
+
this.initializeApi();
|
|
145
|
+
}
|
|
146
|
+
watchHandler(newValue) {
|
|
147
|
+
this.formLoading.emit(newValue);
|
|
148
|
+
}
|
|
149
|
+
async validateAndSubmit({ onSuccess }) {
|
|
150
|
+
const validationErrors = this.validate();
|
|
151
|
+
if (Object.keys(validationErrors).length > 0) {
|
|
152
|
+
this.errors = validationErrors;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this.errors = {};
|
|
156
|
+
this.stepCompleteEvent.emit({ response: null, formStep: BusinessFormStep.documentUpload });
|
|
157
|
+
onSuccess();
|
|
158
|
+
}
|
|
159
|
+
componentWillLoad() {
|
|
160
|
+
this.initializeApi();
|
|
161
|
+
if (this.getBusiness) {
|
|
162
|
+
this.getData();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
initializeApi() {
|
|
166
|
+
if (this.authToken && this.businessId) {
|
|
167
|
+
this.getBusiness = makeGetBusiness({
|
|
168
|
+
authToken: this.authToken,
|
|
169
|
+
businessId: this.businessId,
|
|
170
|
+
service: new BusinessService()
|
|
171
|
+
});
|
|
172
|
+
this.postDocumentRecord = makePostDocumentRecord({
|
|
173
|
+
authToken: this.authToken,
|
|
174
|
+
service: new DocumentRecordService()
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.errorEvent.emit({
|
|
179
|
+
message: 'Missing required props',
|
|
180
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
181
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
get categoryOptions() {
|
|
186
|
+
return [
|
|
187
|
+
{ label: 'Select a category', value: '' },
|
|
188
|
+
...this.categories.map(c => ({ label: c.label, value: c.value })),
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
get docTypeOptions() {
|
|
192
|
+
if (!this.selectedCategory) {
|
|
193
|
+
return [{ label: 'Select a category first', value: '' }];
|
|
194
|
+
}
|
|
195
|
+
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
196
|
+
return (category === null || category === void 0 ? void 0 : category.docTypeOptions) || [{ label: 'Select a category first', value: '' }];
|
|
197
|
+
}
|
|
198
|
+
validate() {
|
|
199
|
+
if (this.allowOptionalFields)
|
|
200
|
+
return {};
|
|
201
|
+
const errors = {};
|
|
202
|
+
const financialDocTypes = ['voided_check', 'bank_statement'];
|
|
203
|
+
const hasExistingDoc = (types) => this.existingDocuments.some(doc => types.includes(doc.document_type));
|
|
204
|
+
const hasUploadedDoc = (categoryValue) => this.uploadQueue.some(entry => entry.categoryValue === categoryValue && entry.status === 'uploaded');
|
|
205
|
+
if (!hasUploadedDoc('financial_document') && !hasExistingDoc(financialDocTypes)) {
|
|
206
|
+
errors['financial_document'] = 'Please upload a financial document';
|
|
207
|
+
}
|
|
208
|
+
if (this.country === CountryCode.CAN) {
|
|
209
|
+
const businessDocTypes = ['articles_of_incorporation', 'business_registration'];
|
|
210
|
+
if (!hasUploadedDoc('business_document') && !hasExistingDoc(businessDocTypes)) {
|
|
211
|
+
errors['business_document'] = 'Please upload a business document';
|
|
212
|
+
}
|
|
213
|
+
const requiredCount = this.owners.length;
|
|
214
|
+
const group1Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group1' && entry.status === 'uploaded').length;
|
|
215
|
+
const group1Existing = this.existingDocuments.filter(doc => personalDocGroup1Types.has(doc.document_type)).length;
|
|
216
|
+
if (group1Uploaded + group1Existing < requiredCount) {
|
|
217
|
+
errors['personal_group1'] =
|
|
218
|
+
`Please upload ${requiredCount} Group 1 identity document(s) (${group1Uploaded + group1Existing} of ${requiredCount} provided)`;
|
|
219
|
+
}
|
|
220
|
+
const group2Uploaded = this.uploadQueue.filter(entry => entry.categoryValue === 'personal_group2' && entry.status === 'uploaded').length;
|
|
221
|
+
const group2Existing = this.existingDocuments.filter(doc => personalDocGroup2Types.has(doc.document_type)).length;
|
|
222
|
+
if (group2Uploaded + group2Existing < requiredCount) {
|
|
223
|
+
errors['personal_group2'] =
|
|
224
|
+
`Please upload ${requiredCount} Group 2 identity document(s) (${group2Uploaded + group2Existing} of ${requiredCount} provided)`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return errors;
|
|
228
|
+
}
|
|
229
|
+
render() {
|
|
230
|
+
if (this.isLoading) {
|
|
231
|
+
return h(PaymentProvisioningLoading, null);
|
|
232
|
+
}
|
|
233
|
+
return (h("form", null, h("fieldset", null, h("legend", { class: "mb-0", part: heading2 }, "Document Uploads"), h("hr", { class: "mt-2" }), h("business-documents-on-file", { documents: this.existingDocuments, isLoading: this.isLoading })), this.country === CountryCode.CAN && this.owners.length > 0 && (h("div", { class: "alert alert-info mt-3" }, "One document from each group (Group 1 and Group 2) is required for each owner (", this.owners.length, " owner(s)).")), h("fieldset", { class: "mt-4" }, h("div", { class: "d-flex align-items-center gap-2" }, h("legend", { class: "mb-0", part: heading2 }, "Add Document"), h("form-control-tooltip", { helpText: "Upload documents one at a time. Select the category and type, then choose a file. For Canadian businesses, one Group 1 and one Group 2 identity document is required for each owner." })), h("hr", { class: "mt-2" }), h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_category", label: "Document Category", options: this.categoryOptions, defaultValue: this.selectedCategory, inputHandler: this.handleCategoryChange })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "document_type", label: "Document Type", options: this.docTypeOptions, defaultValue: this.selectedDocType, inputHandler: this.handleDocTypeChange, disabled: !this.selectedCategory })), h("div", { class: "col-12" }, h("form-control-file", { key: this.fileInputKey, name: "document_file", label: "Upload Document", documentType: this.selectedDocType, onFileSelected: this.handleFileSelected, disabled: !this.selectedDocType, multiple: false })))), h("document-upload-list", { documents: this.uploadQueue }), Object.keys(this.errors).length > 0 && (h("div", { class: "alert alert-danger mt-3" }, h("ul", { class: "mb-0" }, Object.values(this.errors).map(err => h("li", null, err)))))));
|
|
234
|
+
}
|
|
235
|
+
static get is() { return "document-upload-form-step"; }
|
|
236
|
+
static get properties() {
|
|
237
|
+
return {
|
|
238
|
+
"authToken": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "string",
|
|
243
|
+
"resolved": "string",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": true,
|
|
247
|
+
"optional": false,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": ""
|
|
251
|
+
},
|
|
252
|
+
"getter": false,
|
|
253
|
+
"setter": false,
|
|
254
|
+
"reflect": false,
|
|
255
|
+
"attribute": "auth-token"
|
|
256
|
+
},
|
|
257
|
+
"businessId": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"mutable": false,
|
|
260
|
+
"complexType": {
|
|
261
|
+
"original": "string",
|
|
262
|
+
"resolved": "string",
|
|
263
|
+
"references": {}
|
|
264
|
+
},
|
|
265
|
+
"required": true,
|
|
266
|
+
"optional": false,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": ""
|
|
270
|
+
},
|
|
271
|
+
"getter": false,
|
|
272
|
+
"setter": false,
|
|
273
|
+
"reflect": false,
|
|
274
|
+
"attribute": "business-id"
|
|
275
|
+
},
|
|
276
|
+
"allowOptionalFields": {
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"mutable": false,
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "boolean",
|
|
281
|
+
"resolved": "boolean",
|
|
282
|
+
"references": {}
|
|
283
|
+
},
|
|
284
|
+
"required": false,
|
|
285
|
+
"optional": true,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": ""
|
|
289
|
+
},
|
|
290
|
+
"getter": false,
|
|
291
|
+
"setter": false,
|
|
292
|
+
"reflect": false,
|
|
293
|
+
"attribute": "allow-optional-fields"
|
|
294
|
+
},
|
|
295
|
+
"country": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "CountryCode",
|
|
300
|
+
"resolved": "CountryCode.CAN | CountryCode.USA",
|
|
301
|
+
"references": {
|
|
302
|
+
"CountryCode": {
|
|
303
|
+
"location": "import",
|
|
304
|
+
"path": "../../../../utils/country-codes",
|
|
305
|
+
"id": "src/utils/country-codes.ts::CountryCode"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"required": true,
|
|
310
|
+
"optional": false,
|
|
311
|
+
"docs": {
|
|
312
|
+
"tags": [],
|
|
313
|
+
"text": ""
|
|
314
|
+
},
|
|
315
|
+
"getter": false,
|
|
316
|
+
"setter": false,
|
|
317
|
+
"reflect": false,
|
|
318
|
+
"attribute": "country"
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
static get states() {
|
|
323
|
+
return {
|
|
324
|
+
"owners": {},
|
|
325
|
+
"existingDocuments": {},
|
|
326
|
+
"selectedCategory": {},
|
|
327
|
+
"selectedDocType": {},
|
|
328
|
+
"uploadQueue": {},
|
|
329
|
+
"isLoading": {},
|
|
330
|
+
"errors": {},
|
|
331
|
+
"fileInputKey": {},
|
|
332
|
+
"getBusiness": {},
|
|
333
|
+
"postDocumentRecord": {}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
static get events() {
|
|
337
|
+
return [{
|
|
338
|
+
"method": "errorEvent",
|
|
339
|
+
"name": "error-event",
|
|
340
|
+
"bubbles": true,
|
|
341
|
+
"cancelable": true,
|
|
342
|
+
"composed": true,
|
|
343
|
+
"docs": {
|
|
344
|
+
"tags": [],
|
|
345
|
+
"text": ""
|
|
346
|
+
},
|
|
347
|
+
"complexType": {
|
|
348
|
+
"original": "ComponentErrorEvent",
|
|
349
|
+
"resolved": "ComponentErrorEvent",
|
|
350
|
+
"references": {
|
|
351
|
+
"ComponentErrorEvent": {
|
|
352
|
+
"location": "import",
|
|
353
|
+
"path": "../../../../api",
|
|
354
|
+
"id": "src/api/index.ts::ComponentErrorEvent"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}, {
|
|
359
|
+
"method": "stepCompleteEvent",
|
|
360
|
+
"name": "complete-form-step-event",
|
|
361
|
+
"bubbles": true,
|
|
362
|
+
"cancelable": true,
|
|
363
|
+
"composed": true,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": ""
|
|
367
|
+
},
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "ComponentFormStepCompleteEvent",
|
|
370
|
+
"resolved": "ComponentFormStepCompleteEvent",
|
|
371
|
+
"references": {
|
|
372
|
+
"ComponentFormStepCompleteEvent": {
|
|
373
|
+
"location": "import",
|
|
374
|
+
"path": "../../../../api",
|
|
375
|
+
"id": "src/api/index.ts::ComponentFormStepCompleteEvent"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}, {
|
|
380
|
+
"method": "formLoading",
|
|
381
|
+
"name": "formLoading",
|
|
382
|
+
"bubbles": true,
|
|
383
|
+
"cancelable": true,
|
|
384
|
+
"composed": true,
|
|
385
|
+
"docs": {
|
|
386
|
+
"tags": [],
|
|
387
|
+
"text": ""
|
|
388
|
+
},
|
|
389
|
+
"complexType": {
|
|
390
|
+
"original": "boolean",
|
|
391
|
+
"resolved": "boolean",
|
|
392
|
+
"references": {}
|
|
393
|
+
}
|
|
394
|
+
}];
|
|
395
|
+
}
|
|
396
|
+
static get methods() {
|
|
397
|
+
return {
|
|
398
|
+
"validateAndSubmit": {
|
|
399
|
+
"complexType": {
|
|
400
|
+
"signature": "({ onSuccess }: { onSuccess: any; }) => Promise<void>",
|
|
401
|
+
"parameters": [{
|
|
402
|
+
"name": "__0",
|
|
403
|
+
"type": "{ onSuccess: any; }",
|
|
404
|
+
"docs": ""
|
|
405
|
+
}],
|
|
406
|
+
"references": {
|
|
407
|
+
"Promise": {
|
|
408
|
+
"location": "global",
|
|
409
|
+
"id": "global::Promise"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"return": "Promise<void>"
|
|
413
|
+
},
|
|
414
|
+
"docs": {
|
|
415
|
+
"text": "",
|
|
416
|
+
"tags": []
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
static get watchers() {
|
|
422
|
+
return [{
|
|
423
|
+
"propName": "authToken",
|
|
424
|
+
"methodName": "propChanged"
|
|
425
|
+
}, {
|
|
426
|
+
"propName": "businessId",
|
|
427
|
+
"methodName": "propChanged"
|
|
428
|
+
}, {
|
|
429
|
+
"propName": "isLoading",
|
|
430
|
+
"methodName": "watchHandler"
|
|
431
|
+
}];
|
|
432
|
+
}
|
|
433
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { card, heading2, table, tableCell, tableHeadCell } from "../../../../styles/parts";
|
|
3
|
+
export class DocumentUploadList {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.documents = [];
|
|
6
|
+
}
|
|
7
|
+
renderStatus(status) {
|
|
8
|
+
switch (status) {
|
|
9
|
+
case 'uploading':
|
|
10
|
+
return h("span", { class: "badge bg-info" }, "Uploading...");
|
|
11
|
+
case 'uploaded':
|
|
12
|
+
return h("span", { class: "badge bg-success" }, "Uploaded");
|
|
13
|
+
case 'error':
|
|
14
|
+
return h("span", { class: "badge bg-danger" }, "Error");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
if (!this.documents.length) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return (h("div", { class: "mt-4" }, h("div", { class: "card", part: card }, h("div", { class: "card-body" }, h("h5", { class: "card-title", part: heading2 }, "Uploaded Documents"), h("div", { class: "table-responsive" }, h("table", { class: "table table-sm table-borderless", part: table }, h("thead", null, h("tr", null, h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Category"), h("th", { style: { width: '25%' }, part: tableHeadCell, scope: "col" }, "Document Type"), h("th", { style: { width: '30%' }, part: tableHeadCell, scope: "col" }, "File Name"), h("th", { style: { width: '20%' }, part: tableHeadCell, scope: "col" }, "Status"))), h("tbody", null, this.documents.map((doc, index) => (h("tr", { class: index === 0 ? 'border-bottom border-top' : 'border-bottom' }, h("td", { part: tableCell }, doc.categoryLabel), h("td", { part: tableCell }, doc.docTypeLabel), h("td", { part: tableCell }, doc.fileName), h("td", { part: tableCell }, this.renderStatus(doc.status))))))))))));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "document-upload-list"; }
|
|
24
|
+
static get properties() {
|
|
25
|
+
return {
|
|
26
|
+
"documents": {
|
|
27
|
+
"type": "unknown",
|
|
28
|
+
"mutable": false,
|
|
29
|
+
"complexType": {
|
|
30
|
+
"original": "UploadedDocumentEntry[]",
|
|
31
|
+
"resolved": "UploadedDocumentEntry[]",
|
|
32
|
+
"references": {
|
|
33
|
+
"UploadedDocumentEntry": {
|
|
34
|
+
"location": "import",
|
|
35
|
+
"path": "./document-upload-options",
|
|
36
|
+
"id": "src/components/business-forms/payment-provisioning/document-upload/document-upload-options.ts::UploadedDocumentEntry"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": ""
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"defaultValue": "[]"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { CountryCode } from "../../../../utils/country-codes";
|
|
2
|
+
export const businessDocumentOptions = [
|
|
3
|
+
{ label: 'Select a document type', value: '' },
|
|
4
|
+
{ label: 'Articles of Incorporation', value: 'articles_of_incorporation' },
|
|
5
|
+
{ label: 'Business Registration', value: 'business_registration' },
|
|
6
|
+
];
|
|
7
|
+
export const financialDocumentOptions = [
|
|
8
|
+
{ label: 'Select a document type', value: '' },
|
|
9
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
10
|
+
{ label: 'Bank Statement', value: 'bank_statement' },
|
|
11
|
+
];
|
|
12
|
+
export const financialDocumentOptionsCAN = [
|
|
13
|
+
{ label: 'Select a document type', value: '' },
|
|
14
|
+
{ label: 'Voided Check', value: 'voided_check' },
|
|
15
|
+
{ label: 'Bank Letter', value: 'bank_statement' },
|
|
16
|
+
];
|
|
17
|
+
export const personalDocGroup1Options = [
|
|
18
|
+
{ label: 'Select a document type', value: '' },
|
|
19
|
+
{ label: 'Canadian Passport', value: 'passport' },
|
|
20
|
+
{ label: 'Canadian Driver\'s License', value: 'driver_license' },
|
|
21
|
+
{ label: 'Canadian Government Issued ID Card', value: 'government_id' },
|
|
22
|
+
{ label: 'Permanent Resident Card', value: 'resident_card' },
|
|
23
|
+
{ label: 'Certificate of Indian Status', value: 'status_card' },
|
|
24
|
+
{ label: 'US State Issued Driver\'s License', value: 'driver_license' },
|
|
25
|
+
];
|
|
26
|
+
export const personalDocGroup2Options = [
|
|
27
|
+
{ label: 'Select a document type', value: '' },
|
|
28
|
+
{ label: 'Nexus Card (Photo ID)', value: 'nexus_card' },
|
|
29
|
+
{ label: 'Canadian Citizenship/Naturalization Card or Certificate', value: 'citizenship_card' },
|
|
30
|
+
{ label: 'Foreign Passport', value: 'foreign_passport' },
|
|
31
|
+
{ label: 'Canadian Birth Certificate', value: 'birth_certificate' },
|
|
32
|
+
{ label: 'Social Insurance Number (SIN) Card', value: 'sin_card' },
|
|
33
|
+
{ label: 'Social Security Number (SSN) Card', value: 'ssn_card' },
|
|
34
|
+
];
|
|
35
|
+
export function buildStaticCategories(country) {
|
|
36
|
+
const financialOptions = country === CountryCode.CAN
|
|
37
|
+
? financialDocumentOptionsCAN
|
|
38
|
+
: financialDocumentOptions;
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
label: 'Business Document',
|
|
42
|
+
value: 'business_document',
|
|
43
|
+
docTypeOptions: businessDocumentOptions,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: 'Financial Document',
|
|
47
|
+
value: 'financial_document',
|
|
48
|
+
docTypeOptions: financialOptions,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
export function buildPersonalDocumentCategories() {
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
label: 'Identity Document - Group 1',
|
|
56
|
+
value: 'personal_group1',
|
|
57
|
+
docTypeOptions: personalDocGroup1Options,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'Identity Document - Group 2',
|
|
61
|
+
value: 'personal_group2',
|
|
62
|
+
docTypeOptions: personalDocGroup2Options,
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
export const financialOnlyCategories = [
|
|
67
|
+
{
|
|
68
|
+
label: 'Financial Document',
|
|
69
|
+
value: 'financial_document',
|
|
70
|
+
docTypeOptions: financialDocumentOptions,
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
export function buildAllCategories(country) {
|
|
74
|
+
if (country === CountryCode.USA) {
|
|
75
|
+
return financialOnlyCategories;
|
|
76
|
+
}
|
|
77
|
+
return [...buildStaticCategories(country), ...buildPersonalDocumentCategories()];
|
|
78
|
+
}
|
|
79
|
+
export const personalDocGroup1Types = new Set(personalDocGroup1Options.filter(o => o.value).map(o => o.value));
|
|
80
|
+
export const personalDocGroup2Types = new Set(personalDocGroup2Options.filter(o => o.value).map(o => o.value));
|
|
@@ -72,7 +72,7 @@ export class LegalAddressFormStep {
|
|
|
72
72
|
this.formController.validateAndSubmit(() => this.sendData(onSuccess));
|
|
73
73
|
}
|
|
74
74
|
get patchPayload() {
|
|
75
|
-
|
|
75
|
+
const formValues = new Address(this.formController.values.getValue()).payload;
|
|
76
76
|
return { legal_address: formValues };
|
|
77
77
|
}
|
|
78
78
|
componentWillLoad() {
|
|
@@ -27,7 +27,7 @@ export const makeGetBusiness = ({ authToken, businessId, service }) => async ({
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
finally {
|
|
30
|
-
|
|
30
|
+
final();
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
export const makePatchBusiness = ({ authToken, businessId, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
@@ -58,7 +58,7 @@ export const makePatchBusiness = ({ authToken, businessId, service }) => async (
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
finally {
|
|
61
|
-
|
|
61
|
+
final();
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
export const makePostProvisioning = ({ authToken, businessId, product, service }) => async ({ onSuccess, onError }) => {
|
|
@@ -114,7 +114,7 @@ export const makeGetIdentity = ({ authToken, identityId, service }) => async ({
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
finally {
|
|
117
|
-
|
|
117
|
+
final();
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
export const makePatchIdentity = ({ authToken, identityId, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
@@ -143,7 +143,7 @@ export const makePatchIdentity = ({ authToken, identityId, service }) => async (
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
finally {
|
|
146
|
-
|
|
146
|
+
final();
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
export const makePostIdentity = ({ authToken, service }) => async ({ payload, onSuccess, onError, final = () => { } }) => {
|
|
@@ -172,7 +172,7 @@ export const makePostIdentity = ({ authToken, service }) => async ({ payload, on
|
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
finally {
|
|
175
|
-
|
|
175
|
+
final();
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
// Bank Account API Actions
|
|
@@ -202,7 +202,7 @@ export const makePostBankAccount = ({ authToken, service }) => async ({ payload,
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
finally {
|
|
205
|
-
|
|
205
|
+
final();
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
// Business Document API Actions
|
|
@@ -232,6 +232,6 @@ export const makePostDocumentRecord = ({ authToken, service }) => async ({ paylo
|
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
finally {
|
|
235
|
-
|
|
235
|
+
final();
|
|
236
236
|
}
|
|
237
237
|
};
|
|
@@ -11,14 +11,15 @@ export class PaymentProvisioningFormSteps {
|
|
|
11
11
|
3: () => h("business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
|
|
12
12
|
4: () => h("business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
|
|
13
13
|
5: () => h("business-bank-account-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[5] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
|
|
14
|
-
6: () => h("
|
|
14
|
+
6: () => h("document-upload-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[6] = el, allowOptionalFields: this.allowOptionalFields, country: this.country }),
|
|
15
|
+
7: () => h("business-terms-conditions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[7] = el, onFormLoading: this.handleFormLoading, allowOptionalFields: this.allowOptionalFields }),
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
get currentStepComponent() {
|
|
18
19
|
return this.componentStepMapping[this.currentStep]();
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
|
-
return (h("div", { key: '
|
|
22
|
+
return (h("div", { key: 'a249d66ac8348900e21998c4cf89bd02cfeec7c1', class: 'col-12 mb-4' }, this.currentStepComponent));
|
|
22
23
|
}
|
|
23
24
|
static get is() { return "payment-provisioning-form-steps"; }
|
|
24
25
|
static get properties() {
|