@justifi/webcomponents 4.10.0 → 4.12.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-f8e37adb.js +144 -0
- package/dist/cjs/{Payment-89a8bc21.js → Payment-eceed10f.js} +1 -0
- package/dist/cjs/{SubAccount-05867651.js → SubAccount-b3902202.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +5 -6
- package/dist/cjs/business-additional-questions-schema-bdfd29c3.js +78 -0
- package/dist/cjs/business-details-core.cjs.entry.js +9 -4
- package/dist/cjs/{business-form-types-3cdd5447.js → business-form-types-61b8196a.js} +33 -0
- package/dist/cjs/{form-control-datepart_3.cjs.entry.js → form-control-date_4.cjs.entry.js} +70 -56
- package/dist/cjs/form-control-datepart.cjs.entry.js +80 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/{form-control-number_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +4 -46
- package/dist/cjs/{form-input-masks-e3bf2614.js → form-input-masks-baa06faf.js} +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +10 -5
- package/dist/cjs/{index-69b9386b.js → index-5d5f2219.js} +3 -0
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +38 -26
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +20 -21
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-details.cjs.entry.js +23 -7
- package/dist/cjs/justifi-business-form.cjs.entry.js +71 -54
- package/dist/cjs/justifi-business-list.cjs.entry.js +4 -6
- package/dist/cjs/justifi-business-owners.cjs.entry.js +2 -2
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +34 -24
- package/dist/cjs/justifi-checkout.cjs.entry.js +15 -11
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +30 -6
- package/dist/cjs/{justifi-new-payment-method_3.cjs.entry.js → justifi-new-payment-method_4.cjs.entry.js} +95 -11
- package/dist/cjs/justifi-owner-form.cjs.entry.js +42 -20
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +29 -8
- package/dist/cjs/justifi-payment-form.cjs.entry.js +19 -7
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +25 -18
- package/dist/cjs/justifi-payments-list.cjs.entry.js +29 -9
- package/dist/cjs/justifi-payout-details.cjs.entry.js +31 -11
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +30 -10
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +5 -6
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +4 -5
- package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/payload-parsers-32c43c76.js +144 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +10 -5
- package/dist/cjs/{payment.service-0b0086dc.js → payment.service-9db24ab9.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +11 -6
- package/dist/cjs/payout-details-core.cjs.entry.js +11 -7
- package/dist/cjs/{payout.service-5cc3b4e9.js → payout.service-a0efb71a.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +11 -6
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +5 -6
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +2 -2
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +2 -2
- package/dist/cjs/{utils-23e70ef2.js → utils-6e35fa70.js} +1 -1
- package/dist/cjs/{utils-2b9940e1.js → utils-6f62f7a1.js} +0 -7
- package/dist/cjs/utils-f8079741.js +41 -0
- package/dist/cjs/{utils-df5167a8.js → utils-fc72268d.js} +8 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Business.js +3 -20
- package/dist/collection/api/Checkout.js +6 -1
- package/dist/collection/api/ComponentError.js +14 -0
- package/dist/collection/api/Identity.js +7 -4
- package/dist/collection/api/Payment.js +1 -0
- package/dist/collection/api/services/checkout.service.js +7 -3
- package/dist/collection/api/services/utils.js +11 -0
- package/dist/collection/api/shared.js +11 -1
- package/dist/collection/collection-manifest.json +3 -2
- 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/generic-info-details.js +2 -2
- 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-core-info/business-core-info.js +2 -2
- package/dist/collection/components/business-forms/business-form/business-form.js +124 -50
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +12 -12
- 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/business-address/business-address-form.js → owner-form/identity-address/identity-address-form.js} +13 -10
- 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 +75 -13
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +20 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +21 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +44 -4
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +31 -6
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +23 -4
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +74 -15
- 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 +40 -14
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +55 -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 +40 -34
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +8 -0
- package/dist/collection/components/business-forms/utils/business-form-types.js +30 -0
- package/dist/collection/components/business-forms/utils/helpers.js +22 -0
- package/dist/collection/components/business-forms/utils/payload-parsers.js +1 -0
- package/dist/collection/components/business-list/business-list.js +0 -2
- package/dist/collection/components/checkout/checkout-actions.js +2 -2
- package/dist/collection/components/checkout/checkout-core.css +361 -0
- package/dist/collection/components/checkout/checkout-core.js +32 -27
- package/dist/collection/components/checkout/checkout.js +5 -5
- package/dist/collection/components/checkout/new-payment-method.js +12 -6
- package/dist/collection/components/checkout/payment-method-options.css +18 -2
- package/dist/collection/components/checkout/payment-method-options.js +62 -5
- package/dist/collection/components/checkout/payment-method-payload.js +1 -0
- package/dist/collection/components/checkout/saved-payment-method.js +11 -6
- package/dist/collection/components/checkout/sezzel-payment-method.js +247 -0
- package/dist/collection/components/form/form-control-date.css +1803 -0
- package/dist/collection/components/form/form-control-date.js +192 -0
- package/dist/collection/components/form/form-control-text.js +35 -1
- 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/payment-method-selector.js +1 -1
- package/dist/collection/components/payment-form/test/payment-form.spec.js +60 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -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/components/select-input/select-input.js +1 -1
- package/dist/collection/components/select-input/test/select-input.spec.js +4 -4
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +3 -3
- package/dist/collection/components/text-input/test/text-input.spec.js +4 -4
- package/dist/collection/components/text-input/text-input.js +1 -1
- package/dist/collection/utils/form-input-masks.js +1 -1
- package/dist/collection/utils/utils.js +0 -5
- package/dist/docs.json +1583 -607
- package/dist/esm/Business-2410f7e3.js +136 -0
- package/dist/esm/{Payment-55886c86.js → Payment-ef9fc1ae.js} +1 -0
- package/dist/esm/{SubAccount-61ac70eb.js → SubAccount-f4ae9809.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +5 -6
- package/dist/esm/business-additional-questions-schema-5571d40f.js +75 -0
- package/dist/esm/business-details-core.entry.js +9 -4
- package/dist/esm/business-form-types-46ecd908.js +50 -0
- package/dist/esm/{form-control-datepart_3.entry.js → form-control-date_4.entry.js} +68 -55
- package/dist/esm/form-control-datepart.entry.js +76 -0
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/{form-control-number_3.entry.js → form-control-select_2.entry.js} +5 -46
- package/dist/esm/{form-input-masks-a8187c77.js → form-input-masks-850c8cd4.js} +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +10 -5
- package/dist/esm/{index-df86d9a2.js → index-83dcf934.js} +3 -0
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +36 -24
- package/dist/esm/justifi-additional-questions_4.entry.js +20 -21
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_4.entry.js +5 -5
- package/dist/esm/justifi-business-details.entry.js +23 -7
- package/dist/esm/justifi-business-form.entry.js +71 -54
- package/dist/esm/justifi-business-list.entry.js +4 -6
- package/dist/esm/justifi-business-owners.entry.js +2 -2
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +34 -24
- package/dist/esm/justifi-checkout.entry.js +15 -11
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +29 -5
- package/dist/esm/{justifi-new-payment-method_3.entry.js → justifi-new-payment-method_4.entry.js} +95 -12
- package/dist/esm/justifi-owner-form.entry.js +42 -20
- package/dist/esm/justifi-payment-balance-transactions.entry.js +3 -4
- package/dist/esm/justifi-payment-details.entry.js +29 -8
- package/dist/esm/justifi-payment-form.entry.js +19 -7
- package/dist/esm/justifi-payment-method-selector.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +25 -18
- package/dist/esm/justifi-payments-list.entry.js +29 -9
- package/dist/esm/justifi-payout-details.entry.js +31 -11
- package/dist/esm/justifi-payouts-list.entry.js +30 -10
- package/dist/esm/justifi-proceeds-list.entry.js +3 -4
- package/dist/esm/justifi-refund-form.entry.js +2 -2
- package/dist/esm/justifi-subaccount-details.entry.js +5 -6
- package/dist/esm/justifi-subaccounts-list.entry.js +4 -5
- package/dist/esm/justifi-table_2.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/payload-parsers-192e0c3e.js +131 -0
- package/dist/esm/payment-details-core.entry.js +10 -5
- package/dist/esm/{payment.service-f274ef98.js → payment.service-ec28a959.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +11 -6
- package/dist/esm/payout-details-core.entry.js +11 -7
- package/dist/esm/{payout.service-af293f61.js → payout.service-5fd5986c.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +11 -6
- package/dist/esm/subaccount-account-details_4.entry.js +5 -6
- package/dist/esm/subaccount-bank-details.entry.js +2 -2
- package/dist/esm/subaccount-terms-details.entry.js +2 -2
- package/dist/esm/{utils-d01c5f3a.js → utils-210fdf39.js} +1 -1
- package/dist/esm/{utils-d9e90399.js → utils-243abdb4.js} +1 -7
- package/dist/esm/utils-4609f32c.js +38 -0
- package/dist/esm/{utils-2828201a.js → utils-6f05d9d7.js} +8 -2
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/Business.js +48 -21
- package/dist/module/Payment.js +1 -0
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/business-additional-questions-form-step.js +4 -2
- package/dist/module/business-additional-questions-schema.js +16 -7
- package/dist/module/business-address-schema.js +42 -16
- package/dist/module/business-core-info-form-step.js +5 -4
- package/dist/module/business-core-info-schema.js +56 -13
- package/dist/module/business-core-info.js +2 -2
- package/dist/module/business-details-core2.js +8 -3
- package/dist/module/business-form-types.js +32 -1
- package/dist/module/business-identity-schema.js +41 -35
- package/dist/module/business-owners-form-step.js +14 -10
- package/dist/module/business-representative-form-step.js +22 -13
- package/dist/module/business-representative.js +17 -17
- package/dist/module/checkout-core.js +50 -33
- package/dist/module/form-control-date.d.ts +11 -0
- package/dist/module/form-control-date.js +6 -0
- package/dist/module/form-control-date2.js +68 -0
- package/dist/module/form-control-text2.js +5 -1
- package/dist/module/form-input-masks.js +1 -1
- package/dist/module/generic-info-details2.js +2 -2
- package/dist/module/gross-payment-chart-core2.js +8 -2
- package/dist/module/helpers.js +25 -0
- package/dist/module/{business-address-form.js → identity-address-form.js} +17 -20
- package/dist/module/justifi-business-details.js +22 -5
- package/dist/module/justifi-business-form.js +81 -61
- package/dist/module/justifi-business-list.js +1 -3
- package/dist/module/justifi-checkout.js +31 -21
- 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.js +35 -27
- 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-sezzel-payment-method.d.ts +11 -0
- package/dist/module/justifi-sezzel-payment-method.js +6 -0
- 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 -13
- package/dist/module/legal-address-form.js +5 -9
- package/dist/module/new-payment-method.js +5 -4
- package/dist/module/owner-form.js +46 -20
- package/dist/module/payload-parsers.js +11 -1
- package/dist/module/payment-details-core2.js +9 -3
- package/dist/module/payment-method-form.js +1 -1
- package/dist/module/payment-method-options.js +34 -12
- 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/saved-payment-method.js +4 -4
- package/dist/module/select-input2.js +1 -1
- package/dist/module/sezzel-payment-method.js +99 -0
- package/dist/module/subaccount-merchant-details2.js +3 -3
- package/dist/module/text-input2.js +1 -1
- package/dist/module/utils2.js +1 -7
- package/dist/module/utils3.js +31 -1
- package/dist/module/utils4.js +7 -1
- package/dist/types/api/Business.d.ts +0 -19
- package/dist/types/api/Checkout.d.ts +63 -2
- package/dist/types/api/ComponentError.d.ts +18 -0
- package/dist/types/api/Identity.d.ts +2 -0
- package/dist/types/api/Payment.d.ts +2 -1
- package/dist/types/api/SubAccount.d.ts +0 -2
- package/dist/types/api/services/checkout.service.d.ts +8 -2
- 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/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 +9 -2
- package/dist/types/components/business-forms/business-form/business-representative/business-representative.d.ts +3 -3
- 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 +9 -3
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +3 -1
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +2 -0
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning.d.ts +6 -2
- 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 +3 -3
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +11 -11
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +7 -37
- package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +6 -0
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +15 -0
- package/dist/types/components/business-forms/utils/helpers.d.ts +8 -0
- package/dist/types/components/checkout/checkout-actions.d.ts +3 -3
- package/dist/types/components/checkout/checkout-core.d.ts +5 -4
- package/dist/types/components/checkout/checkout.d.ts +1 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +2 -1
- package/dist/types/components/checkout/payment-method-options.d.ts +5 -1
- package/dist/types/components/checkout/payment-method-payload.d.ts +8 -0
- package/dist/types/components/checkout/saved-payment-method.d.ts +2 -1
- package/dist/types/components/checkout/sezzel-payment-method.d.ts +23 -0
- package/dist/types/components/form/form-control-date.d.ts +18 -0
- 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 +329 -52
- package/dist/types/utils/utils.d.ts +0 -1
- package/dist/webcomponents/p-02fa533c.js +1 -0
- package/dist/webcomponents/p-0315876e.entry.js +1 -0
- package/dist/webcomponents/p-0c269feb.entry.js +1 -0
- package/dist/webcomponents/p-0eb56b44.entry.js +1 -0
- package/dist/webcomponents/p-0eb77101.entry.js +1 -0
- package/dist/webcomponents/p-1334f776.entry.js +1 -0
- package/dist/webcomponents/p-19001cc5.entry.js +1 -0
- package/dist/webcomponents/p-2319abaf.entry.js +1 -0
- package/dist/webcomponents/p-26fe62d6.entry.js +1 -0
- package/dist/webcomponents/p-28b38699.js +1 -0
- package/dist/webcomponents/{p-4df6174c.entry.js → p-29376518.entry.js} +1 -1
- package/dist/webcomponents/p-2bee72bd.entry.js +1 -0
- package/dist/webcomponents/p-3302bc76.js +1 -0
- package/dist/webcomponents/p-3adc0688.entry.js +1 -0
- package/dist/webcomponents/p-3fe05c4a.entry.js +1 -0
- package/dist/webcomponents/p-41b1ad3a.entry.js +1 -0
- package/dist/webcomponents/p-4616768c.entry.js +1 -0
- package/dist/webcomponents/p-56780f10.entry.js +1 -0
- package/dist/webcomponents/p-5c269619.js +1 -0
- package/dist/webcomponents/p-5ff7826e.entry.js +1 -0
- package/dist/webcomponents/{p-8482c23f.js → p-65510838.js} +1 -1
- package/dist/webcomponents/p-6f294d5d.js +1 -0
- package/dist/webcomponents/{p-4d50d08a.entry.js → p-7d8d2984.entry.js} +1 -1
- package/dist/webcomponents/p-7da249b8.entry.js +1 -0
- package/dist/webcomponents/p-84b9ffc9.entry.js +1 -0
- package/dist/webcomponents/{p-07b326d0.entry.js → p-8657128b.entry.js} +1 -1
- package/dist/webcomponents/p-8abba4c2.entry.js +1 -0
- package/dist/webcomponents/p-8c9d9812.entry.js +1 -0
- package/dist/webcomponents/p-910bb656.js +1 -0
- package/dist/webcomponents/p-9245777b.js +1 -0
- package/dist/webcomponents/{p-221b9504.entry.js → p-927150b4.entry.js} +1 -1
- package/dist/webcomponents/p-96cebc8b.entry.js +1 -0
- package/dist/webcomponents/{p-0e189d6a.entry.js → p-99d6b67e.entry.js} +1 -1
- package/dist/webcomponents/p-9e3f9e05.entry.js +1 -0
- package/dist/webcomponents/{p-688bb5da.js → p-9ee8ad4d.js} +1 -1
- package/dist/webcomponents/{p-a46174e0.entry.js → p-9f3facf1.entry.js} +1 -1
- package/dist/webcomponents/p-9f529959.entry.js +1 -0
- package/dist/webcomponents/{p-fb49ef28.entry.js → p-a6f170ba.entry.js} +1 -1
- package/dist/webcomponents/p-a8caec98.entry.js +1 -0
- package/dist/webcomponents/p-a90f7ca0.js +1 -0
- package/dist/webcomponents/p-abc03d5a.entry.js +1 -0
- package/dist/webcomponents/p-b318b899.js +1 -0
- package/dist/webcomponents/{p-1bfadb9f.entry.js → p-c1b92cec.entry.js} +1 -1
- package/dist/webcomponents/{p-a68519e5.entry.js → p-c556deda.entry.js} +1 -1
- package/dist/webcomponents/{p-3d4aaa4a.entry.js → p-c6e207f6.entry.js} +1 -1
- package/dist/webcomponents/{p-b68f1dd9.entry.js → p-cdfde1ca.entry.js} +1 -1
- package/dist/webcomponents/p-d69a485a.entry.js +1 -0
- package/dist/webcomponents/p-e2ba8d84.entry.js +1 -0
- package/dist/webcomponents/{p-ebf7c70f.entry.js → p-e4342f49.entry.js} +1 -1
- package/dist/webcomponents/p-ed72a5cc.js +1 -0
- package/dist/webcomponents/{p-6b51cf97.entry.js → p-f0698778.entry.js} +1 -1
- package/dist/webcomponents/p-f4ae621e.entry.js +1 -0
- package/dist/webcomponents/p-f76283a5.entry.js +19 -0
- package/dist/webcomponents/p-fce2b224.entry.js +1 -0
- package/dist/webcomponents/p-fd60d5af.js +1 -0
- package/dist/webcomponents/p-ff211f76.js +1 -0
- package/dist/webcomponents/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Business-663db337.js +0 -92
- package/dist/cjs/Identity-1c4528b8.js +0 -49
- package/dist/cjs/business-additional-questions-schema-cbac27f2.js +0 -26
- package/dist/cjs/business-form-select-options-7ccd8dca.js +0 -85
- package/dist/cjs/justifi-business-address-form-step.cjs.entry.js +0 -35
- package/dist/cjs/payload-parsers-9e72e80f.js +0 -99
- 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/test/business-address.e2e.js +0 -9
- package/dist/collection/components/business-forms/payment-provisioning/business-address/business-address-form-step.css +0 -2536
- package/dist/collection/components/business-forms/payment-provisioning/business-address/business-address-form-step.js +0 -97
- package/dist/collection/components/business-forms/payment-provisioning/business-address/test/business-address-form-step.spec.js +0 -97
- package/dist/collection/components/business-forms/schemas/business-owners-schema.js +0 -16
- package/dist/collection/components/business-forms/utils/business-form-select-options.js +0 -80
- package/dist/collection/components/card-form/test/card-form.e2e.js +0 -13
- package/dist/esm/Business-6cc4e473.js +0 -87
- package/dist/esm/Identity-5f8f916f.js +0 -46
- package/dist/esm/business-additional-questions-schema-2cb80f70.js +0 -23
- package/dist/esm/business-form-select-options-6b9293fe.js +0 -82
- package/dist/esm/business-form-types-de9f38cd.js +0 -19
- package/dist/esm/justifi-business-address-form-step.entry.js +0 -31
- package/dist/esm/payload-parsers-caea809d.js +0 -91
- package/dist/esm/utils-546ca6aa.js +0 -8
- package/dist/module/Identity.js +0 -46
- package/dist/module/business-form-select-options.js +0 -82
- 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/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/payment-provisioning/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/types/components/business-forms/utils/business-form-select-options.d.ts +0 -11
- package/dist/webcomponents/p-03b1d0d5.entry.js +0 -1
- package/dist/webcomponents/p-0923e39c.js +0 -1
- package/dist/webcomponents/p-16dcf053.entry.js +0 -1
- package/dist/webcomponents/p-17d72f4a.js +0 -1
- package/dist/webcomponents/p-2df32b4a.entry.js +0 -1
- package/dist/webcomponents/p-34352d04.js +0 -1
- package/dist/webcomponents/p-38ba2848.entry.js +0 -1
- package/dist/webcomponents/p-41870765.entry.js +0 -1
- package/dist/webcomponents/p-461f42b8.entry.js +0 -1
- package/dist/webcomponents/p-48c2400e.js +0 -1
- package/dist/webcomponents/p-491ca87f.js +0 -1
- package/dist/webcomponents/p-5be4e217.entry.js +0 -1
- package/dist/webcomponents/p-60714f2a.entry.js +0 -1
- package/dist/webcomponents/p-60b2344a.js +0 -1
- package/dist/webcomponents/p-63296409.js +0 -1
- package/dist/webcomponents/p-65500b31.entry.js +0 -19
- package/dist/webcomponents/p-6d39b8bc.entry.js +0 -1
- package/dist/webcomponents/p-6ed680e9.js +0 -1
- package/dist/webcomponents/p-7b2cddc7.js +0 -1
- package/dist/webcomponents/p-7ec301b5.entry.js +0 -1
- package/dist/webcomponents/p-817211f2.entry.js +0 -1
- package/dist/webcomponents/p-9207ccb2.entry.js +0 -1
- package/dist/webcomponents/p-975ab96e.js +0 -1
- package/dist/webcomponents/p-9b99370e.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-a4122c35.entry.js +0 -1
- package/dist/webcomponents/p-af8363a1.entry.js +0 -1
- package/dist/webcomponents/p-b1bc23af.entry.js +0 -1
- package/dist/webcomponents/p-b37d6888.entry.js +0 -1
- package/dist/webcomponents/p-b5a3bf86.entry.js +0 -1
- package/dist/webcomponents/p-b8f22856.js +0 -1
- package/dist/webcomponents/p-cb8f9cb8.entry.js +0 -1
- package/dist/webcomponents/p-d0761829.entry.js +0 -1
- package/dist/webcomponents/p-da34bba7.entry.js +0 -1
- package/dist/webcomponents/p-dbe32e75.entry.js +0 -1
- package/dist/webcomponents/p-e0c1cba8.js +0 -1
- package/dist/webcomponents/p-e924f2e1.entry.js +0 -1
- package/dist/webcomponents/p-ea03b424.entry.js +0 -1
- package/dist/webcomponents/p-ec230480.entry.js +0 -1
- package/dist/webcomponents/p-eed5f4ad.entry.js +0 -1
- package/dist/webcomponents/p-fe8a94c1.entry.js +0 -1
- /package/dist/collection/components/business-forms/{business-form/business-address/business-address-form.css → owner-form/identity-address/identity-address-form.css} +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
|
@@ -5,12 +5,13 @@ import './Pagination.js';
|
|
|
5
5
|
import './Payment.js';
|
|
6
6
|
import './Payout.js';
|
|
7
7
|
import { c as config } from './config.js';
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
8
|
+
import { d as defineCustomElement$a } from './billing-form.js';
|
|
9
|
+
import { d as defineCustomElement$9 } from './checkout-core.js';
|
|
10
|
+
import { d as defineCustomElement$8 } from './new-payment-method.js';
|
|
11
|
+
import { d as defineCustomElement$7 } from './payment-method-form.js';
|
|
12
|
+
import { d as defineCustomElement$6 } from './payment-method-options.js';
|
|
13
|
+
import { d as defineCustomElement$5 } from './saved-payment-method.js';
|
|
14
|
+
import { d as defineCustomElement$4 } from './sezzel-payment-method.js';
|
|
14
15
|
import { d as defineCustomElement$3 } from './select-input2.js';
|
|
15
16
|
import { d as defineCustomElement$2 } from './text-input2.js';
|
|
16
17
|
|
|
@@ -30,9 +31,9 @@ const makeGetCheckout = ({ authToken, checkoutId, service }) => async ({ onSucce
|
|
|
30
31
|
return onError(error.message || error);
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
const
|
|
34
|
+
const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ payment, onSuccess, onError }) => {
|
|
34
35
|
try {
|
|
35
|
-
const response = await service.
|
|
36
|
+
const response = await service.complete(authToken, checkoutId, payment);
|
|
36
37
|
if (!response.error) {
|
|
37
38
|
const checkout = response.data;
|
|
38
39
|
onSuccess({ checkout });
|
|
@@ -52,9 +53,13 @@ class CheckoutService {
|
|
|
52
53
|
const endpoint = `checkouts/${checkoutId}`;
|
|
53
54
|
return Api(authToken, config.proxyApiOrigin).get(endpoint);
|
|
54
55
|
}
|
|
55
|
-
async
|
|
56
|
-
const endpoint = `checkouts/${checkoutId}/
|
|
57
|
-
|
|
56
|
+
async complete(authToken, checkoutId, payment) {
|
|
57
|
+
const endpoint = `checkouts/${checkoutId}/complete`;
|
|
58
|
+
const payload = { payment_mode: payment.payment_mode };
|
|
59
|
+
if (payment.payment_token) {
|
|
60
|
+
payload.payment_token = payment.payment_token;
|
|
61
|
+
}
|
|
62
|
+
return Api(authToken, config.proxyApiOrigin).post(endpoint, JSON.stringify(payload));
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
|
|
@@ -67,7 +72,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
|
|
|
67
72
|
this.authToken = undefined;
|
|
68
73
|
this.checkoutId = undefined;
|
|
69
74
|
this.getCheckout = undefined;
|
|
70
|
-
this.
|
|
75
|
+
this.complete = undefined;
|
|
71
76
|
this.errorMessage = '';
|
|
72
77
|
}
|
|
73
78
|
componentWillLoad() {
|
|
@@ -80,7 +85,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
|
|
|
80
85
|
checkoutId: this.checkoutId,
|
|
81
86
|
service: new CheckoutService()
|
|
82
87
|
});
|
|
83
|
-
this.
|
|
88
|
+
this.complete = makeCheckoutComplete({
|
|
84
89
|
authToken: this.authToken,
|
|
85
90
|
checkoutId: this.checkoutId,
|
|
86
91
|
service: new CheckoutService()
|
|
@@ -94,7 +99,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
|
|
|
94
99
|
this.initializeGetCheckout();
|
|
95
100
|
}
|
|
96
101
|
render() {
|
|
97
|
-
return (h("justifi-checkout-core", { getCheckout: this.getCheckout,
|
|
102
|
+
return (h("justifi-checkout-core", { getCheckout: this.getCheckout, complete: this.complete }));
|
|
98
103
|
}
|
|
99
104
|
static get watchers() { return {
|
|
100
105
|
"authToken": ["propChanged"],
|
|
@@ -105,7 +110,7 @@ const Checkout = /*@__PURE__*/ proxyCustomElement(class Checkout extends HTMLEle
|
|
|
105
110
|
"authToken": [1, "auth-token"],
|
|
106
111
|
"checkoutId": [1, "checkout-id"],
|
|
107
112
|
"getCheckout": [32],
|
|
108
|
-
"
|
|
113
|
+
"complete": [32],
|
|
109
114
|
"errorMessage": [32]
|
|
110
115
|
}, undefined, {
|
|
111
116
|
"authToken": ["propChanged"],
|
|
@@ -115,7 +120,7 @@ function defineCustomElement$1() {
|
|
|
115
120
|
if (typeof customElements === "undefined") {
|
|
116
121
|
return;
|
|
117
122
|
}
|
|
118
|
-
const components = ["justifi-checkout", "justifi-billing-form", "justifi-checkout-core", "justifi-new-payment-method", "justifi-payment-method-form", "justifi-payment-method-options", "justifi-saved-payment-method", "select-input", "text-input"];
|
|
123
|
+
const components = ["justifi-checkout", "justifi-billing-form", "justifi-checkout-core", "justifi-new-payment-method", "justifi-payment-method-form", "justifi-payment-method-options", "justifi-saved-payment-method", "justifi-sezzel-payment-method", "select-input", "text-input"];
|
|
119
124
|
components.forEach(tagName => { switch (tagName) {
|
|
120
125
|
case "justifi-checkout":
|
|
121
126
|
if (!customElements.get(tagName)) {
|
|
@@ -124,30 +129,35 @@ function defineCustomElement$1() {
|
|
|
124
129
|
break;
|
|
125
130
|
case "justifi-billing-form":
|
|
126
131
|
if (!customElements.get(tagName)) {
|
|
127
|
-
defineCustomElement$
|
|
132
|
+
defineCustomElement$a();
|
|
128
133
|
}
|
|
129
134
|
break;
|
|
130
135
|
case "justifi-checkout-core":
|
|
131
136
|
if (!customElements.get(tagName)) {
|
|
132
|
-
defineCustomElement$
|
|
137
|
+
defineCustomElement$9();
|
|
133
138
|
}
|
|
134
139
|
break;
|
|
135
140
|
case "justifi-new-payment-method":
|
|
136
141
|
if (!customElements.get(tagName)) {
|
|
137
|
-
defineCustomElement$
|
|
142
|
+
defineCustomElement$8();
|
|
138
143
|
}
|
|
139
144
|
break;
|
|
140
145
|
case "justifi-payment-method-form":
|
|
141
146
|
if (!customElements.get(tagName)) {
|
|
142
|
-
defineCustomElement$
|
|
147
|
+
defineCustomElement$7();
|
|
143
148
|
}
|
|
144
149
|
break;
|
|
145
150
|
case "justifi-payment-method-options":
|
|
146
151
|
if (!customElements.get(tagName)) {
|
|
147
|
-
defineCustomElement$
|
|
152
|
+
defineCustomElement$6();
|
|
148
153
|
}
|
|
149
154
|
break;
|
|
150
155
|
case "justifi-saved-payment-method":
|
|
156
|
+
if (!customElements.get(tagName)) {
|
|
157
|
+
defineCustomElement$5();
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
case "justifi-sezzel-payment-method":
|
|
151
161
|
if (!customElements.get(tagName)) {
|
|
152
162
|
defineCustomElement$4();
|
|
153
163
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as config } from './config.js';
|
|
3
3
|
import { A as Api } from './Api.js';
|
|
4
|
+
import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
|
|
4
5
|
import { E as ErrorState } from './utils.js';
|
|
5
6
|
import { d as defineCustomElement$2 } from './gross-payment-chart-core2.js';
|
|
6
7
|
|
|
@@ -13,17 +14,30 @@ class ReportsService {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const makeGetGrossPaymentChartData = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
17
|
+
var _a;
|
|
16
18
|
try {
|
|
17
19
|
const response = await service.fetchGrossVolumeChartData(id, authToken);
|
|
18
20
|
if (!response.error) {
|
|
19
21
|
onSuccess(response.data);
|
|
20
22
|
}
|
|
21
23
|
else {
|
|
22
|
-
|
|
24
|
+
const errorMessage = getErrorMessage(response.error);
|
|
25
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
26
|
+
onError({
|
|
27
|
+
error: errorMessage,
|
|
28
|
+
code,
|
|
29
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
30
|
+
});
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
catch (error) {
|
|
26
|
-
|
|
34
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
35
|
+
const errorMessage = getErrorMessage(error);
|
|
36
|
+
onError({
|
|
37
|
+
error: errorMessage,
|
|
38
|
+
code,
|
|
39
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
40
|
+
});
|
|
27
41
|
}
|
|
28
42
|
};
|
|
29
43
|
|
|
@@ -32,6 +46,11 @@ const GrossPaymentChart = /*@__PURE__*/ proxyCustomElement(class GrossPaymentCha
|
|
|
32
46
|
super();
|
|
33
47
|
this.__registerHost();
|
|
34
48
|
this.__attachShadow();
|
|
49
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
50
|
+
this.handleErrorEvent = (event) => {
|
|
51
|
+
this.errorMessage = event.detail.message;
|
|
52
|
+
this.errorEvent.emit(event.detail);
|
|
53
|
+
};
|
|
35
54
|
this.accountId = undefined;
|
|
36
55
|
this.authToken = undefined;
|
|
37
56
|
this.getGrossPayment = undefined;
|
|
@@ -53,13 +72,18 @@ const GrossPaymentChart = /*@__PURE__*/ proxyCustomElement(class GrossPaymentCha
|
|
|
53
72
|
}
|
|
54
73
|
else {
|
|
55
74
|
this.errorMessage = 'Account ID and Auth Token are required';
|
|
75
|
+
this.errorEvent.emit({
|
|
76
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
77
|
+
message: this.errorMessage,
|
|
78
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
79
|
+
});
|
|
56
80
|
}
|
|
57
81
|
}
|
|
58
82
|
render() {
|
|
59
83
|
if (this.errorMessage) {
|
|
60
84
|
return ErrorState(this.errorMessage);
|
|
61
85
|
}
|
|
62
|
-
return (h("gross-payment-chart-core", { getGrossPayment: this.getGrossPayment }));
|
|
86
|
+
return (h("gross-payment-chart-core", { getGrossPayment: this.getGrossPayment, "onError-event": this.handleErrorEvent }));
|
|
63
87
|
}
|
|
64
88
|
static get watchers() { return {
|
|
65
89
|
"accountId": ["propChanged"],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JustifiIdentityAddressForm extends Components.JustifiIdentityAddressForm, HTMLElement {}
|
|
4
|
+
export const JustifiIdentityAddressForm: {
|
|
5
|
+
prototype: JustifiIdentityAddressForm;
|
|
6
|
+
new (): JustifiIdentityAddressForm;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { I as IdentityAddressForm, d as defineCustomElement$1 } from './identity-address-form.js';
|
|
2
|
+
|
|
3
|
+
const JustifiIdentityAddressForm = IdentityAddressForm;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { JustifiIdentityAddressForm, defineCustomElement };
|
|
@@ -3,7 +3,7 @@ import { A as Api } from './Api.js';
|
|
|
3
3
|
import { p as pagingDefaults } from './Pagination.js';
|
|
4
4
|
import { a as PaymentBalanceTransaction } from './Payment.js';
|
|
5
5
|
import './Payout.js';
|
|
6
|
-
import { e as formatDate,
|
|
6
|
+
import { e as formatDate, h as formatTime, s as snakeCaseToHumanReadable, a as formatCurrency } from './utils2.js';
|
|
7
7
|
import { c as config } from './config.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './table.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './pagination-menu2.js';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { P as PaymentService } from './payment.service.js';
|
|
3
3
|
import './Pagination.js';
|
|
4
4
|
import { b as Payment } from './Payment.js';
|
|
5
5
|
import './Payout.js';
|
|
6
|
-
import { g as getErrorMessage } from './utils3.js';
|
|
6
|
+
import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
|
|
7
7
|
import { E as ErrorState } from './utils.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './details.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './payment-details-core2.js';
|
|
10
10
|
|
|
11
11
|
const makeGetPaymentDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
12
|
+
var _a;
|
|
12
13
|
try {
|
|
13
14
|
const response = await service.fetchPayment(id, authToken);
|
|
14
15
|
if (!response.error) {
|
|
@@ -16,11 +17,21 @@ const makeGetPaymentDetails = ({ id, authToken, service }) => async ({ onSuccess
|
|
|
16
17
|
}
|
|
17
18
|
else {
|
|
18
19
|
const responseError = getErrorMessage(response.error);
|
|
19
|
-
|
|
20
|
+
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
21
|
+
onError({
|
|
22
|
+
error: responseError,
|
|
23
|
+
code,
|
|
24
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
25
|
+
});
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
catch (error) {
|
|
23
|
-
|
|
29
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
30
|
+
onError({
|
|
31
|
+
error: getErrorMessage(error),
|
|
32
|
+
code,
|
|
33
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
34
|
+
});
|
|
24
35
|
}
|
|
25
36
|
};
|
|
26
37
|
|
|
@@ -29,7 +40,12 @@ const PaymentDetails = /*@__PURE__*/ proxyCustomElement(class PaymentDetails ext
|
|
|
29
40
|
super();
|
|
30
41
|
this.__registerHost();
|
|
31
42
|
this.__attachShadow();
|
|
43
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
32
44
|
this.paymentService = new PaymentService();
|
|
45
|
+
this.handleErrorEvent = event => {
|
|
46
|
+
this.errorMessage = event.detail.message;
|
|
47
|
+
this.errorEvent.emit(event.detail);
|
|
48
|
+
};
|
|
33
49
|
this.paymentId = undefined;
|
|
34
50
|
this.authToken = undefined;
|
|
35
51
|
this.getPaymentDetails = undefined;
|
|
@@ -51,13 +67,18 @@ const PaymentDetails = /*@__PURE__*/ proxyCustomElement(class PaymentDetails ext
|
|
|
51
67
|
}
|
|
52
68
|
else {
|
|
53
69
|
this.errorMessage = 'Payment ID and Auth Token are required';
|
|
70
|
+
this.errorEvent.emit({
|
|
71
|
+
message: this.errorMessage,
|
|
72
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
73
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
74
|
+
});
|
|
54
75
|
}
|
|
55
76
|
}
|
|
56
77
|
render() {
|
|
57
78
|
if (this.errorMessage) {
|
|
58
79
|
return ErrorState(this.errorMessage);
|
|
59
80
|
}
|
|
60
|
-
return (h("payment-details-core", { getPaymentDetails: this.getPaymentDetails }));
|
|
81
|
+
return (h("payment-details-core", { getPaymentDetails: this.getPaymentDetails, "onError-event": this.handleErrorEvent }));
|
|
61
82
|
}
|
|
62
83
|
static get watchers() { return {
|
|
63
84
|
"paymentId": ["propChanged"],
|
|
@@ -4,6 +4,7 @@ import { P as PaymentMethodTypes } from './Payment.js';
|
|
|
4
4
|
import './Payout.js';
|
|
5
5
|
import { l as loadFontsOnParent } from './utils2.js';
|
|
6
6
|
import { c as config } from './config.js';
|
|
7
|
+
import { b as ComponentErrorCodes, C as ComponentErrorSeverity, g as getErrorMessage } from './utils3.js';
|
|
7
8
|
import { d as defineCustomElement$6 } from './billing-form.js';
|
|
8
9
|
import { d as defineCustomElement$5 } from './payment-method-form.js';
|
|
9
10
|
import { d as defineCustomElement$4 } from './payment-method-selector.js';
|
|
@@ -18,6 +19,7 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
|
|
|
18
19
|
this.__registerHost();
|
|
19
20
|
this.__attachShadow();
|
|
20
21
|
this.submitted = createEvent(this, "submitted", 7);
|
|
22
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
21
23
|
this.bankAccount = undefined;
|
|
22
24
|
this.card = true;
|
|
23
25
|
this.email = undefined;
|
|
@@ -37,6 +39,9 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
|
|
|
37
39
|
async enableSubmitButton() {
|
|
38
40
|
this.submitButtonEnabled = true;
|
|
39
41
|
}
|
|
42
|
+
async disableSubmitButton() {
|
|
43
|
+
this.submitButtonEnabled = false;
|
|
44
|
+
}
|
|
40
45
|
paymentMethodSelectedHandler(event) {
|
|
41
46
|
const paymentMethodType = event.detail;
|
|
42
47
|
this.selectedPaymentMethodType = paymentMethodType;
|
|
@@ -55,12 +60,20 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
|
|
|
55
60
|
const paymentMethodData = Object.assign({ email: this.email }, billingFormFieldValues);
|
|
56
61
|
const tokenizeResponse = await this.paymentMethodFormRef.tokenize(this.clientId, paymentMethodData, this.accountId);
|
|
57
62
|
if (tokenizeResponse.error) {
|
|
58
|
-
|
|
63
|
+
this.errorEvent.emit({
|
|
64
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
65
|
+
message: tokenizeResponse.error.message,
|
|
66
|
+
severity: ComponentErrorSeverity.ERROR
|
|
67
|
+
});
|
|
59
68
|
}
|
|
60
69
|
this.submitted.emit(tokenizeResponse);
|
|
61
70
|
}
|
|
62
71
|
catch (error) {
|
|
63
|
-
|
|
72
|
+
this.errorEvent.emit({
|
|
73
|
+
errorCode: ComponentErrorCodes.UNKNOWN_ERROR,
|
|
74
|
+
message: getErrorMessage(error),
|
|
75
|
+
severity: ComponentErrorSeverity.ERROR
|
|
76
|
+
});
|
|
64
77
|
}
|
|
65
78
|
finally {
|
|
66
79
|
this.isLoading = false;
|
|
@@ -75,7 +88,7 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
|
|
|
75
88
|
if (el) {
|
|
76
89
|
this.billingFormRef = el;
|
|
77
90
|
}
|
|
78
|
-
} })), h("slot", { name: 'insurance' }), h("div", { class: "col-12" }, h("button", { type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, class: `btn btn-primary jfi-submit-button${this.isLoading ? ' jfi-submit-button-loading' : ''}` }, this.isLoading ?
|
|
91
|
+
} })), h("slot", { name: 'insurance' }), h("div", { class: "col-12" }, h("button", { "data-testid": "submit-button", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, class: `btn btn-primary jfi-submit-button${this.isLoading ? ' jfi-submit-button-loading' : ''}` }, this.isLoading ?
|
|
79
92
|
h("div", { class: "spinner-border spinner-border-sm", role: "status" }, h("span", { class: "visually-hidden" }, "Loading...")) :
|
|
80
93
|
this.submitButtonText || 'Submit')))));
|
|
81
94
|
}
|
|
@@ -91,7 +104,8 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
|
|
|
91
104
|
"isLoading": [32],
|
|
92
105
|
"selectedPaymentMethodType": [32],
|
|
93
106
|
"fillBillingForm": [64],
|
|
94
|
-
"enableSubmitButton": [64]
|
|
107
|
+
"enableSubmitButton": [64],
|
|
108
|
+
"disableSubmitButton": [64]
|
|
95
109
|
}]);
|
|
96
110
|
function defineCustomElement$1() {
|
|
97
111
|
if (typeof customElements === "undefined") {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { F as FormAlert, L as LoadingSpinner } from './utils4.js';
|
|
3
|
-
import {
|
|
4
|
-
import { d as defineCustomElement$e } from './form-control-
|
|
3
|
+
import { b as BusinessFormClickActions } from './business-form-types.js';
|
|
4
|
+
import { d as defineCustomElement$e } from './form-control-date2.js';
|
|
5
5
|
import { d as defineCustomElement$d } from './form-control-monetary2.js';
|
|
6
6
|
import { d as defineCustomElement$c } from './form-control-number2.js';
|
|
7
7
|
import { d as defineCustomElement$b } from './form-control-number-masked2.js';
|
|
8
8
|
import { d as defineCustomElement$a } from './form-control-select2.js';
|
|
9
9
|
import { d as defineCustomElement$9 } from './form-control-text2.js';
|
|
10
10
|
import { d as defineCustomElement$8 } from './business-additional-questions-form-step.js';
|
|
11
|
-
import { d as defineCustomElement$7 } from './business-
|
|
12
|
-
import { d as defineCustomElement$6 } from './business-
|
|
13
|
-
import { d as defineCustomElement$5 } from './business-
|
|
14
|
-
import { d as defineCustomElement$4 } from './
|
|
11
|
+
import { d as defineCustomElement$7 } from './business-core-info-form-step.js';
|
|
12
|
+
import { d as defineCustomElement$6 } from './business-owners-form-step.js';
|
|
13
|
+
import { d as defineCustomElement$5 } from './business-representative-form-step.js';
|
|
14
|
+
import { d as defineCustomElement$4 } from './identity-address-form.js';
|
|
15
15
|
import { d as defineCustomElement$3 } from './legal-address-form-step.js';
|
|
16
16
|
import { d as defineCustomElement$2 } from './owner-form.js';
|
|
17
17
|
|
|
@@ -21,14 +21,20 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
|
23
23
|
this.__registerHost();
|
|
24
|
-
this.clickEvent = createEvent(this, "
|
|
24
|
+
this.clickEvent = createEvent(this, "click-event", 7);
|
|
25
25
|
this.refs = [];
|
|
26
26
|
this.componentStepMapping = {
|
|
27
|
-
0: () => h("justifi-business-core-info-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[0] = el, onFormLoading:
|
|
28
|
-
1: () => h("justifi-legal-address-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[1] = el, onFormLoading:
|
|
29
|
-
2: () => h("justifi-additional-questions-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[2] = el, onFormLoading:
|
|
30
|
-
3: () => h("justifi-business-representative-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[3] = el, onFormLoading:
|
|
31
|
-
4: () => h("justifi-business-owners-form-step", { businessId: this.businessId, authToken: this.authToken, ref: (el) => this.refs[4] = el, onFormLoading:
|
|
27
|
+
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 }),
|
|
28
|
+
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 }),
|
|
29
|
+
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 }),
|
|
30
|
+
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 }),
|
|
31
|
+
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 }),
|
|
32
|
+
};
|
|
33
|
+
this.handleFormLoading = (e) => {
|
|
34
|
+
this.formLoading = e.detail;
|
|
35
|
+
};
|
|
36
|
+
this.handleServerErrors = (e) => {
|
|
37
|
+
this.errorMessage = e.detail.message;
|
|
32
38
|
};
|
|
33
39
|
this.incrementSteps = () => {
|
|
34
40
|
if (this.currentStep < this.totalSteps) {
|
|
@@ -40,11 +46,17 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
40
46
|
this.businessId = undefined;
|
|
41
47
|
this.testMode = false;
|
|
42
48
|
this.hideErrors = false;
|
|
49
|
+
this.allowOptionalFields = false;
|
|
50
|
+
this.formTitle = 'Business Information';
|
|
51
|
+
this.removeTitle = false;
|
|
43
52
|
this.formLoading = false;
|
|
44
53
|
this.errorMessage = '';
|
|
45
54
|
this.currentStep = 0;
|
|
46
55
|
this.totalSteps = 5;
|
|
47
56
|
}
|
|
57
|
+
get title() {
|
|
58
|
+
return this.removeTitle ? '' : this.formTitle;
|
|
59
|
+
}
|
|
48
60
|
get showErrors() {
|
|
49
61
|
return this.errorMessage && !this.hideErrors;
|
|
50
62
|
}
|
|
@@ -61,12 +73,6 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
61
73
|
this.refs = [this.coreInfoRef, this.legalAddressRef, this.additionalQuestionsRef, this.representativeRef, this.ownersRef];
|
|
62
74
|
this.totalSteps = Object.keys(this.componentStepMapping).length - 1;
|
|
63
75
|
}
|
|
64
|
-
handleFormLoading(e) {
|
|
65
|
-
this.formLoading = e.detail;
|
|
66
|
-
}
|
|
67
|
-
handleServerErrors(e) {
|
|
68
|
-
this.errorMessage = e.detail.message;
|
|
69
|
-
}
|
|
70
76
|
showPreviousStepButton() {
|
|
71
77
|
return this.currentStep > 0;
|
|
72
78
|
}
|
|
@@ -75,8 +81,7 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
75
81
|
}
|
|
76
82
|
previousStepButtonOnClick() {
|
|
77
83
|
this.clickEvent.emit({ name: BusinessFormClickActions.previousStep });
|
|
78
|
-
|
|
79
|
-
currentStep.validateAndSubmit({ onSuccess: this.decrementSteps });
|
|
84
|
+
this.decrementSteps();
|
|
80
85
|
}
|
|
81
86
|
nextStepButtonOnClick(e, clickEventName) {
|
|
82
87
|
e.preventDefault();
|
|
@@ -91,7 +96,7 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
91
96
|
return this.componentStepMapping[this.currentStep]();
|
|
92
97
|
}
|
|
93
98
|
render() {
|
|
94
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("h1", null,
|
|
99
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("h1", null, this.title), 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'))))));
|
|
95
100
|
}
|
|
96
101
|
static get style() { return paymentProvisioningCss; }
|
|
97
102
|
}, [0, "justifi-payment-provisioning", {
|
|
@@ -99,6 +104,9 @@ const PaymentProvisioning = /*@__PURE__*/ proxyCustomElement(class PaymentProvis
|
|
|
99
104
|
"businessId": [1, "business-id"],
|
|
100
105
|
"testMode": [4, "test-mode"],
|
|
101
106
|
"hideErrors": [4, "hide-errors"],
|
|
107
|
+
"allowOptionalFields": [4, "allow-optional-fields"],
|
|
108
|
+
"formTitle": [1, "form-title"],
|
|
109
|
+
"removeTitle": [4, "remove-title"],
|
|
102
110
|
"formLoading": [32],
|
|
103
111
|
"errorMessage": [32],
|
|
104
112
|
"currentStep": [32],
|
|
@@ -108,14 +116,14 @@ function defineCustomElement$1() {
|
|
|
108
116
|
if (typeof customElements === "undefined") {
|
|
109
117
|
return;
|
|
110
118
|
}
|
|
111
|
-
const components = ["justifi-payment-provisioning", "form-control-
|
|
119
|
+
const components = ["justifi-payment-provisioning", "form-control-date", "form-control-monetary", "form-control-number", "form-control-number-masked", "form-control-select", "form-control-text", "justifi-additional-questions-form-step", "justifi-business-core-info-form-step", "justifi-business-owners-form-step", "justifi-business-representative-form-step", "justifi-identity-address-form", "justifi-legal-address-form-step", "justifi-owner-form"];
|
|
112
120
|
components.forEach(tagName => { switch (tagName) {
|
|
113
121
|
case "justifi-payment-provisioning":
|
|
114
122
|
if (!customElements.get(tagName)) {
|
|
115
123
|
customElements.define(tagName, PaymentProvisioning);
|
|
116
124
|
}
|
|
117
125
|
break;
|
|
118
|
-
case "form-control-
|
|
126
|
+
case "form-control-date":
|
|
119
127
|
if (!customElements.get(tagName)) {
|
|
120
128
|
defineCustomElement$e();
|
|
121
129
|
}
|
|
@@ -150,22 +158,22 @@ function defineCustomElement$1() {
|
|
|
150
158
|
defineCustomElement$8();
|
|
151
159
|
}
|
|
152
160
|
break;
|
|
153
|
-
case "justifi-business-
|
|
161
|
+
case "justifi-business-core-info-form-step":
|
|
154
162
|
if (!customElements.get(tagName)) {
|
|
155
163
|
defineCustomElement$7();
|
|
156
164
|
}
|
|
157
165
|
break;
|
|
158
|
-
case "justifi-business-
|
|
166
|
+
case "justifi-business-owners-form-step":
|
|
159
167
|
if (!customElements.get(tagName)) {
|
|
160
168
|
defineCustomElement$6();
|
|
161
169
|
}
|
|
162
170
|
break;
|
|
163
|
-
case "justifi-business-
|
|
171
|
+
case "justifi-business-representative-form-step":
|
|
164
172
|
if (!customElements.get(tagName)) {
|
|
165
173
|
defineCustomElement$5();
|
|
166
174
|
}
|
|
167
175
|
break;
|
|
168
|
-
case "justifi-
|
|
176
|
+
case "justifi-identity-address-form":
|
|
169
177
|
if (!customElements.get(tagName)) {
|
|
170
178
|
defineCustomElement$4();
|
|
171
179
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { P as PaymentService } from './payment.service.js';
|
|
3
3
|
import './Pagination.js';
|
|
4
4
|
import { b as Payment } from './Payment.js';
|
|
5
5
|
import './Payout.js';
|
|
6
|
-
import { g as getErrorMessage } from './utils3.js';
|
|
6
|
+
import { C as ComponentErrorSeverity, g as getErrorMessage, a as getErrorCode, b as ComponentErrorCodes } from './utils3.js';
|
|
7
7
|
import { E as ErrorState } from './utils.js';
|
|
8
8
|
import { d as defineCustomElement$4 } from './table.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './pagination-menu2.js';
|
|
10
10
|
import { d as defineCustomElement$2 } from './payments-list-core2.js';
|
|
11
11
|
|
|
12
12
|
const makeGetPayments = ({ id, authToken, service }) => async ({ params, onSuccess, onError }) => {
|
|
13
|
-
var _a;
|
|
13
|
+
var _a, _b;
|
|
14
14
|
try {
|
|
15
15
|
const response = await service.fetchPayments(id, authToken, params);
|
|
16
16
|
if (!response.error) {
|
|
@@ -20,11 +20,21 @@ const makeGetPayments = ({ id, authToken, service }) => async ({ params, onSucce
|
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
const responseError = getErrorMessage(response.error);
|
|
23
|
-
|
|
23
|
+
const code = getErrorCode((_b = response.error) === null || _b === void 0 ? void 0 : _b.code);
|
|
24
|
+
return onError({
|
|
25
|
+
error: responseError,
|
|
26
|
+
code,
|
|
27
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
28
|
+
});
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
catch (error) {
|
|
27
|
-
|
|
32
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
33
|
+
return onError({
|
|
34
|
+
error: error.message || error,
|
|
35
|
+
code,
|
|
36
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
};
|
|
30
40
|
|
|
@@ -33,6 +43,11 @@ const PaymentsList = /*@__PURE__*/ proxyCustomElement(class PaymentsList extends
|
|
|
33
43
|
super();
|
|
34
44
|
this.__registerHost();
|
|
35
45
|
this.__attachShadow();
|
|
46
|
+
this.errorEvent = createEvent(this, "error-event", 7);
|
|
47
|
+
this.handleErrorEvent = (event) => {
|
|
48
|
+
this.errorMessage = event.detail.message;
|
|
49
|
+
this.errorEvent.emit(event.detail);
|
|
50
|
+
};
|
|
36
51
|
this.accountId = undefined;
|
|
37
52
|
this.authToken = undefined;
|
|
38
53
|
this.getPayments = undefined;
|
|
@@ -54,13 +69,18 @@ const PaymentsList = /*@__PURE__*/ proxyCustomElement(class PaymentsList extends
|
|
|
54
69
|
}
|
|
55
70
|
else {
|
|
56
71
|
this.errorMessage = 'Account ID and Auth Token are required';
|
|
72
|
+
this.errorEvent.emit({
|
|
73
|
+
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
74
|
+
message: this.errorMessage,
|
|
75
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
76
|
+
});
|
|
57
77
|
}
|
|
58
78
|
}
|
|
59
79
|
render() {
|
|
60
80
|
if (this.errorMessage) {
|
|
61
81
|
return ErrorState(this.errorMessage);
|
|
62
82
|
}
|
|
63
|
-
return (h("payments-list-core", { getPayments: this.getPayments }));
|
|
83
|
+
return (h("payments-list-core", { getPayments: this.getPayments, "onError-event": this.handleErrorEvent }));
|
|
64
84
|
}
|
|
65
85
|
static get watchers() { return {
|
|
66
86
|
"accountId": ["propChanged"],
|