@justifi/webcomponents 4.10.0-rc.0 → 4.11.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/dist/cjs/{Business-79361c8a.js → Business-7ae04d4f.js} +58 -2
- package/dist/cjs/{SubAccount-b3902202.js → SubAccount-05867651.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -1
- package/dist/cjs/business-additional-questions-schema-18a82d19.js +47 -0
- package/dist/cjs/business-details-core.cjs.entry.js +7 -2
- package/dist/cjs/{business-form-types-3cdd5447.js → business-form-types-29b2bad9.js} +7 -0
- package/dist/cjs/{form-control-datepart_3.cjs.entry.js → form-control-datepart_4.cjs.entry.js} +97 -46
- package/dist/cjs/form-control-monetary.cjs.entry.js +19 -17
- package/dist/cjs/{form-control-number_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +7 -45
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +9 -2
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +29 -24
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +7 -7
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +23 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +62 -51
- package/dist/cjs/justifi-business-list.cjs.entry.js +3 -2
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +5 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +1 -1
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +29 -5
- package/dist/cjs/justifi-owner-form.cjs.entry.js +22 -12
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +2 -1
- package/dist/cjs/justifi-payment-details.cjs.entry.js +25 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +18 -4
- package/dist/cjs/{justifi-business-form-stepped.cjs.entry.js → justifi-payment-provisioning.cjs.entry.js} +20 -20
- package/dist/cjs/justifi-payments-list.cjs.entry.js +25 -5
- package/dist/cjs/justifi-payout-details.cjs.entry.js +27 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +26 -6
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +2 -1
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +3 -2
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +3 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/payload-parsers-f437272e.js +132 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +9 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +10 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +10 -4
- package/dist/cjs/payouts-list-core.cjs.entry.js +10 -3
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +2 -1
- package/dist/cjs/{utils-6f62f7a1.js → utils-2b9940e1.js} +7 -0
- package/dist/cjs/{utils-df5167a8.js → utils-87435719.js} +7 -0
- package/dist/cjs/utils-f8079741.js +41 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Business.js +12 -2
- package/dist/collection/api/ComponentError.js +14 -0
- package/dist/collection/api/services/utils.js +11 -0
- package/dist/collection/api/shared.js +11 -1
- package/dist/collection/collection-manifest.json +7 -8
- package/dist/collection/components/billing-form/billing-form.js +1 -1
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +4 -4
- package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +1 -1
- package/dist/collection/components/business-details/business-details-core.js +30 -2
- package/dist/collection/components/business-details/business-details.js +30 -0
- package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +1 -1
- package/dist/collection/components/business-details/get-business.js +15 -3
- package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +1 -1
- package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +1 -1
- package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +1 -1
- package/dist/collection/components/business-details/test/busines-details-core.spec.js +56 -16
- package/dist/collection/components/business-details/test/business-details.spec.js +20 -4
- package/dist/collection/components/business-details/test/get-business.spec.js +13 -6
- package/dist/collection/components/business-forms/business-form/business-form.js +79 -50
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +1 -4
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +4 -2
- package/dist/collection/components/business-forms/{business-form-stepped/business-address/business-address-form-step.js → owner-form/identity-address/identity-address-form.js} +14 -11
- package/dist/collection/components/business-forms/owner-form/identity-address/test/identity-address.e2e.js +9 -0
- package/dist/collection/components/business-forms/{business-form/business-address/test/business-address.spec.js → owner-form/identity-address/test/identity-address.spec.js} +21 -14
- package/dist/collection/components/business-forms/owner-form/owner-form.js +54 -8
- package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/additional-questions/business-additional-questions-form-step.js +23 -4
- package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-core-info/business-core-info-form-step.js +19 -1
- package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-owners/business-owners-form-step.js +44 -4
- package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-representative/business-representative-form-step.js +24 -8
- package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/legal-address-form/legal-address-form-step.js +24 -4
- package/dist/collection/components/business-forms/{business-form-stepped/business-form-stepped.js → payment-provisioning/payment-provisioning.js} +36 -18
- package/dist/collection/components/business-forms/payment-provisioning/test/payment-provisioning.spec.js +61 -0
- package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +15 -6
- package/dist/collection/components/business-forms/schemas/business-address-schema.js +49 -13
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +24 -12
- package/dist/collection/components/business-forms/schemas/business-form-schema.js +4 -4
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +29 -34
- package/dist/collection/components/business-forms/utils/business-form-types.js +7 -0
- package/dist/collection/components/business-forms/utils/helpers.js +2 -0
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/form/form-control-datepart.js +39 -34
- package/dist/collection/components/form/form-control-monetary.js +22 -20
- package/dist/collection/components/form/form-control-number.js +1 -0
- package/dist/collection/components/form/form-control-select.js +3 -1
- package/dist/collection/components/form/form-control-text.js +36 -1
- package/dist/collection/components/form/test/form-control-datepart.spec.js +88 -0
- package/dist/collection/components/form/test/form-control-monetary.spec.js +69 -0
- package/dist/collection/components/form/test/form-control-number.spec.js +77 -0
- package/dist/collection/components/form/test/form-control-select.spec.js +84 -0
- package/dist/collection/components/form/test/form-control-text.spec.js +104 -0
- package/dist/collection/components/form/test/form.spec.js +60 -0
- package/dist/collection/components/form/utils.js +6 -0
- package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +17 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +30 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +35 -1
- package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +26 -8
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +51 -11
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +55 -3
- package/dist/collection/components/payment-details/get-payment-details.js +15 -3
- package/dist/collection/components/payment-details/payment-details-core.js +30 -1
- package/dist/collection/components/payment-details/payment-details.js +35 -1
- package/dist/collection/components/payment-details/test/get-payment-details.spec.js +11 -3
- package/dist/collection/components/payment-details/test/payment-details-core.spec.js +55 -12
- package/dist/collection/components/payment-details/test/payment-details.spec.js +69 -3
- package/dist/collection/components/payment-form/payment-form.js +54 -3
- package/dist/collection/components/payment-form/test/payment-form.spec.js +60 -1
- package/dist/collection/components/payments-list/get-payments.js +15 -4
- package/dist/collection/components/payments-list/payments-list-core.js +28 -2
- package/dist/collection/components/payments-list/payments-list.js +35 -1
- package/dist/collection/components/payments-list/test/get-payments.spec.js +11 -3
- package/dist/collection/components/payments-list/test/payments-list-core.spec.js +43 -28
- package/dist/collection/components/payments-list/test/payments-list.spec.js +31 -3
- package/dist/collection/components/payout-details/get-payout-details.js +17 -6
- package/dist/collection/components/payout-details/payout-details-core.js +31 -3
- package/dist/collection/components/payout-details/payout-details.js +35 -1
- package/dist/collection/components/payout-details/test/get-payout-details.spec.js +15 -5
- package/dist/collection/components/payout-details/test/payout-details-core.spec.js +54 -16
- package/dist/collection/components/payout-details/test/payout-details.spec.js +50 -1
- package/dist/collection/components/payouts-list/get-payouts.js +17 -5
- package/dist/collection/components/payouts-list/payouts-list-core.js +28 -2
- package/dist/collection/components/payouts-list/payouts-list.js +34 -1
- package/dist/collection/components/payouts-list/test/get-payouts.spec.js +11 -3
- package/dist/collection/components/payouts-list/test/payouts-list-core.spec.js +42 -29
- package/dist/collection/components/payouts-list/test/payouts-list.spec.js +33 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +1018 -618
- package/dist/esm/{Business-1df362e0.js → Business-91caaccb.js} +56 -3
- package/dist/esm/{SubAccount-f4ae9809.js → SubAccount-61ac70eb.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +2 -1
- package/dist/esm/business-additional-questions-schema-b642a2b7.js +44 -0
- package/dist/esm/business-details-core.entry.js +8 -3
- package/dist/esm/{business-form-types-de9f38cd.js → business-form-types-0d76133c.js} +8 -1
- package/dist/esm/{form-control-datepart_3.entry.js → form-control-datepart_4.entry.js} +97 -47
- package/dist/esm/form-control-monetary.entry.js +19 -17
- package/dist/esm/{form-control-number_3.entry.js → form-control-select_2.entry.js} +8 -45
- package/dist/esm/gross-payment-chart-core.entry.js +10 -3
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +28 -23
- package/dist/esm/justifi-additional-questions_4.entry.js +7 -7
- package/dist/esm/justifi-billing-form_4.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +24 -5
- package/dist/esm/justifi-business-form.entry.js +62 -51
- package/dist/esm/justifi-business-list.entry.js +3 -2
- package/dist/esm/justifi-checkout-core.entry.js +5 -4
- package/dist/esm/justifi-checkout.entry.js +1 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js +28 -4
- package/dist/esm/justifi-owner-form.entry.js +21 -11
- package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -1
- package/dist/esm/justifi-payment-details.entry.js +26 -5
- package/dist/esm/justifi-payment-form.entry.js +18 -4
- package/dist/esm/{justifi-business-form-stepped.entry.js → justifi-payment-provisioning.entry.js} +20 -20
- package/dist/esm/justifi-payments-list.entry.js +26 -6
- package/dist/esm/justifi-payout-details.entry.js +28 -8
- package/dist/esm/justifi-payouts-list.entry.js +27 -7
- package/dist/esm/justifi-proceeds-list.entry.js +2 -1
- package/dist/esm/justifi-subaccount-details.entry.js +3 -2
- package/dist/esm/justifi-subaccounts-list.entry.js +3 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/payload-parsers-920f49dd.js +123 -0
- package/dist/esm/payment-details-core.entry.js +10 -3
- package/dist/esm/payments-list-core.entry.js +10 -3
- package/dist/esm/payout-details-core.entry.js +11 -5
- package/dist/esm/payouts-list-core.entry.js +10 -3
- package/dist/esm/subaccount-account-details_4.entry.js +2 -1
- package/dist/esm/utils-4609f32c.js +38 -0
- package/dist/esm/{utils-2828201a.js → utils-684d2e47.js} +7 -1
- package/dist/esm/{utils-243abdb4.js → utils-d9e90399.js} +7 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +56 -3
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +7 -4
- package/dist/module/business-additional-questions-schema.js +16 -7
- package/dist/module/business-address-schema.js +50 -14
- package/dist/module/business-core-info-form-step.js +3 -1
- package/dist/module/business-core-info-schema.js +24 -12
- package/dist/module/business-details-core2.js +8 -3
- package/dist/module/business-form-types.js +8 -1
- package/dist/module/business-identity-schema.js +30 -35
- package/dist/module/business-owners-form-step.js +13 -8
- package/dist/module/business-representative-form-step.js +11 -11
- package/dist/module/business-representative.js +4 -7
- package/dist/module/checkout-core.js +4 -4
- package/dist/module/form-control-datepart2.js +37 -33
- package/dist/module/form-control-monetary2.js +20 -18
- package/dist/module/form-control-number2.js +1 -0
- package/dist/module/form-control-select2.js +3 -1
- package/dist/module/form-control-text2.js +6 -1
- package/dist/module/gross-payment-chart-core2.js +8 -2
- package/dist/module/helpers.js +4 -0
- package/dist/module/{business-address-form.js → identity-address-form.js} +17 -20
- package/dist/module/justifi-business-details.js +21 -4
- package/dist/module/justifi-business-form.js +65 -56
- package/dist/module/justifi-gross-payment-chart.js +28 -4
- package/dist/module/justifi-identity-address-form.d.ts +11 -0
- package/dist/module/justifi-identity-address-form.js +6 -0
- package/dist/module/justifi-payment-balance-transactions.js +1 -1
- package/dist/module/justifi-payment-details.js +26 -5
- package/dist/module/justifi-payment-form.js +18 -4
- package/dist/module/justifi-payment-provisioning.d.ts +11 -0
- package/dist/module/{justifi-business-form-stepped.js → justifi-payment-provisioning.js} +32 -31
- package/dist/module/justifi-payments-list.js +26 -6
- package/dist/module/justifi-payout-details.js +28 -8
- package/dist/module/justifi-payouts-list.js +27 -7
- package/dist/module/justifi-subaccount-details.js +1 -1
- package/dist/module/justifi-subaccounts-list.js +1 -1
- package/dist/module/legal-address-form-step.js +10 -12
- package/dist/module/legal-address-form.js +5 -9
- package/dist/module/owner-form.js +23 -35
- package/dist/module/payment-details-core2.js +9 -3
- package/dist/module/payment-method-form.js +1 -1
- package/dist/module/payments-list-core2.js +9 -3
- package/dist/module/payout-details-core2.js +10 -5
- package/dist/module/payouts-list-core2.js +9 -3
- package/dist/module/subaccount-merchant-details2.js +1 -1
- package/dist/module/utils2.js +7 -1
- package/dist/module/utils3.js +31 -1
- package/dist/module/utils4.js +7 -1
- package/dist/types/api/Business.d.ts +10 -3
- package/dist/types/api/ComponentError.d.ts +18 -0
- package/dist/types/api/services/utils.d.ts +2 -0
- package/dist/types/api/shared.d.ts +9 -0
- package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +2 -2
- package/dist/types/components/business-details/business-details-core.d.ts +3 -0
- package/dist/types/components/business-details/business-details.d.ts +3 -0
- package/dist/types/components/business-forms/business-form/business-form.d.ts +4 -2
- package/dist/types/components/business-forms/owner-form/identity-address/identity-address-form.d.ts +10 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +5 -1
- package/dist/types/components/business-forms/{business-form-stepped → payment-provisioning}/additional-questions/business-additional-questions-form-step.d.ts +3 -1
- package/dist/types/components/business-forms/{business-form-stepped → payment-provisioning}/business-core-info/business-core-info-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/{business-form-stepped → payment-provisioning}/business-owners/business-owners-form-step.d.ts +3 -1
- package/dist/types/components/business-forms/{business-form-stepped → payment-provisioning}/business-representative/business-representative-form-step.d.ts +3 -1
- package/dist/types/components/business-forms/{business-form-stepped → payment-provisioning}/legal-address-form/legal-address-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/{business-form-stepped/business-form-stepped.d.ts → payment-provisioning/payment-provisioning.d.ts} +4 -3
- package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +1 -1
- package/dist/types/components/business-forms/schemas/business-address-schema.d.ts +1 -12
- package/dist/types/components/business-forms/schemas/business-core-info-schema.d.ts +1 -1
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +7 -3
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +5 -31
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +10 -0
- package/dist/types/components/business-forms/utils/helpers.d.ts +2 -0
- package/dist/types/components/form/form-control-datepart.d.ts +2 -1
- package/dist/types/components/form/form-control-monetary.d.ts +2 -1
- package/dist/types/components/form/form-control-text.d.ts +2 -0
- package/dist/types/components/form/utils.d.ts +1 -0
- package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +5 -8
- package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +3 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -0
- package/dist/types/components/payment-details/payment-details-core.d.ts +3 -0
- package/dist/types/components/payment-details/payment-details.d.ts +4 -0
- package/dist/types/components/payment-form/payment-form.d.ts +4 -1
- package/dist/types/components/payments-list/payments-list-core.d.ts +2 -0
- package/dist/types/components/payments-list/payments-list.d.ts +4 -0
- package/dist/types/components/payout-details/payout-details-core.d.ts +3 -0
- package/dist/types/components/payout-details/payout-details.d.ts +4 -0
- package/dist/types/components/payouts-list/payouts-list-core.d.ts +2 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +4 -0
- package/dist/types/components.d.ts +278 -104
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/p-091f9732.entry.js +1 -0
- package/dist/webcomponents/p-0b76c770.entry.js +1 -0
- package/dist/webcomponents/p-0d81883d.entry.js +1 -0
- package/dist/webcomponents/p-102b593a.entry.js +1 -0
- package/dist/webcomponents/p-221b9504.entry.js +1 -0
- package/dist/webcomponents/p-28cd23c8.entry.js +1 -0
- package/dist/webcomponents/p-2b8368d2.js +1 -0
- package/dist/webcomponents/p-2df32b4a.entry.js +1 -0
- package/dist/webcomponents/p-3d4aaa4a.entry.js +1 -0
- package/dist/webcomponents/p-436d27b9.entry.js +1 -0
- package/dist/webcomponents/p-448063ba.entry.js +1 -0
- package/dist/webcomponents/p-5341321d.entry.js +1 -0
- package/dist/webcomponents/{p-0399f02b.entry.js → p-5b262705.entry.js} +1 -1
- package/dist/webcomponents/p-5e503d7d.entry.js +1 -0
- package/dist/webcomponents/p-6047b960.entry.js +1 -0
- package/dist/webcomponents/p-60b2344a.js +1 -0
- package/dist/webcomponents/p-6d39b8bc.entry.js +1 -0
- package/dist/webcomponents/p-6f294d5d.js +1 -0
- package/dist/webcomponents/p-7294eb89.entry.js +1 -0
- package/dist/webcomponents/p-746bfba6.entry.js +1 -0
- package/dist/webcomponents/p-7c6a355f.entry.js +1 -0
- package/dist/webcomponents/p-817211f2.entry.js +1 -0
- package/dist/webcomponents/{p-65510838.js → p-8482c23f.js} +1 -1
- package/dist/webcomponents/p-935d6f55.js +1 -0
- package/dist/webcomponents/{p-e924f2e1.entry.js → p-959250e3.entry.js} +1 -1
- package/dist/webcomponents/p-a130a884.entry.js +1 -0
- package/dist/webcomponents/p-a4122c35.entry.js +1 -0
- package/dist/webcomponents/p-ac670a3e.js +1 -0
- package/dist/webcomponents/p-ae21ed6f.entry.js +19 -0
- package/dist/webcomponents/p-c071d8c1.entry.js +1 -0
- package/dist/webcomponents/p-c340b60f.js +1 -0
- package/dist/webcomponents/p-d5aab6b5.entry.js +1 -0
- package/dist/webcomponents/p-d5c80489.entry.js +1 -0
- package/dist/webcomponents/p-d776fe10.entry.js +1 -0
- package/dist/webcomponents/p-d8679fad.entry.js +1 -0
- package/dist/webcomponents/p-e84b3616.entry.js +1 -0
- package/dist/webcomponents/p-ea03b424.entry.js +1 -0
- package/dist/webcomponents/p-ea2cca2a.js +1 -0
- package/dist/webcomponents/p-ec230480.entry.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Identity-b6364aee.js +0 -27
- package/dist/cjs/business-additional-questions-schema-cbac27f2.js +0 -26
- package/dist/cjs/justifi-business-address-form-step.cjs.entry.js +0 -35
- package/dist/cjs/payload-parsers-25ed3936.js +0 -98
- package/dist/cjs/utils-f5d82f21.js +0 -10
- package/dist/collection/api/mockData/MockOnboardingData.js +0 -117
- package/dist/collection/api/mockData/MockPayments.js +0 -243
- package/dist/collection/api/mockData/MockSubAccount.js +0 -102
- package/dist/collection/api/mockData/mockGrossVolumeReport.js +0 -125
- package/dist/collection/components/business-forms/business-form/business-address/business-address-form.css +0 -2536
- package/dist/collection/components/business-forms/business-form/business-address/business-address-form.js +0 -97
- package/dist/collection/components/business-forms/business-form/business-address/test/business-address.e2e.js +0 -9
- package/dist/collection/components/business-forms/business-form-stepped/business-address/test/business-address-form-step.spec.js +0 -97
- package/dist/collection/components/business-forms/business-form-stepped/test/business-form-stepped.spec.js +0 -61
- package/dist/collection/components/business-forms/schemas/business-owners-schema.js +0 -16
- package/dist/collection/components/card-form/test/card-form.e2e.js +0 -13
- package/dist/esm/Identity-774788c0.js +0 -25
- package/dist/esm/business-additional-questions-schema-2cb80f70.js +0 -23
- package/dist/esm/justifi-business-address-form-step.entry.js +0 -31
- package/dist/esm/payload-parsers-1dd7474f.js +0 -90
- package/dist/esm/utils-546ca6aa.js +0 -8
- package/dist/module/justifi-business-address-form-step.d.ts +0 -11
- package/dist/module/justifi-business-address-form-step.js +0 -75
- package/dist/module/justifi-business-address-form.d.ts +0 -11
- package/dist/module/justifi-business-address-form.js +0 -6
- package/dist/module/justifi-business-form-stepped.d.ts +0 -11
- package/dist/types/api/mockData/MockOnboardingData.d.ts +0 -8
- package/dist/types/api/mockData/MockPayments.d.ts +0 -3
- package/dist/types/api/mockData/MockSubAccount.d.ts +0 -3
- package/dist/types/components/business-forms/business-form/business-address/business-address-form.d.ts +0 -9
- package/dist/types/components/business-forms/business-form-stepped/business-address/business-address-form-step.d.ts +0 -9
- package/dist/types/components/business-forms/schemas/business-owners-schema.d.ts +0 -33
- package/dist/webcomponents/p-04a98c63.js +0 -1
- package/dist/webcomponents/p-06888c2e.entry.js +0 -1
- package/dist/webcomponents/p-0811bc77.entry.js +0 -1
- package/dist/webcomponents/p-17d72f4a.js +0 -1
- package/dist/webcomponents/p-17f64853.entry.js +0 -1
- package/dist/webcomponents/p-22085999.entry.js +0 -1
- package/dist/webcomponents/p-252835df.entry.js +0 -1
- package/dist/webcomponents/p-28b38699.js +0 -1
- package/dist/webcomponents/p-374c44e6.entry.js +0 -1
- package/dist/webcomponents/p-4697ccfa.entry.js +0 -1
- package/dist/webcomponents/p-4781cd06.js +0 -1
- package/dist/webcomponents/p-4d806131.entry.js +0 -1
- package/dist/webcomponents/p-4e0b3206.entry.js +0 -1
- package/dist/webcomponents/p-583dd5a2.entry.js +0 -1
- package/dist/webcomponents/p-5be4e217.entry.js +0 -1
- package/dist/webcomponents/p-5da4fbe7.entry.js +0 -1
- package/dist/webcomponents/p-6103c20d.entry.js +0 -1
- package/dist/webcomponents/p-6ed680e9.js +0 -1
- package/dist/webcomponents/p-7654c70d.entry.js +0 -1
- package/dist/webcomponents/p-847441ce.entry.js +0 -1
- package/dist/webcomponents/p-861ba3fc.entry.js +0 -1
- package/dist/webcomponents/p-9207ccb2.entry.js +0 -1
- package/dist/webcomponents/p-9ce8d98c.entry.js +0 -1
- package/dist/webcomponents/p-9e4b81ad.entry.js +0 -1
- package/dist/webcomponents/p-a141c531.js +0 -1
- package/dist/webcomponents/p-a2dbe90f.entry.js +0 -1
- package/dist/webcomponents/p-a98eea84.entry.js +0 -1
- package/dist/webcomponents/p-b1bc23af.entry.js +0 -1
- package/dist/webcomponents/p-b27c9b0d.entry.js +0 -1
- package/dist/webcomponents/p-b8f22856.js +0 -1
- package/dist/webcomponents/p-c8d62072.entry.js +0 -1
- package/dist/webcomponents/p-e3748ea4.entry.js +0 -1
- package/dist/webcomponents/p-eef5ed19.entry.js +0 -1
- package/dist/webcomponents/p-efc7025c.entry.js +0 -1
- package/dist/webcomponents/p-f3453ca2.js +0 -1
- package/dist/webcomponents/p-f3ca6fda.entry.js +0 -1
- package/dist/webcomponents/p-fe2af0cf.entry.js +0 -19
- package/dist/webcomponents/p-fe8a94c1.entry.js +0 -1
- /package/dist/cjs/{state-options-96d05a98.js → state-options-4fbcb48a.js} +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped/business-address/business-address-form-step.css → owner-form/identity-address/identity-address-form.css} +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/additional-questions/test/business-additional-questions-form-step.spec.js +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-core-info/business-core-info-form-step.css +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-core-info/test/business-core-info-form-step.spec.js +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-owners/business-owners-form-step.css +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-owners/test/business-owners-form-step.spec.js +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-representative/business-representative-form-step.css +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/business-representative/test/business-representative-form-step.spec.js +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped → payment-provisioning}/legal-address-form/legal-address-form-step.css +0 -0
- /package/dist/collection/components/business-forms/{business-form-stepped/business-form-stepped.css → payment-provisioning/payment-provisioning.css} +0 -0
- /package/dist/collection/{components/billing-form → utils}/state-options.js +0 -0
- /package/dist/esm/{state-options-fc1daf67.js → state-options-a356fb11.js} +0 -0
- /package/dist/types/{api → home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil}/mockData/mockGrossVolumeReport.d.ts +0 -0
- /package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/{config.d.ts → packages/webcomponents/config.d.ts} +0 -0
- /package/dist/types/{components/billing-form → utils}/state-options.d.ts +0 -0
- /package/dist/webcomponents/{p-8e2a88a8.js → p-6078a370.js} +0 -0
|
@@ -6,15 +6,21 @@ import { BusinessFormClickActions } from "../utils/business-form-types";
|
|
|
6
6
|
* @exportedPart input: The input fields
|
|
7
7
|
* @exportedPart input-invalid: Invalid state for inputfs
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class PaymentProvisioning {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.refs = [];
|
|
12
12
|
this.componentStepMapping = {
|
|
13
|
-
0: () => h("justifi-business-core-info-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[0] = el, onFormLoading:
|
|
14
|
-
1: () => h("justifi-legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, onFormLoading:
|
|
15
|
-
2: () => h("justifi-additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, onFormLoading:
|
|
16
|
-
3: () => h("justifi-business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, onFormLoading:
|
|
17
|
-
4: () => h("justifi-business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, onFormLoading:
|
|
13
|
+
0: () => h("justifi-business-core-info-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[0] = el, onFormLoading: this.handleFormLoading, onServerError: this.handleServerErrors, allowOptionalFields: this.allowOptionalFields }),
|
|
14
|
+
1: () => h("justifi-legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, onFormLoading: this.handleFormLoading, onServerError: this.handleServerErrors, allowOptionalFields: this.allowOptionalFields }),
|
|
15
|
+
2: () => h("justifi-additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, onFormLoading: this.handleFormLoading, onServerError: this.handleServerErrors, allowOptionalFields: this.allowOptionalFields }),
|
|
16
|
+
3: () => h("justifi-business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, onFormLoading: this.handleFormLoading, onServerError: this.handleServerErrors, allowOptionalFields: this.allowOptionalFields }),
|
|
17
|
+
4: () => h("justifi-business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, onFormLoading: this.handleFormLoading, onServerError: this.handleServerErrors, allowOptionalFields: this.allowOptionalFields }),
|
|
18
|
+
};
|
|
19
|
+
this.handleFormLoading = (e) => {
|
|
20
|
+
this.formLoading = e.detail;
|
|
21
|
+
};
|
|
22
|
+
this.handleServerErrors = (e) => {
|
|
23
|
+
this.errorMessage = e.detail.message;
|
|
18
24
|
};
|
|
19
25
|
this.incrementSteps = () => {
|
|
20
26
|
if (this.currentStep < this.totalSteps) {
|
|
@@ -26,6 +32,7 @@ export class BusinessFormStepped {
|
|
|
26
32
|
this.businessId = undefined;
|
|
27
33
|
this.testMode = false;
|
|
28
34
|
this.hideErrors = false;
|
|
35
|
+
this.allowOptionalFields = false;
|
|
29
36
|
this.formLoading = false;
|
|
30
37
|
this.errorMessage = '';
|
|
31
38
|
this.currentStep = 0;
|
|
@@ -47,12 +54,6 @@ export class BusinessFormStepped {
|
|
|
47
54
|
this.refs = [this.coreInfoRef, this.legalAddressRef, this.additionalQuestionsRef, this.representativeRef, this.ownersRef];
|
|
48
55
|
this.totalSteps = Object.keys(this.componentStepMapping).length - 1;
|
|
49
56
|
}
|
|
50
|
-
handleFormLoading(e) {
|
|
51
|
-
this.formLoading = e.detail;
|
|
52
|
-
}
|
|
53
|
-
handleServerErrors(e) {
|
|
54
|
-
this.errorMessage = e.detail.message;
|
|
55
|
-
}
|
|
56
57
|
showPreviousStepButton() {
|
|
57
58
|
return this.currentStep > 0;
|
|
58
59
|
}
|
|
@@ -61,8 +62,7 @@ export class BusinessFormStepped {
|
|
|
61
62
|
}
|
|
62
63
|
previousStepButtonOnClick() {
|
|
63
64
|
this.clickEvent.emit({ name: BusinessFormClickActions.previousStep });
|
|
64
|
-
|
|
65
|
-
currentStep.validateAndSubmit({ onSuccess: this.decrementSteps });
|
|
65
|
+
this.decrementSteps();
|
|
66
66
|
}
|
|
67
67
|
nextStepButtonOnClick(e, clickEventName) {
|
|
68
68
|
e.preventDefault();
|
|
@@ -79,15 +79,15 @@ export class BusinessFormStepped {
|
|
|
79
79
|
render() {
|
|
80
80
|
return (h(Host, { exportparts: "label,input,input-invalid" }, h("h1", null, "Business Information"), this.showErrors && FormAlert(this.errorMessage), h("div", { class: "my-4" }, this.currentStepComponent()), h("div", { class: "d-flex justify-content-between align-items-center" }, h("div", { class: "d-flex align-items-center" }, "Step ", this.currentStep + 1, " of ", this.totalSteps + 1), h("div", { class: "d-flex gap-2" }, this.showPreviousStepButton() && (h("button", { type: "button", class: "btn btn-secondary", onClick: () => this.previousStepButtonOnClick(), disabled: this.formLoading }, "Previous")), this.showNextStepButton() && (h("button", { type: "button", class: `btn btn-primary jfi-submit-button${this.formLoading ? ' jfi-submit-button-loading' : ''}`, onClick: (e) => this.nextStepButtonOnClick(e, BusinessFormClickActions.nextStep), disabled: this.formLoading }, this.formLoading ? LoadingSpinner() : 'Next')), this.showSubmitButton() && (h("button", { type: "submit", class: `btn btn-primary jfi-submit-button${this.formLoading ? ' jfi-submit-button-loading' : ''}`, onClick: (e) => this.nextStepButtonOnClick(e, BusinessFormClickActions.submit), disabled: this.formLoading }, this.formLoading ? LoadingSpinner() : 'Submit'))))));
|
|
81
81
|
}
|
|
82
|
-
static get is() { return "justifi-
|
|
82
|
+
static get is() { return "justifi-payment-provisioning"; }
|
|
83
83
|
static get originalStyleUrls() {
|
|
84
84
|
return {
|
|
85
|
-
"$": ["
|
|
85
|
+
"$": ["payment-provisioning.scss"]
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
static get styleUrls() {
|
|
89
89
|
return {
|
|
90
|
-
"$": ["
|
|
90
|
+
"$": ["payment-provisioning.css"]
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
static get properties() {
|
|
@@ -161,6 +161,24 @@ export class BusinessFormStepped {
|
|
|
161
161
|
"attribute": "hide-errors",
|
|
162
162
|
"reflect": false,
|
|
163
163
|
"defaultValue": "false"
|
|
164
|
+
},
|
|
165
|
+
"allowOptionalFields": {
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "boolean",
|
|
170
|
+
"resolved": "boolean",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": true,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": ""
|
|
178
|
+
},
|
|
179
|
+
"attribute": "allow-optional-fields",
|
|
180
|
+
"reflect": false,
|
|
181
|
+
"defaultValue": "false"
|
|
164
182
|
}
|
|
165
183
|
};
|
|
166
184
|
}
|
|
@@ -175,7 +193,7 @@ export class BusinessFormStepped {
|
|
|
175
193
|
static get events() {
|
|
176
194
|
return [{
|
|
177
195
|
"method": "clickEvent",
|
|
178
|
-
"name": "
|
|
196
|
+
"name": "click-event",
|
|
179
197
|
"bubbles": true,
|
|
180
198
|
"cancelable": true,
|
|
181
199
|
"composed": true,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { PaymentProvisioning } from "../payment-provisioning";
|
|
3
|
+
describe.skip('justifi-payment-provisioning', () => {
|
|
4
|
+
let consoleSpy;
|
|
5
|
+
// Initialize the spy in the beforeEach
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => { });
|
|
8
|
+
});
|
|
9
|
+
// Restore the original function in the afterEach
|
|
10
|
+
afterEach(() => {
|
|
11
|
+
consoleSpy.mockRestore();
|
|
12
|
+
});
|
|
13
|
+
it('should log a warning if no authToken is provided', async () => {
|
|
14
|
+
await newSpecPage({
|
|
15
|
+
components: [PaymentProvisioning],
|
|
16
|
+
html: `<justifi-payment-provisioning></justifi-payment-provisioning>`,
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
it('should log a warning if no businessId is provided', async () => {
|
|
20
|
+
await newSpecPage({
|
|
21
|
+
components: [PaymentProvisioning],
|
|
22
|
+
html: `<justifi-payment-provisioning></justifi-payment-provisioning>`,
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
it('should emit server error event if server error when fetching data', async () => {
|
|
26
|
+
await newSpecPage({
|
|
27
|
+
components: [PaymentProvisioning],
|
|
28
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
it('should emit server error event if server error when patching data', async () => {
|
|
32
|
+
await newSpecPage({
|
|
33
|
+
components: [PaymentProvisioning],
|
|
34
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
it('should render', async () => {
|
|
38
|
+
await newSpecPage({
|
|
39
|
+
components: [PaymentProvisioning],
|
|
40
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
it('should call onSuccess when a step is successfully completed', async () => {
|
|
44
|
+
await newSpecPage({
|
|
45
|
+
components: [PaymentProvisioning],
|
|
46
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
it('should emit clickEvent when a button is clicked', async () => {
|
|
50
|
+
await newSpecPage({
|
|
51
|
+
components: [PaymentProvisioning],
|
|
52
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
it('should emit submitted event when a step is completed', async () => {
|
|
56
|
+
await newSpecPage({
|
|
57
|
+
components: [PaymentProvisioning],
|
|
58
|
+
html: `<justifi-payment-provisioning business-id="biz_123" auth-token="some-token"></justifi-payment-provisioning>`,
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { object, string } from "yup";
|
|
2
|
-
export const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export const additionalQuestionsSchema = (allowOptionalFields) => {
|
|
3
|
+
const schema = object({
|
|
4
|
+
business_revenue: string().required('Enter business revenue'),
|
|
5
|
+
business_payment_volume: string().required('Enter business payment volume'),
|
|
6
|
+
business_dispute_volume: string().required('Enter business dispute volume'),
|
|
7
|
+
business_receivable_volume: string().required('Enter business receivable volume'),
|
|
8
|
+
});
|
|
9
|
+
const easySchema = object({
|
|
10
|
+
business_revenue: string().nullable(),
|
|
11
|
+
business_payment_volume: string().nullable(),
|
|
12
|
+
business_dispute_volume: string().nullable(),
|
|
13
|
+
business_receivable_volume: string().nullable()
|
|
14
|
+
});
|
|
15
|
+
return allowOptionalFields ? easySchema : schema;
|
|
16
|
+
};
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
import { object, string } from "yup";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
export const identityAddressSchema = object({
|
|
11
|
-
line1: string().required('Enter street address'),
|
|
12
|
-
city: string().required('Enter city'),
|
|
13
|
-
state: string().required('Select state'),
|
|
14
|
-
postal_code: string().required('Enter postal code'),
|
|
2
|
+
import StateOptions from "../../../utils/state-options";
|
|
3
|
+
const lineOneValidation = string()
|
|
4
|
+
.min(5, 'Address must be at least 5 characters')
|
|
5
|
+
.max(100, 'Address must be less than 100 characters')
|
|
6
|
+
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Invalid characters in address')
|
|
7
|
+
.transform((value) => {
|
|
8
|
+
return value === '' ? null : value;
|
|
15
9
|
});
|
|
10
|
+
const lineTwoValidation = string()
|
|
11
|
+
.max(100, 'Address must be less than 100 characters')
|
|
12
|
+
.matches(/^(?!^\s+$)[a-zA-Z0-9\s,.'-]*$/, 'Invalid characters in address')
|
|
13
|
+
.transform((value) => {
|
|
14
|
+
return value === '' ? null : value;
|
|
15
|
+
});
|
|
16
|
+
const cityValidation = string()
|
|
17
|
+
.min(2, 'City must be at least 2 characters')
|
|
18
|
+
.max(50, 'City must be less than 50 characters')
|
|
19
|
+
.matches(/^(?!^\s+$)[a-zA-Z\s]*$/, 'Invalid characters in city')
|
|
20
|
+
.transform((value) => {
|
|
21
|
+
return value === '' ? null : value;
|
|
22
|
+
});
|
|
23
|
+
const stateValidation = string()
|
|
24
|
+
.oneOf(StateOptions.map((option) => option.value), 'Select state')
|
|
25
|
+
.transform((value) => {
|
|
26
|
+
return value === '' ? null : value;
|
|
27
|
+
});
|
|
28
|
+
const postalValidation = string()
|
|
29
|
+
.matches(/^[0-9]{5}$/, 'Enter valid postal code')
|
|
30
|
+
.transform((value) => {
|
|
31
|
+
return value === '' ? null : value;
|
|
32
|
+
});
|
|
33
|
+
export const addressSchema = (allowOptionalFields) => {
|
|
34
|
+
const schema = object({
|
|
35
|
+
line1: lineOneValidation.required('Enter street address'),
|
|
36
|
+
line2: lineTwoValidation.nullable(),
|
|
37
|
+
city: cityValidation.required('Enter city'),
|
|
38
|
+
state: stateValidation.required('Select state'),
|
|
39
|
+
postal_code: postalValidation.required('Enter postal code'),
|
|
40
|
+
country: string().required('Select country')
|
|
41
|
+
});
|
|
42
|
+
const easySchema = object({
|
|
43
|
+
line1: lineOneValidation.nullable(),
|
|
44
|
+
line2: lineTwoValidation.nullable(),
|
|
45
|
+
city: cityValidation.nullable(),
|
|
46
|
+
state: stateValidation.nullable(),
|
|
47
|
+
postal_code: postalValidation.nullable(),
|
|
48
|
+
country: string().required('Select country')
|
|
49
|
+
});
|
|
50
|
+
return allowOptionalFields ? easySchema : schema;
|
|
51
|
+
};
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { object, string } from "yup";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.
|
|
6
|
-
.required('Enter website url'),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
2
|
+
import { phoneRegex, urlRegex } from "../utils/helpers";
|
|
3
|
+
export const businessCoreInfoSchema = (allowOptionalFields) => {
|
|
4
|
+
const schema = object({
|
|
5
|
+
legal_name: string().required('Enter legal name'),
|
|
6
|
+
website_url: string().matches(urlRegex, 'Enter valid website url').required('Enter website url'),
|
|
7
|
+
email: string().email('Enter valid email').required('Enter email'),
|
|
8
|
+
phone: string().matches(phoneRegex, 'Enter valid phone number').required('Enter phone number'),
|
|
9
|
+
doing_business_as: string().required('Enter doing business as'),
|
|
10
|
+
business_type: string().required('Select business type'),
|
|
11
|
+
business_structure: string().required('Select business structure'),
|
|
12
|
+
industry: string().required('Enter a business industry'),
|
|
13
|
+
});
|
|
14
|
+
const easySchema = object({
|
|
15
|
+
legal_name: string().required('Enter legal name'),
|
|
16
|
+
website_url: string().matches(urlRegex, 'Enter valid website url').nullable(),
|
|
17
|
+
email: string().email('Enter valid email').nullable(),
|
|
18
|
+
phone: string().matches(phoneRegex, 'Enter valid phone number').nullable(),
|
|
19
|
+
doing_business_as: string().nullable(),
|
|
20
|
+
business_type: string().nullable(),
|
|
21
|
+
business_structure: string().nullable(),
|
|
22
|
+
industry: string().nullable(),
|
|
23
|
+
});
|
|
24
|
+
return allowOptionalFields ? easySchema : schema;
|
|
25
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { object } from "yup";
|
|
2
2
|
import { businessCoreInfoSchema } from "./business-core-info-schema";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export const businessFormSchema = object(Object.assign(Object.assign({}, businessCoreInfoSchema.fields), { legal_address:
|
|
3
|
+
import { additionalQuestionsSchema } from "./business-additional-questions-schema";
|
|
4
|
+
import { identitySchema } from "./business-identity-schema";
|
|
5
|
+
import { addressSchema } from "./business-address-schema";
|
|
6
|
+
export const businessFormSchema = object(Object.assign(Object.assign({}, businessCoreInfoSchema().fields), { legal_address: addressSchema(), additional_questions: additionalQuestionsSchema(), representative: identitySchema('Representative') }));
|
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
import { object, string } from "yup";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dob_month: string().required('Enter owner birth month'),
|
|
32
|
-
dob_year: string().required('Enter owner birth year'),
|
|
33
|
-
identification_number: string(),
|
|
34
|
-
address: identityAddressSchema,
|
|
35
|
-
});
|
|
2
|
+
import { addressSchema } from "./business-address-schema";
|
|
3
|
+
import { phoneRegex } from "../utils/helpers";
|
|
4
|
+
export const identitySchema = (title, allowOptionalFields) => {
|
|
5
|
+
const schema = object({
|
|
6
|
+
name: string().required(`Enter ${title} name`),
|
|
7
|
+
email: string()
|
|
8
|
+
.email(`Enter valid ${title} email`)
|
|
9
|
+
.required(`Enter ${title} email`),
|
|
10
|
+
phone: string().matches(phoneRegex, 'Enter valid phone number').required('Enter phone number'),
|
|
11
|
+
dob_day: string().required(`Enter ${title} birth day`),
|
|
12
|
+
dob_month: string().required(`Enter ${title} birth month`),
|
|
13
|
+
dob_year: string().required(`Enter ${title} birth year`),
|
|
14
|
+
identification_number: string(),
|
|
15
|
+
address: addressSchema(allowOptionalFields),
|
|
16
|
+
});
|
|
17
|
+
const easySchema = object({
|
|
18
|
+
name: string().required(`Enter ${title} name`),
|
|
19
|
+
email: string()
|
|
20
|
+
.email(`Enter valid ${title} email`)
|
|
21
|
+
.nullable(),
|
|
22
|
+
phone: string().matches(phoneRegex, 'Enter valid phone number').nullable(),
|
|
23
|
+
dob_day: string().nullable(),
|
|
24
|
+
dob_month: string().nullable(),
|
|
25
|
+
dob_year: string().nullable(),
|
|
26
|
+
identification_number: string().nullable(),
|
|
27
|
+
address: addressSchema(allowOptionalFields),
|
|
28
|
+
});
|
|
29
|
+
return allowOptionalFields ? easySchema : schema;
|
|
30
|
+
};
|
|
@@ -15,3 +15,10 @@ export var OwnerFormServerErrors;
|
|
|
15
15
|
OwnerFormServerErrors["patchData"] = "Error updating owner data";
|
|
16
16
|
OwnerFormServerErrors["postData"] = "Error adding owner data";
|
|
17
17
|
})(OwnerFormServerErrors || (OwnerFormServerErrors = {}));
|
|
18
|
+
export var OwnerFormClickActions;
|
|
19
|
+
(function (OwnerFormClickActions) {
|
|
20
|
+
OwnerFormClickActions["removeOwner"] = "removeOwner";
|
|
21
|
+
OwnerFormClickActions["addOwner"] = "addOwner";
|
|
22
|
+
OwnerFormClickActions["addOwnerForm"] = "addOwnerForm";
|
|
23
|
+
OwnerFormClickActions["updateOwner"] = "updateOwner";
|
|
24
|
+
})(OwnerFormClickActions || (OwnerFormClickActions = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { extractComputedFontsToLoad } from "../../utils/utils";
|
|
2
|
+
import { extractComputedFontsToLoad, formatCurrency } from "../../utils/utils";
|
|
3
3
|
import { config } from "../../../config";
|
|
4
4
|
export class CheckoutCore {
|
|
5
5
|
constructor() {
|
|
@@ -11,7 +11,7 @@ export class CheckoutCore {
|
|
|
11
11
|
this.checkoutId = undefined;
|
|
12
12
|
this.hasLoadedFonts = false;
|
|
13
13
|
this.isLoading = false;
|
|
14
|
-
this.checkout =
|
|
14
|
+
this.checkout = undefined;
|
|
15
15
|
this.serverError = false;
|
|
16
16
|
this.errorMessage = '';
|
|
17
17
|
this.creatingNewPaymentMethod = false;
|
|
@@ -78,8 +78,8 @@ export class CheckoutCore {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
return (h(Host, null, h("div", { class: "row gy-3" }, h("div", { class: "col-12 mb-4" }, h("h2", { class: "fs-5 fw-bold" }, "Summary"), h("div", null, "
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
82
|
+
return (h(Host, null, h("div", { class: "row gy-3" }, h("div", { class: "col-12 mb-4" }, h("h2", { class: "fs-5 fw-bold" }, "Summary"), this.checkout && (h("div", null, h("div", null, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", null, "Total ", formatCurrency(+this.checkout.payment_amount))))), h("div", { class: "col-12" }, h("h2", { class: "fs-5 fw-bold border-bottom pb-3" }, "Payment"), h("h3", { class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { class: "d-flex flex-column" }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": ((_c = (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.payment_settings) === null || _c === void 0 ? void 0 : _c.credit_card_payments) || true, "show-ach": ((_e = (_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_settings) === null || _e === void 0 ? void 0 : _e.ach_payments) || true, "client-id": (_f = this.checkout) === null || _f === void 0 ? void 0 : _f.payment_client_id, "account-id": (_g = this.checkout) === null || _g === void 0 ? void 0 : _g.account_id, savedPaymentMethods: (_h = this.checkout) === null || _h === void 0 ? void 0 : _h.payment_methods }))), h("div", { class: "col-12" }, h("div", { class: "d-flex justify-content-end" }, h("button", { type: "submit", onClick: event => this.submit(event), disabled: this.isLoading, class: `btn btn-primary jfi-submit-button ${this.isLoading ? 'jfi-submit-button-loading' : ''}` }, this.isLoading ? this.loadingSpinner : 'Pay'))))));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "justifi-checkout-core"; }
|
|
85
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ export class DatePartInput {
|
|
|
7
7
|
this.name = undefined;
|
|
8
8
|
this.error = undefined;
|
|
9
9
|
this.defaultValue = undefined;
|
|
10
|
-
this.type =
|
|
10
|
+
this.type = 'day';
|
|
11
11
|
this.inputHandler = undefined;
|
|
12
12
|
this.disabled = undefined;
|
|
13
13
|
}
|
|
@@ -15,45 +15,49 @@ export class DatePartInput {
|
|
|
15
15
|
this.updateInput(newValue);
|
|
16
16
|
}
|
|
17
17
|
componentDidLoad() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
maskOptions = {
|
|
29
|
-
mask: Number,
|
|
30
|
-
min: 1900,
|
|
31
|
-
max: new Date().getFullYear(),
|
|
32
|
-
};
|
|
33
|
-
break;
|
|
34
|
-
default:
|
|
35
|
-
throw new Error('Invalid type prop');
|
|
36
|
-
}
|
|
37
|
-
this.imask = IMask(this.textInput, maskOptions);
|
|
38
|
-
this.imask.on('accept', () => {
|
|
39
|
-
const rawValue = this.imask.unmaskedValue;
|
|
40
|
-
this.inputHandler(this.name, rawValue);
|
|
41
|
-
});
|
|
42
|
-
this.textInput.addEventListener('blur', () => {
|
|
43
|
-
this.formControlBlur.emit();
|
|
44
|
-
});
|
|
45
|
-
this.updateInput(this.defaultValue);
|
|
18
|
+
this.initializeMask();
|
|
19
|
+
this.updateInput(this.defaultValue);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
var _a;
|
|
23
|
+
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
24
|
+
}
|
|
25
|
+
initializeMask() {
|
|
26
|
+
if (!this.textInput) {
|
|
27
|
+
return;
|
|
46
28
|
}
|
|
29
|
+
let maskOptions;
|
|
30
|
+
switch (this.type) {
|
|
31
|
+
default:
|
|
32
|
+
case 'day':
|
|
33
|
+
maskOptions = { mask: Number, min: 1, max: 31 };
|
|
34
|
+
break;
|
|
35
|
+
case 'month':
|
|
36
|
+
maskOptions = { mask: Number, min: 1, max: 12 };
|
|
37
|
+
break;
|
|
38
|
+
case 'year':
|
|
39
|
+
maskOptions = {
|
|
40
|
+
mask: Number,
|
|
41
|
+
min: 1900,
|
|
42
|
+
max: new Date().getFullYear(),
|
|
43
|
+
};
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
this.imask = IMask(this.textInput, maskOptions);
|
|
47
|
+
this.imask.on('accept', () => {
|
|
48
|
+
const rawValue = this.imask.unmaskedValue;
|
|
49
|
+
this.inputHandler(this.name, rawValue);
|
|
50
|
+
this.formControlInput.emit({ name: this.name, value: rawValue });
|
|
51
|
+
});
|
|
52
|
+
this.textInput.addEventListener('blur', () => {
|
|
53
|
+
this.formControlBlur.emit();
|
|
54
|
+
});
|
|
47
55
|
}
|
|
48
56
|
updateInput(newValue) {
|
|
49
57
|
if (this.imask) {
|
|
50
58
|
this.imask.value = String(newValue);
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
|
-
disconnectedCallback() {
|
|
54
|
-
var _a;
|
|
55
|
-
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
56
|
-
}
|
|
57
61
|
render() {
|
|
58
62
|
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
59
63
|
}
|
|
@@ -154,7 +158,8 @@ export class DatePartInput {
|
|
|
154
158
|
"text": ""
|
|
155
159
|
},
|
|
156
160
|
"attribute": "type",
|
|
157
|
-
"reflect": false
|
|
161
|
+
"reflect": false,
|
|
162
|
+
"defaultValue": "'day'"
|
|
158
163
|
},
|
|
159
164
|
"inputHandler": {
|
|
160
165
|
"type": "unknown",
|
|
@@ -13,29 +13,31 @@ export class MonetaryInput {
|
|
|
13
13
|
this.updateInput(newValue);
|
|
14
14
|
}
|
|
15
15
|
componentDidLoad() {
|
|
16
|
-
|
|
17
|
-
this.imask = IMask(this.textInput, {
|
|
18
|
-
mask: Number,
|
|
19
|
-
scale: 2,
|
|
20
|
-
thousandsSeparator: ',',
|
|
21
|
-
padFractionalZeros: true,
|
|
22
|
-
normalizeZeros: true,
|
|
23
|
-
radix: '.',
|
|
24
|
-
});
|
|
25
|
-
this.imask.on('accept', () => {
|
|
26
|
-
const rawValue = this.imask.unmaskedValue;
|
|
27
|
-
this.inputHandler(this.name, rawValue);
|
|
28
|
-
});
|
|
29
|
-
this.textInput.addEventListener('blur', () => {
|
|
30
|
-
this.formControlBlur.emit();
|
|
31
|
-
});
|
|
32
|
-
}
|
|
16
|
+
this.initializeIMask();
|
|
33
17
|
this.updateInput(this.defaultValue);
|
|
34
18
|
}
|
|
35
19
|
disconnectedCallback() {
|
|
36
20
|
var _a;
|
|
37
21
|
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
38
22
|
}
|
|
23
|
+
initializeIMask() {
|
|
24
|
+
if (!this.textInput)
|
|
25
|
+
return;
|
|
26
|
+
this.imask = IMask(this.textInput, {
|
|
27
|
+
mask: Number,
|
|
28
|
+
scale: 2,
|
|
29
|
+
thousandsSeparator: ',',
|
|
30
|
+
padFractionalZeros: true,
|
|
31
|
+
normalizeZeros: true,
|
|
32
|
+
radix: '.',
|
|
33
|
+
});
|
|
34
|
+
this.imask.on('accept', () => {
|
|
35
|
+
const rawValue = this.imask.unmaskedValue;
|
|
36
|
+
this.inputHandler(this.name, rawValue);
|
|
37
|
+
this.formControlInput.emit({ name: this.name, value: rawValue });
|
|
38
|
+
});
|
|
39
|
+
this.textInput.addEventListener('blur', () => this.formControlBlur.emit());
|
|
40
|
+
}
|
|
39
41
|
updateInput(newValue) {
|
|
40
42
|
if (this.imask) {
|
|
41
43
|
this.imask.value = String(newValue);
|
|
@@ -76,11 +78,11 @@ export class MonetaryInput {
|
|
|
76
78
|
"reflect": false
|
|
77
79
|
},
|
|
78
80
|
"name": {
|
|
79
|
-
"type": "
|
|
81
|
+
"type": "string",
|
|
80
82
|
"mutable": false,
|
|
81
83
|
"complexType": {
|
|
82
|
-
"original": "
|
|
83
|
-
"resolved": "
|
|
84
|
+
"original": "string",
|
|
85
|
+
"resolved": "string",
|
|
84
86
|
"references": {}
|
|
85
87
|
},
|
|
86
88
|
"required": false,
|
|
@@ -22,6 +22,7 @@ export class NumberInput {
|
|
|
22
22
|
const target = event.target;
|
|
23
23
|
const name = target.getAttribute('name');
|
|
24
24
|
this.inputHandler(name, target.value);
|
|
25
|
+
this.formControlInput.emit({ name, value: target.value });
|
|
25
26
|
}
|
|
26
27
|
componentDidLoad() {
|
|
27
28
|
this.updateInput(this.defaultValue);
|
|
@@ -19,12 +19,14 @@ export class SelectInput {
|
|
|
19
19
|
const target = event.target;
|
|
20
20
|
const name = target.getAttribute('name');
|
|
21
21
|
this.inputHandler(name, target.value);
|
|
22
|
+
this.formControlInput.emit(target.value);
|
|
22
23
|
}
|
|
23
24
|
componentDidLoad() {
|
|
24
25
|
this.updateInput(this.defaultValue);
|
|
25
26
|
}
|
|
26
27
|
render() {
|
|
27
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { ref: el => (this.selectElement = el), id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), onBlur: () => this.formControlBlur.emit(), part: `input ${this.error ? 'input-invalid' : ''}`, class: this.error ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
28
30
|
}
|
|
29
31
|
static get is() { return "form-control-select"; }
|
|
30
32
|
static get encapsulation() { return "shadow"; }
|