@justifi/webcomponents 6.12.6-rc.1 → 6.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/{Analytics-CexlbLRl.js → Analytics-CuYtRPw5.js} +2 -2
- package/dist/cjs/{Plaid-KasiL5mp.js → Plaid-BRSyOOuw.js} +19 -14
- package/dist/cjs/{additional-questions-form-step_15.cjs.entry.js → additional-questions-form-step_14.cjs.entry.js} +169 -378
- package/dist/cjs/additional-questions_5.cjs.entry.js +7 -7
- package/dist/cjs/additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-form-options-CnlrfbQ6.js → business-form-options-D_nM7NDk.js} +0 -51
- package/dist/cjs/{business-identity-schema-CC1wOwXd.js → business-identity-schema-DuFGX6_i.js} +7 -11
- package/dist/cjs/{business.service-BBovho58.js → business.service-Z9OACEQL.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-jeIQGJ8A.js → check-pkg-version-CPWLIT6P.js} +1 -1
- package/dist/cjs/{checkout.service-C0M9hmsL.js → checkout.service-BZOyqXgW.js} +1 -1
- package/dist/cjs/{country-config-Ck-eEeZZ.js → country-config-aJp8ScEs.js} +0 -2
- package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
- package/dist/cjs/{event-types-DDNVjmfR.js → event-types-AU1B76Vm.js} +1 -1
- package/dist/cjs/form-address-fields_3.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_2.cjs.entry.js +4 -5
- package/dist/cjs/{get-business-Ggw-UjXj.js → get-business-aR-C83KX.js} +2 -2
- package/dist/cjs/{get-payment-details-BVKRwME1.js → get-payment-details-dwhA02Zl.js} +2 -2
- package/dist/cjs/{get-subaccounts-RRmcS9xU.js → get-subaccounts-B1jmSa2d.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/{index.esm-BNETBIV_.js → index.esm-C1ZPG85l.js} +18 -0
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +11 -10
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{lodash-CxSkBibc.js → lodash-C4mGy21w.js} +38 -27
- package/dist/cjs/{package-CDegPd7E.js → package-Dxjq_cJI.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-Cn8bgHKu.js → payment-provisioning-actions-BiSpysjW.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +2 -3
- package/dist/cjs/{payment.service-CbIxt30x.js → payment.service-ByrgA_QZ.js} +1 -1
- package/dist/cjs/{payout.service-DVMvsdAf.js → payout.service-CnQm_BpU.js} +1 -1
- package/dist/cjs/{payouts-status-CzS2CLGW.js → payouts-status-AuS3Mp0V.js} +2 -2
- package/dist/cjs/{plaid.service-DNT_DX6z.js → plaid.service-Dlb8EUR8.js} +1 -1
- package/dist/cjs/{schema-validations-DackMxv7.js → schema-validations-DNPcvDh5.js} +8 -11
- package/dist/cjs/styled-host-DAi5SuFa.js +11 -0
- package/dist/cjs/{terminal.service-BBHixg-d.js → terminal.service-BdwHQ3Vv.js} +1 -1
- package/dist/cjs/{utils-kDsk4nqH.js → utils-FVGp6se3.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Document.js +7 -14
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +3 -5
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -4
- package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -46
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +114 -6
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +0 -8
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -4
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +2 -3
- package/dist/collection/components/business-forms/schemas/business-bank-account-schema.js +38 -10
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +3 -7
- package/dist/collection/components/business-forms/schemas/schema-validations.js +5 -8
- package/dist/collection/components/business-forms/utils/business-form-options.js +0 -50
- package/dist/collection/components/business-forms/utils/country-config.js +0 -2
- package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +8 -6
- package/dist/collection/ui-components/form/form-control-file.js +1 -1
- package/dist/docs.json +76 -502
- package/dist/esm/{Analytics-5J6H0ALl.js → Analytics-CwckfiSK.js} +2 -2
- package/dist/esm/{Plaid-BM3JUIG5.js → Plaid-l6nNIjab.js} +19 -15
- package/dist/esm/{additional-questions-form-step_15.entry.js → additional-questions-form-step_14.entry.js} +169 -377
- package/dist/esm/additional-questions_5.entry.js +8 -8
- package/dist/esm/additional-statement_8.entry.js +1 -1
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business-form-options-DXjZp4Rl.js → business-form-options-DRalxlqN.js} +1 -51
- package/dist/esm/{business-identity-schema-D8L_UfWl.js → business-identity-schema-0Q3kck3C.js} +7 -11
- package/dist/esm/{business.service-C4BD3pf7.js → business.service-C31wbMVs.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-C7cHTIM0.js → check-pkg-version-Dy2NK3Nn.js} +1 -1
- package/dist/esm/{checkout.service-DmWeKNQs.js → checkout.service-cVdOGDuI.js} +1 -1
- package/dist/esm/{country-config-BW2dUoTJ.js → country-config-CdvhLcnT.js} +0 -2
- package/dist/esm/dispute-notification_2.entry.js +6 -6
- package/dist/esm/{event-types-eIqsrwmW.js → event-types-DalU_6SB.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +1 -1
- package/dist/esm/form-control-number_2.entry.js +4 -5
- package/dist/esm/{get-business-DtFHdc37.js → get-business-Gg6qn5on.js} +2 -2
- package/dist/esm/{get-payment-details-26GxiYgv.js → get-payment-details-BiWgSJau.js} +2 -2
- package/dist/esm/{get-subaccounts-xkGMPstt.js → get-subaccounts-CkjZeR9U.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/{index.esm-KCSohgHx.js → index.esm-BHdVU4hV.js} +18 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +11 -10
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -5
- package/dist/esm/justifi-bank-account-form.entry.js +5 -5
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +8 -8
- package/dist/esm/justifi-business-form.entry.js +13 -13
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list.entry.js +8 -8
- package/dist/esm/justifi-dispute-management.entry.js +7 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
- package/dist/esm/justifi-order-terminals.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +8 -8
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +8 -8
- package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +9 -9
- package/dist/esm/justifi-refund-payment.entry.js +9 -9
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{lodash-CrGKVSPp.js → lodash-BF_QgjtL.js} +38 -27
- package/dist/esm/{package-8R9xLun-.js → package-DAZd_gFd.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment-provisioning-actions-fWdNDUdq.js → payment-provisioning-actions-cl5xIYnF.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +2 -3
- package/dist/esm/{payment.service-CWR7jF-K.js → payment.service-5_u-UzTY.js} +1 -1
- package/dist/esm/{payout.service-CFU362cH.js → payout.service-D2zS5y8N.js} +1 -1
- package/dist/esm/{payouts-status-D2G7FKu1.js → payouts-status-DCjCGTaa.js} +2 -2
- package/dist/esm/{plaid.service-0hd1i5Ga.js → plaid.service-BiJ65YG8.js} +1 -1
- package/dist/esm/{schema-validations-CjqWFLKt.js → schema-validations-A1o1biOB.js} +8 -11
- package/dist/esm/styled-host-D6byRazK.js +9 -0
- package/dist/esm/{terminal.service-Dr6dERcJ.js → terminal.service-CIxDfM7V.js} +1 -1
- package/dist/esm/{utils-q7KOrlSX.js → utils-C1B2hVAB.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +19 -15
- package/dist/module/additional-questions-form-step2.js +5 -11
- package/dist/module/bank-account-document-form-inputs.js +1 -55
- package/dist/module/bank-account-document-form-inputs2.js +57 -0
- package/dist/module/business-bank-account-form-step2.js +177 -24
- package/dist/module/business-core-info-form-step2.js +2 -2
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-core-info2.js +3 -3
- package/dist/module/business-documents-on-file2.js +1 -1
- package/dist/module/business-form-options.js +1 -51
- package/dist/module/business-identity-schema.js +3 -7
- package/dist/module/business-owners-form-step2.js +0 -8
- package/dist/module/business-representative-form-inputs2.js +3 -5
- package/dist/module/business-representative2.js +5 -6
- package/dist/module/button.js +1 -1
- package/dist/module/country-config.js +0 -2
- package/dist/module/form-control-number2.js +1 -1
- package/dist/module/form-control-textarea2.js +1 -1
- package/dist/module/form.js +18 -1
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +1 -1
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +2 -2
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-google-pay2.js +4 -3
- package/dist/module/justifi-modular-checkout2.js +1 -1
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-provisioning.js +27 -33
- package/dist/module/justifi-payment-transactions-list.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +2 -2
- package/dist/module/justifi-payouts-list-filters.js +1 -1
- package/dist/module/justifi-payouts-list.js +2 -2
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list.js +2 -2
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +2 -2
- package/dist/module/lodash.js +38 -27
- package/dist/module/owner-form-inputs2.js +3 -5
- package/dist/module/owner-form2.js +1 -10
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/payment-provisioning-actions.js +1 -1
- package/dist/module/payment-provisioning-form-steps2.js +28 -35
- package/dist/module/plaid-verification2.js +1 -1
- package/dist/module/schema-validations.js +5 -8
- package/dist/module/skeleton.js +1 -1
- package/dist/module/styled-host.js +1 -1
- package/dist/module/table.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/types/api/Document.d.ts +2 -15
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +0 -2
- package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +12 -1
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-form-steps.d.ts +0 -1
- package/dist/types/components/business-forms/schemas/business-bank-account-schema.d.ts +4 -4
- package/dist/types/components/business-forms/utils/business-form-options.d.ts +0 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +1 -1
- package/dist/types/components.d.ts +10 -71
- package/dist/webcomponents/p-034fa691.entry.js +1 -0
- package/dist/webcomponents/{p-086f7eea.entry.js → p-07eaee91.entry.js} +1 -1
- package/dist/webcomponents/{p-2e063c5d.entry.js → p-08ab97ce.entry.js} +1 -1
- package/dist/webcomponents/{p-80fdd013.entry.js → p-1f34b2f7.entry.js} +1 -1
- package/dist/webcomponents/{p-3bcac405.entry.js → p-279c17ac.entry.js} +1 -1
- package/dist/webcomponents/{p-29b82954.entry.js → p-2a5ee558.entry.js} +1 -1
- package/dist/webcomponents/p-2aac2ab6.entry.js +1 -0
- package/dist/webcomponents/p-37254105.entry.js +1 -0
- package/dist/webcomponents/{p-a7e0ab9b.entry.js → p-38209a25.entry.js} +1 -1
- package/dist/webcomponents/{p-4b14b7e7.entry.js → p-3cefb032.entry.js} +1 -1
- package/dist/webcomponents/{p-8ed1bc07.entry.js → p-3ef07f42.entry.js} +1 -1
- package/dist/webcomponents/{p-a5ad9183.entry.js → p-41637e4a.entry.js} +1 -1
- package/dist/webcomponents/{p-92d8a14b.entry.js → p-4b39a470.entry.js} +1 -1
- package/dist/webcomponents/{p-6b21947c.entry.js → p-4ee55e7d.entry.js} +1 -1
- package/dist/webcomponents/p-5G1OMxZz.js +1 -0
- package/dist/webcomponents/p-6904c62c.entry.js +1 -0
- package/dist/webcomponents/{p-5f071ee0.entry.js → p-7377f7d1.entry.js} +1 -1
- package/dist/webcomponents/{p-48a866ae.entry.js → p-78c4668b.entry.js} +1 -1
- package/dist/webcomponents/{p-c2e09203.entry.js → p-8e56430a.entry.js} +1 -1
- package/dist/webcomponents/{p-947950cc.entry.js → p-9153c121.entry.js} +1 -1
- package/dist/webcomponents/p-9b5ca32c.entry.js +1 -0
- package/dist/webcomponents/{p-04d6d725.entry.js → p-9d676f54.entry.js} +1 -1
- package/dist/webcomponents/{p-BrFax4_P.js → p-APOabprT.js} +1 -1
- package/dist/webcomponents/p-Aacb4jqT.js +1 -0
- package/dist/webcomponents/{p-CeW0EPHy.js → p-Axa3cgnH.js} +1 -1
- package/dist/webcomponents/{p-CL8LyqRI.js → p-BJu1-9kE.js} +1 -1
- package/dist/webcomponents/{p-czJ2qSU1.js → p-BXyADlAH.js} +1 -1
- package/dist/webcomponents/{p-xWuaNtJy.js → p-Ba8jdOkX.js} +1 -1
- package/dist/webcomponents/{p-DvnFba1A.js → p-BdpSLMs7.js} +1 -1
- package/dist/webcomponents/p-BqNNwq6C.js +1 -0
- package/dist/webcomponents/{p-BBSnDYJw.js → p-Bt4GjEWL.js} +1 -1
- package/dist/webcomponents/{p-C-zuQNNP.js → p-BxKbnILQ.js} +1 -1
- package/dist/webcomponents/{p-D9sqTVmd.js → p-CKiAlBsU.js} +1 -1
- package/dist/webcomponents/{p-CDu7TeCZ.js → p-Cm9f5fyh.js} +1 -1
- package/dist/webcomponents/p-D8ytux5N.js +1 -0
- package/dist/webcomponents/p-DAZd_gFd.js +1 -0
- package/dist/webcomponents/{p-DdeBubpX.js → p-Dk26hk5T.js} +1 -1
- package/dist/webcomponents/p-DrMJliVY.js +1 -0
- package/dist/webcomponents/{p-Dzv0P2Ly.js → p-NZS8uCtH.js} +1 -1
- package/dist/webcomponents/p-OeJ-3w3l.js +9 -0
- package/dist/webcomponents/p-XIWgia4J.js +1 -0
- package/dist/webcomponents/{p-8db8d7e7.entry.js → p-a2c25cc4.entry.js} +1 -1
- package/dist/webcomponents/{p-de1ccbea.entry.js → p-a56e43a1.entry.js} +1 -1
- package/dist/webcomponents/{p-a3b48ba3.entry.js → p-a7a1b168.entry.js} +1 -1
- package/dist/webcomponents/{p-85c0abdb.entry.js → p-a9e82502.entry.js} +1 -1
- package/dist/webcomponents/{p-BSyTbuZy.js → p-av6jyzyC.js} +1 -1
- package/dist/webcomponents/{p-0b169fac.entry.js → p-b0b6083f.entry.js} +1 -1
- package/dist/webcomponents/{p-86eb32d8.entry.js → p-b21010cb.entry.js} +1 -1
- package/dist/webcomponents/{p-1e34c488.entry.js → p-b62ff001.entry.js} +1 -1
- package/dist/webcomponents/{p-c1b48216.entry.js → p-b8351983.entry.js} +1 -1
- package/dist/webcomponents/{p-3960e6b7.entry.js → p-bc2dddf3.entry.js} +1 -1
- package/dist/webcomponents/{p-3e10a0de.entry.js → p-c4767c7b.entry.js} +1 -1
- package/dist/webcomponents/p-c8bc235f.entry.js +1 -0
- package/dist/webcomponents/{p-0a4fcb15.entry.js → p-ca87c609.entry.js} +1 -1
- package/dist/webcomponents/{p-ba2ab989.entry.js → p-cf3e3394.entry.js} +1 -1
- package/dist/webcomponents/{p-e0e6c2df.entry.js → p-d01a1076.entry.js} +1 -1
- package/dist/webcomponents/{p-a4520dba.entry.js → p-d5edbea3.entry.js} +1 -1
- package/dist/webcomponents/{p-b17ce21d.entry.js → p-d79c5ee4.entry.js} +1 -1
- package/dist/webcomponents/{p-562447ad.entry.js → p-e02d7751.entry.js} +4 -4
- package/dist/webcomponents/{p-c3cc4ad6.entry.js → p-e07506b7.entry.js} +1 -1
- package/dist/webcomponents/{p-cc558e25.entry.js → p-e17b92ec.entry.js} +1 -1
- package/dist/webcomponents/p-ea254f14.entry.js +1 -0
- package/dist/webcomponents/{p-ca1c2048.entry.js → p-ebb7b693.entry.js} +1 -1
- package/dist/webcomponents/{p-0e4cda77.entry.js → p-f1b9cbf0.entry.js} +1 -1
- package/dist/webcomponents/{p-Cz0yhyYu.js → p-fE5A37L5.js} +1 -1
- package/dist/webcomponents/p-ff8cf16c.entry.js +1 -0
- package/dist/webcomponents/p-nb_LhbJq.js +1 -0
- package/dist/webcomponents/{p--RbNhyet.js → p-oTtn8xDw.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +0 -21
- package/dist/cjs/styled-host-Ch0-dxF-.js +0 -11
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.js +0 -435
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-list.js +0 -52
- package/dist/collection/components/business-forms/payment-provisioning/document-upload/document-upload-options.js +0 -72
- package/dist/esm/bank-account-document-form-inputs.entry.js +0 -19
- package/dist/esm/styled-host-D84RBv1W.js +0 -9
- package/dist/module/document-upload-form-step.d.ts +0 -11
- package/dist/module/document-upload-form-step.js +0 -6
- package/dist/module/document-upload-form-step2.js +0 -397
- package/dist/module/document-upload-list.d.ts +0 -11
- package/dist/module/document-upload-list.js +0 -6
- package/dist/module/document-upload-list2.js +0 -46
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-form-step.d.ts +0 -44
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-list.d.ts +0 -6
- package/dist/types/components/business-forms/payment-provisioning/document-upload/document-upload-options.d.ts +0 -44
- package/dist/webcomponents/p-37676092.entry.js +0 -1
- package/dist/webcomponents/p-54ee2a30.entry.js +0 -1
- package/dist/webcomponents/p-58adef16.entry.js +0 -1
- package/dist/webcomponents/p-8R9xLun-.js +0 -1
- package/dist/webcomponents/p-92e7ce54.entry.js +0 -1
- package/dist/webcomponents/p-9ce2a98a.entry.js +0 -1
- package/dist/webcomponents/p-B1yVkh15.js +0 -1
- package/dist/webcomponents/p-BzXQDB0t.js +0 -1
- package/dist/webcomponents/p-C_ifLmT1.js +0 -9
- package/dist/webcomponents/p-D9ZHVy-j.js +0 -1
- package/dist/webcomponents/p-DV4n8kZd.js +0 -1
- package/dist/webcomponents/p-DzEdYT8R.js +0 -1
- package/dist/webcomponents/p-a2ed63df.entry.js +0 -1
- package/dist/webcomponents/p-a9976353.entry.js +0 -1
- package/dist/webcomponents/p-c9599fc7.entry.js +0 -1
- package/dist/webcomponents/p-cab840bd.entry.js +0 -1
- package/dist/webcomponents/p-n_pmf4AT.js +0 -1
- package/dist/webcomponents/p-vUN_uvAi.js +0 -1
|
@@ -1,435 +0,0 @@
|
|
|
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.owners, 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
|
-
identityId: category.identityId,
|
|
66
|
-
status: 'uploading',
|
|
67
|
-
}));
|
|
68
|
-
const startIndex = this.uploadQueue.length;
|
|
69
|
-
this.uploadQueue = [...this.uploadQueue, ...newEntries];
|
|
70
|
-
this.selectedCategory = '';
|
|
71
|
-
this.selectedDocType = '';
|
|
72
|
-
this.fileInputKey++;
|
|
73
|
-
await Promise.all(newEntries.map(async (entry, i) => {
|
|
74
|
-
const index = startIndex + i;
|
|
75
|
-
try {
|
|
76
|
-
const docData = new EntityDocument({ file: entry.file, document_type: entry.docTypeValue }, this.businessId, entry.identityId);
|
|
77
|
-
const recordCreated = await this.postDocumentRecordData(docData);
|
|
78
|
-
if (!recordCreated) {
|
|
79
|
-
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const uploaded = await this.uploadDocument(docData);
|
|
83
|
-
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: uploaded ? 'uploaded' : 'error' }) : e);
|
|
84
|
-
}
|
|
85
|
-
catch (_a) {
|
|
86
|
-
this.uploadQueue = this.uploadQueue.map((e, j) => j === index ? Object.assign(Object.assign({}, e), { status: 'error' }) : e);
|
|
87
|
-
}
|
|
88
|
-
}));
|
|
89
|
-
};
|
|
90
|
-
this.postDocumentRecordData = async (docData) => {
|
|
91
|
-
const payload = docData.record_data;
|
|
92
|
-
return new Promise((resolve) => {
|
|
93
|
-
this.postDocumentRecord({
|
|
94
|
-
payload,
|
|
95
|
-
onSuccess: (response) => {
|
|
96
|
-
resolve(this.handleDocRecordResponse(docData, response));
|
|
97
|
-
},
|
|
98
|
-
onError: ({ error, code, severity }) => {
|
|
99
|
-
this.errorEvent.emit({
|
|
100
|
-
message: error,
|
|
101
|
-
errorCode: code,
|
|
102
|
-
severity: severity,
|
|
103
|
-
});
|
|
104
|
-
resolve(false);
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
this.handleDocRecordResponse = (docData, response) => {
|
|
110
|
-
if (response.error) {
|
|
111
|
-
this.errorEvent.emit({
|
|
112
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
113
|
-
message: response.error.message,
|
|
114
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
115
|
-
data: response.error,
|
|
116
|
-
});
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
docData.setPresignedUrl(response.data.presigned_url);
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
this.uploadDocument = async (docData) => {
|
|
125
|
-
if (!docData.presigned_url) {
|
|
126
|
-
throw new Error('Presigned URL is not set');
|
|
127
|
-
}
|
|
128
|
-
const fileData = await docData.getFileData();
|
|
129
|
-
const response = await fetch(docData.presigned_url, {
|
|
130
|
-
method: 'PUT',
|
|
131
|
-
body: fileData,
|
|
132
|
-
});
|
|
133
|
-
if (!response.ok) {
|
|
134
|
-
this.errorEvent.emit({
|
|
135
|
-
errorCode: ComponentErrorCodes.POST_ERROR,
|
|
136
|
-
message: 'Failed to upload document',
|
|
137
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
138
|
-
});
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
propChanged() {
|
|
145
|
-
this.initializeApi();
|
|
146
|
-
}
|
|
147
|
-
watchHandler(newValue) {
|
|
148
|
-
this.formLoading.emit(newValue);
|
|
149
|
-
}
|
|
150
|
-
async validateAndSubmit({ onSuccess }) {
|
|
151
|
-
const validationErrors = this.validate();
|
|
152
|
-
if (Object.keys(validationErrors).length > 0) {
|
|
153
|
-
this.errors = validationErrors;
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
this.errors = {};
|
|
157
|
-
this.stepCompleteEvent.emit({ response: null, formStep: BusinessFormStep.documentUpload });
|
|
158
|
-
onSuccess();
|
|
159
|
-
}
|
|
160
|
-
componentWillLoad() {
|
|
161
|
-
this.initializeApi();
|
|
162
|
-
if (this.getBusiness) {
|
|
163
|
-
this.getData();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
initializeApi() {
|
|
167
|
-
if (this.authToken && this.businessId) {
|
|
168
|
-
this.getBusiness = makeGetBusiness({
|
|
169
|
-
authToken: this.authToken,
|
|
170
|
-
businessId: this.businessId,
|
|
171
|
-
service: new BusinessService()
|
|
172
|
-
});
|
|
173
|
-
this.postDocumentRecord = makePostDocumentRecord({
|
|
174
|
-
authToken: this.authToken,
|
|
175
|
-
service: new DocumentRecordService()
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
this.errorEvent.emit({
|
|
180
|
-
message: 'Missing required props',
|
|
181
|
-
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
182
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
get categoryOptions() {
|
|
187
|
-
return [
|
|
188
|
-
{ label: 'Select a category', value: '' },
|
|
189
|
-
...this.categories.map(c => ({ label: c.label, value: c.value })),
|
|
190
|
-
];
|
|
191
|
-
}
|
|
192
|
-
get docTypeOptions() {
|
|
193
|
-
if (!this.selectedCategory) {
|
|
194
|
-
return [{ label: 'Select a category first', value: '' }];
|
|
195
|
-
}
|
|
196
|
-
const category = this.categories.find(c => c.value === this.selectedCategory);
|
|
197
|
-
return (category === null || category === void 0 ? void 0 : category.docTypeOptions) || [{ label: 'Select a category first', value: '' }];
|
|
198
|
-
}
|
|
199
|
-
validate() {
|
|
200
|
-
if (this.allowOptionalFields)
|
|
201
|
-
return {};
|
|
202
|
-
const errors = {};
|
|
203
|
-
const financialDocTypes = ['voided_check', 'bank_statement'];
|
|
204
|
-
const hasExistingDoc = (types) => this.existingDocuments.some(doc => types.includes(doc.document_type));
|
|
205
|
-
const hasUploadedDoc = (categoryValue) => this.uploadQueue.some(entry => entry.categoryValue === categoryValue && entry.status === 'uploaded');
|
|
206
|
-
if (!hasUploadedDoc('financial_document') && !hasExistingDoc(financialDocTypes)) {
|
|
207
|
-
errors['financial_document'] = 'Please upload a financial document';
|
|
208
|
-
}
|
|
209
|
-
if (this.country === CountryCode.CAN) {
|
|
210
|
-
const businessDocTypes = ['articles_of_incorporation', 'business_registration'];
|
|
211
|
-
if (!hasUploadedDoc('business_document') && !hasExistingDoc(businessDocTypes)) {
|
|
212
|
-
errors['business_document'] = 'Please upload a business document';
|
|
213
|
-
}
|
|
214
|
-
for (const owner of this.owners) {
|
|
215
|
-
const ownerCategoryValue = `personal_${owner.id}`;
|
|
216
|
-
const ownerDocs = this.uploadQueue.filter(entry => entry.categoryValue === ownerCategoryValue && entry.status === 'uploaded');
|
|
217
|
-
const hasGroup1 = ownerDocs.some(d => personalDocGroup1Types.has(d.docTypeValue));
|
|
218
|
-
const hasGroup2 = ownerDocs.some(d => personalDocGroup2Types.has(d.docTypeValue));
|
|
219
|
-
if (!hasGroup1) {
|
|
220
|
-
errors[`personal_group1_${owner.id}`] =
|
|
221
|
-
`Please upload a Group 1 identity document for ${owner.name}`;
|
|
222
|
-
}
|
|
223
|
-
if (!hasGroup2) {
|
|
224
|
-
errors[`personal_group2_${owner.id}`] =
|
|
225
|
-
`Please upload a Group 2 identity document for ${owner.name}`;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return errors;
|
|
230
|
-
}
|
|
231
|
-
render() {
|
|
232
|
-
if (this.isLoading) {
|
|
233
|
-
return h(PaymentProvisioningLoading, null);
|
|
234
|
-
}
|
|
235
|
-
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 })), 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 identity documents, two documents from different groups are required per 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)))))));
|
|
236
|
-
}
|
|
237
|
-
static get is() { return "document-upload-form-step"; }
|
|
238
|
-
static get properties() {
|
|
239
|
-
return {
|
|
240
|
-
"authToken": {
|
|
241
|
-
"type": "string",
|
|
242
|
-
"mutable": false,
|
|
243
|
-
"complexType": {
|
|
244
|
-
"original": "string",
|
|
245
|
-
"resolved": "string",
|
|
246
|
-
"references": {}
|
|
247
|
-
},
|
|
248
|
-
"required": true,
|
|
249
|
-
"optional": false,
|
|
250
|
-
"docs": {
|
|
251
|
-
"tags": [],
|
|
252
|
-
"text": ""
|
|
253
|
-
},
|
|
254
|
-
"getter": false,
|
|
255
|
-
"setter": false,
|
|
256
|
-
"reflect": false,
|
|
257
|
-
"attribute": "auth-token"
|
|
258
|
-
},
|
|
259
|
-
"businessId": {
|
|
260
|
-
"type": "string",
|
|
261
|
-
"mutable": false,
|
|
262
|
-
"complexType": {
|
|
263
|
-
"original": "string",
|
|
264
|
-
"resolved": "string",
|
|
265
|
-
"references": {}
|
|
266
|
-
},
|
|
267
|
-
"required": true,
|
|
268
|
-
"optional": false,
|
|
269
|
-
"docs": {
|
|
270
|
-
"tags": [],
|
|
271
|
-
"text": ""
|
|
272
|
-
},
|
|
273
|
-
"getter": false,
|
|
274
|
-
"setter": false,
|
|
275
|
-
"reflect": false,
|
|
276
|
-
"attribute": "business-id"
|
|
277
|
-
},
|
|
278
|
-
"allowOptionalFields": {
|
|
279
|
-
"type": "boolean",
|
|
280
|
-
"mutable": false,
|
|
281
|
-
"complexType": {
|
|
282
|
-
"original": "boolean",
|
|
283
|
-
"resolved": "boolean",
|
|
284
|
-
"references": {}
|
|
285
|
-
},
|
|
286
|
-
"required": false,
|
|
287
|
-
"optional": true,
|
|
288
|
-
"docs": {
|
|
289
|
-
"tags": [],
|
|
290
|
-
"text": ""
|
|
291
|
-
},
|
|
292
|
-
"getter": false,
|
|
293
|
-
"setter": false,
|
|
294
|
-
"reflect": false,
|
|
295
|
-
"attribute": "allow-optional-fields"
|
|
296
|
-
},
|
|
297
|
-
"country": {
|
|
298
|
-
"type": "string",
|
|
299
|
-
"mutable": false,
|
|
300
|
-
"complexType": {
|
|
301
|
-
"original": "CountryCode",
|
|
302
|
-
"resolved": "CountryCode.CAN | CountryCode.USA",
|
|
303
|
-
"references": {
|
|
304
|
-
"CountryCode": {
|
|
305
|
-
"location": "import",
|
|
306
|
-
"path": "../../../../utils/country-codes",
|
|
307
|
-
"id": "src/utils/country-codes.ts::CountryCode"
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
"required": true,
|
|
312
|
-
"optional": false,
|
|
313
|
-
"docs": {
|
|
314
|
-
"tags": [],
|
|
315
|
-
"text": ""
|
|
316
|
-
},
|
|
317
|
-
"getter": false,
|
|
318
|
-
"setter": false,
|
|
319
|
-
"reflect": false,
|
|
320
|
-
"attribute": "country"
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
static get states() {
|
|
325
|
-
return {
|
|
326
|
-
"owners": {},
|
|
327
|
-
"existingDocuments": {},
|
|
328
|
-
"selectedCategory": {},
|
|
329
|
-
"selectedDocType": {},
|
|
330
|
-
"uploadQueue": {},
|
|
331
|
-
"isLoading": {},
|
|
332
|
-
"errors": {},
|
|
333
|
-
"fileInputKey": {},
|
|
334
|
-
"getBusiness": {},
|
|
335
|
-
"postDocumentRecord": {}
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
static get events() {
|
|
339
|
-
return [{
|
|
340
|
-
"method": "errorEvent",
|
|
341
|
-
"name": "error-event",
|
|
342
|
-
"bubbles": true,
|
|
343
|
-
"cancelable": true,
|
|
344
|
-
"composed": true,
|
|
345
|
-
"docs": {
|
|
346
|
-
"tags": [],
|
|
347
|
-
"text": ""
|
|
348
|
-
},
|
|
349
|
-
"complexType": {
|
|
350
|
-
"original": "ComponentErrorEvent",
|
|
351
|
-
"resolved": "ComponentErrorEvent",
|
|
352
|
-
"references": {
|
|
353
|
-
"ComponentErrorEvent": {
|
|
354
|
-
"location": "import",
|
|
355
|
-
"path": "../../../../api",
|
|
356
|
-
"id": "src/api/index.ts::ComponentErrorEvent"
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}, {
|
|
361
|
-
"method": "stepCompleteEvent",
|
|
362
|
-
"name": "complete-form-step-event",
|
|
363
|
-
"bubbles": true,
|
|
364
|
-
"cancelable": true,
|
|
365
|
-
"composed": true,
|
|
366
|
-
"docs": {
|
|
367
|
-
"tags": [],
|
|
368
|
-
"text": ""
|
|
369
|
-
},
|
|
370
|
-
"complexType": {
|
|
371
|
-
"original": "ComponentFormStepCompleteEvent",
|
|
372
|
-
"resolved": "ComponentFormStepCompleteEvent",
|
|
373
|
-
"references": {
|
|
374
|
-
"ComponentFormStepCompleteEvent": {
|
|
375
|
-
"location": "import",
|
|
376
|
-
"path": "../../../../api",
|
|
377
|
-
"id": "src/api/index.ts::ComponentFormStepCompleteEvent"
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}, {
|
|
382
|
-
"method": "formLoading",
|
|
383
|
-
"name": "formLoading",
|
|
384
|
-
"bubbles": true,
|
|
385
|
-
"cancelable": true,
|
|
386
|
-
"composed": true,
|
|
387
|
-
"docs": {
|
|
388
|
-
"tags": [],
|
|
389
|
-
"text": ""
|
|
390
|
-
},
|
|
391
|
-
"complexType": {
|
|
392
|
-
"original": "boolean",
|
|
393
|
-
"resolved": "boolean",
|
|
394
|
-
"references": {}
|
|
395
|
-
}
|
|
396
|
-
}];
|
|
397
|
-
}
|
|
398
|
-
static get methods() {
|
|
399
|
-
return {
|
|
400
|
-
"validateAndSubmit": {
|
|
401
|
-
"complexType": {
|
|
402
|
-
"signature": "({ onSuccess }: { onSuccess: any; }) => Promise<void>",
|
|
403
|
-
"parameters": [{
|
|
404
|
-
"name": "__0",
|
|
405
|
-
"type": "{ onSuccess: any; }",
|
|
406
|
-
"docs": ""
|
|
407
|
-
}],
|
|
408
|
-
"references": {
|
|
409
|
-
"Promise": {
|
|
410
|
-
"location": "global",
|
|
411
|
-
"id": "global::Promise"
|
|
412
|
-
}
|
|
413
|
-
},
|
|
414
|
-
"return": "Promise<void>"
|
|
415
|
-
},
|
|
416
|
-
"docs": {
|
|
417
|
-
"text": "",
|
|
418
|
-
"tags": []
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
static get watchers() {
|
|
424
|
-
return [{
|
|
425
|
-
"propName": "authToken",
|
|
426
|
-
"methodName": "propChanged"
|
|
427
|
-
}, {
|
|
428
|
-
"propName": "businessId",
|
|
429
|
-
"methodName": "propChanged"
|
|
430
|
-
}, {
|
|
431
|
-
"propName": "isLoading",
|
|
432
|
-
"methodName": "watchHandler"
|
|
433
|
-
}];
|
|
434
|
-
}
|
|
435
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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 personalDocGroup1Options = [
|
|
13
|
-
{ label: 'Select a document type', value: '' },
|
|
14
|
-
{ label: 'Canadian Passport', value: 'passport' },
|
|
15
|
-
{ label: 'Canadian Driver\'s License', value: 'driver_license' },
|
|
16
|
-
{ label: 'Canadian Government Issued ID Card', value: 'government_id' },
|
|
17
|
-
{ label: 'Permanent Resident Card', value: 'resident_card' },
|
|
18
|
-
{ label: 'Certificate of Indian Status', value: 'status_card' },
|
|
19
|
-
{ label: 'US State Issued Driver\'s License', value: 'driver_license' },
|
|
20
|
-
];
|
|
21
|
-
export const personalDocGroup2Options = [
|
|
22
|
-
{ label: 'Select a document type', value: '' },
|
|
23
|
-
{ label: 'Nexus Card (Photo ID)', value: 'nexus_card' },
|
|
24
|
-
{ label: 'Canadian Citizenship/Naturalization Card or Certificate', value: 'citizenship_card' },
|
|
25
|
-
{ label: 'Foreign Passport', value: 'foreign_passport' },
|
|
26
|
-
{ label: 'Canadian Birth Certificate', value: 'birth_certificate' },
|
|
27
|
-
{ label: 'Social Insurance Number (SIN) Card', value: 'sin_card' },
|
|
28
|
-
{ label: 'Social Security Number (SSN) Card', value: 'ssn_card' },
|
|
29
|
-
];
|
|
30
|
-
export const staticCategories = [
|
|
31
|
-
{
|
|
32
|
-
label: 'Business Document',
|
|
33
|
-
value: 'business_document',
|
|
34
|
-
docTypeOptions: businessDocumentOptions,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: 'Financial Document',
|
|
38
|
-
value: 'financial_document',
|
|
39
|
-
docTypeOptions: financialDocumentOptions,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
export function buildOwnerCategories(owners) {
|
|
43
|
-
const group1Opts = personalDocGroup1Options.filter(o => o.value !== '');
|
|
44
|
-
const group2Opts = personalDocGroup2Options.filter(o => o.value !== '');
|
|
45
|
-
return owners.map(owner => ({
|
|
46
|
-
label: `${owner.name} - Identity Document`,
|
|
47
|
-
value: `personal_${owner.id}`,
|
|
48
|
-
identityId: owner.id,
|
|
49
|
-
docTypeOptions: [
|
|
50
|
-
{ label: 'Select a document type', value: '' },
|
|
51
|
-
{ label: '── Group 1 ──', value: '_group1_header' },
|
|
52
|
-
...group1Opts,
|
|
53
|
-
{ label: '── Group 2 ──', value: '_group2_header' },
|
|
54
|
-
...group2Opts,
|
|
55
|
-
],
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
export const financialOnlyCategories = [
|
|
59
|
-
{
|
|
60
|
-
label: 'Financial Document',
|
|
61
|
-
value: 'financial_document',
|
|
62
|
-
docTypeOptions: financialDocumentOptions,
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
export function buildAllCategories(owners, country) {
|
|
66
|
-
if (country === CountryCode.USA) {
|
|
67
|
-
return financialOnlyCategories;
|
|
68
|
-
}
|
|
69
|
-
return [...staticCategories, ...buildOwnerCategories(owners)];
|
|
70
|
-
}
|
|
71
|
-
export const personalDocGroup1Types = new Set(personalDocGroup1Options.filter(o => o.value).map(o => o.value));
|
|
72
|
-
export const personalDocGroup2Types = new Set(personalDocGroup2Options.filter(o => o.value).map(o => o.value));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-CV0Pyo1O.js';
|
|
2
|
-
import './config-state-kKn89dp1.js';
|
|
3
|
-
import './dinero-HXpYMWUU.js';
|
|
4
|
-
import { E as EntityDocumentType } from './Plaid-BM3JUIG5.js';
|
|
5
|
-
import './Pagination-CLHwhyvu.js';
|
|
6
|
-
import './Business-BcNb9bVO.js';
|
|
7
|
-
import './index-cDVGjRkU.js';
|
|
8
|
-
import './utils-BTtxWI2r.js';
|
|
9
|
-
|
|
10
|
-
const BankAccountDocumentFormInputs = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
registerInstance(this, hostRef);
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return (h("div", { key: 'd0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9', class: "row gy-3" }, h("div", { key: '02ed406f38558badf9f591e076b120d09c71f83b', class: "col-12" }, h("form-control-file", { key: '11ff1dc68264b9e5aa561ffe19b423abc1a00c78', name: "voided_check", label: "Voided Check", documentType: EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), h("div", { key: '71d26407522a75a54489155566c18af1a64c1417', class: "col-12" }, h("form-control-file", { key: '7ea42e03a44c223a5fedc273e94e635e70d54f4b', name: "bank_statement", label: "Bank Statement", documentType: EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { BankAccountDocumentFormInputs as bank_account_document_form_inputs };
|