@justifi/webcomponents 4.16.0 → 4.17.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-80336968.js} +1 -1
- package/dist/cjs/{SubAccount-4f4fac22.js → SubAccount-135ff8c8.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
- package/dist/cjs/{business-additional-questions-schema-606d1292.js → business-additional-questions-schema-cf545610.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
- package/dist/cjs/form-control-checkbox_5.cjs.entry.js +7 -10
- package/dist/cjs/form-control-date_3.cjs.entry.js +3 -3
- package/dist/cjs/form-control-error-text_4.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number.cjs.entry.js +1 -1
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +2 -2
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +8 -11
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +13 -1678
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-list.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +13 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +11 -3
- package/dist/cjs/justifi-details.cjs.entry.js +1 -1
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +68 -26
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1688 -0
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +1 -1
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-b40227dd.js → package-7b63c02b.js} +1 -1
- package/dist/cjs/{payload-parsers-6e4cf5d7.js → payload-parsers-78445405.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{schema-validations-9668fd79.js → schema-validations-2733de42.js} +3 -4
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +5 -5
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +1 -1
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +1 -1
- package/dist/cjs/{utils-fd644316.js → utils-742da2e3.js} +12 -3
- package/dist/cjs/{utils-17869710.js → utils-80191fbe.js} +6 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Checkout.js +0 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/billing-form/billing-form.js +2 -2
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
- 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/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/checkout/checkout-core.js +64 -5
- package/dist/collection/components/checkout/checkout.js +59 -1
- package/dist/collection/components/checkout/new-payment-method.js +94 -14
- package/dist/collection/components/checkout/payment-method-option-utils.js +2 -0
- package/dist/collection/components/checkout/payment-method-options.css +8 -0
- package/dist/collection/components/checkout/payment-method-options.js +98 -14
- package/dist/collection/components/checkout/save-new-payment-method.js +38 -0
- package/dist/collection/components/checkout/saved-payment-method.js +11 -4
- package/dist/collection/components/checkout/sezzle-payment-method.js +11 -4
- package/dist/collection/components/details/details.js +1 -1
- 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 +1 -1
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +2 -2
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -1
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +7 -7
- package/dist/collection/components/payment-form/payment-form.js +3 -3
- package/dist/collection/components/payment-form/payment-method-selector.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.js +1 -1
- package/dist/collection/components/refund-form/refund-form.js +1 -1
- package/dist/collection/components/skeleton/skeleton.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +1 -1
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +1 -1
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +415 -41
- package/dist/esm/{Analytics-17c33e9e.js → Analytics-c52faca6.js} +1 -1
- package/dist/esm/{SubAccount-8bf9cb0c.js → SubAccount-7fcb1450.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/{business-additional-questions-schema-b00a73ba.js → business-additional-questions-schema-956e3caf.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +2 -2
- package/dist/esm/form-control-checkbox_5.entry.js +7 -10
- package/dist/esm/form-control-date_3.entry.js +3 -3
- package/dist/esm/form-control-error-text_4.entry.js +2 -2
- package/dist/esm/form-control-file.entry.js +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-number.entry.js +1 -1
- package/dist/esm/gross-payment-chart-core.entry.js +2 -2
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +9 -12
- package/dist/esm/justifi-bank-account-form.entry.js +2 -2
- package/dist/esm/justifi-billing-form_2.entry.js +13 -1678
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +5 -5
- package/dist/esm/justifi-business-list.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +2 -2
- package/dist/esm/justifi-checkout-core.entry.js +13 -5
- package/dist/esm/justifi-checkout.entry.js +11 -3
- package/dist/esm/justifi-details.entry.js +1 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-new-payment-method_4.entry.js +68 -26
- package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +2 -2
- package/dist/esm/justifi-payment-form.entry.js +6 -6
- package/dist/esm/justifi-payment-method-form.entry.js +1684 -0
- package/dist/esm/justifi-payment-method-selector.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +2 -2
- package/dist/esm/justifi-payout-details.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +2 -2
- package/dist/esm/justifi-proceeds-list.entry.js +2 -2
- package/dist/esm/justifi-refund-form.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +3 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +1 -1
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-subaccount-details.entry.js +3 -3
- package/dist/esm/justifi-subaccounts-list.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-02a6e473.js → package-8ab448a3.js} +1 -1
- package/dist/esm/{payload-parsers-a9e8f8cc.js → payload-parsers-57289fc4.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +8 -8
- package/dist/esm/payments-list-core.entry.js +2 -2
- package/dist/esm/payout-details-core.entry.js +2 -2
- package/dist/esm/payouts-list-core.entry.js +2 -2
- package/dist/esm/{schema-validations-770bdf3e.js → schema-validations-a83ff220.js} +3 -4
- package/dist/esm/subaccount-account-details_4.entry.js +5 -5
- package/dist/esm/subaccount-bank-details.entry.js +1 -1
- package/dist/esm/subaccount-terms-details.entry.js +1 -1
- package/dist/esm/{utils-61a21dea.js → utils-5f4c4faa.js} +6 -1
- package/dist/esm/{utils-8de964da.js → utils-c7b3f21a.js} +12 -3
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/SubAccount.js +1 -1
- package/dist/module/additional-questions.js +1 -1
- package/dist/module/billing-form.js +2 -2
- 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-representative-form-step.js +1 -4
- package/dist/module/checkout-core.js +37 -21
- package/dist/module/details.js +1 -1
- 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/gross-payment-chart-core2.js +1 -1
- package/dist/module/justifi-checkout.js +35 -20
- package/dist/module/justifi-payment-balance-transactions.js +2 -2
- package/dist/module/justifi-payment-form.js +3 -3
- package/dist/module/justifi-proceeds-list.js +1 -1
- package/dist/module/justifi-refund-form.js +1 -1
- 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 -1
- package/dist/module/justifi-subaccount-details.js +2 -2
- package/dist/module/justifi-subaccounts-list.js +2 -2
- package/dist/module/new-payment-method.js +52 -24
- package/dist/module/owner-form.js +2 -5
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-options.js +51 -26
- package/dist/module/payment-method-selector.js +1 -1
- package/dist/module/payments-list-core2.js +2 -2
- package/dist/module/payout-details-core2.js +2 -2
- package/dist/module/payouts-list-core2.js +2 -2
- 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 +2 -2
- package/dist/module/sezzle-payment-method.js +5 -2
- package/dist/module/skeleton.js +1 -1
- package/dist/module/subaccount-account-details2.js +1 -1
- package/dist/module/subaccount-bank-details.js +1 -1
- package/dist/module/subaccount-merchant-details2.js +2 -2
- package/dist/module/subaccount-owners-details2.js +1 -1
- package/dist/module/subaccount-representative-details2.js +1 -1
- package/dist/module/subaccount-terms-details.js +1 -1
- 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/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.d.ts +55 -12
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/{p-4791c1f2.entry.js → p-00de4ae0.entry.js} +1 -1
- package/dist/webcomponents/{p-0f10316f.entry.js → p-015ba24e.entry.js} +1 -1
- package/dist/webcomponents/p-0575daac.js +1 -0
- package/dist/webcomponents/p-0a09edbb.entry.js +1 -0
- package/dist/webcomponents/{p-31031d15.entry.js → p-0fc18c89.entry.js} +1 -1
- package/dist/webcomponents/{p-f14db665.entry.js → p-100cb35c.entry.js} +1 -1
- package/dist/webcomponents/{p-b01c0120.entry.js → p-189dee9f.entry.js} +1 -1
- package/dist/webcomponents/{p-288c95b3.entry.js → p-1c60004a.entry.js} +1 -1
- package/dist/webcomponents/{p-65969627.entry.js → p-30a7bebc.entry.js} +2 -2
- package/dist/webcomponents/{p-7ae2d26f.entry.js → p-378bb067.entry.js} +1 -1
- package/dist/webcomponents/p-3fd13ca3.js +1 -0
- package/dist/webcomponents/{p-923c37a2.entry.js → p-404d7c56.entry.js} +1 -1
- package/dist/webcomponents/{p-f18e63c3.entry.js → p-43326623.entry.js} +1 -1
- package/dist/webcomponents/{p-9228912b.entry.js → p-4c5f9260.entry.js} +1 -1
- package/dist/webcomponents/{p-7c28a80d.entry.js → p-5309e887.entry.js} +1 -1
- package/dist/webcomponents/{p-fee616cf.entry.js → p-6006e085.entry.js} +1 -1
- package/dist/webcomponents/{p-9c00adf1.entry.js → p-61e486ad.entry.js} +1 -1
- package/dist/webcomponents/{p-eefe2f29.entry.js → p-738049aa.entry.js} +1 -1
- package/dist/webcomponents/{p-56275f64.entry.js → p-739f1e09.entry.js} +1 -1
- package/dist/webcomponents/{p-4b260a52.entry.js → p-7f77d91f.entry.js} +1 -1
- package/dist/webcomponents/{p-ebce7b2f.entry.js → p-84b3cead.entry.js} +1 -1
- package/dist/webcomponents/{p-06baf263.entry.js → p-8805d083.entry.js} +1 -1
- package/dist/webcomponents/p-89887332.js +1 -0
- package/dist/webcomponents/p-95c18035.entry.js +1 -0
- package/dist/webcomponents/{p-fa9773c0.entry.js → p-95c8c313.entry.js} +1 -1
- package/dist/webcomponents/p-97220d5b.entry.js +1 -0
- package/dist/webcomponents/{p-8e8f5033.entry.js → p-98985c7d.entry.js} +1 -1
- package/dist/webcomponents/{p-e3a31451.entry.js → p-9936c393.entry.js} +1 -1
- package/dist/webcomponents/p-9d03464e.entry.js +1 -0
- package/dist/webcomponents/{p-3a7e0753.entry.js → p-a34c28af.entry.js} +1 -1
- package/dist/webcomponents/{p-d42e284d.entry.js → p-a6477232.entry.js} +1 -1
- package/dist/webcomponents/{p-2451611d.entry.js → p-a90a6703.entry.js} +1 -1
- package/dist/webcomponents/{p-a33c3e1c.entry.js → p-b1a24d24.entry.js} +1 -1
- package/dist/webcomponents/{p-9b1e7f5e.entry.js → p-b27d2ce1.entry.js} +1 -1
- package/dist/webcomponents/{p-3394ff6c.js → p-b7d9d9fa.js} +1 -1
- package/dist/webcomponents/{p-1e53021d.entry.js → p-be049573.entry.js} +1 -1
- package/dist/webcomponents/{p-c85fb952.entry.js → p-bfe69314.entry.js} +1 -1
- package/dist/webcomponents/{p-9601cf9d.entry.js → p-c2d6a5e2.entry.js} +1 -1
- package/dist/webcomponents/{p-4b4fc43d.js → p-c4264aaf.js} +1 -1
- package/dist/webcomponents/{p-808c8988.entry.js → p-c69713c2.entry.js} +1 -1
- package/dist/webcomponents/{p-9e5d765c.js → p-c8c08fe3.js} +1 -1
- package/dist/webcomponents/{p-b94bf537.entry.js → p-d779f2f2.entry.js} +1 -1
- package/dist/webcomponents/{p-26779944.entry.js → p-da313a7e.entry.js} +1 -1
- package/dist/webcomponents/{p-6ce586e0.entry.js → p-e04f7070.entry.js} +1 -1
- package/dist/webcomponents/p-e7915927.entry.js +1 -0
- package/dist/webcomponents/{p-fb53112b.js → p-e8c651b8.js} +1 -1
- package/dist/webcomponents/p-eb142b8a.entry.js +1 -0
- package/dist/webcomponents/{p-851e57f4.js → p-edb605b3.js} +1 -1
- package/dist/webcomponents/{p-e673e681.entry.js → p-efe744ce.entry.js} +1 -1
- package/dist/webcomponents/p-f6858597.entry.js +1 -0
- package/dist/webcomponents/p-f68cf935.entry.js +1 -0
- package/dist/webcomponents/{p-3f06ce2f.entry.js → p-fcf42299.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-038fb958.entry.js +0 -1
- package/dist/webcomponents/p-144e4bda.js +0 -1
- package/dist/webcomponents/p-1feebf9c.entry.js +0 -1
- package/dist/webcomponents/p-306aea52.entry.js +0 -1
- package/dist/webcomponents/p-6b05f357.entry.js +0 -1
- package/dist/webcomponents/p-71800e4c.js +0 -1
- package/dist/webcomponents/p-88d68804.entry.js +0 -1
- package/dist/webcomponents/p-8a6049ed.js +0 -1
- package/dist/webcomponents/p-bacd9d6e.entry.js +0 -1
- package/dist/webcomponents/p-f3ae3cb6.entry.js +0 -1
|
@@ -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: '7a9d21ea2d343fbbf56de456bb0275f25e7538a1', class: "payment-method" }, h("div", { key: '84ed7ef64a6cc1d6936b182fd4139e8dceb497ec', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '9dd41da85d45145f6054a28e216c530dd6a140e8', 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: '7e1a273a1ca12f07c9b4ee8a5c6eebcf713362e8', 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": {
|
|
@@ -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
|
;
|
|
@@ -7073,6 +7073,14 @@ input[type=radio]:focus {
|
|
|
7073
7073
|
box-shadow: var(--jfi-radio-button-box-shadow-focus);
|
|
7074
7074
|
}
|
|
7075
7075
|
|
|
7076
|
+
input[type=checkbox] {
|
|
7077
|
+
cursor: pointer;
|
|
7078
|
+
}
|
|
7079
|
+
|
|
7080
|
+
.checkbox-label {
|
|
7081
|
+
cursor: auto;
|
|
7082
|
+
}
|
|
7083
|
+
|
|
7076
7084
|
:host {
|
|
7077
7085
|
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
7078
7086
|
font-size: 1rem;
|
|
@@ -8,8 +8,10 @@ export class PaymentMethodOptions {
|
|
|
8
8
|
this.showAch = undefined;
|
|
9
9
|
this.showBnpl = undefined;
|
|
10
10
|
this.showSavedPaymentMethods = undefined;
|
|
11
|
+
this.paymentMethodGroupId = undefined;
|
|
11
12
|
this.bnpl = undefined;
|
|
12
|
-
this.
|
|
13
|
+
this.insuranceToggled = undefined;
|
|
14
|
+
this.authToken = undefined;
|
|
13
15
|
this.accountId = undefined;
|
|
14
16
|
this.iframeOrigin = config.iframeOrigin;
|
|
15
17
|
this.savedPaymentMethods = [];
|
|
@@ -17,39 +19,53 @@ export class PaymentMethodOptions {
|
|
|
17
19
|
this.selectedPaymentMethodId = undefined;
|
|
18
20
|
this.paymentMethodOptions = [];
|
|
19
21
|
}
|
|
22
|
+
async fillBillingForm(fields) {
|
|
23
|
+
const newPaymentMethodElement = this.selectedPaymentMethodOptionRef;
|
|
24
|
+
if (newPaymentMethodElement.fillBillingForm) {
|
|
25
|
+
newPaymentMethodElement.fillBillingForm(fields);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
20
28
|
connectedCallback() {
|
|
21
29
|
this.paymentMethodsChanged();
|
|
22
|
-
this.selectedPaymentMethodId = this.paymentMethodOptions[0].id;
|
|
23
30
|
}
|
|
24
31
|
paymentMethodsChanged() {
|
|
25
|
-
var _a;
|
|
26
|
-
this.paymentMethodOptions = this.savedPaymentMethods
|
|
32
|
+
var _a, _b;
|
|
33
|
+
this.paymentMethodOptions = this.savedPaymentMethods
|
|
34
|
+
.map((paymentMethod) => new PaymentMethodOption(paymentMethod))
|
|
35
|
+
.filter((paymentMethod) => {
|
|
36
|
+
// Don't saved card or bank account if they are disabled
|
|
37
|
+
return ((this.showCard || paymentMethod.type !== PaymentMethodTypes.card) &&
|
|
38
|
+
(this.showAch || paymentMethod.type !== PaymentMethodTypes.bankAccount));
|
|
39
|
+
});
|
|
40
|
+
if (this.showBnpl && ((_a = this.bnpl) === null || _a === void 0 ? void 0 : _a.provider) === 'sezzle' && !this.insuranceToggled) {
|
|
41
|
+
this.paymentMethodOptions.push(new PaymentMethodOption({ id: PaymentMethodTypes.sezzle }));
|
|
42
|
+
}
|
|
27
43
|
if (this.showCard) {
|
|
28
44
|
this.paymentMethodOptions.push(new PaymentMethodOption({ id: PaymentMethodTypes.card }));
|
|
29
45
|
}
|
|
30
46
|
if (this.showAch) {
|
|
31
47
|
this.paymentMethodOptions.push(new PaymentMethodOption({ id: PaymentMethodTypes.bankAccount }));
|
|
32
48
|
}
|
|
33
|
-
if (this.
|
|
34
|
-
this.
|
|
49
|
+
if (!this.selectedPaymentMethodId) {
|
|
50
|
+
this.selectedPaymentMethodId = (_b = this.paymentMethodOptions[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
35
51
|
}
|
|
36
52
|
}
|
|
37
53
|
paymentMethodOptionSelected(event) {
|
|
38
54
|
this.selectedPaymentMethodId = event.detail.id;
|
|
39
55
|
}
|
|
40
|
-
async resolvePaymentMethod() {
|
|
56
|
+
async resolvePaymentMethod(insuranceValidation) {
|
|
41
57
|
var _a;
|
|
42
|
-
return await ((_a = this.selectedPaymentMethodOptionRef) === null || _a === void 0 ? void 0 : _a.resolvePaymentMethod());
|
|
58
|
+
return await ((_a = this.selectedPaymentMethodOptionRef) === null || _a === void 0 ? void 0 : _a.resolvePaymentMethod(insuranceValidation));
|
|
43
59
|
}
|
|
44
60
|
render() {
|
|
45
61
|
var _a;
|
|
46
|
-
return (h("div", { key: '
|
|
62
|
+
return (h("div", { key: '6dd0b7072f2e9ee81fafb2526fa9e4b5d170b804' }, (_a = this.paymentMethodOptions) === null || _a === void 0 ? void 0 : _a.map((paymentMethodOption) => {
|
|
47
63
|
const newCard = paymentMethodOption.id === PaymentMethodTypes.card;
|
|
48
64
|
const newBankAccount = paymentMethodOption.id === PaymentMethodTypes.bankAccount;
|
|
49
65
|
const isSelected = this.selectedPaymentMethodId === paymentMethodOption.id;
|
|
50
66
|
const sezzle = paymentMethodOption.id === PaymentMethodTypes.sezzle;
|
|
51
67
|
if (newCard || newBankAccount) {
|
|
52
|
-
return (h("justifi-new-payment-method", { paymentMethodOption: paymentMethodOption,
|
|
68
|
+
return (h("justifi-new-payment-method", { paymentMethodOption: paymentMethodOption, authToken: this.authToken, "account-id": this.accountId, "is-selected": isSelected, paymentMethodGroupId: this.paymentMethodGroupId, ref: (el) => {
|
|
53
69
|
if (isSelected) {
|
|
54
70
|
this.selectedPaymentMethodOptionRef = el;
|
|
55
71
|
}
|
|
@@ -152,6 +168,23 @@ export class PaymentMethodOptions {
|
|
|
152
168
|
"attribute": "show-saved-payment-methods",
|
|
153
169
|
"reflect": false
|
|
154
170
|
},
|
|
171
|
+
"paymentMethodGroupId": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string",
|
|
176
|
+
"resolved": "string",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": true,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": ""
|
|
184
|
+
},
|
|
185
|
+
"attribute": "payment-method-group-id",
|
|
186
|
+
"reflect": false
|
|
187
|
+
},
|
|
155
188
|
"bnpl": {
|
|
156
189
|
"type": "unknown",
|
|
157
190
|
"mutable": false,
|
|
@@ -173,7 +206,24 @@ export class PaymentMethodOptions {
|
|
|
173
206
|
"text": ""
|
|
174
207
|
}
|
|
175
208
|
},
|
|
176
|
-
"
|
|
209
|
+
"insuranceToggled": {
|
|
210
|
+
"type": "boolean",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "boolean",
|
|
214
|
+
"resolved": "boolean",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": ""
|
|
222
|
+
},
|
|
223
|
+
"attribute": "insurance-toggled",
|
|
224
|
+
"reflect": false
|
|
225
|
+
},
|
|
226
|
+
"authToken": {
|
|
177
227
|
"type": "string",
|
|
178
228
|
"mutable": false,
|
|
179
229
|
"complexType": {
|
|
@@ -187,7 +237,7 @@ export class PaymentMethodOptions {
|
|
|
187
237
|
"tags": [],
|
|
188
238
|
"text": ""
|
|
189
239
|
},
|
|
190
|
-
"attribute": "
|
|
240
|
+
"attribute": "auth-token",
|
|
191
241
|
"reflect": false
|
|
192
242
|
},
|
|
193
243
|
"accountId": {
|
|
@@ -286,10 +336,44 @@ export class PaymentMethodOptions {
|
|
|
286
336
|
}
|
|
287
337
|
static get methods() {
|
|
288
338
|
return {
|
|
339
|
+
"fillBillingForm": {
|
|
340
|
+
"complexType": {
|
|
341
|
+
"signature": "(fields: BillingFormFields) => Promise<void>",
|
|
342
|
+
"parameters": [{
|
|
343
|
+
"name": "fields",
|
|
344
|
+
"type": "BillingFormFields",
|
|
345
|
+
"docs": ""
|
|
346
|
+
}],
|
|
347
|
+
"references": {
|
|
348
|
+
"Promise": {
|
|
349
|
+
"location": "global",
|
|
350
|
+
"id": "global::Promise"
|
|
351
|
+
},
|
|
352
|
+
"BillingFormFields": {
|
|
353
|
+
"location": "import",
|
|
354
|
+
"path": "../billing-form/billing-form-schema",
|
|
355
|
+
"id": "src/components/billing-form/billing-form-schema.ts::BillingFormFields"
|
|
356
|
+
},
|
|
357
|
+
"HTMLJustifiNewPaymentMethodElement": {
|
|
358
|
+
"location": "global",
|
|
359
|
+
"id": "global::HTMLJustifiNewPaymentMethodElement"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"return": "Promise<void>"
|
|
363
|
+
},
|
|
364
|
+
"docs": {
|
|
365
|
+
"text": "",
|
|
366
|
+
"tags": []
|
|
367
|
+
}
|
|
368
|
+
},
|
|
289
369
|
"resolvePaymentMethod": {
|
|
290
370
|
"complexType": {
|
|
291
|
-
"signature": "() => Promise<PaymentMethodPayload>",
|
|
292
|
-
"parameters": [
|
|
371
|
+
"signature": "(insuranceValidation: any) => Promise<PaymentMethodPayload>",
|
|
372
|
+
"parameters": [{
|
|
373
|
+
"name": "insuranceValidation",
|
|
374
|
+
"type": "any",
|
|
375
|
+
"docs": ""
|
|
376
|
+
}],
|
|
293
377
|
"references": {
|
|
294
378
|
"Promise": {
|
|
295
379
|
"location": "global",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class SaveNewPaymentMethod {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.isChecked = false;
|
|
5
|
+
}
|
|
6
|
+
handleCheckboxChange(event) {
|
|
7
|
+
const target = event.target;
|
|
8
|
+
this.isChecked = target.checked;
|
|
9
|
+
this.checkboxChanged.emit(this.isChecked);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h("div", { key: '2de6df80b2da83b29a9adb8b1a94d6326200567b', class: "mt-4 d-flex align-items-center" }, h("input", { key: 'ad5bac37f404ed7abf754d7ed87b58a80f04150e', type: "checkbox", checked: this.isChecked, onChange: (event) => this.handleCheckboxChange(event), class: "me-2" }), h("label", { key: 'cc860c51e9a9efdb95cdaf974723b2538204d6a0', class: 'checkbox-label' }, "Save new payment method")));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "justifi-save-new-payment-method"; }
|
|
15
|
+
static get states() {
|
|
16
|
+
return {
|
|
17
|
+
"isChecked": {}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static get events() {
|
|
21
|
+
return [{
|
|
22
|
+
"method": "checkboxChanged",
|
|
23
|
+
"name": "checkboxChanged",
|
|
24
|
+
"bubbles": true,
|
|
25
|
+
"cancelable": true,
|
|
26
|
+
"composed": true,
|
|
27
|
+
"docs": {
|
|
28
|
+
"tags": [],
|
|
29
|
+
"text": ""
|
|
30
|
+
},
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "boolean",
|
|
33
|
+
"resolved": "boolean",
|
|
34
|
+
"references": {}
|
|
35
|
+
}
|
|
36
|
+
}];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -10,14 +10,17 @@ export class SavedPaymentMethod {
|
|
|
10
10
|
this.paymentMethodOption = undefined;
|
|
11
11
|
this.isSelected = undefined;
|
|
12
12
|
}
|
|
13
|
-
async resolvePaymentMethod() {
|
|
13
|
+
async resolvePaymentMethod(insuranceValidation) {
|
|
14
14
|
var _a;
|
|
15
|
+
if (!insuranceValidation.isValid) {
|
|
16
|
+
return { validationError: true };
|
|
17
|
+
}
|
|
15
18
|
return { token: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id };
|
|
16
19
|
}
|
|
17
20
|
;
|
|
18
21
|
render() {
|
|
19
22
|
var _a, _b, _c, _d, _e;
|
|
20
|
-
return (h(Fragment, { key: '
|
|
23
|
+
return (h(Fragment, { key: '5dda9656eaaa1419566414393447ac77507ea3a8' }, h("div", { key: 'c6eeb3bfa46658e67edb10c4144aa605a7291c8f', class: "payment-method" }, h("div", { key: '51c5fa5a49bc9192f7863f135aa97f45f7e0d121', class: "payment-method-header p-3", onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '25f9048dd3b7c627fc0df1a3a2e26b9ba9dae42b', 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: '629311044d83b839bb78a8383b240b87351a309b', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, CardBrandLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.brand], " *", (_e = this.paymentMethodOption) === null || _e === void 0 ? void 0 :
|
|
21
24
|
_e.acct_last_four)))));
|
|
22
25
|
}
|
|
23
26
|
static get is() { return "justifi-saved-payment-method"; }
|
|
@@ -103,8 +106,12 @@ export class SavedPaymentMethod {
|
|
|
103
106
|
return {
|
|
104
107
|
"resolvePaymentMethod": {
|
|
105
108
|
"complexType": {
|
|
106
|
-
"signature": "() => Promise<PaymentMethodPayload>",
|
|
107
|
-
"parameters": [
|
|
109
|
+
"signature": "(insuranceValidation: any) => Promise<PaymentMethodPayload>",
|
|
110
|
+
"parameters": [{
|
|
111
|
+
"name": "insuranceValidation",
|
|
112
|
+
"type": "any",
|
|
113
|
+
"docs": ""
|
|
114
|
+
}],
|
|
108
115
|
"references": {
|
|
109
116
|
"Promise": {
|
|
110
117
|
"location": "global",
|
|
@@ -56,13 +56,16 @@ export class SezzlePaymentMethod {
|
|
|
56
56
|
this.initializeSezzleCheckout();
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
async resolvePaymentMethod() {
|
|
59
|
+
async resolvePaymentMethod(insuranceValidation) {
|
|
60
|
+
if (!insuranceValidation.isValid) {
|
|
61
|
+
return { validationError: true };
|
|
62
|
+
}
|
|
60
63
|
this.sezzleButtonRef.click();
|
|
61
64
|
return this.sezzlePromise;
|
|
62
65
|
}
|
|
63
66
|
render() {
|
|
64
67
|
var _a, _b, _c, _d, _e;
|
|
65
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: 'ccb94a3389d6622f156ee9310c4de64c45526cea', class: "payment-method" }, h("script", { key: 'af6ab6f27dea70522142082cabfc21fa46517487', src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { key: 'd411456241653d9f3d5821cc2bf2d4df340326e0', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '1666ded908064d72d211faffb9193e7c1b3c16d9', 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: '3182111d9f1d855d808c557ff17b49db4d1da398', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, h("div", { key: '9ea4a25704e7a6fbe0c33ad52f61f794cef98c1b' }, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", { key: '7f5a43b15a9141e9c459dbef03ec1d1770c8fc89' }, h("span", { key: '731ef282ffe005258a2ea57e554c0710f10e33c2' }, (_d = this.installmentPlan) === null || _d === void 0 ? void 0 : _d.installments.length), "\u00A0", h("span", { key: '87b61f76c3c309f5730dbc8e119ccb6264d2a519' }, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { key: 'b24080d4434f25bae07a17dc8e93546a2f3aa00b', class: "fw-bold" }, formatCurrency((_e = this.installmentPlan) === null || _e === void 0 ? void 0 : _e.installments[0].amountInCents))))))));
|
|
66
69
|
}
|
|
67
70
|
static get is() { return "justifi-sezzle-payment-method"; }
|
|
68
71
|
static get properties() {
|
|
@@ -222,8 +225,12 @@ export class SezzlePaymentMethod {
|
|
|
222
225
|
return {
|
|
223
226
|
"resolvePaymentMethod": {
|
|
224
227
|
"complexType": {
|
|
225
|
-
"signature": "() => Promise<PaymentMethodPayload>",
|
|
226
|
-
"parameters": [
|
|
228
|
+
"signature": "(insuranceValidation: any) => Promise<PaymentMethodPayload>",
|
|
229
|
+
"parameters": [{
|
|
230
|
+
"name": "insuranceValidation",
|
|
231
|
+
"type": "any",
|
|
232
|
+
"docs": ""
|
|
233
|
+
}],
|
|
227
234
|
"references": {
|
|
228
235
|
"Promise": {
|
|
229
236
|
"location": "global",
|
|
@@ -5,7 +5,7 @@ export class Details {
|
|
|
5
5
|
this.errorMessage = undefined;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '2d6ed5cb3c548d10c9a7de29b2b1b3a94f60133f', exportParts: 'detail-empty-state, detail-metadata-title, detail-metadata, detail-section, detail-section-title, \n detail-section-item-title, detail-section-item-data, detail-head, detail-title, detail-head-info' }, this.errorMessage ?
|
|
9
9
|
ErrorState(this.errorMessage)
|
|
10
10
|
:
|
|
11
11
|
h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' }))));
|
|
@@ -25,7 +25,7 @@ export class CheckboxInput {
|
|
|
25
25
|
this.updateInput(this.defaultValue);
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '727dd3a3e8024aae9540885f677f2aebca05f4f0', exportparts: "label,input,input-invalid" }, h("div", { key: '8d523339b9f03b078333d4380d03db9d1005bb5d', class: 'form-group d-flex flex-column' }, h("div", { key: 'e1b85ac05cf6a578d7f78a017d2ae85da9fd0b14', class: "form-check" }, h("input", { key: 'd5c111ba29f7035a6213555f7d876ae042badd2f', ref: el => (this.checkboxElement = el), type: "checkbox", id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input-checkbox ${this.errorText ? 'input-checkbox-invalid' : ''}`, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled }), h("label", { key: '604dc0bba4a0fe0a7171cfed95649a5600d3890f', class: "form-check-label", htmlFor: this.name }, this.label)), h("form-control-help-text", { key: '2779d04d33657d493b17864fa96b8b5c6ab5c4da', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '27b6ba8589b8fb9adbfb1792efd36bd4af4338d2', errorText: this.errorText, name: this.name }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "form-control-checkbox"; }
|
|
31
31
|
static get properties() {
|
|
@@ -25,7 +25,7 @@ export class DateInput {
|
|
|
25
25
|
this.dateInput.value = value;
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '477163306527f6b607c43e63ec4a38aaac5a4780', exportparts: "label,input,input-invalid" }, h("label", { key: '3174cbb24f2bd74e59e28dc6a31e224a0e2ab47d', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: 'de908daeee9db445c1369b75c536bcf33cb9f4e9', type: "date", ref: el => (this.dateInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled }), h("form-control-help-text", { key: 'ea51242481f4a9894d55871d23aeaf4013112e24', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '2db99a325bd6d691c0fdcbf3965535266329506f', errorText: this.errorText, name: this.name })));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "form-control-date"; }
|
|
31
31
|
static get properties() {
|
|
@@ -31,7 +31,7 @@ export class FileInput {
|
|
|
31
31
|
this.fileInput = this.el.querySelector('input');
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '2219dfef80cb3ef71148fbc4d2d29df6583d6779', exportparts: "label,input,input-invalid" }, h("div", { key: '18d059b17b226815a97cf1be429857bd93e43115', class: "form-group d-flex flex-column" }, h("label", { key: '91adf40d0dd7559888b7c37eeee40f363628bada', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '6aa37be009cce396e2f1268429c94b812d48167e', ref: (el) => this.fileInput = el, type: "file", name: this.name, part: `input ${this.errorText ? 'input-invalid ' : ''}${this.disabled ? ' input-disabled' : ''}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', multiple: this.multiple, disabled: this.disabled, onChange: this.changeHandler, onInput: this.handleFormControlInput, onBlur: () => this.formControlBlur.emit() }), h("form-control-help-text", { key: 'd4241aceb5a40b2dfedebc9658b128231d43fcc0', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'af7dd8c90ea83f2f99f24100e97c9147f787aadf', errorText: this.errorText, name: this.name }))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "form-control-file"; }
|
|
37
37
|
static get properties() {
|
|
@@ -47,7 +47,7 @@ export class MonetaryInput {
|
|
|
47
47
|
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'db55365b80d790ecdd9388bd80068be4d024fcbb', exportparts: "label,input,input-invalid" }, h("div", { key: 'badef12431b67dd5c8de702cc978237fffaad16a', class: "form-group d-flex flex-column" }, h("label", { key: 'c187a982531ea45e674e74a77aad65e3cf4d8e1c', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("div", { key: '61d58986d9369907e9732f1540ce0f914d16cda8', class: "input-group" }, h("span", { key: '883f4851ddb76c62b514bdd2399f06415f201995', class: "input-group-text" }, "$"), h("input", { key: 'af5a0b3239f664f1ed82c2534f667b38adda245a', ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control monetary is-invalid' : 'form-control monetary', type: "text", disabled: this.disabled })), h("form-control-help-text", { key: 'f0e59b47f55772a3c7a008ee32475d16415163af', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'fd9b43f2a028e0ca00df298000bb933c0cb10b7f', errorText: this.errorText, name: this.name }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "form-control-monetary"; }
|
|
53
53
|
static get properties() {
|
|
@@ -46,7 +46,7 @@ export class NumberInputMasked {
|
|
|
46
46
|
this.updateInput(this.defaultValue);
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '781c4f77fe5b5b4f39c2d44868814ada72ce67c9', exportparts: "label,input,input-invalid" }, h("div", { key: '9c3ed0d13b883e3d2dc302225f25a00414088ef6', class: "form-group d-flex flex-column" }, h("label", { key: '0782f2936175944dd54e5497e54d2389c35c94bc', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '8feee613f2f83e8cb0ac34a4939fd65b5c14729a', ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h("form-control-help-text", { key: 'dbdf33259fd04b1488b299216eb550960068c553', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '8a148bb9a29f322fb21acbfd8597a1e89433056a', errorText: this.errorText, name: this.name }))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "form-control-number-masked"; }
|
|
52
52
|
static get properties() {
|
|
@@ -28,7 +28,7 @@ export class NumberInput {
|
|
|
28
28
|
this.updateInput(this.defaultValue);
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: 'da1318fae566f16be182c710840df84a60ccf707', exportparts: 'label,input,input-invalid' }, h("div", { key: 'de12c73d81be1a797c7efd482adef5e648d2947b', class: 'form-group d-flex flex-column' }, h("label", { key: '95113ea706e25074512e948ae041ac121af6c181', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '03d3cf05f76c6dd4ec2b00d486f31045dd36dc12', id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h("form-control-help-text", { key: 'ac4d21a4d723c80bff561364858f2dfba3c704b6', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '7f474f8d69bf555a2e6c517772e79d35a7bd32b2', errorText: this.errorText, name: this.name }))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "form-control-number"; }
|
|
34
34
|
static get properties() {
|
|
@@ -27,7 +27,7 @@ export class SelectInput {
|
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
29
|
var _a;
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'abc80a7f20c59c99a3468f199142bc01ba7883cb', exportparts: "label,input,input-invalid" }, h("div", { key: 'd34ec19e40c33bd16b1e03e2bfac07dd6dd1a3a8', class: "form-group d-flex flex-column" }, h("label", { key: '43adfb46f3bf2e72e50d2bab17b909fec8693c2a', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { key: 'eacb07490715f8041cfa6cd4fab91959d5b6bfae', ref: el => (this.selectElement = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText ? 'input-invalid' : ''}`, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h("form-control-help-text", { key: '5ec5ba6ca4e0503ffdbddb95e70444bbf8b169b7', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'bd90d61ca9aa0c52d351e336febc9f3d2e501355', errorText: this.errorText, name: this.name }))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "form-control-select"; }
|
|
33
33
|
static get properties() {
|