@justifi/webcomponents 4.16.0 → 4.18.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/{Analytics-423b2bb5.js → Analytics-d4aa8c07.js} +1 -1
- package/dist/cjs/{SubAccount-4f4fac22.js → SubAccount-135ff8c8.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +13 -13
- package/dist/cjs/{business-additional-questions-schema-606d1292.js → business-additional-questions-schema-cf545610.js} +2 -2
- package/dist/cjs/business-details-core.cjs.entry.js +6 -9
- package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
- package/dist/cjs/form-control-checkbox_5.cjs.entry.js +10 -13
- package/dist/cjs/form-control-date.cjs.entry.js +43 -0
- package/dist/cjs/form-control-error-text_2.cjs.entry.js +36 -0
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-date_3.cjs.entry.js → form-control-number-masked_2.cjs.entry.js} +3 -40
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-error-text_4.cjs.entry.js → form-control-select_2.cjs.entry.js} +3 -33
- package/dist/cjs/get-payout-csv-e4e4771a.js +48 -0
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
- package/dist/cjs/{index-b4498996.js → index-fb499e95.js} +15 -3
- package/dist/cjs/{insurance-state-3f044af7.js → insurance-state-80e24caf.js} +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +9 -12
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +16 -1680
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-business-list.cjs.entry.js +4 -7
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +21 -9
- package/dist/cjs/justifi-checkout.cjs.entry.js +12 -4
- package/dist/cjs/justifi-details.cjs.entry.js +4 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +73 -28
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +4 -7
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1688 -0
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +7 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -8
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +15 -10
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -12
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -7
- package/dist/cjs/justifi-refund-form.cjs.entry.js +4 -3
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +14 -9
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -3
- package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -9
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-table_2.cjs.entry.js +8 -12
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-b40227dd.js → package-5fee1ffb.js} +1 -1
- package/dist/cjs/{payload-parsers-6e4cf5d7.js → payload-parsers-1cbc3b57.js} +3 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +11 -14
- package/dist/cjs/payments-list-core.cjs.entry.js +7 -7
- package/dist/cjs/payout-details-core.cjs.entry.js +19 -8
- package/dist/cjs/payouts-list-core.cjs.entry.js +29 -8
- package/dist/cjs/{schema-validations-9668fd79.js → schema-validations-2733de42.js} +3 -4
- package/dist/cjs/styled-host-b8bed12a.js +14 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -23
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -7
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -7
- package/dist/cjs/{utils-17869710.js → utils-80191fbe.js} +6 -0
- package/dist/cjs/{utils-fd644316.js → utils-8c3bf659.js} +13 -4
- package/dist/cjs/{utils-0c3168ef.js → utils-c1d2e426.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Checkout.js +0 -1
- package/dist/collection/api/services/payout.service.js +5 -0
- package/dist/collection/assets/download-icon.js +2 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/billing-form/billing-form.css +2 -8162
- package/dist/collection/components/billing-form/billing-form.js +5 -4
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -3
- package/dist/collection/components/business-details/business-details-core.js +5 -14
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +2 -3
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +2 -3
- package/dist/collection/components/business-details/owner-details/owner-details.js +2 -3
- package/dist/collection/components/business-details/representative-details/representative-details.js +2 -3
- package/dist/collection/components/business-details/shared-business-details.css +3 -0
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-form.css +5 -8768
- package/dist/collection/components/business-forms/business-form/business-form.js +4 -3
- package/dist/collection/components/business-forms/owner-form/owner-form.js +2 -5
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -4
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +14 -2
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.css +4 -9155
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -12
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.css +5 -763
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.js +2 -2
- package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
- package/dist/collection/components/business-forms/schemas/schema-helpers.js +0 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +4 -4
- package/dist/collection/components/business-forms/utils/payload-parsers.js +2 -0
- package/dist/collection/components/business-list/business-list.js +3 -12
- package/dist/collection/components/checkout/checkout-core.css +3 -8147
- package/dist/collection/components/checkout/checkout-core.js +68 -8
- package/dist/collection/components/checkout/checkout.js +59 -1
- package/dist/collection/components/checkout/form-check-input.css +20 -0
- package/dist/collection/components/checkout/header.css +4 -0
- package/dist/collection/components/checkout/new-payment-method.js +95 -15
- package/dist/collection/components/checkout/payment-method-option-utils.js +2 -0
- package/dist/collection/components/checkout/payment-method-options.css +1 -7080
- package/dist/collection/components/checkout/payment-method-options.js +101 -17
- package/dist/collection/components/checkout/save-new-payment-method.js +38 -0
- package/dist/collection/components/checkout/saved-payment-method.js +12 -5
- package/dist/collection/components/checkout/sezzle-payment-method.js +12 -5
- package/dist/collection/components/details/details.js +3 -12
- package/dist/collection/components/form/form-control-checkbox.js +1 -1
- package/dist/collection/components/form/form-control-date.js +1 -1
- package/dist/collection/components/form/form-control-file.js +1 -1
- package/dist/collection/components/form/form-control-monetary.js +1 -1
- package/dist/collection/components/form/form-control-number-masked.js +1 -1
- package/dist/collection/components/form/form-control-number.js +1 -1
- package/dist/collection/components/form/form-control-select.js +1 -1
- package/dist/collection/components/form/form-control-text.js +1 -1
- package/dist/collection/components/form/utils.js +12 -3
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +2 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +1 -573
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.css +6 -8183
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +6 -7
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -2
- package/dist/collection/components/pagination-menu/pagination-menu.js +3 -14
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +3 -13
- package/dist/collection/components/payment-details/payment-details-core.js +9 -18
- package/dist/collection/components/payment-form/payment-form.css +3 -2513
- package/dist/collection/components/payment-form/payment-form.js +6 -5
- package/dist/collection/components/payment-form/payment-method-selector.css +5 -1881
- package/dist/collection/components/payment-form/payment-method-selector.js +2 -3
- package/dist/collection/components/payments-list/payments-list-core.js +6 -12
- package/dist/collection/components/payments-list/payments-list.js +3 -0
- package/dist/collection/components/payout-details/get-payout-csv.js +19 -0
- package/dist/collection/components/payout-details/payout-details-core.js +37 -12
- package/dist/collection/components/payout-details/payout-details.js +11 -4
- package/dist/collection/components/payouts-list/payouts-list-core.js +45 -14
- package/dist/collection/components/payouts-list/payouts-list.js +14 -6
- package/dist/collection/components/proceeds-list/proceeds-list.js +3 -12
- package/dist/collection/components/refund-form/refund-form.css +1 -7737
- package/dist/collection/components/refund-form/refund-form.js +4 -3
- package/dist/collection/components/skeleton/skeleton.css +1 -573
- package/dist/collection/components/skeleton/skeleton.js +2 -2
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +1 -12
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +1 -12
- package/dist/collection/components/subaccount-details/subaccount-details.js +3 -12
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +1 -12
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +1 -12
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +1 -12
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +1 -12
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +1 -1
- package/dist/collection/components/table/table.css +0 -8085
- package/dist/collection/components/table/table.js +3 -4
- package/dist/collection/utils/styled-host/styled-host.js +6 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +546 -64
- package/dist/esm/{Analytics-17c33e9e.js → Analytics-29fac206.js} +1 -1
- package/dist/esm/{SubAccount-8bf9cb0c.js → SubAccount-7fcb1450.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +13 -13
- package/dist/esm/{business-additional-questions-schema-b00a73ba.js → business-additional-questions-schema-956e3caf.js} +2 -2
- package/dist/esm/business-details-core.entry.js +6 -9
- package/dist/esm/form-alert_5.entry.js +3 -3
- package/dist/esm/form-control-checkbox_5.entry.js +10 -13
- package/dist/esm/form-control-date.entry.js +39 -0
- package/dist/esm/form-control-error-text_2.entry.js +31 -0
- package/dist/esm/form-control-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/{form-control-date_3.entry.js → form-control-number-masked_2.entry.js} +4 -40
- package/dist/esm/form-control-number.entry.js +2 -2
- package/dist/esm/{form-control-error-text_4.entry.js → form-control-select_2.entry.js} +4 -32
- package/dist/esm/get-payout-csv-9b4aaada.js +45 -0
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{index-4bd1eae9.js → index-57431c24.js} +15 -3
- package/dist/esm/{insurance-state-09754ab9.js → insurance-state-8ce01e59.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -13
- package/dist/esm/justifi-bank-account-form.entry.js +3 -3
- package/dist/esm/justifi-billing-form_2.entry.js +16 -1680
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +9 -8
- package/dist/esm/justifi-business-list.entry.js +4 -7
- package/dist/esm/justifi-card-form.entry.js +3 -3
- package/dist/esm/justifi-checkout-core.entry.js +21 -9
- package/dist/esm/justifi-checkout.entry.js +12 -4
- package/dist/esm/justifi-details.entry.js +4 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +73 -28
- package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -7
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-form.entry.js +9 -8
- package/dist/esm/justifi-payment-method-form.entry.js +1684 -0
- package/dist/esm/justifi-payment-method-selector.entry.js +3 -3
- package/dist/esm/justifi-payment-provisioning-core.entry.js +7 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -8
- package/dist/esm/justifi-payments-list.entry.js +4 -4
- package/dist/esm/justifi-payout-details.entry.js +14 -9
- package/dist/esm/justifi-payouts-list.entry.js +14 -11
- package/dist/esm/justifi-proceeds-list.entry.js +4 -7
- package/dist/esm/justifi-refund-form.entry.js +4 -3
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +14 -9
- package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -3
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-subaccount-details.entry.js +6 -9
- package/dist/esm/justifi-subaccounts-list.entry.js +4 -4
- package/dist/esm/justifi-table_2.entry.js +8 -12
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-02a6e473.js → package-1123f528.js} +1 -1
- package/dist/esm/{payload-parsers-a9e8f8cc.js → payload-parsers-acb719d1.js} +3 -1
- package/dist/esm/payment-details-core.entry.js +11 -14
- package/dist/esm/payments-list-core.entry.js +7 -7
- package/dist/esm/payout-details-core.entry.js +19 -8
- package/dist/esm/payouts-list-core.entry.js +29 -8
- package/dist/esm/{schema-validations-770bdf3e.js → schema-validations-a83ff220.js} +3 -4
- package/dist/esm/styled-host-57aae7fa.js +12 -0
- package/dist/esm/subaccount-account-details_4.entry.js +7 -23
- package/dist/esm/subaccount-bank-details.entry.js +3 -7
- package/dist/esm/subaccount-terms-details.entry.js +3 -7
- package/dist/esm/{utils-1e583166.js → utils-56719d07.js} +1 -1
- package/dist/esm/{utils-61a21dea.js → utils-5f4c4faa.js} +6 -1
- package/dist/esm/{utils-8de964da.js → utils-f4c4ba7d.js} +13 -4
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/additional-questions-details2.js +3 -4
- package/dist/module/additional-questions.js +1 -1
- package/dist/module/billing-form.js +5 -4
- package/dist/module/business-additional-questions-form-step.js +1 -1
- package/dist/module/business-core-info-form-step.js +3 -2
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-details-core2.js +5 -8
- package/dist/module/business-representative-form-step.js +1 -4
- package/dist/module/business-terms-conditions-text.js +2 -2
- package/dist/module/checkout-core.js +44 -24
- package/dist/module/details.js +3 -6
- package/dist/module/form-control-checkbox2.js +1 -1
- package/dist/module/form-control-date2.js +1 -1
- package/dist/module/form-control-file2.js +1 -1
- package/dist/module/form-control-monetary2.js +1 -1
- package/dist/module/form-control-number-masked2.js +1 -1
- package/dist/module/form-control-number.js +1 -1
- package/dist/module/form-control-select2.js +1 -1
- package/dist/module/form-control-text2.js +1 -1
- package/dist/module/generic-info-details2.js +3 -4
- package/dist/module/get-payout-csv.js +45 -0
- package/dist/module/gross-payment-chart-core2.js +2 -2
- package/dist/module/justifi-business-form.js +4 -3
- package/dist/module/justifi-business-list.js +3 -6
- package/dist/module/justifi-checkout.js +35 -20
- package/dist/module/justifi-payment-balance-transactions.js +5 -9
- package/dist/module/justifi-payment-form.js +6 -5
- package/dist/module/justifi-payment-provisioning.js +2 -7
- package/dist/module/justifi-payments-list.js +19 -1
- package/dist/module/justifi-payout-details.js +11 -5
- package/dist/module/justifi-payouts-list.js +30 -8
- package/dist/module/justifi-proceeds-list.js +3 -6
- package/dist/module/justifi-refund-form.js +4 -3
- package/dist/module/justifi-save-new-payment-method.d.ts +11 -0
- package/dist/module/justifi-save-new-payment-method.js +6 -0
- package/dist/module/justifi-season-interruption-insurance.js +1 -2
- package/dist/module/justifi-subaccount-details.js +4 -7
- package/dist/module/justifi-subaccounts-list.js +2 -2
- package/dist/module/legal-address-details2.js +3 -4
- package/dist/module/new-payment-method.js +52 -24
- package/dist/module/owner-details2.js +3 -4
- package/dist/module/owner-form.js +2 -5
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +4 -9
- package/dist/module/payload-parsers.js +2 -0
- package/dist/module/payment-details-core2.js +10 -13
- package/dist/module/payment-method-options.js +56 -28
- package/dist/module/payment-method-selector.js +3 -4
- package/dist/module/payment-provisioning-core.js +9 -3
- package/dist/module/payments-list-core2.js +26 -8
- package/dist/module/payout-details-core2.js +19 -7
- package/dist/module/payouts-list-core2.js +49 -9
- package/dist/module/representative-details2.js +3 -4
- package/dist/module/save-new-payment-method.js +36 -0
- package/dist/module/saved-payment-method.js +7 -2
- package/dist/module/schema-validations.js +3 -4
- package/dist/module/season-interruption-insurance-core.js +12 -7
- package/dist/module/sezzle-payment-method.js +5 -2
- package/dist/module/skeleton.js +2 -2
- package/dist/module/styled-host.js +12 -0
- package/dist/module/subaccount-account-details2.js +2 -7
- package/dist/module/subaccount-bank-details.js +2 -7
- package/dist/module/subaccount-merchant-details2.js +3 -8
- package/dist/module/subaccount-owners-details2.js +2 -7
- package/dist/module/subaccount-representative-details2.js +2 -7
- package/dist/module/subaccount-terms-details.js +2 -7
- package/dist/module/table.js +4 -5
- package/dist/module/utils2.js +6 -1
- package/dist/module/utils3.js +12 -3
- package/dist/types/api/Checkout.d.ts +6 -0
- package/dist/types/api/services/payout.service.d.ts +2 -0
- package/dist/types/assets/download-icon.d.ts +1 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +0 -1
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +0 -1
- package/dist/types/components/business-forms/schemas/schema-helpers.d.ts +0 -1
- package/dist/types/components/checkout/checkout-core.d.ts +5 -1
- package/dist/types/components/checkout/checkout.d.ts +5 -0
- package/dist/types/components/checkout/new-payment-method.d.ts +8 -2
- package/dist/types/components/checkout/payment-method-option-utils.d.ts +1 -0
- package/dist/types/components/checkout/payment-method-options.d.ts +6 -2
- package/dist/types/components/checkout/payment-method-payload.d.ts +1 -0
- package/dist/types/components/checkout/save-new-payment-method.d.ts +7 -0
- package/dist/types/components/checkout/saved-payment-method.d.ts +1 -1
- package/dist/types/components/checkout/sezzle-payment-method.d.ts +1 -1
- package/dist/types/components/form/utils.d.ts +1 -1
- package/dist/types/components/payment-method-form/payment-method-responses.d.ts +6 -4
- package/dist/types/components/payments-list/payments-list-core.d.ts +1 -0
- package/dist/types/components/payments-list/payments-list.d.ts +3 -0
- package/dist/types/components/payout-details/get-payout-csv.d.ts +7 -0
- package/dist/types/components/payout-details/payout-details-core.d.ts +2 -0
- package/dist/types/components/payout-details/payout-details.d.ts +2 -1
- package/dist/types/components/payouts-list/payouts-list-core.d.ts +3 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +5 -1
- package/dist/types/components.d.ts +83 -12
- package/dist/types/utils/styled-host/styled-host.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/{p-851e57f4.js → p-092e080c.js} +1 -1
- package/dist/webcomponents/p-09affce4.entry.js +1 -0
- package/dist/webcomponents/p-0a4a9ccd.entry.js +1 -0
- package/dist/webcomponents/{p-7c28a80d.entry.js → p-0dca0770.entry.js} +1 -1
- package/dist/webcomponents/p-0e4a54c8.entry.js +1 -0
- package/dist/webcomponents/p-0ed3c1d2.entry.js +1 -0
- package/dist/webcomponents/p-10b57ac6.entry.js +1 -0
- package/dist/webcomponents/p-1737f6bf.entry.js +1 -0
- package/dist/webcomponents/{p-ebce7b2f.entry.js → p-2244e679.entry.js} +1 -1
- package/dist/webcomponents/p-2306d44d.entry.js +1 -0
- package/dist/webcomponents/{p-f7b6dcc4.js → p-2338affa.js} +1 -1
- package/dist/webcomponents/p-2af3672b.entry.js +1 -0
- package/dist/webcomponents/p-3294856b.entry.js +1 -0
- package/dist/webcomponents/p-3514b616.entry.js +1 -0
- package/dist/webcomponents/p-390157c9.entry.js +1 -0
- package/dist/webcomponents/p-3fd13ca3.js +1 -0
- package/dist/webcomponents/p-412c7a22.entry.js +1 -0
- package/dist/webcomponents/p-464e4dfe.entry.js +1 -0
- package/dist/webcomponents/p-49b8e112.js +1 -0
- package/dist/webcomponents/{p-808c8988.entry.js → p-4b9587ec.entry.js} +1 -1
- package/dist/webcomponents/p-531d873a.entry.js +1 -0
- package/dist/webcomponents/p-54287db6.entry.js +1 -0
- package/dist/webcomponents/p-547a2cd0.entry.js +1 -0
- package/dist/webcomponents/p-571d7f1a.entry.js +1 -0
- package/dist/webcomponents/p-5963bcdc.entry.js +1 -0
- package/dist/webcomponents/p-5b1451e7.entry.js +1 -0
- package/dist/webcomponents/p-66758365.entry.js +1 -0
- package/dist/webcomponents/{p-3394ff6c.js → p-667a5aa8.js} +1 -1
- package/dist/webcomponents/p-67e497aa.entry.js +1 -0
- package/dist/webcomponents/p-68fd8283.js +1 -0
- package/dist/webcomponents/p-6bcf621a.entry.js +1 -0
- package/dist/webcomponents/p-6bd5d569.entry.js +1 -0
- package/dist/webcomponents/p-76180bb4.entry.js +1 -0
- package/dist/webcomponents/p-77dc159c.entry.js +1 -0
- package/dist/webcomponents/{p-3a7e0753.entry.js → p-7a346c0b.entry.js} +1 -1
- package/dist/webcomponents/p-7d6aba64.entry.js +1 -0
- package/dist/webcomponents/p-81d3eda6.entry.js +1 -0
- package/dist/webcomponents/p-85fc69e5.js +1 -0
- package/dist/webcomponents/p-87932e16.js +1 -0
- package/dist/webcomponents/p-88c7ef46.entry.js +1 -0
- package/dist/webcomponents/p-89887332.js +1 -0
- package/dist/webcomponents/p-8cc7a418.entry.js +1 -0
- package/dist/webcomponents/p-8dd22c8d.entry.js +1 -0
- package/dist/webcomponents/p-959b478a.entry.js +19 -0
- package/dist/webcomponents/{p-3f06ce2f.entry.js → p-9631b768.entry.js} +1 -1
- package/dist/webcomponents/p-9e7c3231.entry.js +1 -0
- package/dist/webcomponents/{p-9601cf9d.entry.js → p-bb32b91c.entry.js} +1 -1
- package/dist/webcomponents/p-bbc18b9f.entry.js +1 -0
- package/dist/webcomponents/{p-4b4fc43d.js → p-c4264aaf.js} +1 -1
- package/dist/webcomponents/p-cb9ee476.entry.js +1 -0
- package/dist/webcomponents/p-d083a342.entry.js +1 -0
- package/dist/webcomponents/{p-288c95b3.entry.js → p-d5612f35.entry.js} +1 -1
- package/dist/webcomponents/p-debeefbb.entry.js +1 -0
- package/dist/webcomponents/{p-e3a31451.entry.js → p-df38dd21.entry.js} +1 -1
- package/dist/webcomponents/p-e0bcfdb5.entry.js +1 -0
- package/dist/webcomponents/{p-cb68e8fa.js → p-e1651130.js} +1 -1
- package/dist/webcomponents/p-e46929a1.entry.js +1 -0
- package/dist/webcomponents/{p-fee616cf.entry.js → p-e85ef4af.entry.js} +1 -1
- package/dist/webcomponents/{p-fb53112b.js → p-e8c651b8.js} +1 -1
- package/dist/webcomponents/p-ea7c77a3.entry.js +1 -0
- package/dist/webcomponents/{p-2451611d.entry.js → p-f3555f0b.entry.js} +1 -1
- package/dist/webcomponents/p-fad19d75.js +2 -0
- package/dist/webcomponents/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/payout.service-eec372aa.js +0 -22
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +0 -7348
- package/dist/collection/components/business-details/business-details.css +0 -6446
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +0 -7348
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +0 -7348
- package/dist/collection/components/business-details/owner-details/owner-details.css +0 -7348
- package/dist/collection/components/business-details/representative-details/representative-details.css +0 -7348
- package/dist/collection/components/business-list/business-list.css +0 -579
- package/dist/collection/components/details/details.css +0 -7993
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
- package/dist/collection/components/payment-details/payment-details.css +0 -7993
- package/dist/collection/components/payments-list/payments-list.css +0 -579
- package/dist/collection/components/payout-details/payout-details.css +0 -7993
- package/dist/collection/components/payouts-list/payouts-list.css +0 -579
- package/dist/collection/components/proceeds-list/proceeds-list.css +0 -579
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-details.css +0 -7993
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +0 -7352
- package/dist/esm/payout.service-28b9594f.js +0 -20
- package/dist/module/payout.service.js +0 -20
- package/dist/webcomponents/p-023fe908.entry.js +0 -1
- package/dist/webcomponents/p-038fb958.entry.js +0 -1
- package/dist/webcomponents/p-06baf263.entry.js +0 -1
- package/dist/webcomponents/p-0f10316f.entry.js +0 -1
- package/dist/webcomponents/p-144e4bda.js +0 -1
- package/dist/webcomponents/p-1e53021d.entry.js +0 -1
- package/dist/webcomponents/p-1feebf9c.entry.js +0 -1
- package/dist/webcomponents/p-26779944.entry.js +0 -1
- package/dist/webcomponents/p-306aea52.entry.js +0 -1
- package/dist/webcomponents/p-31031d15.entry.js +0 -1
- package/dist/webcomponents/p-4791c1f2.entry.js +0 -1
- package/dist/webcomponents/p-4b260a52.entry.js +0 -1
- package/dist/webcomponents/p-56275f64.entry.js +0 -1
- package/dist/webcomponents/p-64d1aeb8.entry.js +0 -1
- package/dist/webcomponents/p-65969627.entry.js +0 -19
- package/dist/webcomponents/p-68f3a7b0.entry.js +0 -1
- package/dist/webcomponents/p-6b05f357.entry.js +0 -1
- package/dist/webcomponents/p-6ce586e0.entry.js +0 -1
- package/dist/webcomponents/p-71800e4c.js +0 -1
- package/dist/webcomponents/p-7ae2d26f.entry.js +0 -1
- package/dist/webcomponents/p-88d68804.entry.js +0 -1
- package/dist/webcomponents/p-8a6049ed.js +0 -1
- package/dist/webcomponents/p-8e8f5033.entry.js +0 -1
- package/dist/webcomponents/p-9228912b.entry.js +0 -1
- package/dist/webcomponents/p-923c37a2.entry.js +0 -1
- package/dist/webcomponents/p-9b1e7f5e.entry.js +0 -1
- package/dist/webcomponents/p-9c00adf1.entry.js +0 -1
- package/dist/webcomponents/p-9e5d765c.js +0 -1
- package/dist/webcomponents/p-a33c3e1c.entry.js +0 -1
- package/dist/webcomponents/p-a63a6fb9.js +0 -2
- package/dist/webcomponents/p-b01c0120.entry.js +0 -1
- package/dist/webcomponents/p-b94bf537.entry.js +0 -1
- package/dist/webcomponents/p-bacd9d6e.entry.js +0 -1
- package/dist/webcomponents/p-c85fb952.entry.js +0 -1
- package/dist/webcomponents/p-ca39c89f.js +0 -1
- package/dist/webcomponents/p-d42e284d.entry.js +0 -1
- package/dist/webcomponents/p-e673e681.entry.js +0 -1
- package/dist/webcomponents/p-eefe2f29.entry.js +0 -1
- package/dist/webcomponents/p-f14db665.entry.js +0 -1
- package/dist/webcomponents/p-f18e63c3.entry.js +0 -1
- package/dist/webcomponents/p-f3ae3cb6.entry.js +0 -1
- package/dist/webcomponents/p-fa9773c0.entry.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { h
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { formatCurrency } from "../../utils/utils";
|
|
3
3
|
import { config } from "../../../config";
|
|
4
4
|
import { Checkout } from "../../api/Checkout";
|
|
5
5
|
import { ComponentErrorSeverity } from "../../api/ComponentError";
|
|
6
6
|
import { insuranceValues, insuranceValuesOn, validateInsuranceValues } from "../insurance/insurance-state";
|
|
7
|
+
import StyledHost from "../../utils/styled-host/styled-host";
|
|
7
8
|
export class CheckoutCore {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.completeCheckout = async (payment) => {
|
|
@@ -41,6 +42,10 @@ export class CheckoutCore {
|
|
|
41
42
|
this.serverError = undefined;
|
|
42
43
|
this.renderState = 'loading';
|
|
43
44
|
this.creatingNewPaymentMethod = false;
|
|
45
|
+
this.insuranceToggled = false;
|
|
46
|
+
}
|
|
47
|
+
async fillBillingForm(fields) {
|
|
48
|
+
this.paymentMethodOptionsRef.fillBillingForm(fields);
|
|
44
49
|
}
|
|
45
50
|
componentWillLoad() {
|
|
46
51
|
if (this.getCheckout) {
|
|
@@ -49,6 +54,7 @@ export class CheckoutCore {
|
|
|
49
54
|
insuranceValuesOn('set', (key) => {
|
|
50
55
|
const value = insuranceValues[key];
|
|
51
56
|
if (value !== undefined) {
|
|
57
|
+
this.insuranceToggled = value;
|
|
52
58
|
this.fetchData();
|
|
53
59
|
}
|
|
54
60
|
});
|
|
@@ -59,6 +65,8 @@ export class CheckoutCore {
|
|
|
59
65
|
this.getCheckout({
|
|
60
66
|
onSuccess: ({ checkout }) => {
|
|
61
67
|
this.checkout = new Checkout(checkout);
|
|
68
|
+
const { status } = this.checkout;
|
|
69
|
+
this.loaded.emit({ checkout_status: status });
|
|
62
70
|
this.renderState = 'success';
|
|
63
71
|
},
|
|
64
72
|
onError: ({ error, code, severity }) => {
|
|
@@ -78,8 +86,8 @@ export class CheckoutCore {
|
|
|
78
86
|
event.preventDefault();
|
|
79
87
|
this.renderState = 'loading';
|
|
80
88
|
const insuranceValidation = validateInsuranceValues();
|
|
81
|
-
const payload = await this.paymentMethodOptionsRef.resolvePaymentMethod();
|
|
82
|
-
if (
|
|
89
|
+
const payload = await this.paymentMethodOptionsRef.resolvePaymentMethod(insuranceValidation);
|
|
90
|
+
if (payload.validationError) {
|
|
83
91
|
this.renderState = 'error';
|
|
84
92
|
}
|
|
85
93
|
else if (payload.error) {
|
|
@@ -109,25 +117,25 @@ export class CheckoutCore {
|
|
|
109
117
|
}
|
|
110
118
|
get paymentType() {
|
|
111
119
|
var _a, _b, _c, _d, _e;
|
|
112
|
-
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { variant: "rounded", height: "300px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": !this.disableCreditCard, "show-ach": !this.disableBankAccount, "show-bnpl": !this.disableBnpl,
|
|
120
|
+
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { variant: "rounded", height: "300px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("justifi-payment-method-options", { ref: (el) => (this.paymentMethodOptionsRef = el), "show-card": !this.disableCreditCard, "show-ach": !this.disableBankAccount, "show-bnpl": !this.disableBnpl, paymentMethodGroupId: (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_method_group_id, "show-saved-payment-methods": !this.disablePaymentMethodGroup, bnpl: (_b = this.checkout) === null || _b === void 0 ? void 0 : _b.bnpl, authToken: this.authToken, "account-id": (_c = this.checkout) === null || _c === void 0 ? void 0 : _c.account_id, savedPaymentMethods: ((_d = this.checkout) === null || _d === void 0 ? void 0 : _d.payment_methods) || [], paymentAmount: (_e = this.checkout) === null || _e === void 0 ? void 0 : _e.payment_amount, insuranceToggled: this.insuranceToggled }))));
|
|
113
121
|
}
|
|
114
122
|
get summary() {
|
|
115
123
|
var _a, _b;
|
|
116
124
|
return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h("justifi-skeleton", { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
|
|
117
125
|
}
|
|
118
126
|
render() {
|
|
119
|
-
return (h(
|
|
127
|
+
return (h(StyledHost, { key: '2b96ee13916f7da0c872ba6f72223368b2c666e3' }, h("div", { key: 'c9b10b32f8b3c69fef559b6ff9753efad3ed1fef', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '2bce2147ecb9b18d5d3b60843a0af77b2fc4bcb2', class: "col-12" }, h("h2", { key: '690fe9231ec98d3500497c27ae73ff0ed25549ef', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '719ba6b07d282b18e85a8ef330c21f30a1caf921', class: "col-12" }, h("slot", { key: 'd75c873384397b080e17dfcb7571e29eacd4c298', name: "insurance" })), h("div", { key: '8a72d01adba931e56bc685aa4d8bc53b1db91bdc', class: "col-12 mt-4" }, h("h2", { key: 'b09d2c310b22c01287d8783ca82b4108b0e18868', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: '00b969e4d3ea8fbfa0325aae334862a485cd117b', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: 'a952ad0a2070926eb6d73fa86b9fd7c9b9f82748', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: 'aec96d897f66e146940c133bfe2be046dbe83a34', class: "col-12" }, h("div", { key: '5b5adba09d08b6381f3fe8b84a494433f58be556', class: "d-flex justify-content-end" }, h("button", { key: '4048bd514eebcabca392d2f33691491ed9be7037', type: "submit", onClick: event => this.submit(event), disabled: this.isLoading, part: "pay-button", class: `btn btn-primary jfi-submit-button ${this.isLoading ? 'jfi-submit-button-loading' : ''}` }, this.isLoading ? this.loadingSpinner : 'Pay'))))));
|
|
120
128
|
}
|
|
121
129
|
static get is() { return "justifi-checkout-core"; }
|
|
122
130
|
static get encapsulation() { return "shadow"; }
|
|
123
131
|
static get originalStyleUrls() {
|
|
124
132
|
return {
|
|
125
|
-
"$": ["checkout-core.
|
|
133
|
+
"$": ["checkout-core.css", "header.css"]
|
|
126
134
|
};
|
|
127
135
|
}
|
|
128
136
|
static get styleUrls() {
|
|
129
137
|
return {
|
|
130
|
-
"$": ["checkout-core.css"]
|
|
138
|
+
"$": ["checkout-core.css", "header.css"]
|
|
131
139
|
};
|
|
132
140
|
}
|
|
133
141
|
static get properties() {
|
|
@@ -300,7 +308,8 @@ export class CheckoutCore {
|
|
|
300
308
|
"checkout": {},
|
|
301
309
|
"serverError": {},
|
|
302
310
|
"renderState": {},
|
|
303
|
-
"creatingNewPaymentMethod": {}
|
|
311
|
+
"creatingNewPaymentMethod": {},
|
|
312
|
+
"insuranceToggled": {}
|
|
304
313
|
};
|
|
305
314
|
}
|
|
306
315
|
static get events() {
|
|
@@ -346,6 +355,57 @@ export class CheckoutCore {
|
|
|
346
355
|
}
|
|
347
356
|
}
|
|
348
357
|
}
|
|
358
|
+
}, {
|
|
359
|
+
"method": "loaded",
|
|
360
|
+
"name": "loaded",
|
|
361
|
+
"bubbles": true,
|
|
362
|
+
"cancelable": true,
|
|
363
|
+
"composed": true,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": ""
|
|
367
|
+
},
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "ILoadedEventResponse",
|
|
370
|
+
"resolved": "{ checkout_status: ICheckoutStatus; }",
|
|
371
|
+
"references": {
|
|
372
|
+
"ILoadedEventResponse": {
|
|
373
|
+
"location": "import",
|
|
374
|
+
"path": "../../api/Checkout",
|
|
375
|
+
"id": "src/api/Checkout.ts::ILoadedEventResponse"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
349
379
|
}];
|
|
350
380
|
}
|
|
381
|
+
static get methods() {
|
|
382
|
+
return {
|
|
383
|
+
"fillBillingForm": {
|
|
384
|
+
"complexType": {
|
|
385
|
+
"signature": "(fields: BillingFormFields) => Promise<void>",
|
|
386
|
+
"parameters": [{
|
|
387
|
+
"name": "fields",
|
|
388
|
+
"type": "BillingFormFields",
|
|
389
|
+
"docs": ""
|
|
390
|
+
}],
|
|
391
|
+
"references": {
|
|
392
|
+
"Promise": {
|
|
393
|
+
"location": "global",
|
|
394
|
+
"id": "global::Promise"
|
|
395
|
+
},
|
|
396
|
+
"BillingFormFields": {
|
|
397
|
+
"location": "import",
|
|
398
|
+
"path": "../billing-form/billing-form-schema",
|
|
399
|
+
"id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"return": "Promise<void>"
|
|
403
|
+
},
|
|
404
|
+
"docs": {
|
|
405
|
+
"text": "",
|
|
406
|
+
"tags": []
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
351
411
|
}
|
|
@@ -47,8 +47,15 @@ export class Checkout {
|
|
|
47
47
|
propChanged() {
|
|
48
48
|
this.initializeGetCheckout();
|
|
49
49
|
}
|
|
50
|
+
async fillBillingForm(fields) {
|
|
51
|
+
this.checkoutCoreRef.fillBillingForm(fields);
|
|
52
|
+
}
|
|
50
53
|
render() {
|
|
51
|
-
return (h("justifi-checkout-core", { key: '
|
|
54
|
+
return (h("justifi-checkout-core", { key: '5dd0269c6fd04bff259204e80800803e618ffa83', getCheckout: this.getCheckout, authToken: this.authToken, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup, ref: el => {
|
|
55
|
+
if (el) {
|
|
56
|
+
this.checkoutCoreRef = el;
|
|
57
|
+
}
|
|
58
|
+
} }, h("div", { key: 'a659fc258e90c32b4b16ea1d92492c0e16f830a3', slot: "insurance" }, h("slot", { key: 'c92ba9f86f72b372cafabbdd7aba92cee0af44f7', name: "insurance" }))));
|
|
52
59
|
}
|
|
53
60
|
static get is() { return "justifi-checkout"; }
|
|
54
61
|
static get properties() {
|
|
@@ -203,8 +210,59 @@ export class Checkout {
|
|
|
203
210
|
}
|
|
204
211
|
}
|
|
205
212
|
}
|
|
213
|
+
}, {
|
|
214
|
+
"method": "loadedEvent",
|
|
215
|
+
"name": "loaded",
|
|
216
|
+
"bubbles": true,
|
|
217
|
+
"cancelable": true,
|
|
218
|
+
"composed": true,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": ""
|
|
222
|
+
},
|
|
223
|
+
"complexType": {
|
|
224
|
+
"original": "ILoadedEventResponse",
|
|
225
|
+
"resolved": "{ checkout_status: ICheckoutStatus; }",
|
|
226
|
+
"references": {
|
|
227
|
+
"ILoadedEventResponse": {
|
|
228
|
+
"location": "import",
|
|
229
|
+
"path": "../../api",
|
|
230
|
+
"id": "src/api/index.ts::ILoadedEventResponse"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
206
234
|
}];
|
|
207
235
|
}
|
|
236
|
+
static get methods() {
|
|
237
|
+
return {
|
|
238
|
+
"fillBillingForm": {
|
|
239
|
+
"complexType": {
|
|
240
|
+
"signature": "(fields: BillingFormFields) => Promise<void>",
|
|
241
|
+
"parameters": [{
|
|
242
|
+
"name": "fields",
|
|
243
|
+
"type": "BillingFormFields",
|
|
244
|
+
"docs": ""
|
|
245
|
+
}],
|
|
246
|
+
"references": {
|
|
247
|
+
"Promise": {
|
|
248
|
+
"location": "global",
|
|
249
|
+
"id": "global::Promise"
|
|
250
|
+
},
|
|
251
|
+
"BillingFormFields": {
|
|
252
|
+
"location": "import",
|
|
253
|
+
"path": "../billing-form/billing-form-schema",
|
|
254
|
+
"id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"return": "Promise<void>"
|
|
258
|
+
},
|
|
259
|
+
"docs": {
|
|
260
|
+
"text": "",
|
|
261
|
+
"tags": []
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
}
|
|
208
266
|
static get watchers() {
|
|
209
267
|
return [{
|
|
210
268
|
"propName": "authToken",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.form-check-input,
|
|
2
|
+
label {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.form-check-input {
|
|
7
|
+
background-color: var(--jfi-radio-button-background-color);
|
|
8
|
+
border-color: var(--jfi-radio-button-border-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.form-check-input:checked,
|
|
12
|
+
.form-check-input:checked:focus {
|
|
13
|
+
background-color: var(--jfi-radio-button-background-color-selected);
|
|
14
|
+
border-color: var(--jfi-radio-button-border-color-selected);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-check-input:focus {
|
|
18
|
+
border-color: var(--jfi-radio-button-border-color-focus);
|
|
19
|
+
box-shadow: var(--jfi-radio-button-box-shadow-focus);
|
|
20
|
+
}
|
|
@@ -10,19 +10,27 @@ export class NewPaymentMethod {
|
|
|
10
10
|
this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
|
|
11
11
|
};
|
|
12
12
|
this.iframeOrigin = config.iframeOrigin;
|
|
13
|
-
this.
|
|
13
|
+
this.authToken = undefined;
|
|
14
14
|
this.accountId = undefined;
|
|
15
15
|
this.paymentMethodOption = undefined;
|
|
16
|
+
this.paymentMethodGroupId = undefined;
|
|
16
17
|
this.isSelected = undefined;
|
|
18
|
+
this.saveNewPaymentMethodChecked = false;
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
handleCheckboxChanged(event) {
|
|
21
|
+
this.saveNewPaymentMethodChecked = event.detail;
|
|
22
|
+
}
|
|
23
|
+
async fillBillingForm(fields) {
|
|
24
|
+
this.billingFormRef.fill(fields);
|
|
25
|
+
}
|
|
26
|
+
async resolvePaymentMethod(insuranceValidation) {
|
|
19
27
|
var _a, _b;
|
|
20
28
|
if (!this.paymentMethodFormRef || !this.billingFormRef)
|
|
21
29
|
return;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
const isValid = await this.validate();
|
|
31
|
+
if (!isValid || !insuranceValidation.isValid) {
|
|
32
|
+
return { validationError: true };
|
|
33
|
+
}
|
|
26
34
|
const tokenizeResponse = await this.tokenize();
|
|
27
35
|
if (tokenizeResponse.error) {
|
|
28
36
|
return { error: tokenizeResponse.error };
|
|
@@ -32,11 +40,22 @@ export class NewPaymentMethod {
|
|
|
32
40
|
return { token: ((_a = tokenizeRessponseData.card) === null || _a === void 0 ? void 0 : _a.token) || ((_b = tokenizeRessponseData.bank_account) === null || _b === void 0 ? void 0 : _b.token) };
|
|
33
41
|
}
|
|
34
42
|
}
|
|
43
|
+
async validate() {
|
|
44
|
+
const billingFormValidation = await this.billingFormRef.validate();
|
|
45
|
+
const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
|
|
46
|
+
return billingFormValidation.isValid && paymentMethodFormValidation.isValid;
|
|
47
|
+
}
|
|
35
48
|
async tokenize() {
|
|
36
49
|
try {
|
|
37
50
|
const billingFormFieldValues = await this.billingFormRef.getValues();
|
|
38
|
-
|
|
39
|
-
|
|
51
|
+
let paymentMethodData;
|
|
52
|
+
if (this.saveNewPaymentMethodChecked) {
|
|
53
|
+
paymentMethodData = Object.assign(Object.assign({}, billingFormFieldValues), { payment_method_group_id: this.paymentMethodGroupId });
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
paymentMethodData = Object.assign({}, billingFormFieldValues);
|
|
57
|
+
}
|
|
58
|
+
const clientId = this.authToken;
|
|
40
59
|
const tokenizeResponse = await this.paymentMethodFormRef.tokenize(clientId, paymentMethodData, this.accountId);
|
|
41
60
|
return tokenizeResponse;
|
|
42
61
|
}
|
|
@@ -46,11 +65,11 @@ export class NewPaymentMethod {
|
|
|
46
65
|
}
|
|
47
66
|
showNewPaymentMethodForm() {
|
|
48
67
|
var _a;
|
|
49
|
-
return (h("div", { class: "mt-2 pb-4 border-bottom" }, h("div", { class: "mb-3" }, h("justifi-payment-method-form", { ref: (el) => (this.paymentMethodFormRef = el), "payment-method-form-type": (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, "iframe-origin": this.iframeOrigin })), h("h3", { class: "fs-6 fw-bold lh-lg mb-4" }, "Billing address"), h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el) })));
|
|
68
|
+
return (h("div", { class: "mt-2 pb-4 border-bottom" }, h("div", { class: "mb-3" }, h("justifi-payment-method-form", { ref: (el) => (this.paymentMethodFormRef = el), "payment-method-form-type": (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, "iframe-origin": this.iframeOrigin })), h("h3", { class: "fs-6 fw-bold lh-lg mb-4" }, "Billing address"), h("justifi-billing-form", { ref: (el) => (this.billingFormRef = el) }), h("justifi-save-new-payment-method", { hidden: !this.paymentMethodGroupId })));
|
|
50
69
|
}
|
|
51
70
|
render() {
|
|
52
71
|
var _a, _b, _c, _d;
|
|
53
|
-
return (h("div", { key: '
|
|
72
|
+
return (h("div", { key: '450c5e6cb4d59d63733c78dff2aa2d59fe2ac579', class: "payment-method" }, h("div", { key: '6fc5d18cbf1d6287e5b29859ceb56e36088ad43a', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '508d561fb7bba38e7fc0b91c519b9e2aa7529e2d', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'bc34b7f590107caa9f99e7fff8741cbbbe6c93e5', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
|
|
54
73
|
}
|
|
55
74
|
static get is() { return "justifi-new-payment-method"; }
|
|
56
75
|
static get properties() {
|
|
@@ -73,7 +92,7 @@ export class NewPaymentMethod {
|
|
|
73
92
|
"reflect": false,
|
|
74
93
|
"defaultValue": "config.iframeOrigin"
|
|
75
94
|
},
|
|
76
|
-
"
|
|
95
|
+
"authToken": {
|
|
77
96
|
"type": "string",
|
|
78
97
|
"mutable": false,
|
|
79
98
|
"complexType": {
|
|
@@ -87,7 +106,7 @@ export class NewPaymentMethod {
|
|
|
87
106
|
"tags": [],
|
|
88
107
|
"text": ""
|
|
89
108
|
},
|
|
90
|
-
"attribute": "
|
|
109
|
+
"attribute": "auth-token",
|
|
91
110
|
"reflect": false
|
|
92
111
|
},
|
|
93
112
|
"accountId": {
|
|
@@ -117,7 +136,7 @@ export class NewPaymentMethod {
|
|
|
117
136
|
"PaymentMethodOption": {
|
|
118
137
|
"location": "import",
|
|
119
138
|
"path": "./payment-method-option-utils",
|
|
120
|
-
"id": "src/components/checkout/payment-method-option-utils.
|
|
139
|
+
"id": "src/components/checkout/payment-method-option-utils.ts::PaymentMethodOption"
|
|
121
140
|
}
|
|
122
141
|
}
|
|
123
142
|
},
|
|
@@ -128,6 +147,23 @@ export class NewPaymentMethod {
|
|
|
128
147
|
"text": ""
|
|
129
148
|
}
|
|
130
149
|
},
|
|
150
|
+
"paymentMethodGroupId": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "string",
|
|
155
|
+
"resolved": "string",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"attribute": "payment-method-group-id",
|
|
165
|
+
"reflect": false
|
|
166
|
+
},
|
|
131
167
|
"isSelected": {
|
|
132
168
|
"type": "boolean",
|
|
133
169
|
"mutable": false,
|
|
@@ -147,6 +183,11 @@ export class NewPaymentMethod {
|
|
|
147
183
|
}
|
|
148
184
|
};
|
|
149
185
|
}
|
|
186
|
+
static get states() {
|
|
187
|
+
return {
|
|
188
|
+
"saveNewPaymentMethodChecked": {}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
150
191
|
static get events() {
|
|
151
192
|
return [{
|
|
152
193
|
"method": "paymentMethodOptionSelected",
|
|
@@ -167,10 +208,40 @@ export class NewPaymentMethod {
|
|
|
167
208
|
}
|
|
168
209
|
static get methods() {
|
|
169
210
|
return {
|
|
211
|
+
"fillBillingForm": {
|
|
212
|
+
"complexType": {
|
|
213
|
+
"signature": "(fields: BillingFormFields) => Promise<void>",
|
|
214
|
+
"parameters": [{
|
|
215
|
+
"name": "fields",
|
|
216
|
+
"type": "BillingFormFields",
|
|
217
|
+
"docs": ""
|
|
218
|
+
}],
|
|
219
|
+
"references": {
|
|
220
|
+
"Promise": {
|
|
221
|
+
"location": "global",
|
|
222
|
+
"id": "global::Promise"
|
|
223
|
+
},
|
|
224
|
+
"BillingFormFields": {
|
|
225
|
+
"location": "import",
|
|
226
|
+
"path": "../billing-form/billing-form-schema",
|
|
227
|
+
"id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"return": "Promise<void>"
|
|
231
|
+
},
|
|
232
|
+
"docs": {
|
|
233
|
+
"text": "",
|
|
234
|
+
"tags": []
|
|
235
|
+
}
|
|
236
|
+
},
|
|
170
237
|
"resolvePaymentMethod": {
|
|
171
238
|
"complexType": {
|
|
172
|
-
"signature": "() => Promise<PaymentMethodPayload>",
|
|
173
|
-
"parameters": [
|
|
239
|
+
"signature": "(insuranceValidation: any) => Promise<PaymentMethodPayload>",
|
|
240
|
+
"parameters": [{
|
|
241
|
+
"name": "insuranceValidation",
|
|
242
|
+
"type": "any",
|
|
243
|
+
"docs": ""
|
|
244
|
+
}],
|
|
174
245
|
"references": {
|
|
175
246
|
"Promise": {
|
|
176
247
|
"location": "global",
|
|
@@ -191,4 +262,13 @@ export class NewPaymentMethod {
|
|
|
191
262
|
}
|
|
192
263
|
};
|
|
193
264
|
}
|
|
265
|
+
static get listeners() {
|
|
266
|
+
return [{
|
|
267
|
+
"name": "checkboxChanged",
|
|
268
|
+
"method": "handleCheckboxChanged",
|
|
269
|
+
"target": undefined,
|
|
270
|
+
"capture": false,
|
|
271
|
+
"passive": false
|
|
272
|
+
}];
|
|
273
|
+
}
|
|
194
274
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { snakeToCamel } from "../../utils/utils";
|
|
1
2
|
export class PaymentMethodOption {
|
|
2
3
|
constructor(paymentMethod) {
|
|
3
4
|
this.id = paymentMethod.id;
|
|
4
5
|
this.brand = paymentMethod.brand;
|
|
5
6
|
this.acct_last_four = paymentMethod.acct_last_four;
|
|
7
|
+
this.type = snakeToCamel(paymentMethod.type);
|
|
6
8
|
}
|
|
7
9
|
}
|
|
8
10
|
;
|