@justifi/webcomponents 6.0.0-rc.1 → 6.0.0-rc.11
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/{Api-CPuq_15r.js → Api-DyimBzKT.js} +2 -2
- package/dist/cjs/{Refund-CqWNG8sx.js → Refund-BefKONu4.js} +6 -3
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/{badge-CMmPvqtE.js → badge-CcJ9H85-.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
- package/dist/cjs/bank-account-form.cjs.entry.js +9 -6
- package/dist/cjs/business-details-core.cjs.entry.js +4 -4
- package/dist/cjs/{business.service-C3BdUPlm.js → business.service-BB6zl4Gc.js} +2 -2
- package/dist/cjs/{button-CfVQSysQ.js → button-DsHDMHaa.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +9 -6
- package/dist/cjs/{check-pkg-version-D_lazhBQ.js → check-pkg-version-B85-DAz3.js} +9 -3
- package/dist/cjs/{checkout.service-B0ZmvWwI.js → checkout.service-B-R80p4f.js} +2 -2
- package/dist/cjs/checkout.store-CDQXaOcP.js +90 -0
- package/dist/cjs/checkouts-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{payments-list-params-state-BNbT1fuJ.js → checkouts-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{checkouts-table-UN5gPpQ_.js → checkouts-table-DjMdEiEW.js} +3 -3
- package/dist/cjs/{config-state-5xZf-jax.js → config-state-BBOZIS8x.js} +1 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +3 -3
- package/dist/cjs/{dispute.service-DsPEAcDn.js → dispute.service-B5tITFAh.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/form-control-date.cjs.entry.js +4 -4
- package/dist/cjs/{form-control-error-text-HM0zQerh.js → form-control-error-text-B-P5UDhm.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-help-text-5KIUw1IP.js → form-control-help-text-JoZjhb9m.js} +1 -1
- package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +4 -4
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +3 -3
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
- package/dist/cjs/{get-payment-details-DtCXaIMx.js → get-payment-details-BfgRmNL4.js} +2 -2
- package/dist/cjs/{get-subaccounts-CwCH5rC8.js → get-subaccounts-Bnfv2tEN.js} +3 -3
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
- package/dist/cjs/{header-1-DD41iNlG.js → header-1-DRA3f4Jh.js} +1 -1
- package/dist/cjs/{header-3-D9Wa0IfT.js → header-3-sOdOpfx3.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +4 -4
- package/dist/cjs/{index-Yd9aLenr.js → index-B32W0A3m.js} +1 -1
- package/dist/cjs/{index-dm_GlYlb.js → index-C9hBD-32.js} +2 -2
- package/dist/cjs/index-D-dD-aC2.js +30 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{insurance-state-Cyva9u6S.js → insurance-state-d2thhXUX.js} +2 -2
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +7 -7
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +8 -8
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +782 -0
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +21 -19
- package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +1421 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +26 -48
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +15 -15
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -9
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +13 -13
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -15
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -13
- package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +17 -12
- package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -8
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +14 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-Cp_7Ls2E.js → package-BL9z319y.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +15 -15
- package/dist/cjs/payment-method-option.cjs.entry.js +3 -3
- package/dist/cjs/{payment.service-1H0VC3LV.js → payment.service-aR96UW5e.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{payouts-list-params-state-BNbT1fuJ.js → payments-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{payments-status-PB63klt3.js → payments-status-DXRh_ekP.js} +2 -2
- package/dist/cjs/{payments-table-quF0NnsS.js → payments-table-BE8u0-i0.js} +3 -3
- package/dist/cjs/payout-details-core.cjs.entry.js +11 -11
- package/dist/cjs/{payout.service-CIZFU-hV.js → payout.service-6Cl_yXXQ.js} +2 -2
- package/dist/cjs/payouts-list-core.cjs.entry.js +12 -12
- package/dist/cjs/{checkouts-list-params-state-BNbT1fuJ.js → payouts-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{payouts-status-Bk1JFzbP.js → payouts-status-DxTQZv3i.js} +2 -2
- package/dist/cjs/{payouts-table-D_CCTR_k.js → payouts-table-BbydhJUr.js} +3 -3
- package/dist/cjs/{skeleton-x-GSs3xk.js → skeleton-C7DQRD6r.js} +1 -1
- package/dist/cjs/{spinner-Kb1BFvnL.js → spinner-jmeA44Ee.js} +1 -1
- package/dist/cjs/{styled-host-CqQYxX-w.js → styled-host-BfVJlAsJ.js} +1 -1
- package/dist/cjs/{table-BJVUhh3s.js → table-Ccdrt0v_.js} +2 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +11 -11
- package/dist/cjs/{terminal-orders-list-params-state-BNbT1fuJ.js → terminal-orders-list-params-state-Cewmin_p.js} +1 -1
- package/dist/cjs/{terminal-orders-table-0O5jtzYj.js → terminal-orders-table-B4HjERrK.js} +5 -5
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
- package/dist/cjs/{terminal.service-DUlyMTrX.js → terminal.service-D1FAYZzd.js} +2 -2
- package/dist/cjs/terminals-list-core.cjs.entry.js +11 -11
- package/dist/cjs/terminals-list-params-state-Cewmin_p.js +22 -0
- package/dist/cjs/{terminals-table-C2BNRUS5.js → terminals-table-C79Xc4FI.js} +3 -3
- package/dist/cjs/{utils-Df-pajL7.js → utils-Bzyj4qWe.js} +1 -1
- package/dist/cjs/{utils-BaGF9XIe.js → utils-ChCUZgUy.js} +6 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/api/ApplePay.js +119 -0
- package/dist/collection/api/Payment.js +5 -2
- package/dist/collection/api/index.js +1 -2
- package/dist/collection/api/services/apple-pay.service.js +293 -0
- package/dist/collection/api/services/plaid.service.js +20 -0
- package/dist/collection/assets/plaid-icon.svg +1 -0
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
- package/dist/collection/components/checkout/card-form/card-form.js +6 -3
- package/dist/collection/components/checkout/checkout.js +17 -39
- package/dist/collection/components/checkout/save-new-payment-method.js +26 -1
- package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
- package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-management.js +1 -1
- package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
- package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +4 -0
- package/dist/collection/components/modular-checkout/ModularCheckout.js +28 -0
- package/dist/collection/components/modular-checkout/modular-checkout.js +263 -150
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +10 -0
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +509 -0
- package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +853 -0
- package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +125 -0
- package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +7 -5
- package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +25 -8
- package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
- package/dist/collection/components/order-terminals/order-terminals.js +1 -1
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/payment-details-core.js +8 -8
- package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
- package/dist/collection/components/payments-list/payments-list-core.js +1 -1
- package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/payments-list.js +1 -1
- package/dist/collection/components/payout-details/payout-details-core.js +3 -3
- package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
- package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/payouts-list.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +82 -34
- package/dist/collection/index.js +1 -0
- package/dist/collection/store/checkout.store.js +48 -2
- package/dist/collection/ui-components/apple-pay-button.js +146 -0
- package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
- package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
- package/dist/collection/ui-components/form/form-control-date.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +5 -5
- package/dist/collection/ui-components/form/form-control-select.js +2 -2
- package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +4 -4
- package/dist/collection/utils/check-pkg-version.js +6 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/docs.json +1061 -212
- package/dist/esm/{Api-N_veT2p6.js → Api-DAWuvzbl.js} +2 -2
- package/dist/esm/{Refund-Di6J0oN2.js → Refund-CVh70dXA.js} +7 -4
- package/dist/esm/additional-questions-details_5.entry.js +4 -4
- package/dist/esm/{badge-D_mzXSCQ.js → badge-DSYSJcRy.js} +2 -2
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +8 -8
- package/dist/esm/bank-account-form.entry.js +10 -7
- package/dist/esm/business-details-core.entry.js +5 -5
- package/dist/esm/{business.service-Bdvhdc_d.js → business.service-cQrH5BqF.js} +2 -2
- package/dist/esm/{button-CeR8qVS3.js → button-CpllL0At.js} +2 -2
- package/dist/esm/card-form.entry.js +10 -7
- package/dist/esm/{check-pkg-version-Bb69ihTN.js → check-pkg-version-CeFbumLK.js} +9 -3
- package/dist/esm/{checkout.service-XgGFa7H8.js → checkout.service-Bbgi1I6V.js} +2 -2
- package/dist/esm/checkout.store-CKOWX2jL.js +85 -0
- package/dist/esm/checkouts-list-core.entry.js +12 -12
- package/dist/esm/{checkouts-list-params-state-SMXQIZTt.js → checkouts-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{checkouts-table-CFZYoYjn.js → checkouts-table-Ddf2I-Ul.js} +4 -4
- package/dist/esm/{config-state-BrllxiM0.js → config-state-DZeVYerv.js} +1 -1
- package/dist/esm/custom-popper_2.entry.js +4 -4
- package/dist/esm/{dispute.service-CKPcmwhH.js → dispute.service-CrZsNDW8.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +2 -2
- package/dist/esm/form-control-checkbox.entry.js +6 -6
- package/dist/esm/form-control-date.entry.js +5 -5
- package/dist/esm/{form-control-error-text-D3ZwkOv-.js → form-control-error-text-R7U07nTg.js} +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +3 -3
- package/dist/esm/{form-control-help-text-C39ZW65w.js → form-control-help-text-CRLH-2f7.js} +2 -2
- package/dist/esm/form-control-help-text.entry.js +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +4 -4
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number-masked_2.entry.js +3 -3
- package/dist/esm/form-control-number.entry.js +4 -4
- package/dist/esm/form-control-radio.entry.js +4 -4
- package/dist/esm/form-control-select_2.entry.js +5 -5
- package/dist/esm/{get-payment-details-Dt-dr16k.js → get-payment-details-0VzpMNY9.js} +2 -2
- package/dist/esm/{get-subaccounts-BsoVLANw.js → get-subaccounts-9UMbyFiT.js} +3 -3
- package/dist/esm/gross-payment-chart-core.entry.js +6 -6
- package/dist/esm/{header-1-E-hEi3wF.js → header-1-3M9If0gM.js} +2 -2
- package/dist/esm/{header-3-Dm7M85kz.js → header-3-CWa41YWq.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +5 -5
- package/dist/esm/{index-B9me4yN2.js → index-B_KxSZIF.js} +1 -1
- package/dist/esm/{index-kpoIU4v_.js → index-Bn7inNWG.js} +2 -2
- package/dist/esm/index-CbL73B6U.js +30 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{insurance-state-CB4l8sOv.js → insurance-state-CTalqbNa.js} +3 -3
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +8 -8
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +9 -9
- package/dist/esm/justifi-additional-statement_8.entry.js +10 -10
- package/dist/esm/justifi-apple-pay.entry.js +780 -0
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +22 -20
- package/dist/esm/justifi-business-details.entry.js +11 -11
- package/dist/esm/justifi-business-form.entry.js +14 -14
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
- package/dist/esm/justifi-checkout-summary_7.entry.js +1413 -0
- package/dist/esm/justifi-checkout.entry.js +26 -48
- package/dist/esm/justifi-checkouts-list-filters.entry.js +9 -9
- package/dist/esm/justifi-checkouts-list.entry.js +15 -15
- package/dist/esm/justifi-config-provider.entry.js +3 -3
- package/dist/esm/justifi-details.entry.js +3 -3
- package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +10 -10
- package/dist/esm/justifi-dispute-notification_3.entry.js +16 -16
- package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
- package/dist/esm/justifi-order-terminals.entry.js +14 -14
- package/dist/esm/justifi-owner-form_3.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js +12 -12
- package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
- package/dist/esm/justifi-payment-transactions-list.entry.js +14 -14
- package/dist/esm/justifi-payments-list-filters.entry.js +8 -8
- package/dist/esm/justifi-payments-list.entry.js +15 -15
- package/dist/esm/justifi-payout-details.entry.js +11 -11
- package/dist/esm/justifi-payout-transactions-list.entry.js +14 -14
- package/dist/esm/justifi-payouts-list-filters.entry.js +8 -8
- package/dist/esm/justifi-payouts-list.entry.js +16 -16
- package/dist/esm/justifi-refund-payment.entry.js +14 -14
- package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +18 -13
- package/dist/esm/justifi-skeleton.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +10 -10
- package/dist/esm/justifi-terminal-orders-list.entry.js +13 -13
- package/dist/esm/justifi-terminals-list-filters.entry.js +9 -9
- package/dist/esm/justifi-terminals-list.entry.js +15 -15
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-O3LY2Da6.js → package-CxLeEBSa.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +2 -2
- package/dist/esm/{parts-CfF8KKwx.js → parts-RvUQ__Pq.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +16 -16
- package/dist/esm/payment-method-option.entry.js +4 -4
- package/dist/esm/{payment.service-BWO84KlP.js → payment.service-TxyxCg0E.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +13 -13
- package/dist/esm/{payments-list-params-state-SMXQIZTt.js → payments-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{payments-status-XoZrlbiZ.js → payments-status-5orNU2Rd.js} +2 -2
- package/dist/esm/{payments-table-Dh4P9mTb.js → payments-table-gkJV5GNK.js} +4 -4
- package/dist/esm/payout-details-core.entry.js +12 -12
- package/dist/esm/{payout.service-Cld6TS5W.js → payout.service-BOwZ4wWh.js} +2 -2
- package/dist/esm/payouts-list-core.entry.js +13 -13
- package/dist/esm/{payouts-list-params-state-SMXQIZTt.js → payouts-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{payouts-status-Qm2jZG1-.js → payouts-status-CZPwa2AE.js} +2 -2
- package/dist/esm/{payouts-table-DMVAZp-r.js → payouts-table-0PtktGRd.js} +4 -4
- package/dist/esm/{skeleton-DrHwsgs_.js → skeleton-qMb0_Cjy.js} +2 -2
- package/dist/esm/{spinner-XBq6mVJW.js → spinner-DUzyWLhj.js} +2 -2
- package/dist/esm/{styled-host-B_XBaM7z.js → styled-host-CTAGIN84.js} +1 -1
- package/dist/esm/{table-qqt2Ew5y.js → table-Br3n9Xu-.js} +3 -3
- package/dist/esm/table-filters-menu.entry.js +4 -4
- package/dist/esm/terminal-orders-list-core.entry.js +12 -12
- package/dist/esm/{terminal-orders-list-params-state-SMXQIZTt.js → terminal-orders-list-params-state-D8tzsGR_.js} +1 -1
- package/dist/esm/{terminal-orders-table-BN4Co4T8.js → terminal-orders-table-DTBSIMlJ.js} +6 -6
- package/dist/esm/terminal-quantity-selector.entry.js +3 -3
- package/dist/esm/{terminal.service-DmYCUQcA.js → terminal.service-E6dZlM43.js} +2 -2
- package/dist/esm/terminals-list-core.entry.js +12 -12
- package/dist/esm/terminals-list-params-state-D8tzsGR_.js +16 -0
- package/dist/esm/{terminals-table-C8LczeG_.js → terminals-table-TGUKTi7I.js} +4 -4
- package/dist/esm/{utils-lb8p1Exq.js → utils-BscIVFn8.js} +6 -1
- package/dist/esm/{utils-kWaZhFAd.js → utils-Dg6gMUTv.js} +2 -2
- package/dist/esm/webcomponents.js +4 -4
- package/dist/module/Analytics.js +6 -0
- package/dist/module/ModularCheckout.js +30 -0
- package/dist/module/Refund.js +5 -2
- package/dist/module/additional-statement.js +1 -1
- package/dist/module/bank-account-form.js +5 -2
- package/dist/module/bank-account.js +2 -2
- package/dist/module/cancellation-policy.js +1 -1
- package/dist/module/card-form.js +5 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.store.js +49 -2
- package/dist/module/checkouts-list-core2.js +1 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details.js +1 -1
- package/dist/module/dispute-management-core.js +1 -1
- package/dist/module/dispute-notification.js +1 -1
- package/dist/module/dispute-response-core.js +1 -1
- package/dist/module/dispute-response.js +1 -1
- package/dist/module/duplicate-charge.js +1 -1
- package/dist/module/electronic-evidence.js +1 -1
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-radio2.js +3 -3
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/gross-payment-chart-core2.js +2 -2
- package/dist/module/index.js +1 -0
- package/dist/module/justifi-apple-pay.d.ts +11 -0
- package/dist/module/justifi-apple-pay.js +811 -0
- package/dist/module/justifi-checkout.js +63 -75
- package/dist/module/justifi-checkouts-list-filters.js +1 -1
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-plaid-payment-method.d.ts +11 -0
- package/dist/module/justifi-plaid-payment-method.js +6 -0
- package/dist/module/justifi-radio-list-item2.js +2 -2
- package/dist/module/justifi-season-interruption-insurance.js +5 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +2 -2
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/modular-checkout.js +214 -106
- package/dist/module/package.js +1 -1
- package/dist/module/payment-details-core2.js +8 -8
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +3 -3
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/plaid-payment-method.js +635 -0
- package/dist/module/plaid.service.js +26 -0
- package/dist/module/product-or-service.js +1 -1
- package/dist/module/refund-policy.js +1 -1
- package/dist/module/save-new-payment-method.js +3 -1
- package/dist/module/saved-payment-methods.js +7 -5
- package/dist/module/sezzle-payment-method.js +14 -22
- package/dist/module/shipping-details.js +1 -1
- package/dist/module/summary.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-orders-list-core2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/terminals-list-core2.js +2 -2
- package/dist/module/tokenize-payment-method.js +45 -34
- package/dist/module/utils2.js +6 -1
- package/dist/types/api/ApplePay.d.ts +196 -0
- package/dist/types/api/Checkout.d.ts +9 -14
- package/dist/types/api/Payment.d.ts +4 -3
- package/dist/types/api/index.d.ts +2 -2
- package/dist/types/api/services/apple-pay.service.d.ts +55 -0
- package/dist/types/api/services/plaid.service.d.ts +12 -0
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
- package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
- package/dist/types/components/checkout/checkout.d.ts +6 -7
- package/dist/types/components/checkout/save-new-payment-method.d.ts +1 -0
- package/dist/types/components/modular-checkout/ModularCheckout.d.ts +31 -0
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +14 -6
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +6 -0
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +39 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +79 -0
- package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.test.d.ts +1 -0
- package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +1 -1
- package/dist/types/components/modular-checkout/sub-components/sezzle-payment-method.d.ts +1 -1
- package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +8 -6
- package/dist/types/components.d.ts +182 -19
- package/dist/types/index.d.ts +3 -0
- package/dist/types/store/checkout.store.d.ts +16 -3
- package/dist/types/ui-components/apple-pay-button.d.ts +17 -0
- package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
- package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-06283633.entry.js +1 -0
- package/dist/webcomponents/{p-Dvxpy_P1.js → p-0Om7jLBs.js} +1 -1
- package/dist/webcomponents/{p-283cd78b.entry.js → p-0ff04742.entry.js} +1 -1
- package/dist/webcomponents/p-19c7e6a5.entry.js +1 -0
- package/dist/webcomponents/p-2430761e.entry.js +1 -0
- package/dist/webcomponents/{p-f01953ea.entry.js → p-2953b537.entry.js} +1 -1
- package/dist/webcomponents/{p-f47095cd.entry.js → p-29d05416.entry.js} +1 -1
- package/dist/webcomponents/p-2b39ab97.entry.js +1 -0
- package/dist/webcomponents/{p-7c51805a.entry.js → p-2d14f144.entry.js} +1 -1
- package/dist/webcomponents/{p-1d53f0b8.entry.js → p-2f658457.entry.js} +1 -1
- package/dist/webcomponents/{p-08ea8974.entry.js → p-33311d41.entry.js} +1 -1
- package/dist/webcomponents/p-35ae3497.entry.js +1 -0
- package/dist/webcomponents/{p-6849bf8e.entry.js → p-3fe420c4.entry.js} +1 -1
- package/dist/webcomponents/p-402caa84.entry.js +1 -0
- package/dist/webcomponents/p-406ebea6.entry.js +1 -0
- package/dist/webcomponents/p-42d4ea58.entry.js +1 -0
- package/dist/webcomponents/{p-4ba144ac.entry.js → p-431ba789.entry.js} +1 -1
- package/dist/webcomponents/{p-a8205044.entry.js → p-44450a94.entry.js} +1 -1
- package/dist/webcomponents/{p-28c7bef7.entry.js → p-46b6142b.entry.js} +4 -4
- package/dist/webcomponents/p-48e32b40.entry.js +1 -0
- package/dist/webcomponents/p-4c3d8cef.entry.js +1 -0
- package/dist/webcomponents/p-4e1653c2.entry.js +1 -0
- package/dist/webcomponents/{p-df199396.entry.js → p-522e7b24.entry.js} +1 -1
- package/dist/webcomponents/p-52cbd667.entry.js +1 -0
- package/dist/webcomponents/p-537aa971.entry.js +1 -0
- package/dist/webcomponents/{p-ae4297dd.entry.js → p-53daaca6.entry.js} +1 -1
- package/dist/webcomponents/{p-7322c86e.entry.js → p-5c17360c.entry.js} +1 -1
- package/dist/webcomponents/{p-6e18d13f.entry.js → p-613421d4.entry.js} +1 -1
- package/dist/webcomponents/p-62d3d62c.entry.js +1 -0
- package/dist/webcomponents/p-63300c63.entry.js +1 -0
- package/dist/webcomponents/p-65ed60bf.entry.js +1 -0
- package/dist/webcomponents/{p-bea4309d.entry.js → p-67332ff8.entry.js} +1 -1
- package/dist/webcomponents/{p-48bccf3b.entry.js → p-70f51444.entry.js} +1 -1
- package/dist/webcomponents/p-7186f4a7.entry.js +1 -0
- package/dist/webcomponents/p-71f9c48a.entry.js +1 -0
- package/dist/webcomponents/p-778e9fe9.entry.js +1 -0
- package/dist/webcomponents/p-77948b46.entry.js +1 -0
- package/dist/webcomponents/{p-b0bfa20f.entry.js → p-7cf87637.entry.js} +1 -1
- package/dist/webcomponents/{p-I8XpD1TX.js → p-7s1gsXM5.js} +1 -1
- package/dist/webcomponents/{p-3d85d046.entry.js → p-80331983.entry.js} +1 -1
- package/dist/webcomponents/{p-79055216.entry.js → p-8687e5d6.entry.js} +1 -1
- package/dist/webcomponents/{p-a7d5e434.entry.js → p-8d743490.entry.js} +1 -1
- package/dist/webcomponents/{p-15777cfe.entry.js → p-8ff839a4.entry.js} +1 -1
- package/dist/webcomponents/{p-57143978.entry.js → p-95cbb655.entry.js} +1 -1
- package/dist/webcomponents/{p-904a95e5.entry.js → p-9be67b19.entry.js} +1 -1
- package/dist/webcomponents/p-9c997d0b.entry.js +1 -0
- package/dist/webcomponents/{p-c3a2c619.entry.js → p-9c9a4eb7.entry.js} +1 -1
- package/dist/webcomponents/p-9d37b85f.entry.js +1 -0
- package/dist/webcomponents/p-9fc567d8.entry.js +1 -0
- package/dist/webcomponents/p-B71k50jz.js +1 -0
- package/dist/webcomponents/p-BF4U0yVj.js +1 -0
- package/dist/webcomponents/{p-zdIeCUeh.js → p-BHf9IqGw.js} +1 -1
- package/dist/webcomponents/p-BQ2TIFoY.js +1 -0
- package/dist/webcomponents/p-BSt6p1oq.js +1 -0
- package/dist/webcomponents/p-BY1mRAvj.js +1 -0
- package/dist/webcomponents/{p-YND5pTuF.js → p-Bb-6bNcq.js} +1 -1
- package/dist/webcomponents/p-BbZwa5UI.js +1 -0
- package/dist/webcomponents/p-BdKWuCys.js +1 -0
- package/dist/webcomponents/p-BfM6X7lF.js +1 -0
- package/dist/webcomponents/{p-BbYVgLcf.js → p-BjVfIXWC.js} +1 -1
- package/dist/webcomponents/{p-kpoIU4v_.js → p-Bn7inNWG.js} +1 -1
- package/dist/webcomponents/{p-BisQ61nK.js → p-BsGE9UDv.js} +1 -1
- package/dist/webcomponents/{p-BeszVz87.js → p-C5id7s_l.js} +1 -1
- package/dist/webcomponents/{p-CsNubTqD.js → p-CAJnQLZF.js} +1 -1
- package/dist/webcomponents/{p-Bz164TKZ.js → p-CB0mCq1M.js} +1 -1
- package/dist/webcomponents/p-CY7N7-0P.js +1 -0
- package/dist/webcomponents/p-CaAVuW6B.js +1 -0
- package/dist/webcomponents/p-Cb0FhuyU.js +1 -0
- package/dist/webcomponents/p-CbL73B6U.js +1 -0
- package/dist/webcomponents/p-CpaS1Lex.js +1 -0
- package/dist/webcomponents/p-CxLeEBSa.js +1 -0
- package/dist/webcomponents/p-DD0Mvpeu.js +1 -0
- package/dist/webcomponents/p-DDUmOl3v.js +1 -0
- package/dist/webcomponents/p-DIDloHpm.js +1 -0
- package/dist/webcomponents/{p-UD2JhYS2.js → p-DK2sRMlx.js} +1 -1
- package/dist/webcomponents/{p-DO3INvI2.js → p-DNo0OPOP.js} +1 -1
- package/dist/webcomponents/{p-BTkXk7ol.js → p-DRXvcLy9.js} +1 -1
- package/dist/webcomponents/p-Da3idOSV.js +1 -0
- package/dist/webcomponents/p-Dgflaz6J.js +1 -0
- package/dist/webcomponents/{p-9y5MOK55.js → p-DhGNCW2f.js} +1 -1
- package/dist/webcomponents/p-DsZZxRXY.js +1 -0
- package/dist/webcomponents/{p-CRFzwZW6.js → p-DxqCFDtF.js} +1 -1
- package/dist/webcomponents/p-ED_TzwCp.js +1 -0
- package/dist/webcomponents/p-JyHlIFWl.js +1 -0
- package/dist/webcomponents/{p-CfF8KKwx.js → p-RvUQ__Pq.js} +1 -1
- package/dist/webcomponents/{p-DWUnL_zj.js → p-Wh1V0gvF.js} +1 -1
- package/dist/webcomponents/{p-36d72e2d.entry.js → p-a6748a1d.entry.js} +1 -1
- package/dist/webcomponents/{p-ded22005.entry.js → p-a7ac285c.entry.js} +1 -1
- package/dist/webcomponents/{p-40ba49e4.entry.js → p-aa6194ef.entry.js} +1 -1
- package/dist/webcomponents/{p-463ae23a.entry.js → p-abbf14b5.entry.js} +1 -1
- package/dist/webcomponents/p-bc45aa92.entry.js +1 -0
- package/dist/webcomponents/p-bc81d165.entry.js +1 -0
- package/dist/webcomponents/p-c4c88660.entry.js +1 -0
- package/dist/webcomponents/p-c8bed49a.entry.js +1 -0
- package/dist/webcomponents/{p-5e10aa65.entry.js → p-d46dbb83.entry.js} +1 -1
- package/dist/webcomponents/{p-cebe360b.entry.js → p-e13d6ed3.entry.js} +1 -1
- package/dist/webcomponents/p-e6d1ed81.entry.js +1 -0
- package/dist/webcomponents/p-e7b66120.entry.js +1 -0
- package/dist/webcomponents/p-e9a5c837.entry.js +1 -0
- package/dist/webcomponents/p-eP3fmhta.js +1 -0
- package/dist/webcomponents/p-eb2d9e5b.entry.js +1 -0
- package/dist/webcomponents/{p-d77908ca.entry.js → p-ed901f9d.entry.js} +1 -1
- package/dist/webcomponents/{p-c5b48e8d.entry.js → p-f1cba43c.entry.js} +1 -1
- package/dist/webcomponents/{p-828a61b9.entry.js → p-f3c312b1.entry.js} +1 -1
- package/dist/webcomponents/p-f499a8de.entry.js +1 -0
- package/dist/webcomponents/{p-818f51fd.entry.js → p-f680e617.entry.js} +1 -1
- package/dist/webcomponents/p-f849a34e.entry.js +1 -0
- package/dist/webcomponents/p-fa1884b4.entry.js +1 -0
- package/dist/webcomponents/p-sw5RO19U.js +1 -0
- package/dist/webcomponents/{p-BNz6wy4f.js → p-xuDuc7qr.js} +1 -1
- package/dist/webcomponents/p-z-5r0gWn.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/checkout.store-CV_fuGQw.js +0 -39
- package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +0 -698
- package/dist/cjs/terminals-list-params-state-BNbT1fuJ.js +0 -22
- package/dist/esm/checkout.store-B60siz2l.js +0 -36
- package/dist/esm/justifi-checkout-summary_6.entry.js +0 -691
- package/dist/esm/terminals-list-params-state-SMXQIZTt.js +0 -16
- package/dist/webcomponents/p-0932f6a9.entry.js +0 -1
- package/dist/webcomponents/p-09e768fe.entry.js +0 -1
- package/dist/webcomponents/p-0dcc83ac.entry.js +0 -1
- package/dist/webcomponents/p-131d799c.entry.js +0 -1
- package/dist/webcomponents/p-1bdce018.entry.js +0 -1
- package/dist/webcomponents/p-1f8cd44e.entry.js +0 -1
- package/dist/webcomponents/p-22be0859.entry.js +0 -1
- package/dist/webcomponents/p-2f31a4e5.entry.js +0 -1
- package/dist/webcomponents/p-3a4ca4df.entry.js +0 -1
- package/dist/webcomponents/p-424f491c.entry.js +0 -1
- package/dist/webcomponents/p-466f33d7.entry.js +0 -1
- package/dist/webcomponents/p-57802e57.entry.js +0 -1
- package/dist/webcomponents/p-5rVtZ2GJ.js +0 -1
- package/dist/webcomponents/p-77515be6.entry.js +0 -1
- package/dist/webcomponents/p-7WIgS5RM.js +0 -1
- package/dist/webcomponents/p-89e27079.entry.js +0 -1
- package/dist/webcomponents/p-8f0339de.entry.js +0 -1
- package/dist/webcomponents/p-9106fd74.entry.js +0 -1
- package/dist/webcomponents/p-9b75aced.entry.js +0 -1
- package/dist/webcomponents/p-BC8YDY7M.js +0 -1
- package/dist/webcomponents/p-BVD7g3cE.js +0 -1
- package/dist/webcomponents/p-Bb6FBEPP.js +0 -1
- package/dist/webcomponents/p-Bpcb3SsP.js +0 -1
- package/dist/webcomponents/p-Bt388eye.js +0 -1
- package/dist/webcomponents/p-BySyDTv5.js +0 -1
- package/dist/webcomponents/p-C1fMfnu0.js +0 -1
- package/dist/webcomponents/p-CCME-fyU.js +0 -1
- package/dist/webcomponents/p-CLwzqWk2.js +0 -1
- package/dist/webcomponents/p-CVQyw7ao.js +0 -1
- package/dist/webcomponents/p-C_CXv7AN.js +0 -1
- package/dist/webcomponents/p-CwZKT93w.js +0 -1
- package/dist/webcomponents/p-D599ZMGU.js +0 -1
- package/dist/webcomponents/p-DD74a16D.js +0 -1
- package/dist/webcomponents/p-DaDsBt65.js +0 -1
- package/dist/webcomponents/p-JgbsbAhz.js +0 -1
- package/dist/webcomponents/p-O3LY2Da6.js +0 -1
- package/dist/webcomponents/p-WEguiGt1.js +0 -1
- package/dist/webcomponents/p-a4172773.entry.js +0 -1
- package/dist/webcomponents/p-ae5a3c2a.entry.js +0 -1
- package/dist/webcomponents/p-ba8ae31f.entry.js +0 -1
- package/dist/webcomponents/p-be06d86a.entry.js +0 -1
- package/dist/webcomponents/p-d0e24727.entry.js +0 -1
- package/dist/webcomponents/p-dd257e60.entry.js +0 -1
- package/dist/webcomponents/p-dd689b5e.entry.js +0 -1
- package/dist/webcomponents/p-dd6d6ddb.entry.js +0 -1
- package/dist/webcomponents/p-dfd7c212.entry.js +0 -1
- package/dist/webcomponents/p-e830a580.entry.js +0 -1
- package/dist/webcomponents/p-e859ece8.entry.js +0 -1
- package/dist/webcomponents/p-eaea7cc1.entry.js +0 -1
- package/dist/webcomponents/p-f3a757b2.entry.js +0 -1
- package/dist/webcomponents/p-fa33df9f.entry.js +0 -1
- package/dist/webcomponents/p-ff3377e7.entry.js +0 -1
- package/dist/webcomponents/p-ff869ded.entry.js +0 -1
- package/dist/webcomponents/p-pska2q1M.js +0 -1
- package/dist/webcomponents/p-qMrd7_Gp.js +0 -1
- package/dist/webcomponents/p-vRhNRfmB.js +0 -1
- package/dist/webcomponents/p-zrUQD0Wr.js +0 -1
|
@@ -1,54 +1,75 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { checkoutStore,
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { checkoutStore, onAnyChange, getAvailablePaymentMethodTypes } from "../../store/checkout.store";
|
|
3
3
|
import JustifiAnalytics from "../../api/Analytics";
|
|
4
4
|
import { checkPkgVersion } from "../../utils/check-pkg-version";
|
|
5
|
-
import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, ICheckoutStatus } from "../../api";
|
|
6
|
-
import { makeCheckoutComplete, makeGetCheckout } from "../../actions/checkout/checkout-actions";
|
|
5
|
+
import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, ICheckoutStatus, PaymentMethodTypes, } from "../../api";
|
|
6
|
+
import { makeCheckoutComplete, makeGetCheckout, } from "../../actions/checkout/checkout-actions";
|
|
7
7
|
import { CheckoutService } from "../../api/services/checkout.service";
|
|
8
|
+
import { PlaidService } from "../../api/services/plaid.service";
|
|
8
9
|
import { insuranceValues, insuranceValuesOn, hasInsuranceValueChanged } from "../insurance/insurance-state";
|
|
10
|
+
import { PAYMENT_MODE } from "./ModularCheckout";
|
|
9
11
|
export class ModularCheckout {
|
|
10
12
|
constructor() {
|
|
11
|
-
this.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
this.plaidService = new PlaidService();
|
|
14
|
+
this.handleApplePayCompleted = (event) => {
|
|
15
|
+
const { success, token, paymentMethodId, error } = event.detail;
|
|
16
|
+
if (success && token) {
|
|
17
|
+
checkoutStore.paymentToken = paymentMethodId;
|
|
18
|
+
checkoutStore.selectedPaymentMethod = { type: PaymentMethodTypes.applePay };
|
|
19
|
+
this.submitCheckout();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.error("Apple Pay completed but failed:", error);
|
|
23
|
+
this.errorEvent.emit({
|
|
24
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || "Apple Pay payment failed",
|
|
25
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
26
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.handleApplePayError = (event) => {
|
|
31
|
+
const { error } = event.detail;
|
|
32
|
+
console.error("Apple Pay error:", error);
|
|
33
|
+
this.errorEvent.emit({
|
|
34
|
+
message: error || "Apple Pay error occurred",
|
|
35
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
36
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
this.handleApplePayCancelled = () => {
|
|
40
|
+
checkoutStore.paymentToken = undefined;
|
|
41
|
+
checkoutStore.selectedPaymentMethod = undefined;
|
|
42
|
+
};
|
|
15
43
|
}
|
|
16
44
|
connectedCallback() {
|
|
17
45
|
this.observer = new MutationObserver(() => {
|
|
18
46
|
this.queryFormRefs();
|
|
47
|
+
this.setupApplePayListeners(); // set up again listeners when DOM changes
|
|
19
48
|
});
|
|
20
49
|
this.observer.observe(this.hostEl, {
|
|
21
50
|
childList: true,
|
|
22
|
-
subtree: true
|
|
51
|
+
subtree: true,
|
|
23
52
|
});
|
|
24
53
|
checkoutStore.checkoutId = this.checkoutId;
|
|
25
54
|
const config = {
|
|
26
55
|
authToken: this.authToken,
|
|
27
56
|
checkoutId: this.checkoutId,
|
|
28
|
-
service: new CheckoutService()
|
|
57
|
+
service: new CheckoutService(),
|
|
29
58
|
};
|
|
30
59
|
this.getCheckout = makeGetCheckout(config);
|
|
31
60
|
this.completeCheckout = makeCheckoutComplete(config);
|
|
32
|
-
|
|
33
|
-
|
|
61
|
+
// Emit checkout-changed whenever any store key changes
|
|
62
|
+
onAnyChange(() => {
|
|
63
|
+
this.emitCheckoutChanged();
|
|
34
64
|
});
|
|
35
65
|
}
|
|
36
66
|
componentWillLoad() {
|
|
37
|
-
if (!this.authToken || !this.checkoutId) {
|
|
38
|
-
this.errorEvent.emit({
|
|
39
|
-
message: ComponentErrorMessages.NOT_AUTHENTICATED,
|
|
40
|
-
errorCode: ComponentErrorCodes.NOT_AUTHENTICATED,
|
|
41
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
42
|
-
});
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
67
|
this.analytics = new JustifiAnalytics(this);
|
|
46
68
|
checkPkgVersion();
|
|
47
69
|
checkoutStore.authToken = this.authToken;
|
|
48
|
-
checkoutStore.savePaymentMethod = this.savePaymentMethod;
|
|
49
70
|
this.fetchCheckout();
|
|
50
71
|
// Refresh the checkout data when insurance values actually change (not on initial load)
|
|
51
|
-
insuranceValuesOn(
|
|
72
|
+
insuranceValuesOn("set", (key) => {
|
|
52
73
|
const value = insuranceValues[key];
|
|
53
74
|
if (value !== undefined && hasInsuranceValueChanged(key, value)) {
|
|
54
75
|
this.fetchCheckout();
|
|
@@ -57,15 +78,26 @@ export class ModularCheckout {
|
|
|
57
78
|
}
|
|
58
79
|
componentDidLoad() {
|
|
59
80
|
this.queryFormRefs();
|
|
81
|
+
this.setupApplePayListeners();
|
|
60
82
|
}
|
|
61
83
|
disconnectedCallback() {
|
|
62
84
|
var _a;
|
|
63
85
|
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
86
|
+
this.removeApplePayListeners();
|
|
64
87
|
}
|
|
65
88
|
fetchCheckout() {
|
|
89
|
+
if (!this.authToken || !this.checkoutId) {
|
|
90
|
+
this.errorEvent.emit({
|
|
91
|
+
message: ComponentErrorMessages.NOT_AUTHENTICATED,
|
|
92
|
+
errorCode: ComponentErrorCodes.NOT_AUTHENTICATED,
|
|
93
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
94
|
+
});
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
66
97
|
if (this.getCheckout) {
|
|
67
98
|
this.getCheckout({
|
|
68
99
|
onSuccess: ({ checkout }) => {
|
|
100
|
+
this.updateStore(checkout);
|
|
69
101
|
if (checkout.status === ICheckoutStatus.completed) {
|
|
70
102
|
this.errorEvent.emit({
|
|
71
103
|
message: ComponentErrorMessages.CHECKOUT_ALREADY_COMPLETED,
|
|
@@ -82,7 +114,6 @@ export class ModularCheckout {
|
|
|
82
114
|
});
|
|
83
115
|
return;
|
|
84
116
|
}
|
|
85
|
-
this.updateStore(checkout);
|
|
86
117
|
},
|
|
87
118
|
onError: (error) => {
|
|
88
119
|
this.errorEvent.emit({
|
|
@@ -90,12 +121,12 @@ export class ModularCheckout {
|
|
|
90
121
|
errorCode: ComponentErrorCodes.FETCH_ERROR,
|
|
91
122
|
severity: ComponentErrorSeverity.ERROR,
|
|
92
123
|
});
|
|
93
|
-
}
|
|
124
|
+
},
|
|
94
125
|
});
|
|
95
126
|
}
|
|
96
127
|
}
|
|
97
128
|
updateStore(checkout) {
|
|
98
|
-
var _a, _b, _c, _d;
|
|
129
|
+
var _a, _b, _c, _d, _e;
|
|
99
130
|
checkoutStore.accountId = checkout.account_id;
|
|
100
131
|
checkoutStore.paymentMethods = checkout.payment_methods;
|
|
101
132
|
checkoutStore.paymentMethodGroupId = checkout.payment_method_group_id;
|
|
@@ -103,119 +134,204 @@ export class ModularCheckout {
|
|
|
103
134
|
checkoutStore.totalAmount = checkout.total_amount;
|
|
104
135
|
checkoutStore.paymentAmount = checkout.payment_amount;
|
|
105
136
|
checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
|
|
106
|
-
checkoutStore.
|
|
107
|
-
checkoutStore.
|
|
108
|
-
checkoutStore.
|
|
109
|
-
checkoutStore.
|
|
137
|
+
checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
|
|
138
|
+
checkoutStore.bankAccountVerification = (_a = checkout.payment_settings) === null || _a === void 0 ? void 0 : _a.bank_account_verification;
|
|
139
|
+
checkoutStore.bnplProviderClientId = (_b = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _b === void 0 ? void 0 : _b.provider_client_id;
|
|
140
|
+
checkoutStore.bnplProviderMode = (_c = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _c === void 0 ? void 0 : _c.provider_mode;
|
|
141
|
+
checkoutStore.bnplProviderApiVersion = (_d = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _d === void 0 ? void 0 : _d.provider_api_version;
|
|
142
|
+
checkoutStore.bnplProviderCheckoutUrl =
|
|
143
|
+
(_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_checkout_url;
|
|
144
|
+
}
|
|
145
|
+
emitCheckoutChanged() {
|
|
146
|
+
const detail = {
|
|
147
|
+
availablePaymentMethodTypes: getAvailablePaymentMethodTypes(),
|
|
148
|
+
selectedPaymentMethod: checkoutStore.selectedPaymentMethod,
|
|
149
|
+
savedPaymentMethods: checkoutStore.paymentMethods,
|
|
150
|
+
};
|
|
151
|
+
this.checkoutChangedEvent.emit(detail);
|
|
110
152
|
}
|
|
111
153
|
queryFormRefs() {
|
|
112
|
-
this.
|
|
113
|
-
this.
|
|
154
|
+
this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full");
|
|
155
|
+
this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
|
|
156
|
+
this.paymentMethodFormRef =
|
|
157
|
+
this.hostEl.querySelector('justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method');
|
|
114
158
|
this.insuranceFormRef = this.hostEl.querySelector('justifi-season-interruption-insurance');
|
|
115
|
-
|
|
159
|
+
}
|
|
160
|
+
setupApplePayListeners() {
|
|
161
|
+
if (this.applePayRef) {
|
|
162
|
+
this.applePayRef.addEventListener("applePayCompleted", this.handleApplePayCompleted);
|
|
163
|
+
this.applePayRef.addEventListener("applePayError", this.handleApplePayError);
|
|
164
|
+
this.applePayRef.addEventListener("applePayCancelled", this.handleApplePayCancelled);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
removeApplePayListeners() {
|
|
168
|
+
if (this.applePayRef) {
|
|
169
|
+
this.applePayRef.removeEventListener("applePayCompleted", this.handleApplePayCompleted);
|
|
170
|
+
this.applePayRef.removeEventListener("applePayError", this.handleApplePayError);
|
|
171
|
+
this.applePayRef.removeEventListener("applePayCancelled", this.handleApplePayCancelled);
|
|
172
|
+
}
|
|
116
173
|
}
|
|
117
174
|
async tokenizePaymentMethod(tokenizeArgs) {
|
|
118
175
|
var _a, _b, _c;
|
|
119
|
-
const billingInfoValues = (_b = await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues())) !== null && _b !== void 0 ? _b : {};
|
|
176
|
+
const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
|
|
120
177
|
const combinedBillingInfo = Object.assign(Object.assign({}, tokenizeArgs), billingInfoValues);
|
|
121
178
|
const paymentMethodMetadata = Object.assign({ accountId: checkoutStore.accountId, payment_method_group_id: undefined }, combinedBillingInfo);
|
|
122
179
|
if (checkoutStore.savePaymentMethod) {
|
|
123
|
-
paymentMethodMetadata.payment_method_group_id =
|
|
180
|
+
paymentMethodMetadata.payment_method_group_id =
|
|
181
|
+
checkoutStore.paymentMethodGroupId;
|
|
124
182
|
}
|
|
125
|
-
|
|
183
|
+
const tokenizeResult = await ((_c = this.paymentMethodFormRef) === null || _c === void 0 ? void 0 : _c.tokenize({
|
|
126
184
|
clientId: this.authToken,
|
|
127
185
|
paymentMethodMetadata,
|
|
128
186
|
account: checkoutStore.accountId,
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// If we have a payment token from the store (set by tokenize-payment-method), use it
|
|
133
|
-
if (checkoutStore.paymentToken) {
|
|
134
|
-
return checkoutStore.paymentToken;
|
|
135
|
-
}
|
|
136
|
-
// Fallback to the original tokenization logic for backward compatibility
|
|
137
|
-
if (!this.paymentMethodFormRef) {
|
|
138
|
-
return checkoutStore.selectedPaymentMethod;
|
|
139
|
-
}
|
|
140
|
-
const { error, id: token } = await this.tokenizePaymentMethod(submitCheckoutArgs);
|
|
141
|
-
if (error) {
|
|
142
|
-
this.errorEvent.emit({
|
|
143
|
-
errorCode: error.code,
|
|
144
|
-
message: error.message,
|
|
145
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
146
|
-
});
|
|
147
|
-
return undefined;
|
|
187
|
+
}));
|
|
188
|
+
if (tokenizeResult.error) {
|
|
189
|
+
return tokenizeResult;
|
|
148
190
|
}
|
|
149
|
-
|
|
191
|
+
checkoutStore.paymentToken = tokenizeResult.id;
|
|
192
|
+
return tokenizeResult.id;
|
|
150
193
|
}
|
|
194
|
+
// set the selected payment method to the checkout store from outside the component
|
|
195
|
+
async setSelectedPaymentMethod(paymentMethod) {
|
|
196
|
+
checkoutStore.selectedPaymentMethod = paymentMethod;
|
|
197
|
+
checkoutStore.paymentToken = paymentMethod.id || undefined;
|
|
198
|
+
}
|
|
199
|
+
// getAvailablePaymentMethods removed in favor of checkout-changed event
|
|
200
|
+
// if validation fails, the error will be emitted by the component
|
|
151
201
|
async validate() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
console.log('payment method form', this.paymentMethodFormRef);
|
|
155
|
-
console.log('insurance form', this.insuranceFormRef);
|
|
156
|
-
console.log('sezzle payment method', this.sezzlePaymentMethodRef);
|
|
157
|
-
const promises = [
|
|
158
|
-
(_a = this.paymentMethodFormRef) === null || _a === void 0 ? void 0 : _a.validate(),
|
|
159
|
-
(_b = this.billingFormRef) === null || _b === void 0 ? void 0 : _b.validate()
|
|
160
|
-
];
|
|
161
|
-
if (this.insuranceFormRef) {
|
|
202
|
+
const promises = [];
|
|
203
|
+
if (checkoutStore.insuranceEnabled && this.insuranceFormRef) {
|
|
162
204
|
promises.push(this.insuranceFormRef.validate());
|
|
163
205
|
}
|
|
164
|
-
const
|
|
165
|
-
|
|
206
|
+
const isNewCard = checkoutStore.selectedPaymentMethod.type === PaymentMethodTypes.card && checkoutStore.selectedPaymentMethod.id === undefined;
|
|
207
|
+
const isNewBankAccount = checkoutStore.selectedPaymentMethod.type === PaymentMethodTypes.bankAccount && checkoutStore.selectedPaymentMethod.id === undefined;
|
|
208
|
+
// For new card/bank account, validate payment method + billing.
|
|
209
|
+
if (isNewCard ||
|
|
210
|
+
isNewBankAccount) {
|
|
211
|
+
if (this.paymentMethodFormRef)
|
|
212
|
+
promises.push(this.paymentMethodFormRef.validate());
|
|
213
|
+
if (this.billingFormRef)
|
|
214
|
+
promises.push(this.billingFormRef.validate());
|
|
215
|
+
}
|
|
216
|
+
if (promises.length === 0)
|
|
217
|
+
return true;
|
|
218
|
+
try {
|
|
219
|
+
const results = await Promise.all(promises);
|
|
220
|
+
// Normalize different validator return shapes:
|
|
221
|
+
// - boolean -> use it directly
|
|
222
|
+
// - object -> look for isValid; treat missing isValid as falsey only if explicitly false
|
|
223
|
+
const resultsAreValid = results.every(r => typeof r === 'boolean' ? r : (r === null || r === void 0 ? void 0 : r.isValid) !== false);
|
|
224
|
+
if (!resultsAreValid) {
|
|
225
|
+
this.errorEvent.emit({
|
|
226
|
+
message: 'Validation error',
|
|
227
|
+
errorCode: ComponentErrorCodes.VALIDATION_ERROR,
|
|
228
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
229
|
+
});
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
catch (_a) {
|
|
235
|
+
// If any validator throws/rejects, consider the whole validation failed.
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
166
238
|
}
|
|
167
239
|
async submitCheckout(submitCheckoutArgs) {
|
|
168
240
|
var _a;
|
|
169
241
|
const isValid = await this.validate();
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
242
|
+
const isNewCard = checkoutStore.selectedPaymentMethod.type === PaymentMethodTypes.card &&
|
|
243
|
+
checkoutStore.selectedPaymentMethod.id === undefined;
|
|
244
|
+
const isNewBankAccount = checkoutStore.selectedPaymentMethod.type === PaymentMethodTypes.bankAccount &&
|
|
245
|
+
checkoutStore.selectedPaymentMethod.id === undefined;
|
|
246
|
+
const isPlaid = checkoutStore.selectedPaymentMethod.type === PaymentMethodTypes.plaid;
|
|
247
|
+
const shouldTokenize = isNewCard || isNewBankAccount;
|
|
248
|
+
if (shouldTokenize) {
|
|
249
|
+
const tokenizeResult = await this.tokenizePaymentMethod(submitCheckoutArgs);
|
|
250
|
+
if (tokenizeResult === null || tokenizeResult === void 0 ? void 0 : tokenizeResult.error) {
|
|
251
|
+
this.errorEvent.emit({
|
|
252
|
+
message: tokenizeResult.error.message,
|
|
253
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
254
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
255
|
+
});
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
177
258
|
}
|
|
178
|
-
|
|
179
|
-
if (checkoutStore.
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
259
|
+
// For Plaid, perform exchange at submit time using stored public token and link token id
|
|
260
|
+
if (isPlaid && !checkoutStore.paymentToken) {
|
|
261
|
+
const publicToken = checkoutStore.plaidPublicToken;
|
|
262
|
+
const linkTokenId = checkoutStore.plaidLinkTokenId;
|
|
263
|
+
if (!publicToken) {
|
|
183
264
|
this.errorEvent.emit({
|
|
184
|
-
message:
|
|
265
|
+
message: 'Missing Plaid public token. Please connect your bank.',
|
|
185
266
|
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
186
267
|
severity: ComponentErrorSeverity.ERROR,
|
|
187
268
|
});
|
|
188
269
|
return;
|
|
189
270
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
271
|
+
try {
|
|
272
|
+
const response = await this.plaidService.tokenizeBankAccount(checkoutStore.authToken, checkoutStore.accountId, publicToken, linkTokenId || undefined, checkoutStore.savePaymentMethod ? checkoutStore.paymentMethodGroupId : undefined);
|
|
273
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
274
|
+
this.errorEvent.emit({
|
|
275
|
+
message: typeof response.error === 'string' ? response.error : response.error.message || 'Failed to tokenize bank account',
|
|
276
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
277
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
278
|
+
});
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const paymentMethod = response === null || response === void 0 ? void 0 : response.data;
|
|
282
|
+
const token = ((_a = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.bank_account) === null || _a === void 0 ? void 0 : _a.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.token) || (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
283
|
+
checkoutStore.paymentToken = token;
|
|
195
284
|
}
|
|
196
|
-
|
|
197
|
-
else {
|
|
198
|
-
const paymentMethod = await this.getPaymentMethod(submitCheckoutArgs);
|
|
199
|
-
if (!paymentMethod) {
|
|
285
|
+
catch (err) {
|
|
200
286
|
this.errorEvent.emit({
|
|
201
|
-
message:
|
|
287
|
+
message: (err === null || err === void 0 ? void 0 : err.message) || 'Plaid exchange error',
|
|
202
288
|
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
203
289
|
severity: ComponentErrorSeverity.ERROR,
|
|
204
290
|
});
|
|
205
291
|
return;
|
|
206
292
|
}
|
|
207
|
-
;
|
|
208
|
-
payment = {
|
|
209
|
-
payment_mode: 'ecom',
|
|
210
|
-
payment_token: paymentMethod,
|
|
211
|
-
};
|
|
212
293
|
}
|
|
294
|
+
if (!isValid) {
|
|
295
|
+
this.errorEvent.emit({
|
|
296
|
+
message: "Please fill in all required fields.",
|
|
297
|
+
errorCode: ComponentErrorCodes.VALIDATION_ERROR,
|
|
298
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
299
|
+
});
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (!checkoutStore.paymentToken) {
|
|
303
|
+
this.errorEvent.emit({
|
|
304
|
+
message: 'Payment token not found.',
|
|
305
|
+
errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
|
|
306
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
307
|
+
});
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
let payment;
|
|
311
|
+
const mapTypeToPaymentMode = (type) => {
|
|
312
|
+
switch (type) {
|
|
313
|
+
case PaymentMethodTypes.card:
|
|
314
|
+
case PaymentMethodTypes.bankAccount:
|
|
315
|
+
case PaymentMethodTypes.plaid:
|
|
316
|
+
return PAYMENT_MODE.ECOM;
|
|
317
|
+
case PaymentMethodTypes.sezzle:
|
|
318
|
+
return PAYMENT_MODE.BNPL;
|
|
319
|
+
case PaymentMethodTypes.applePay:
|
|
320
|
+
return PAYMENT_MODE.APPLE_PAY;
|
|
321
|
+
default:
|
|
322
|
+
return undefined;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
payment = {
|
|
326
|
+
payment_mode: mapTypeToPaymentMode(checkoutStore.selectedPaymentMethod.type),
|
|
327
|
+
payment_token: checkoutStore.paymentToken,
|
|
328
|
+
};
|
|
213
329
|
this.completeCheckout({
|
|
214
330
|
payment,
|
|
215
331
|
onSuccess: ({ checkout }) => {
|
|
216
332
|
this.submitEvent.emit({
|
|
217
333
|
checkout,
|
|
218
|
-
message:
|
|
334
|
+
message: "Checkout completed successfully",
|
|
219
335
|
});
|
|
220
336
|
},
|
|
221
337
|
onError: (error) => {
|
|
@@ -227,11 +343,8 @@ export class ModularCheckout {
|
|
|
227
343
|
},
|
|
228
344
|
});
|
|
229
345
|
}
|
|
230
|
-
async setSelectedPaymentMethod(paymentMethodId) {
|
|
231
|
-
checkoutStore.selectedPaymentMethod = paymentMethodId;
|
|
232
|
-
}
|
|
233
346
|
render() {
|
|
234
|
-
return
|
|
347
|
+
return h(Host, { key: '6d77d6adf39e471c1fac481dee997b71ebc01e24' });
|
|
235
348
|
}
|
|
236
349
|
static get is() { return "justifi-modular-checkout"; }
|
|
237
350
|
static get properties() {
|
|
@@ -273,26 +386,6 @@ export class ModularCheckout {
|
|
|
273
386
|
"getter": false,
|
|
274
387
|
"setter": false,
|
|
275
388
|
"reflect": false
|
|
276
|
-
},
|
|
277
|
-
"savePaymentMethod": {
|
|
278
|
-
"type": "boolean",
|
|
279
|
-
"attribute": "save-payment-method",
|
|
280
|
-
"mutable": false,
|
|
281
|
-
"complexType": {
|
|
282
|
-
"original": "boolean",
|
|
283
|
-
"resolved": "boolean",
|
|
284
|
-
"references": {}
|
|
285
|
-
},
|
|
286
|
-
"required": false,
|
|
287
|
-
"optional": true,
|
|
288
|
-
"docs": {
|
|
289
|
-
"tags": [],
|
|
290
|
-
"text": ""
|
|
291
|
-
},
|
|
292
|
-
"getter": false,
|
|
293
|
-
"setter": false,
|
|
294
|
-
"reflect": false,
|
|
295
|
-
"defaultValue": "false"
|
|
296
389
|
}
|
|
297
390
|
};
|
|
298
391
|
}
|
|
@@ -328,8 +421,8 @@ export class ModularCheckout {
|
|
|
328
421
|
"references": {}
|
|
329
422
|
}
|
|
330
423
|
}, {
|
|
331
|
-
"method": "
|
|
332
|
-
"name": "
|
|
424
|
+
"method": "checkoutChangedEvent",
|
|
425
|
+
"name": "checkout-changed",
|
|
333
426
|
"bubbles": true,
|
|
334
427
|
"cancelable": true,
|
|
335
428
|
"composed": true,
|
|
@@ -338,69 +431,95 @@ export class ModularCheckout {
|
|
|
338
431
|
"text": ""
|
|
339
432
|
},
|
|
340
433
|
"complexType": {
|
|
341
|
-
"original": "
|
|
342
|
-
"resolved": "
|
|
343
|
-
"references": {
|
|
434
|
+
"original": "CheckoutChangedEventDetail",
|
|
435
|
+
"resolved": "CheckoutChangedEventDetail",
|
|
436
|
+
"references": {
|
|
437
|
+
"CheckoutChangedEventDetail": {
|
|
438
|
+
"location": "import",
|
|
439
|
+
"path": "./ModularCheckout",
|
|
440
|
+
"id": "src/components/modular-checkout/ModularCheckout.ts::CheckoutChangedEventDetail"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
344
443
|
}
|
|
345
444
|
}];
|
|
346
445
|
}
|
|
347
446
|
static get methods() {
|
|
348
447
|
return {
|
|
349
|
-
"
|
|
448
|
+
"setSelectedPaymentMethod": {
|
|
350
449
|
"complexType": {
|
|
351
|
-
"signature": "() => Promise<
|
|
352
|
-
"parameters": [
|
|
450
|
+
"signature": "(paymentMethod: ICheckoutPaymentMethod | { type: PaymentMethodTypes; }) => Promise<void>",
|
|
451
|
+
"parameters": [{
|
|
452
|
+
"name": "paymentMethod",
|
|
453
|
+
"type": "ICheckoutPaymentMethod | { type: PaymentMethodTypes; }",
|
|
454
|
+
"docs": ""
|
|
455
|
+
}],
|
|
353
456
|
"references": {
|
|
354
457
|
"Promise": {
|
|
355
458
|
"location": "global",
|
|
356
459
|
"id": "global::Promise"
|
|
460
|
+
},
|
|
461
|
+
"ICheckoutPaymentMethod": {
|
|
462
|
+
"location": "import",
|
|
463
|
+
"path": "../../api",
|
|
464
|
+
"id": "src/api/index.ts::ICheckoutPaymentMethod"
|
|
465
|
+
},
|
|
466
|
+
"PaymentMethodTypes": {
|
|
467
|
+
"location": "import",
|
|
468
|
+
"path": "../../api",
|
|
469
|
+
"id": "src/api/index.ts::PaymentMethodTypes"
|
|
357
470
|
}
|
|
358
471
|
},
|
|
359
|
-
"return": "Promise<
|
|
472
|
+
"return": "Promise<void>"
|
|
360
473
|
},
|
|
361
474
|
"docs": {
|
|
362
475
|
"text": "",
|
|
363
476
|
"tags": []
|
|
364
477
|
}
|
|
365
478
|
},
|
|
366
|
-
"
|
|
479
|
+
"validate": {
|
|
367
480
|
"complexType": {
|
|
368
|
-
"signature": "(
|
|
369
|
-
"parameters": [
|
|
370
|
-
"name": "submitCheckoutArgs",
|
|
371
|
-
"type": "BillingFormFields",
|
|
372
|
-
"docs": ""
|
|
373
|
-
}],
|
|
481
|
+
"signature": "() => Promise<boolean>",
|
|
482
|
+
"parameters": [],
|
|
374
483
|
"references": {
|
|
375
484
|
"Promise": {
|
|
376
485
|
"location": "global",
|
|
377
486
|
"id": "global::Promise"
|
|
378
487
|
},
|
|
379
|
-
"
|
|
488
|
+
"ICheckoutPaymentMethod": {
|
|
380
489
|
"location": "import",
|
|
381
|
-
"path": "../../
|
|
382
|
-
"id": "src/
|
|
490
|
+
"path": "../../api",
|
|
491
|
+
"id": "src/api/index.ts::ICheckoutPaymentMethod"
|
|
383
492
|
}
|
|
384
493
|
},
|
|
385
|
-
"return": "Promise<
|
|
494
|
+
"return": "Promise<boolean>"
|
|
386
495
|
},
|
|
387
496
|
"docs": {
|
|
388
497
|
"text": "",
|
|
389
498
|
"tags": []
|
|
390
499
|
}
|
|
391
500
|
},
|
|
392
|
-
"
|
|
501
|
+
"submitCheckout": {
|
|
393
502
|
"complexType": {
|
|
394
|
-
"signature": "(
|
|
503
|
+
"signature": "(submitCheckoutArgs?: BillingFormFields) => Promise<void>",
|
|
395
504
|
"parameters": [{
|
|
396
|
-
"name": "
|
|
397
|
-
"type": "
|
|
505
|
+
"name": "submitCheckoutArgs",
|
|
506
|
+
"type": "BillingFormFields",
|
|
398
507
|
"docs": ""
|
|
399
508
|
}],
|
|
400
509
|
"references": {
|
|
401
510
|
"Promise": {
|
|
402
511
|
"location": "global",
|
|
403
512
|
"id": "global::Promise"
|
|
513
|
+
},
|
|
514
|
+
"BillingFormFields": {
|
|
515
|
+
"location": "import",
|
|
516
|
+
"path": "../../components",
|
|
517
|
+
"id": "src/components.d.ts::BillingFormFields"
|
|
518
|
+
},
|
|
519
|
+
"ICheckoutPaymentMethod": {
|
|
520
|
+
"location": "import",
|
|
521
|
+
"path": "../../api",
|
|
522
|
+
"id": "src/api/index.ts::ICheckoutPaymentMethod"
|
|
404
523
|
}
|
|
405
524
|
},
|
|
406
525
|
"return": "Promise<void>"
|
|
@@ -413,10 +532,4 @@ export class ModularCheckout {
|
|
|
413
532
|
};
|
|
414
533
|
}
|
|
415
534
|
static get elementRef() { return "hostEl"; }
|
|
416
|
-
static get watchers() {
|
|
417
|
-
return [{
|
|
418
|
-
"propName": "savePaymentMethod",
|
|
419
|
-
"methodName": "savePaymentMethodChanged"
|
|
420
|
-
}];
|
|
421
|
-
}
|
|
422
535
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { Skeleton } from "../../../ui-components";
|
|
3
|
+
const ApplePaySkeleton = (props) => {
|
|
4
|
+
const { isReady } = props;
|
|
5
|
+
if (isReady) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
return (h("div", { class: 'container-fluid p-0' }, h("div", { class: 'row mb-3' }, h("div", { class: 'col-12 align-content-center' }, h(Skeleton, { height: '44px', width: '100%', styles: { borderRadius: "8px" } })))));
|
|
9
|
+
};
|
|
10
|
+
export default ApplePaySkeleton;
|