@justifi/webcomponents 6.0.0-rc.2 → 6.0.0-rc.4
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/bank-account-document-form-inputs_4.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-BfmeLSXP.js → check-pkg-version-BNVGE27p.js} +1 -1
- package/dist/cjs/{checkout.store-Cn3Jj5gi.js → checkout.store-CV_fuGQw.js} +0 -1
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +12 -99
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CuNDvHTB.js → package-BKILqyp3.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/modular-checkout/modular-checkout.js +5 -92
- 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/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 +2 -2
- package/dist/collection/store/checkout.store.js +0 -1
- 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-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
- package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
- package/dist/docs.json +1 -463
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{badge-D4ZXPFjL.js → badge-D_mzXSCQ.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/business-details-core.entry.js +3 -3
- package/dist/esm/{button-C0wLsDP3.js → button-CeR8qVS3.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-BuYkk-jV.js → check-pkg-version-CaWUVat7.js} +1 -1
- package/dist/esm/{checkout.store-OAv_iY1u.js → checkout.store-B60siz2l.js} +0 -1
- package/dist/esm/checkouts-list-core.entry.js +5 -5
- package/dist/esm/{checkouts-table-DjGKtqoc.js → checkouts-table-CFZYoYjn.js} +2 -2
- package/dist/esm/custom-popper_2.entry.js +3 -3
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +4 -4
- package/dist/esm/{form-control-error-text-Bzfs_rxk.js → form-control-error-text-D3ZwkOv-.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-ueLctOBN.js → form-control-help-text-C39ZW65w.js} +1 -1
- package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number-masked_2.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_2.entry.js +4 -4
- package/dist/esm/gross-payment-chart-core.entry.js +3 -3
- package/dist/esm/{header-1-BMKEv9y6.js → header-1-E-hEi3wF.js} +1 -1
- package/dist/esm/{header-3-C3t3m27b.js → header-3-Dm7M85kz.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +7 -7
- package/dist/esm/{insurance-state-d4hjThzE.js → insurance-state-CB4l8sOv.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +3 -3
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
- package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
- package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +12 -12
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +6 -6
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
- package/dist/esm/justifi-checkout-summary_6.entry.js +16 -103
- package/dist/esm/justifi-checkout.entry.js +4 -4
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +5 -5
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +2 -2
- package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-order-terminals.entry.js +5 -5
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +7 -7
- package/dist/esm/justifi-refund-payment.entry.js +5 -5
- package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-skeleton.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +6 -6
- package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
- package/dist/esm/justifi-terminals-list.entry.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-C60pS6qh.js → package-BF-uL8B4.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/{parts-RvUQ__Pq.js → parts-CfF8KKwx.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +13 -13
- package/dist/esm/payment-method-option.entry.js +2 -2
- package/dist/esm/payments-list-core.entry.js +7 -7
- package/dist/esm/{payments-status-1yRdTNeS.js → payments-status-XoZrlbiZ.js} +1 -1
- package/dist/esm/{payments-table-8RADYkma.js → payments-table-Dh4P9mTb.js} +2 -2
- package/dist/esm/payout-details-core.entry.js +9 -9
- package/dist/esm/payouts-list-core.entry.js +7 -7
- package/dist/esm/{payouts-status-BqsQVtBp.js → payouts-status-Qm2jZG1-.js} +1 -1
- package/dist/esm/{payouts-table-DPw7yIx8.js → payouts-table-DMVAZp-r.js} +2 -2
- package/dist/esm/{skeleton-BmTjpTYa.js → skeleton-DrHwsgs_.js} +1 -1
- package/dist/esm/{spinner-YGDOI-CS.js → spinner-XBq6mVJW.js} +1 -1
- package/dist/esm/table-filters-menu.entry.js +2 -2
- package/dist/esm/{table-ybHxxc9f.js → table-qqt2Ew5y.js} +2 -2
- package/dist/esm/terminal-orders-list-core.entry.js +6 -6
- package/dist/esm/{terminal-orders-table-D-xP5WuM.js → terminal-orders-table-BN4Co4T8.js} +2 -2
- package/dist/esm/terminal-quantity-selector.entry.js +2 -2
- package/dist/esm/terminals-list-core.entry.js +6 -6
- package/dist/esm/{terminals-table-DVAPCgEr.js → terminals-table-C8LczeG_.js} +2 -2
- package/dist/esm/{utils-DG5aMFmf.js → utils-kWaZhFAd.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/bank-account.js +2 -2
- package/dist/module/card-form2.js +2 -2
- package/dist/module/checkout.store.js +0 -1
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-date2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/justifi-button2.js +1 -1
- package/dist/module/justifi-header2.js +1 -1
- package/dist/module/justifi-order-terminals.js +1 -1
- 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-skeleton.js +1 -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 +5 -92
- 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/summary.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 +1 -1
- package/dist/module/tokenize-payment-method.js +2 -2
- package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -8
- package/dist/types/components.d.ts +0 -120
- package/dist/types/store/checkout.store.d.ts +0 -1
- package/dist/webcomponents/{p-dc245644.entry.js → p-0b790fa4.entry.js} +4 -4
- package/dist/webcomponents/{p-0e64cd09.entry.js → p-0cab7d5d.entry.js} +1 -1
- package/dist/webcomponents/{p-cbfc8269.entry.js → p-0e287092.entry.js} +1 -1
- package/dist/webcomponents/{p-59e8f027.entry.js → p-145bb9c4.entry.js} +1 -1
- package/dist/webcomponents/{p-cabaf013.entry.js → p-14d66df2.entry.js} +1 -1
- package/dist/webcomponents/{p-a406bf1a.entry.js → p-15777cfe.entry.js} +1 -1
- package/dist/webcomponents/p-1975406a.entry.js +1 -0
- package/dist/webcomponents/{p-387bcdee.entry.js → p-1ffbf771.entry.js} +1 -1
- package/dist/webcomponents/{p-7b9fa1fb.entry.js → p-29b6f15a.entry.js} +1 -1
- package/dist/webcomponents/p-2a59547b.entry.js +1 -0
- package/dist/webcomponents/p-2da63719.entry.js +1 -0
- package/dist/webcomponents/{p-fbaf62a5.entry.js → p-35bbfbf8.entry.js} +1 -1
- package/dist/webcomponents/{p-b04cc606.entry.js → p-3d85d046.entry.js} +1 -1
- package/dist/webcomponents/{p-ea1b161a.entry.js → p-413236be.entry.js} +1 -1
- package/dist/webcomponents/{p-0aee6da6.entry.js → p-43d693a3.entry.js} +1 -1
- package/dist/webcomponents/{p-03c7cee8.entry.js → p-48bccf3b.entry.js} +1 -1
- package/dist/webcomponents/p-4ae2a0b9.entry.js +1 -0
- package/dist/webcomponents/p-4b795b77.entry.js +1 -0
- package/dist/webcomponents/{p-2169c3d1.entry.js → p-518a9519.entry.js} +1 -1
- package/dist/webcomponents/{p-a1a8f6bd.entry.js → p-53c81d62.entry.js} +1 -1
- package/dist/webcomponents/p-5477c449.entry.js +1 -0
- package/dist/webcomponents/p-56980ef3.entry.js +1 -0
- package/dist/webcomponents/{p-a9d2dd5e.entry.js → p-57143978.entry.js} +1 -1
- package/dist/webcomponents/p-614fcef6.entry.js +1 -0
- package/dist/webcomponents/{p-5ad70aae.entry.js → p-6e18d13f.entry.js} +1 -1
- package/dist/webcomponents/p-70ff3b10.entry.js +1 -0
- package/dist/webcomponents/{p-0aa78c58.entry.js → p-724b0361.entry.js} +1 -1
- package/dist/webcomponents/{p-08a5cc2f.entry.js → p-738e0511.entry.js} +1 -1
- package/dist/webcomponents/p-739d6f13.entry.js +1 -0
- package/dist/webcomponents/{p-76a95d07.entry.js → p-79055216.entry.js} +1 -1
- package/dist/webcomponents/{p-42994618.entry.js → p-7b9008f1.entry.js} +1 -1
- package/dist/webcomponents/{p-281e36be.entry.js → p-84ce3bae.entry.js} +1 -1
- package/dist/webcomponents/p-8a5e168d.entry.js +1 -0
- package/dist/webcomponents/{p-cf16498f.entry.js → p-8f31a0c5.entry.js} +1 -1
- package/dist/webcomponents/{p-e8a198fa.entry.js → p-904a95e5.entry.js} +1 -1
- package/dist/webcomponents/{p-4cf9168d.entry.js → p-98579723.entry.js} +1 -1
- package/dist/webcomponents/{p-c7e5245a.entry.js → p-9c5b0b94.entry.js} +1 -1
- package/dist/webcomponents/p-9ccd19f5.entry.js +1 -0
- package/dist/webcomponents/{p-1246b999.entry.js → p-9f289c31.entry.js} +1 -1
- package/dist/webcomponents/p-BC8YDY7M.js +1 -0
- package/dist/webcomponents/p-BF-uL8B4.js +1 -0
- package/dist/webcomponents/{p-BUadwxkh.js → p-BTkXk7ol.js} +1 -1
- package/dist/webcomponents/p-BbYVgLcf.js +1 -0
- package/dist/webcomponents/{p-CP_tg-uH.js → p-BeszVz87.js} +1 -1
- package/dist/webcomponents/{p-wyEq9Pa1.js → p-BisQ61nK.js} +1 -1
- package/dist/webcomponents/{p-HAk7yBNq.js → p-Bz164TKZ.js} +1 -1
- package/dist/webcomponents/p-C1fMfnu0.js +1 -0
- package/dist/webcomponents/{p-BXKEChoo.js → p-CCME-fyU.js} +1 -1
- package/dist/webcomponents/p-C_CXv7AN.js +1 -0
- package/dist/webcomponents/{p-RvUQ__Pq.js → p-CfF8KKwx.js} +1 -1
- package/dist/webcomponents/{p-DBsw4qpn.js → p-CsNubTqD.js} +1 -1
- package/dist/webcomponents/p-CwZKT93w.js +1 -0
- package/dist/webcomponents/p-D599ZMGU.js +1 -0
- package/dist/webcomponents/{p-DuXN7Akd.js → p-DO3INvI2.js} +1 -1
- package/dist/webcomponents/{p-D9Sv4eV5.js → p-DWOKxG7j.js} +1 -1
- package/dist/webcomponents/{p-BhdBpAn9.js → p-Dvxpy_P1.js} +1 -1
- package/dist/webcomponents/{p-D48iERjQ.js → p-JgbsbAhz.js} +1 -1
- package/dist/webcomponents/{p-nWGo6sHu.js → p-YND5pTuF.js} +1 -1
- package/dist/webcomponents/{p-bfc38bc2.entry.js → p-a0573ecc.entry.js} +1 -1
- package/dist/webcomponents/p-a33ea645.entry.js +1 -0
- package/dist/webcomponents/{p-4c994761.entry.js → p-a8205044.entry.js} +1 -1
- package/dist/webcomponents/{p-c6860f60.entry.js → p-b0bfa20f.entry.js} +1 -1
- package/dist/webcomponents/{p-1202181b.entry.js → p-b93377a7.entry.js} +1 -1
- package/dist/webcomponents/p-ba018d57.entry.js +1 -0
- package/dist/webcomponents/{p-d014a155.entry.js → p-bafe873d.entry.js} +1 -1
- package/dist/webcomponents/p-be06d86a.entry.js +1 -0
- package/dist/webcomponents/{p-4a79c737.entry.js → p-befda39d.entry.js} +1 -1
- package/dist/webcomponents/{p-afc83e27.entry.js → p-c5b48e8d.entry.js} +1 -1
- package/dist/webcomponents/{p-92efb3f2.entry.js → p-c5dabaf4.entry.js} +1 -1
- package/dist/webcomponents/p-cea8e40e.entry.js +1 -0
- package/dist/webcomponents/p-d075bd72.entry.js +1 -0
- package/dist/webcomponents/{p-1a83d9f2.entry.js → p-d7720819.entry.js} +1 -1
- package/dist/webcomponents/p-df4f2af9.entry.js +1 -0
- package/dist/webcomponents/p-e1ba5735.entry.js +1 -0
- package/dist/webcomponents/{p-e6ca1872.entry.js → p-e2267656.entry.js} +1 -1
- package/dist/webcomponents/p-e4e30e84.entry.js +1 -0
- package/dist/webcomponents/{p-55b7bdba.entry.js → p-e81c5d79.entry.js} +1 -1
- package/dist/webcomponents/p-f200cbda.entry.js +1 -0
- package/dist/webcomponents/p-f4645aef.entry.js +1 -0
- package/dist/webcomponents/{p-a70bc148.entry.js → p-f4f3cae8.entry.js} +1 -1
- package/dist/webcomponents/p-f7345d66.entry.js +1 -0
- package/dist/webcomponents/{p-1b892b3a.entry.js → p-f7e62bfa.entry.js} +1 -1
- package/dist/webcomponents/{p-32cc081a.entry.js → p-fd39af50.entry.js} +1 -1
- package/dist/webcomponents/{p-C0AHrswP.js → p-qMrd7_Gp.js} +1 -1
- package/dist/webcomponents/{p-DKRXPZKS.js → p-vRhNRfmB.js} +1 -1
- package/dist/webcomponents/p-zrUQD0Wr.js +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/justifi-apple-pay.cjs.entry.js +0 -830
- package/dist/collection/api/ApplePay.js +0 -119
- package/dist/collection/api/services/apple-pay.service.js +0 -329
- package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +0 -10
- package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +0 -554
- package/dist/collection/ui-components/apple-pay-button.js +0 -146
- package/dist/esm/justifi-apple-pay.entry.js +0 -828
- package/dist/module/justifi-apple-pay.d.ts +0 -11
- package/dist/module/justifi-apple-pay.js +0 -871
- package/dist/types/api/ApplePay.d.ts +0 -196
- package/dist/types/api/services/apple-pay.service.d.ts +0 -65
- package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +0 -6
- package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +0 -38
- package/dist/types/ui-components/apple-pay-button.d.ts +0 -17
- package/dist/webcomponents/p-12c312a0.entry.js +0 -1
- package/dist/webcomponents/p-1c0c1d7b.entry.js +0 -1
- package/dist/webcomponents/p-1e206c92.entry.js +0 -1
- package/dist/webcomponents/p-2988e82c.entry.js +0 -1
- package/dist/webcomponents/p-2a0a907d.entry.js +0 -1
- package/dist/webcomponents/p-41416b5f.entry.js +0 -1
- package/dist/webcomponents/p-5510b57c.entry.js +0 -1
- package/dist/webcomponents/p-5a5f07be.entry.js +0 -1
- package/dist/webcomponents/p-5acd6add.entry.js +0 -1
- package/dist/webcomponents/p-5afbfafb.entry.js +0 -1
- package/dist/webcomponents/p-6974a44c.entry.js +0 -1
- package/dist/webcomponents/p-6f2b41f5.entry.js +0 -1
- package/dist/webcomponents/p-6f9755cc.entry.js +0 -1
- package/dist/webcomponents/p-7288473f.entry.js +0 -1
- package/dist/webcomponents/p-98939b74.entry.js +0 -1
- package/dist/webcomponents/p-BZzESzqz.js +0 -1
- package/dist/webcomponents/p-BmFoKOM3.js +0 -1
- package/dist/webcomponents/p-BtOB_CaO.js +0 -1
- package/dist/webcomponents/p-C60pS6qh.js +0 -1
- package/dist/webcomponents/p-D7eeJWA-.js +0 -1
- package/dist/webcomponents/p-DOd8HaWV.js +0 -1
- package/dist/webcomponents/p-DcE8SQPv.js +0 -1
- package/dist/webcomponents/p-Drz6LnIw.js +0 -1
- package/dist/webcomponents/p-b41d2b8f.entry.js +0 -1
- package/dist/webcomponents/p-b8f63e28.entry.js +0 -1
- package/dist/webcomponents/p-ba84c3bd.entry.js +0 -1
- package/dist/webcomponents/p-c62e23c1.entry.js +0 -1
- package/dist/webcomponents/p-eff0b0e9.entry.js +0 -1
- package/dist/webcomponents/p-f3be7b2b.entry.js +0 -1
- package/dist/webcomponents/p-f787bc18.entry.js +0 -1
- package/dist/webcomponents/p-fb1904d2.entry.js +0 -1
- package/dist/webcomponents/p-fcb6e870.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-kpoIU4v_.js";import{c as i}from"./p-9y5MOK55.js";import{S as n}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{S as a}from"./p-DOd8HaWV.js";import{c as o,o as r}from"./p-BXKEChoo.js";import"./p-7WIgS5RM.js";import"./p-RvUQ__Pq.js";var p,c,l,h;!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(p||(p={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(c||(c={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(l||(l={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(h||(h={}));class d{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||c.PLAIN,this.buttonStyle=t.buttonStyle||l.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class u{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,e,s,i;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(e=this.supportedNetworks)||void 0===e?void 0:e.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(i=this.total)||void 0===i?void 0:i.amount))}}class y{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var e;if(!this.isApplePaySupported())return!1;try{return await(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,e,s="final"){return{label:t,amount:this.formatAmount(e),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[h.SUPPORTS_3DS,h.SUPPORTS_EMV,h.SUPPORTS_CREDIT,h.SUPPORTS_DEBIT]}}class b{constructor(){this.apiBaseUrl=i.apiOrigin}setApiBaseUrl(t){this.apiBaseUrl=t}setAuthToken(t){this.authToken=t}setAccountId(t){this.accountId=t}initialize(t){if(this.applePayConfig=new d(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t){const e=`${this.apiBaseUrl}/v1/apple_pay/merchant_session`;console.log("=== MERCHANT VALIDATION REQUEST ==="),console.log("Endpoint:",e),console.log("Auth token present:",!!t),console.log("Account ID:",this.accountId);const s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${t}`,"Sub-Account":this.accountId}});if(console.log("Response status:",s.status),!s.ok){const t=await s.text();console.error("Backend validation failed - Raw response:",t);try{const e=JSON.parse(t);console.error("Backend validation failed - Parsed error:",e)}catch(t){console.error("Could not parse error response as JSON:",t)}throw new Error(`Merchant validation failed: ${s.status}`)}const i=await s.json();return console.log("Merchant session received:",i),i}async processPayment(t,e){const s=`${this.apiBaseUrl}/v1/apple_pay/process_token`,i=e,n=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${t}`,"Sub-Account":this.accountId},body:JSON.stringify(i)}),a=await n.json();return{success:a.id&&!!a.data.token,data:a}}isAvailable(){return y.isApplePaySupported()&&y.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await y.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");const e=new u(t);if(!e.isValid)throw new Error("Invalid payment request provided");return this.currentPaymentRequest=e,new Promise(((t,s)=>{try{this.currentSession=new window.ApplePaySession(3,e),this.setupSessionEventHandlers(t,s),this.currentSession.begin()}catch(t){s({success:!1,error:{code:"SESSION_ERROR",message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest&&(this.currentSession.onvalidatemerchant=async()=>{try{if(!this.authToken)throw new Error("Authentication token not set. Call setAuthToken() first.");const t=await this.validateMerchant(this.authToken);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:"MERCHANT_VALIDATION_ERROR",message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async s=>{try{const i=s.payment,n=Object.assign(Object.assign({},i.token),{product_details:{name:this.currentPaymentRequest.total.label,price:y.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}});if(!this.authToken)throw new Error("Authentication token not set. Call setAuthToken() first.");const a=await this.processPayment(this.authToken,n);a.success?(this.currentSession.completePayment({status:p.STATUS_SUCCESS}),t({success:!0,token:i.token})):(console.error("PSP reported payment failure:",a.data),this.currentSession.completePayment({status:p.STATUS_FAILURE}),e({success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),console.error("Error stack:",t.stack),this.currentSession.completePayment({status:p.STATUS_FAILURE}),e({success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:p.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:"USER_CANCELLED",message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:"SESSION_ERROR",message:"Apple Pay session error occurred"}})}))}static createPaymentRequest(t,e,s="US",i="USD"){return{countryCode:s,currencyCode:i,merchantCapabilities:y.getDefaultMerchantCapabilities(),supportedNetworks:y.getDefaultSupportedNetworks(),total:y.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const f=e=>{const{isReady:s}=e;return s?null:t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(a,{height:"44px",width:"100%",styles:{borderRadius:"8px"}}))))},v=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case l.WHITE:t+=" apple-pay-button-white";break;case l.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case c.BUY:t+=" apple-pay-button-type-buy";break;case c.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width||"200px",height:e.height||"48px"},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: inline-block;\n position: relative;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),m=class{constructor(t){e(this,t),this.applePayStarted=s(this,"applePayStarted"),this.applePayCompleted=s(this,"applePayCompleted"),this.applePayCancelled=s(this,"applePayCancelled"),this.applePayError=s(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.apiBaseUrl=i.apiOrigin,this.buttonType=c.PLAIN,this.buttonStyle=l.BLACK,this.disabled=!1,this.showSkeleton=!0,this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.error=null,this.handleApplePayClick=async()=>{var t;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const e={countryCode:this.countryCode,currencyCode:o.paymentCurrency,merchantCapabilities:y.getDefaultMerchantCapabilities(),supportedNetworks:y.getDefaultSupportedNetworks(),total:y.createLineItem(o.paymentDescription,o.paymentAmount)},s=await this.applePayService.startPaymentSession(e);s.success?this.applePayCompleted.emit({success:!0,token:s.token}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed"}))}catch(t){console.error("Apple Pay payment error:",t);const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e}),this.applePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}componentWillLoad(){this.applePayService=new b,this.applePayService.setApiBaseUrl(this.apiBaseUrl),this.applePayService.setAuthToken(o.authToken),this.applePayService.setAccountId(o.accountId),this.initializeApplePay()}componentDidLoad(){r("paymentAmount",(()=>{this.initializeApplePay()})),r("authToken",(()=>{this.applePayService&&this.applePayService.setAuthToken(o.authToken)}))}watchPropsChange(){this.initializeApplePay()}async initializeApplePay(){console.log("Initializing Apple Pay");try{if(this.applePayService&&(this.applePayService.setApiBaseUrl(this.apiBaseUrl),this.applePayService.setAuthToken(o.authToken)),this.isLoading=!0,this.error=null,!o.paymentAmount)return this.error="Missing required Apple Pay configuration",void(this.isLoading=!1);if(this.isAvailable=!0,this.canMakePayments=!0,!this.isAvailable)return this.error="Apple Pay is not supported on this device",void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};console.log("=== APPLE PAY CONFIG ==="),console.log("Config:",t),console.log("Auth token present:",!!o.authToken),console.log("Account ID:",o.accountId),this.applePayService.setAccountId(o.accountId),this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay"}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?y.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&!this.error;return t(n,{key:"45f2eaf52c3a2b2641a9cf6b22861de0a2a628a6"},t("script",{key:"42a858aefc0e5ff23d5cf322ebca4408d7ac745f",async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"}),t("div",{key:"87ff666f7a898051253e18a1c14a9fca0373b1a8",class:"apple-pay-container"},t(f,{key:"3b4a24e3e8f4a4fdde1b134b61d7cbe422b40fd9",isReady:e}),!this.isLoading&&this.error&&t("div",{key:"a6f58df266b99e385eb38f7d8104906966b337af",class:"apple-pay-error",role:"alert"},t("span",{key:"c97d5489a323df55a97a5d3395fd4e14363ba32b",class:"error-icon"},"⚠️"),t("span",{key:"d6447983dcf879d061d1b4d6d06300e9df3430d4",class:"error-message"},this.error)),!this.isLoading&&!this.error&&!this.isAvailable&&t("div",{key:"d58714c3a66403876a1b92f7de5a2981a71baaa4",class:"apple-pay-unavailable"},t("span",{key:"7d01800c0044a6b1cce70d76da8c4b37e9d592c8",class:"unavailable-message"},"Apple Pay is not available on this device")),!this.isLoading&&!this.error&&this.isAvailable&&this.canMakePayments&&t(v,{key:"6e950987ae3c2d7c5168028f48a6400bd97a0692",buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick})),t("style",{key:"2358f7ee9df1d9d270754801b00be2c807c2a10c"},"\n .apple-pay-container {\n width: 100%;\n }\n\n .apple-pay-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n }\n\n .apple-pay-unavailable {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n color: #6b7280;\n font-size: 14px;\n }\n\n .error-icon {\n font-size: 16px;\n }\n "))}static get watchers(){return{merchantIdentifier:["watchPropsChange"],apiBaseUrl:["watchPropsChange"],buttonType:["watchPropsChange"],buttonStyle:["watchPropsChange"],disabled:["watchPropsChange"]}}};export{m as justifi_apple_pay}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-WEguiGt1.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as f,h as b,i as m,j as d,k as u,l as g}from"./p-HAk7yBNq.js";import{T as y}from"./p-CZfYo5-1.js";import{t as j,a as l}from"./p-BhdBpAn9.js";import{o as k,g as v}from"./p-BVD7g3cE.js";import"./p-7WIgS5RM.js";import"./p-zdIeCUeh.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-Drz6LnIw.js";import"./p-DKRXPZKS.js";const C=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:y.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new a(this.terminals,this.columns,j,l),this.getTerminals&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get terminalParams(){const t=v();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"f3d727c92c66b2504c6c8952a284cd4972706fd4"},e(r,{key:"c368038fb5683749737bb6b2b27a0a55ac95fe95"},e(h,{key:"96b41588ba94168581bfa423d3199916a06a925e"},e(o,{key:"fd1991bbcc22c3eb2b9ba107341285abf55a06b2"},this.terminalsTable.columnData.map((t=>t)))),e(c,{key:"ff3244f6b51f311fbc4311e37fc2c5bd4115a71a"},e(n,{key:"821b4e55ea536fbe14e018107e8c19c309b86fca",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"cbeedf4e12ff428e7d24f536675f5b1f3c9d3d67",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(f,{key:"4c7882127d862af40ea5960ec10adf092e676e4e",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e(b,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(m,{key:"7bd7c9bbc95b0c24c03c1b3fd1685877dcdfec06"},e(d,{key:"d6988cf0398b1a435f71a73761fb57656ff5ee7d"},e(u,{key:"207ac8dd06e9b053653781b255833e4f20bf9559",colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"329f13886ec41244f05030673cf4cd7baf6b1cb6",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{C as terminals_list_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as r}from"./p-kpoIU4v_.js";import{P as i}from"./p-Bb6FBEPP.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as n,a}from"./p-D2muobcE.js";import{c,J as m}from"./p-D9Sv4eV5.js";import{S as h}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-D7eeJWA-.js";import"./p-I8XpD1TX.js";import"./p-zdIeCUeh.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-C60pS6qh.js";import"./p-nWGo6sHu.js";import"./p-DKRXPZKS.js";import"./p-RvUQ__Pq.js";const u=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=f,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,f;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:a(m.error),code:n(null===(f=m.error)||void 0===f?void 0:f.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"2c77c3faa07c2f363a0c0ff2f4262de157effafc"},r("payments-list-core",{key:"374dc84e80696157b60bfc04f836bcd8e59e67ff",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payments_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as p,a}from"./p-D2muobcE.js";import{c,J as n}from"./p-D9Sv4eV5.js";import{C as h}from"./p-UD2JhYS2.js";import{m,S as u}from"./p-Bpcb3SsP.js";import{S as d}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-DBsw4qpn.js";import"./p-7WIgS5RM.js";import"./p-zdIeCUeh.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-C60pS6qh.js";import"./p-I8XpD1TX.js";import"./p-DKRXPZKS.js";import"./p-RvUQ__Pq.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:c,onError:n})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return n({error:a(u.error),code:p(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);c({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"0e9e50e18983dad43cfab19f2271678d3f5e6abd"},i("checkouts-list-core",{key:"6f128cc756477ff64638625d9a9ff9a5b4533948",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,c as i,H as s,g as o}from"./p-kpoIU4v_.js";import{z as r,r as a}from"./p-RvUQ__Pq.js";import{f as n}from"./p-zdIeCUeh.js";import{c as h,o as d}from"./p-BXKEChoo.js";import{S as c}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{H as l}from"./p-DcE8SQPv.js";import{H as u,b as m,h as p,i as y}from"./p-C0AHrswP.js";import{H as v}from"./p-BtOB_CaO.js";import{J as f,c as b}from"./p-D9Sv4eV5.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as k,a as g,b as j}from"./p-Cjcsf8ku.js";import{I as C,k as P}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as _,a as w}from"./p-D2muobcE.js";import{C as M}from"./p-UD2JhYS2.js";import{C as z}from"./p-ZpPDShvP.js";import"./p-7WIgS5RM.js";import"./p-C60pS6qh.js";import"./p-I8XpD1TX.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const S=class{constructor(t){e(this,t)}render(){return t(c,{key:"28a1a324b8cdf2dea0aafe91fbdd3679482e76f8"},t("section",{key:"e8ffe2fdd1592a0b762647fdab94ee5e21436a93"},t("div",{key:"099fbfb449066290cdcd113b0de5f87334777a0e"},t("div",{key:"c78325957b4e00299366b8e9efe6fd6e86da3b97",part:r},null==h?void 0:h.paymentDescription),t("div",{key:"d077da888b03a34e540f66ebaa57502fe22be7c4"},t("span",{key:"d4f7ddd24e10302222679a9f73c3b5ed305267a7",part:r},"Total")," ",t("span",{key:"1f5d7b6b0cce64eea04879e7767ff87ce5a64069",part:r},n(+(null==h?void 0:h.totalAmount)))))))}},O=class{constructor(t){e(this,t),this.levels={h1:l,h2:u,h3:v},this.level="h1"}render(){return t(c,{key:"73104ea086f8a9948e69f86451adf19e0f39fb32"},t(this.levels[this.level],{key:"a8582109634299a24e2a9b3c7181c6bba511fde7",text:this.text,class:this.class}))}},A=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.paymentMethodChangedEvent=i(this,"payment-method-changed"),this.savePaymentMethod=!1,this.handleApplePayCompleted=e=>{const{success:t,token:i,error:s}=e.detail;t&&i?(this.applePayToken=i,this.submitCheckoutWithApplePay()):(console.error("Apple Pay completed but failed:",s),this.errorEvent.emit({message:(null==s?void 0:s.message)||"Apple Pay payment failed",errorCode:g.TOKENIZE_ERROR,severity:k.ERROR}))},this.handleApplePayError=e=>{const{error:t}=e.detail;console.error("Apple Pay error:",t),this.errorEvent.emit({message:t||"Apple Pay error occurred",errorCode:g.TOKENIZE_ERROR,severity:k.ERROR})},this.handleApplePayCancelled=()=>{console.log("Apple Pay cancelled by user"),this.applePayToken=void 0}}savePaymentMethodChanged(e){h.savePaymentMethod=e}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),h.checkoutId=this.checkoutId;const e={authToken:this.authToken,checkoutId:this.checkoutId,service:new M};this.getCheckout=(({authToken:e,checkoutId:t,service:i})=>async({onSuccess:s,onError:o})=>{var r;try{const a=await i.fetchCheckout(e,t);if(a.error)return o({error:w(a.error),code:_(null===(r=a.error)||void 0===r?void 0:r.code),severity:k.ERROR});s({checkout:a.data})}catch(e){const t=_(null==e?void 0:e.code);return o({error:e.message||e,code:t,severity:k.ERROR})}})(e),this.completeCheckout=(({authToken:e,checkoutId:t,service:i})=>async({payment:s,onSuccess:o,onError:r})=>{var a;try{const n=await i.complete(e,t,s);if(n.error)return r({error:w(n.error),code:_(null===(a=n.error)||void 0===a?void 0:a.code),severity:k.ERROR});o({checkout:n.data})}catch(e){const t=_(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:k.ERROR})}})(e),d("selectedPaymentMethod",(e=>{this.paymentMethodChangedEvent.emit(e)}))}componentWillLoad(){this.authToken&&this.checkoutId?(this.analytics=new f(this),b(),h.authToken=this.authToken,h.savePaymentMethod=this.savePaymentMethod,this.fetchCheckout(),m("set",(e=>{const t=y[e];void 0!==t&&p(e,t)&&this.fetchCheckout()}))):this.errorEvent.emit({message:j.NOT_AUTHENTICATED,errorCode:g.NOT_AUTHENTICATED,severity:k.ERROR})}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.getCheckout&&this.getCheckout({onSuccess:({checkout:e})=>{e.status!==C.completed?e.status!==C.expired?this.updateStore(e):this.errorEvent.emit({message:j.CHECKOUT_EXPIRED,errorCode:g.CHECKOUT_EXPIRED,severity:k.ERROR}):this.errorEvent.emit({message:j.CHECKOUT_ALREADY_COMPLETED,errorCode:g.CHECKOUT_ALREADY_COMPLETED,severity:k.ERROR})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:g.FETCH_ERROR,severity:k.ERROR})}})}updateStore(e){var t,i,s,o;h.accountId=e.account_id,h.paymentMethods=e.payment_methods,h.paymentMethodGroupId=e.payment_method_group_id,h.paymentDescription=e.payment_description,h.totalAmount=e.total_amount,h.paymentAmount=e.payment_amount,h.bnplEnabled=e.payment_settings.bnpl_payments,h.bnplProviderClientId=null===(t=null==e?void 0:e.bnpl)||void 0===t?void 0:t.provider_client_id,h.bnplProviderMode=null===(i=null==e?void 0:e.bnpl)||void 0===i?void 0:i.provider_mode,h.bnplProviderApiVersion=null===(s=null==e?void 0:e.bnpl)||void 0===s?void 0:s.provider_api_version,h.bnplProviderCheckoutUrl=null===(o=null==e?void 0:e.bnpl)||void 0===o?void 0:o.provider_checkout_url}queryFormRefs(){this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form"),this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance"),this.sezzlePaymentMethodRef=this.hostEl.querySelector("justifi-sezzle-payment-method"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}async submitCheckoutWithApplePay(){this.applePayToken?this.completeCheckout({payment:{payment_mode:"apple_pay",payment_token:this.applePayToken},onSuccess:({checkout:e})=>{this.submitEvent.emit({checkout:e,message:"Apple Pay checkout completed successfully"})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:g.COMPLETE_CHECKOUT_ERROR,severity:k.ERROR})}}):this.errorEvent.emit({message:"No Apple Pay token available",errorCode:g.TOKENIZE_ERROR,severity:k.ERROR})}async tokenizePaymentMethod(e){var t,i,s;const o=null!==(i=await(null===(t=this.billingFormRef)||void 0===t?void 0:t.getValues()))&&void 0!==i?i:{},r=Object.assign(Object.assign({},e),o),a=Object.assign({accountId:h.accountId,payment_method_group_id:void 0},r);return h.savePaymentMethod&&(a.payment_method_group_id=h.paymentMethodGroupId),null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:h.accountId})}async getPaymentMethod(e){if(this.applePayToken)return"apple_pay_token";if(h.paymentToken)return h.paymentToken;if(!this.paymentMethodFormRef)return h.selectedPaymentMethod;const{error:t,id:i}=await this.tokenizePaymentMethod(e);if(!t)return i;this.errorEvent.emit({errorCode:t.code,message:t.message,severity:k.ERROR})}async validate(){var e,t;if(this.applePayToken)return!0;const i=[null===(e=this.paymentMethodFormRef)||void 0===e?void 0:e.validate(),null===(t=this.billingFormRef)||void 0===t?void 0:t.validate()];return this.insuranceFormRef&&i.push(this.insuranceFormRef.validate()),(await Promise.all(i)).every((e=>!1!==(null==e?void 0:e.isValid)))}async submitCheckout(e){var t;if(this.applePayToken)return void await this.submitCheckoutWithApplePay();if(!await this.validate())return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:g.VALIDATION_ERROR,severity:k.ERROR});let i;if("sezzle"===h.selectedPaymentMethod){const e=this.insuranceFormRef?await this.insuranceFormRef.validate():{isValid:!0},s=await this.sezzlePaymentMethodRef.resolvePaymentMethod(e);if(s.error)return void this.errorEvent.emit({message:s.error.message,errorCode:g.TOKENIZE_ERROR,severity:k.ERROR});"success"===(null===(t=s.bnpl)||void 0===t?void 0:t.status)&&(i={payment_mode:"bnpl",payment_token:void 0})}else{const t=await this.getPaymentMethod(e);if(!t)return void this.errorEvent.emit({message:"Payment method tokenization failed.",errorCode:g.TOKENIZE_ERROR,severity:k.ERROR});i={payment_mode:"ecom",payment_token:t}}this.completeCheckout({payment:i,onSuccess:({checkout:e})=>{this.submitEvent.emit({checkout:e,message:"Checkout completed successfully"})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:g.COMPLETE_CHECKOUT_ERROR,severity:k.ERROR})}})}async setSelectedPaymentMethod(e){h.selectedPaymentMethod=e}render(){return t(s,{key:"1b0c613494dde43962dc963618d5a81c4423b218"})}get hostEl(){return o(this)}static get watchers(){return{savePaymentMethod:["savePaymentMethodChanged"]}}},E=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=e=>t=>{t.preventDefault(),h.selectedPaymentMethod=e},this.isAllowedPaymentMethod=e=>!("card"===e.type&&h.disableCreditCard||"bank_account"===e.type&&h.disableBankAccount)}componentWillLoad(){h.paymentMethods.length||console.warn("No saved payment methods available."),h.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return h.disablePaymentMethodGroup?null:t(c,null,t("div",{class:"saved-payment-methods"},h.paymentMethods.length?h.paymentMethods.filter(this.isAllowedPaymentMethod).map((e=>t("div",{class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick(null==e?void 0:e.id)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:h.selectedPaymentMethod===(null==e?void 0:e.id),label:`${z[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},I=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),B=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId="sezzle",this.onPaymentMethodOptionClick=e=>{e.preventDefault(),h.selectedPaymentMethod=this.paymentMethodOptionId,this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)},this.initializeSezzleCheckout=()=>{let e;this.sezzlePromise=new Promise((t=>{e=t}));const t=Number(h.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:h.bnplProviderClientId,apiMode:h.bnplProviderMode,apiVersion:h.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(e){e.preventDefault(),i.startCheckout({checkout_url:h.bnplProviderCheckoutUrl})},onComplete:t=>e({bnpl:t.data}),onCancel:t=>e({bnpl:t.data}),onFailure:t=>e({bnpl:t.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(t)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(e){return e.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var e,i;return!h.bnplEnabled||h.disableBnpl?(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null):t(c,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:e=>this.scriptRef=e}),t("div",{class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{name:"paymentMethodType",value:this.paymentMethodOptionId,checked:h.selectedPaymentMethod===this.paymentMethodOptionId,label:t("div",null,t("div",null,"Buy now, pay later with ",I),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},n(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))})))}},L={[P.bankAccount]:"New bank account",[P.card]:"New credit or debit card"},D="Payment form not ready",T="Validation error",F=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.isLoading=!1,this.computedHideSubmitButton=!1,this.submitButtonText="Submit"}componentWillLoad(){b(),this.analytics=new f(this),this.validateRequiredProps()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}handleRadioClick(e){this.selectedPaymentMethodId=e.detail}async fillBillingForm(e){var t;null===(t=this.billingFormRef)||void 0===t||t.fill(e)}async tokenizePaymentMethod(e){null==e||e.preventDefault(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:g.TOKENIZE_ERROR,message:T}),void(this.isLoading=!1);const e=await this.resolvePaymentMethod({isValid:!0});return e.error&&this.emitError({errorCode:e.error.code,message:e.error.message}),this.submitEvent.emit({response:e}),e}catch(e){const t=this.createErrorResponse(g.TOKENIZE_ERROR,e.message);return this.emitError({errorCode:g.TOKENIZE_ERROR,message:e.message}),this.submitEvent.emit({response:t}),t}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:D}};const[e,t]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:e.isValid&&t.isValid,errors:Object.assign(Object.assign({},e.errors),t.errors)}}validateRequiredProps(){this.authToken||h.authToken||this.emitError({errorCode:g.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||h.accountId||this.emitError({errorCode:g.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethodId||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethodId=P.bankAccount):this.selectedPaymentMethodId=P.card)}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const e=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=e}isSlottedWithinModularCheckout(){var e;let t=null===(e=this.host)||void 0===e?void 0:e.parentElement;for(;t;){if("JUSTIFI-MODULAR-CHECKOUT"===t.tagName)return!0;t=t.parentElement}return!1}get availablePaymentMethods(){const e=[];return this.disableCreditCard||e.push(P.card),this.disableBankAccount||e.push(P.bankAccount),e}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(e){this.errorEvent.emit(Object.assign(Object.assign({},e),{severity:k.ERROR}))}createErrorResponse(e,t){return{error:{code:e,message:t,decline_code:void 0}}}async resolvePaymentMethod(e){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",D);try{const t=await this.validate();if(!t.isValid||!e.isValid){const e=Object.values(t.errors)[0]||T;return{validationError:!0,error:{code:"validation_error",message:String(e),decline_code:void 0}}}return await this.performTokenization()}catch(e){return{error:e}}}async performTokenization(){var e,t;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(e=s.card)||void 0===e?void 0:e.token)||(null===(t=s.bank_account)||void 0===t?void 0:t.token),data:s}}async tokenize(){try{const e=await this.billingFormRef.getValues(),t={clientId:this.authToken||h.authToken,account:this.accountId||h.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(e)};return await this.paymentMethodFormRef.tokenize(t)}catch(e){return e}}buildPaymentMethodMetadata(e){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},e),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},e)}get paymentMethodGroupID(){return this.paymentMethodGroupId||h.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!h.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(e){const i=this.selectedPaymentMethodId===e;return t("div",{class:"payment-method"},t("justifi-radio-list-item",{name:"paymentMethodType",value:e,checked:i,label:L[e],hidden:this.shouldHideRadioInput}),i&&this.renderSelectedPaymentMethodForm(e))}renderSelectedPaymentMethodForm(e){return t("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(e),t("div",{class:"mt-4"},t("justifi-billing-form",{ref:e=>this.billingFormRef=e,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:e})),t("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID}))}renderPaymentMethodForm(e){return t(e===P.card?"justifi-card-form":"justifi-bank-account-form",{ref:e=>this.paymentMethodFormRef=e})}render(){return t(c,{key:"47fb6432264a7009d1df82cac73c3283be5a1514"},t("form",{key:"b283f414e00296cbf08960a669fbd0f91a2cb554"},t("fieldset",{key:"bfaddf226f5ec365ceb22185804f29d46f9f59c7"},t("div",{key:"b828e27ea63fa96dd7f38ef8d6038e3a6d1f234c",class:"row gy-3"},t("div",{key:"1b34dba8e5d3a5426f002e4b2eace7dbc32b80e8",class:"col-12"},this.availablePaymentMethods.map((e=>this.renderPaymentMethodOption(e)))),t("div",{key:"d62cdda4a73c39ce53936717c5c22779dd9c3c48",class:"col-12"},t("justifi-button",{key:"24bbd9e275990e59d0549b07725111aa0fffa8c4",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:e=>this.tokenizePaymentMethod(e),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return o(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{S as justifi_checkout_summary,O as justifi_header,A as justifi_modular_checkout,E as justifi_saved_payment_methods,B as justifi_sezzle_payment_method,F as justifi_tokenize_payment_method}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as a}from"./p-kpoIU4v_.js";import{a3 as i,a4 as h,a5 as r,a6 as o,a7 as c,l}from"./p-RvUQ__Pq.js";const f=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?i:this.isFocused&&this.checked?h:this.checked?r:this.isFocused?o:c}render(){return e(a,{key:"f699cf07beab2c184ed0bf349b547e20b8a809a3",class:"form-group d-flex flex-column"},e("div",{key:"7a6427ca06397dd7ef610484e66766137a49bcc5",class:"form-check"},e("input",{key:"2cbda070ab205f489ec5345a387f95aa63303ad4",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"653fbd79f9fc7e55337208e02b55f2e7751d2811",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:l},this.label)),e("form-control-help-text",{key:"36bebcb0ce02c548a21a02219d6d6b54c9a856eb",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"8bc6df11eeaea35ea50b3d8132678c9855beacd9",errorText:this.errorText,name:this.name}))}};export{f as form_control_radio}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-WEguiGt1.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{T as o,a as h,b as c,c as n,d as p,e as d,f,g as u,h as m,i as y,j as b,k as g,l as j}from"./p-HAk7yBNq.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-wyEq9Pa1.js";import{o as v,g as S}from"./p-Bt388eye.js";import"./p-7WIgS5RM.js";import"./p-zdIeCUeh.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-Drz6LnIw.js";import"./p-CP_tg-uH.js";import"./p-DKRXPZKS.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),v("set",(()=>{this.pagingParams={}})),v("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=S();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"fe72adaaaa7e03339bd2c023ed3cfd76ce20cc09"},e(h,{key:"d9c191823846f3160ee178a291d797885862346b"},e(c,{key:"070d60c8ed1e9469208b2d12ff22f5c5782e5b06"},e(n,{key:"e3a8658405dc3339af9694f88ee7e39553e7f48f"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"5c919ca5c320c664f5c1fde43a996ecdd1ef346f"},e(d,{key:"e037e4280fac5697c1d5c7798ab09550046038a0",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(f,{key:"963f510db0f77df7d257e2ad1bba91ab0e071945",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(u,{key:"6e7eedf2e5c51c7c483695f4892ca492ef799514",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(y,{key:"b5b0b65da33dd148425571b328d04fffddf0e1f3"},e(b,{key:"73cc200689fd799618fffa1bc8a102c357372aef"},e(g,{key:"b85785c0eb003fa546137119d50264e05a6b9382",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"e42a0da2d4c06c659ad6a9fc7f2cd2bb61caf1ee",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{w as payouts_list_core}
|