@justifi/webcomponents 6.15.0 → 6.16.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Analytics-BjZHa0wt.js → Analytics-jQsZxClw.js} +2 -2
- package/dist/cjs/{Api-us3AxMRC.js → Api-DqXlEWR1.js} +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +8 -8
- package/dist/cjs/additional-questions_4.cjs.entry.js +1 -1
- package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +13 -7
- package/dist/cjs/bank-account-form.cjs.entry.js +66 -12
- package/dist/cjs/{business-identity-schema-XiCLzxWM.js → business-identity-schema-DuOIMFjG.js} +2 -2
- package/dist/cjs/{business.service-_Sl3vWmu.js → business.service-Ca-olopC.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +14 -10
- package/dist/cjs/{checkout.service-B_qymeqJ.js → checkout.service-DBHPH2ji.js} +1 -1
- package/dist/cjs/{checkout.store-DaV9lvEQ.js → checkout.store-B5lTwvUV.js} +1 -0
- package/dist/cjs/{country-config-DQQujh5h.js → country-config-CFC3KuVD.js} +24 -2
- package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
- package/dist/cjs/detect-duplicate-version-D8ZajVUT.js +29 -0
- package/dist/cjs/dispute-notification_2.cjs.entry.js +9 -9
- package/dist/cjs/{event-types-DmY59QXs.js → event-types-luy3xnYR.js} +1 -1
- package/dist/cjs/form-address-fields_3.cjs.entry.js +5 -5
- package/dist/cjs/form-alert_3.cjs.entry.js +116 -15
- 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 +1 -1
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number_2.cjs.entry.js +3 -3
- package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
- package/dist/cjs/form-control-select_2.cjs.entry.js +22 -6
- package/dist/cjs/{get-subaccounts-BMY2bOFj.js → get-subaccounts-D11aTYj1.js} +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +41 -25
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +8 -7
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +7 -7
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -9
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +9 -6
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +10 -8
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +8 -8
- package/dist/cjs/justifi-payment-details.cjs.entry.js +14 -14
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +6 -6
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +6 -6
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-30T__1wH.js → package-B414Jbra.js} +1 -3
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-DRXVT-uB.js → payment.service-CNTe8vrp.js} +1 -1
- package/dist/cjs/{payout.service-CuQ-mXKB.js → payout.service-BmU3q9jO.js} +1 -1
- package/dist/cjs/{plaid.service-B58nzlUE.js → plaid.service-d9LAwbnX.js} +1 -1
- package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
- package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
- package/dist/cjs/{schema-validations-sjRvL4KO.js → schema-validations-BDFa_oIq.js} +8 -2
- package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-CmtSEgTc.js → terminal.service-BkQWZv9b.js} +1 -1
- package/dist/cjs/utils-Ct_X5q0U.js +62 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/business-details/justifi-business-details.js +3 -3
- package/dist/collection/components/business-forms/business-form/justifi-business-form.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +2 -2
- package/dist/collection/components/business-forms/schemas/schema-validations.js +8 -1
- package/dist/collection/components/business-forms/utils/country-config.js +3 -2
- package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +90 -12
- package/dist/collection/components/checkout/billing-form/billing-form-full.js +6 -2
- package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +6 -2
- package/dist/collection/components/checkout/card-form/card-form.js +39 -11
- package/dist/collection/components/checkout/justifi-checkout.js +26 -4
- package/dist/collection/components/checkout/message-event-types.js +2 -0
- package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +2 -2
- package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +4 -4
- package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
- 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.js +3 -3
- 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/dispute-management/justifi-dispute-management.js +3 -3
- package/dist/collection/components/filters/table-filters-menu.js +1 -1
- package/dist/collection/components/gross-payment-chart/justifi-gross-payment-chart.js +2 -2
- package/dist/collection/components/insurance/season-interruption/justifi-season-interruption-insurance.js +2 -2
- package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +50 -12
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +3 -3
- package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +33 -6
- package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +28 -3
- package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
- package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +1 -1
- package/dist/collection/components/order-terminals/justifi-order-terminals.js +3 -3
- package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
- package/dist/collection/components/payment-details/justifi-payment-details.js +10 -10
- package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +3 -3
- package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
- package/dist/collection/components/payments-list/justifi-payments-list.js +3 -3
- package/dist/collection/components/payout-details/justifi-payout-details.js +5 -5
- package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +3 -3
- package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
- package/dist/collection/components/payouts-list/justifi-payouts-list.js +3 -3
- package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +2 -2
- package/dist/collection/components/refund-payment/justifi-refund-payment.js +2 -2
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +4 -4
- package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/justifi-terminals-list.js +3 -3
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +45 -6
- package/dist/collection/store/checkout.store.js +1 -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-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-select.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +37 -4
- package/dist/collection/ui-components/form/iframe-input.js +136 -14
- package/dist/collection/ui-components/form/utils.js +32 -0
- package/dist/collection/ui-components/internal-button.js +1 -1
- package/dist/collection/ui-components/radio-list-item.js +1 -1
- package/dist/collection/utils/detect-duplicate-version.js +24 -0
- package/dist/collection/utils/postal-code.js +19 -0
- package/dist/docs.json +286 -17
- package/dist/esm/{Analytics-BtMYbHD0.js → Analytics-DihSSvAP.js} +2 -2
- package/dist/esm/{Api-nVK-rgbk.js → Api-INJHjnya.js} +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +8 -8
- package/dist/esm/additional-questions_4.entry.js +1 -1
- package/dist/esm/additional-statement_8.entry.js +8 -8
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +13 -7
- package/dist/esm/bank-account-form.entry.js +66 -12
- package/dist/esm/{business-identity-schema-BP61Unwf.js → business-identity-schema-BLKCH6xV.js} +2 -2
- package/dist/esm/{business.service-Cq7H5w1T.js → business.service-C8f7OSEu.js} +1 -1
- package/dist/esm/card-form.entry.js +14 -10
- package/dist/esm/{checkout.service-JA7oTq5d.js → checkout.service-BYDkC7uy.js} +1 -1
- package/dist/esm/{checkout.store-B2mtQcB5.js → checkout.store-B8CGkx0o.js} +1 -0
- package/dist/esm/{country-config-F5YwgHgR.js → country-config-DJFj1v-Q.js} +23 -3
- package/dist/esm/custom-popper_2.entry.js +2 -2
- package/dist/esm/detect-duplicate-version-C4r1WAzO.js +27 -0
- package/dist/esm/dispute-notification_2.entry.js +9 -9
- package/dist/esm/{event-types-Dsf8IwD6.js → event-types-S8CgMbPg.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +5 -5
- package/dist/esm/form-alert_3.entry.js +116 -15
- package/dist/esm/form-control-checkbox.entry.js +2 -2
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/form-control-file-v2_2.entry.js +1 -1
- package/dist/esm/form-control-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number_2.entry.js +3 -3
- package/dist/esm/form-control-radio.entry.js +2 -2
- package/dist/esm/form-control-select_2.entry.js +22 -6
- package/dist/esm/{get-subaccounts-B-S2TGRa.js → get-subaccounts-BHWiH8q9.js} +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_12.entry.js +41 -25
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
- package/dist/esm/justifi-bank-account-form.entry.js +8 -7
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +7 -7
- package/dist/esm/justifi-business-form.entry.js +9 -9
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +9 -6
- package/dist/esm/justifi-checkout-qr-code.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +10 -8
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +9 -9
- package/dist/esm/justifi-dispute-management.entry.js +7 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
- package/dist/esm/justifi-order-terminals.entry.js +8 -8
- package/dist/esm/justifi-payment-details.entry.js +14 -14
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -6
- package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +7 -7
- package/dist/esm/justifi-payout-details.entry.js +9 -9
- package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
- package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payouts-list.entry.js +8 -8
- package/dist/esm/justifi-qr-terminal.entry.js +6 -6
- package/dist/esm/justifi-refund-payment.entry.js +6 -6
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +7 -7
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-BQpbTebi.js +5 -0
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-B42sKlQE.js → payment.service-CQXRsu6Y.js} +1 -1
- package/dist/esm/{payout.service-BIoAgNJJ.js → payout.service-RRyWfpEK.js} +1 -1
- package/dist/esm/{plaid.service-C6Ltk2ef.js → plaid.service-Cg3E3Plo.js} +1 -1
- package/dist/esm/radio-list-item.entry.js +1 -1
- package/dist/esm/save-new-payment-method.entry.js +2 -2
- package/dist/esm/{schema-validations-De7Qe0VU.js → schema-validations-8GJ34Do1.js} +8 -2
- package/dist/esm/table-filters-menu.entry.js +1 -1
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-DV3qIwBy.js → terminal.service-Dy6D8bnl.js} +1 -1
- package/dist/esm/utils-Cpck08K0.js +59 -0
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/additional-statement2.js +1 -1
- package/dist/module/bank-account-form2.js +65 -10
- package/dist/module/billing-form-full2.js +6 -2
- package/dist/module/cancellation-policy2.js +1 -1
- package/dist/module/card-billing-form-simple2.js +6 -2
- package/dist/module/card-form2.js +14 -9
- package/dist/module/checkout.store.js +1 -0
- package/dist/module/country-config.js +23 -3
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/customer-details2.js +1 -1
- package/dist/module/detect-duplicate-version.js +27 -0
- package/dist/module/dispute-notification2.js +2 -2
- package/dist/module/dispute-response2.js +3 -3
- package/dist/module/duplicate-charge2.js +1 -1
- package/dist/module/electronic-evidence2.js +1 -1
- package/dist/module/form-address-fields2.js +3 -3
- 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-number2.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-select2.js +2 -2
- package/dist/module/form-control-text2.js +21 -4
- package/dist/module/iframe-input2.js +119 -15
- package/dist/module/internal-button2.js +1 -1
- package/dist/module/justifi-bank-account-billing-form-simple.js +3 -3
- package/dist/module/justifi-bank-account-form.js +6 -4
- package/dist/module/justifi-billing-form-full.js +1 -1
- package/dist/module/justifi-business-details.js +3 -3
- package/dist/module/justifi-business-form.js +2 -2
- package/dist/module/justifi-card-billing-form-simple.js +1 -1
- package/dist/module/justifi-card-form.js +6 -3
- package/dist/module/justifi-checkout-qr-code2.js +2 -2
- package/dist/module/justifi-checkout-summary2.js +1 -1
- package/dist/module/justifi-checkout.js +7 -4
- package/dist/module/justifi-checkouts-list-filters.js +2 -2
- package/dist/module/justifi-checkouts-list.js +4 -4
- package/dist/module/justifi-dispute-management.js +3 -3
- package/dist/module/justifi-gross-payment-chart.js +2 -2
- package/dist/module/justifi-modular-checkout2.js +30 -12
- package/dist/module/justifi-order-terminals.js +3 -3
- package/dist/module/justifi-payment-details.js +10 -10
- package/dist/module/justifi-payment-provisioning.js +2 -2
- package/dist/module/justifi-payment-transactions-list.js +3 -3
- package/dist/module/justifi-payments-list-filters.js +2 -2
- package/dist/module/justifi-payments-list.js +3 -3
- package/dist/module/justifi-payout-details.js +5 -5
- package/dist/module/justifi-payout-transactions-list.js +3 -3
- package/dist/module/justifi-payouts-list-filters.js +2 -2
- package/dist/module/justifi-payouts-list.js +3 -3
- package/dist/module/justifi-paypal2.js +1 -1
- package/dist/module/justifi-qr-terminal.js +2 -2
- package/dist/module/justifi-refund-payment.js +2 -2
- package/dist/module/justifi-save-new-payment-method.js +1 -1
- package/dist/module/justifi-season-interruption-insurance.js +2 -2
- package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
- package/dist/module/justifi-terminal-orders-list.js +4 -4
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +3 -3
- package/dist/module/justifi-tokenize-payment-method2.js +9 -6
- package/dist/module/package.js +1 -3
- package/dist/module/payment-method-option.js +1 -1
- package/dist/module/product-or-service2.js +1 -1
- package/dist/module/radio-list-item2.js +1 -1
- package/dist/module/refund-policy2.js +1 -1
- package/dist/module/save-new-payment-method2.js +1 -1
- package/dist/module/schema-validations.js +8 -2
- package/dist/module/shipping-details2.js +1 -1
- package/dist/module/table-filters-menu2.js +1 -1
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/module/utils4.js +33 -1
- package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +8 -1
- package/dist/types/components/checkout/card-form/card-form.d.ts +5 -1
- package/dist/types/components/checkout/justifi-checkout.d.ts +2 -0
- package/dist/types/components/checkout/message-event-types.d.ts +2 -0
- package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +9 -0
- package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-form.d.ts +4 -1
- package/dist/types/components/modular-checkout/sub-components/justifi-card-form.d.ts +9 -0
- package/dist/types/components/tokenize-payment-method/justifi-tokenize-payment-method.d.ts +9 -0
- package/dist/types/components.d.ts +85 -3
- package/dist/types/store/checkout.store.d.ts +1 -0
- package/dist/types/ui-components/form/form-control-text.d.ts +1 -0
- package/dist/types/ui-components/form/iframe-input.d.ts +24 -0
- package/dist/types/ui-components/form/utils.d.ts +1 -0
- package/dist/types/utils/detect-duplicate-version.d.ts +7 -0
- package/dist/types/utils/postal-code.d.ts +3 -0
- package/dist/webcomponents/p-12daf522.entry.js +1 -0
- package/dist/webcomponents/p-1a1aef42.entry.js +1 -0
- package/dist/webcomponents/p-1ceb65cc.entry.js +1 -0
- package/dist/webcomponents/{p-0f7e3515.entry.js → p-1ff1dcc5.entry.js} +4 -4
- package/dist/webcomponents/{p-777470cb.entry.js → p-2272a65b.entry.js} +1 -1
- package/dist/webcomponents/{p-c4889a06.entry.js → p-2d25f1d1.entry.js} +1 -1
- package/dist/webcomponents/{p-f2b3c7d5.entry.js → p-30ec1cd6.entry.js} +1 -1
- package/dist/webcomponents/p-357d14ee.entry.js +1 -0
- package/dist/webcomponents/{p-ead48010.entry.js → p-4450dbe9.entry.js} +1 -1
- package/dist/webcomponents/p-4c7e7880.entry.js +1 -0
- package/dist/webcomponents/{p-6c7fca1a.entry.js → p-4d85dd63.entry.js} +1 -1
- package/dist/webcomponents/p-521c534c.entry.js +1 -0
- package/dist/webcomponents/p-5babaaa9.entry.js +1 -0
- package/dist/webcomponents/{p-88a44a02.entry.js → p-5e8f26ec.entry.js} +1 -1
- package/dist/webcomponents/p-622c2af4.entry.js +1 -0
- package/dist/webcomponents/{p-9e3e2e32.entry.js → p-6aaf2758.entry.js} +1 -1
- package/dist/webcomponents/p-6bfdc443.entry.js +1 -0
- package/dist/webcomponents/{p-42021e67.entry.js → p-6f3b035b.entry.js} +1 -1
- package/dist/webcomponents/p-73af269e.entry.js +1 -0
- package/dist/webcomponents/{p-a7c594d1.entry.js → p-7ff788f8.entry.js} +1 -1
- package/dist/webcomponents/{p-a10beb26.entry.js → p-846ae5d5.entry.js} +1 -1
- package/dist/webcomponents/p-8758aec4.entry.js +1 -0
- package/dist/webcomponents/p-87f8d4e7.entry.js +1 -0
- package/dist/webcomponents/p-8c22ff9c.entry.js +1 -0
- package/dist/webcomponents/p-91358854.entry.js +1 -0
- package/dist/webcomponents/{p-13814028.entry.js → p-956707a2.entry.js} +1 -1
- package/dist/webcomponents/p-9c1863d5.entry.js +1 -0
- package/dist/webcomponents/{p-B_2zgnvM.js → p-BG8NxEUn.js} +1 -1
- package/dist/webcomponents/{p-DC2djVls.js → p-BKtKrQzN.js} +1 -1
- package/dist/webcomponents/p-BQpbTebi.js +1 -0
- package/dist/webcomponents/{p-BjjKkMO1.js → p-Bh5BNj74.js} +1 -1
- package/dist/webcomponents/{p-C6Jq8YDT.js → p-BtiJJJwv.js} +1 -1
- package/dist/webcomponents/p-BzESNgd8.js +1 -0
- package/dist/webcomponents/p-CkrzG0pB.js +1 -0
- package/dist/webcomponents/{p-D694H6co.js → p-Cl6irPVE.js} +1 -1
- package/dist/webcomponents/p-Cpck08K0.js +1 -0
- package/dist/webcomponents/{p-D7fNBSlC.js → p-Cy_sz0Tx.js} +1 -1
- package/dist/webcomponents/{p-pueOrhXO.js → p-D42DvqTW.js} +1 -1
- package/dist/webcomponents/{p-C60AkJ6a.js → p-DBudSN_h.js} +1 -1
- package/dist/webcomponents/p-DMzYgqml.js +1 -0
- package/dist/webcomponents/p-FsWkrvEF.js +1 -0
- package/dist/webcomponents/{p-BmaQUnqv.js → p-MLQyjvrV.js} +1 -1
- package/dist/webcomponents/p-a095b86d.entry.js +1 -0
- package/dist/webcomponents/p-a1e1afa4.entry.js +1 -0
- package/dist/webcomponents/p-a2c4e99f.entry.js +1 -0
- package/dist/webcomponents/p-a8f1c9b3.entry.js +1 -0
- package/dist/webcomponents/{p-f5cb6a26.entry.js → p-b665841f.entry.js} +1 -1
- package/dist/webcomponents/p-b925d666.entry.js +1 -0
- package/dist/webcomponents/p-bc3e46af.entry.js +1 -0
- package/dist/webcomponents/p-c172decb.entry.js +1 -0
- package/dist/webcomponents/p-c9871158.entry.js +1 -0
- package/dist/webcomponents/p-d19d7d41.entry.js +1 -0
- package/dist/webcomponents/{p-f40fa614.entry.js → p-d35cde99.entry.js} +1 -1
- package/dist/webcomponents/{p-1cfa634a.entry.js → p-d48f80d1.entry.js} +1 -1
- package/dist/webcomponents/{p-cec7164e.entry.js → p-dae31a59.entry.js} +1 -1
- package/dist/webcomponents/p-deff4422.entry.js +1 -0
- package/dist/webcomponents/{p-1365a46b.entry.js → p-e3c7b4e5.entry.js} +1 -1
- package/dist/webcomponents/p-e6d1e3e2.entry.js +1 -0
- package/dist/webcomponents/{p-97c6593d.entry.js → p-ebae270b.entry.js} +1 -1
- package/dist/webcomponents/p-ebed68aa.entry.js +1 -0
- package/dist/webcomponents/{p-16261d8a.entry.js → p-f0084d20.entry.js} +1 -1
- package/dist/webcomponents/{p-065b854f.entry.js → p-f0da2ca5.entry.js} +1 -1
- package/dist/webcomponents/{p-9b43b90d.entry.js → p-f23d7d13.entry.js} +1 -1
- package/dist/webcomponents/p-f2c99647.entry.js +1 -0
- package/dist/webcomponents/p-f458928d.entry.js +1 -0
- package/dist/webcomponents/{p-429046e1.entry.js → p-f5686720.entry.js} +1 -1
- package/dist/webcomponents/p-f681f747.entry.js +1 -0
- package/dist/webcomponents/{p-0e9351c4.entry.js → p-f6efd9e0.entry.js} +1 -1
- package/dist/webcomponents/{p-a71cc8e2.entry.js → p-fa0427d5.entry.js} +1 -1
- package/dist/webcomponents/p-fb1f2fe8.entry.js +1 -0
- package/dist/webcomponents/p-fcc5af24.entry.js +1 -0
- package/dist/webcomponents/{p-iA-Amt2z.js → p-hdPjEOdB.js} +1 -1
- package/dist/webcomponents/{p-rFpPIJgu.js → p-l3JhjHLW.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -21
- package/dist/cjs/check-pkg-version-CjJab8fX.js +0 -47
- package/dist/cjs/utils-DAyWinG2.js +0 -29
- package/dist/collection/utils/check-pkg-version.js +0 -42
- package/dist/esm/check-pkg-version-BW9zgceK.js +0 -45
- package/dist/esm/package-BC9n8nB2.js +0 -7
- package/dist/esm/utils-BnjCmwMr.js +0 -27
- package/dist/module/check-pkg-version.js +0 -45
- package/dist/types/utils/check-pkg-version.d.ts +0 -1
- package/dist/webcomponents/p-082f912c.entry.js +0 -1
- package/dist/webcomponents/p-0cd689f4.entry.js +0 -1
- package/dist/webcomponents/p-0fbc806f.entry.js +0 -1
- package/dist/webcomponents/p-10787684.entry.js +0 -1
- package/dist/webcomponents/p-19cabdaf.entry.js +0 -1
- package/dist/webcomponents/p-1fa62eba.entry.js +0 -1
- package/dist/webcomponents/p-2ef913b8.entry.js +0 -1
- package/dist/webcomponents/p-36340e63.entry.js +0 -1
- package/dist/webcomponents/p-388082cd.entry.js +0 -1
- package/dist/webcomponents/p-3a1f8c5b.entry.js +0 -1
- package/dist/webcomponents/p-3f2fb856.entry.js +0 -1
- package/dist/webcomponents/p-44ff4f2c.entry.js +0 -1
- package/dist/webcomponents/p-4740601b.entry.js +0 -1
- package/dist/webcomponents/p-59b95eae.entry.js +0 -1
- package/dist/webcomponents/p-72bb4aff.entry.js +0 -1
- package/dist/webcomponents/p-735d397e.entry.js +0 -1
- package/dist/webcomponents/p-8432cb42.entry.js +0 -1
- package/dist/webcomponents/p-89f0c2aa.entry.js +0 -1
- package/dist/webcomponents/p-9db15fac.entry.js +0 -1
- package/dist/webcomponents/p-9eb00966.entry.js +0 -1
- package/dist/webcomponents/p-9f0ef3f3.entry.js +0 -1
- package/dist/webcomponents/p-BAvoKtN2.js +0 -1
- package/dist/webcomponents/p-BC9n8nB2.js +0 -1
- package/dist/webcomponents/p-BnjCmwMr.js +0 -1
- package/dist/webcomponents/p-Fpaf7CLD.js +0 -1
- package/dist/webcomponents/p-_MjmE9YT.js +0 -1
- package/dist/webcomponents/p-a8d25057.entry.js +0 -1
- package/dist/webcomponents/p-acb0b66c.entry.js +0 -1
- package/dist/webcomponents/p-b9ba7c95.entry.js +0 -1
- package/dist/webcomponents/p-c385f10d.entry.js +0 -1
- package/dist/webcomponents/p-c55fdbbf.entry.js +0 -1
- package/dist/webcomponents/p-ca6c5365.entry.js +0 -1
- package/dist/webcomponents/p-d3544e86.entry.js +0 -1
- package/dist/webcomponents/p-de047614.entry.js +0 -1
- package/dist/webcomponents/p-f0434a13.entry.js +0 -1
- package/dist/webcomponents/p-f9f310dc.entry.js +0 -1
- package/dist/webcomponents/p-fda6f27d.entry.js +0 -1
- package/dist/webcomponents/p-riZDHN5-.js +0 -1
|
@@ -2,16 +2,20 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import BankAccountFormSkeleton from "./bank-account-form-skeleton";
|
|
3
3
|
import { configState, waitForConfig } from "../../config-provider/config-state";
|
|
4
4
|
import { generateTabId } from "../../../utils/utils";
|
|
5
|
-
import {
|
|
5
|
+
import { detectDuplicateVersion } from "../../../utils/detect-duplicate-version";
|
|
6
6
|
import { checkoutStore } from "../../../store/checkout.store";
|
|
7
7
|
import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, } from "../../../api";
|
|
8
8
|
import { Button } from "../../../ui-components";
|
|
9
9
|
export class BankAccountForm {
|
|
10
10
|
constructor() {
|
|
11
11
|
this.iframeState = 'loading';
|
|
12
|
+
this.showAccountNumberConfirmation = false;
|
|
12
13
|
this.hasLoggedAchDisabledWarning = false;
|
|
14
|
+
this.loadedInputIds = new Set();
|
|
15
|
+
this.watchedInputIds = '';
|
|
13
16
|
this.reloadIframes = () => {
|
|
14
17
|
this.iframeState = 'loading';
|
|
18
|
+
this.loadedInputIds.clear();
|
|
15
19
|
this.iframeElements.forEach((element) => element.reload());
|
|
16
20
|
this.watchIframesLoad();
|
|
17
21
|
};
|
|
@@ -20,12 +24,19 @@ export class BankAccountForm {
|
|
|
20
24
|
await waitForConfig();
|
|
21
25
|
this.iframeOrigin = configState.iframeOrigin;
|
|
22
26
|
this.tabId = generateTabId();
|
|
23
|
-
|
|
27
|
+
detectDuplicateVersion();
|
|
24
28
|
}
|
|
25
29
|
componentDidRender() {
|
|
26
|
-
if (this.
|
|
30
|
+
if (this.iframeElements.length < this.expectedIframeCount) {
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
33
|
+
// Re-watch when the rendered field set changes -- showAccountNumberConfirmation
|
|
34
|
+
// can flip on after the first watch already finished.
|
|
35
|
+
const inputIds = this.iframeElements.map((element) => element.inputId).join(',');
|
|
36
|
+
if (inputIds === this.watchedInputIds) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.watchedInputIds = inputIds;
|
|
29
40
|
this.watchIframesLoad();
|
|
30
41
|
}
|
|
31
42
|
disconnectedCallback() {
|
|
@@ -37,13 +48,24 @@ export class BankAccountForm {
|
|
|
37
48
|
}
|
|
38
49
|
async validate() {
|
|
39
50
|
if (this.isAchDisabledForCheckout()) {
|
|
40
|
-
return false;
|
|
51
|
+
return { isValid: false };
|
|
52
|
+
}
|
|
53
|
+
const elements = this.iframeElements;
|
|
54
|
+
// A field that has not rendered yet cannot be validated -- fail closed
|
|
55
|
+
// rather than report a pass for a form that is not all there.
|
|
56
|
+
if (elements.length < this.expectedIframeCount) {
|
|
57
|
+
return { isValid: false };
|
|
41
58
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
// Sequential on purpose: the parent correlates iframe replies by eventType
|
|
60
|
+
// alone, with no request id, so concurrent validates would cross replies.
|
|
61
|
+
const results = [];
|
|
62
|
+
for (const element of elements) {
|
|
63
|
+
results.push(await element.validate());
|
|
64
|
+
}
|
|
65
|
+
return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
|
|
45
66
|
}
|
|
46
67
|
async tokenize({ clientId, paymentMethodMetadata, account }) {
|
|
68
|
+
var _a, _b;
|
|
47
69
|
if (this.isAchDisabledForCheckout()) {
|
|
48
70
|
return {
|
|
49
71
|
error: {
|
|
@@ -51,25 +73,54 @@ export class BankAccountForm {
|
|
|
51
73
|
},
|
|
52
74
|
};
|
|
53
75
|
}
|
|
76
|
+
// tokenize() is a public @Method: an integrator with their own submit button
|
|
77
|
+
// can reach it without validate(), so the mismatch check has to live here too.
|
|
78
|
+
if (this.showAccountNumberConfirmation) {
|
|
79
|
+
const confirmation = await ((_a = this.accountNumberConfirmationIframeElement) === null || _a === void 0 ? void 0 : _a.validate());
|
|
80
|
+
if ((confirmation === null || confirmation === void 0 ? void 0 : confirmation.isValid) !== true) {
|
|
81
|
+
return {
|
|
82
|
+
error: {
|
|
83
|
+
code: 'validation_error',
|
|
84
|
+
message: ((_b = confirmation === null || confirmation === void 0 ? void 0 : confirmation.error) === null || _b === void 0 ? void 0 : _b.message) ||
|
|
85
|
+
'The entered value does not match the account number',
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
54
90
|
const result = await this.accountNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
|
|
55
91
|
return result;
|
|
56
92
|
}
|
|
57
93
|
get isReady() {
|
|
58
94
|
return this.iframeState === 'ready';
|
|
59
95
|
}
|
|
96
|
+
get expectedIframeCount() {
|
|
97
|
+
return this.showAccountNumberConfirmation ? 3 : 2;
|
|
98
|
+
}
|
|
60
99
|
get iframeElements() {
|
|
61
100
|
return [
|
|
62
101
|
this.accountNumberIframeElement,
|
|
102
|
+
...(this.showAccountNumberConfirmation
|
|
103
|
+
? [this.accountNumberConfirmationIframeElement]
|
|
104
|
+
: []),
|
|
63
105
|
this.routingNumberIframeElement,
|
|
64
|
-
];
|
|
106
|
+
].filter(Boolean);
|
|
65
107
|
}
|
|
66
108
|
watchIframesLoad() {
|
|
67
109
|
var _a;
|
|
68
110
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
69
111
|
const { signal } = (this.loadAbortController = new AbortController());
|
|
70
|
-
const pending = new Set(this.iframeElements
|
|
112
|
+
const pending = new Set(this.iframeElements
|
|
113
|
+
.filter((element) => !this.loadedInputIds.has(element.inputId))
|
|
114
|
+
.map((element) => element.inputId));
|
|
71
115
|
const loaded = Promise.all(this.iframeElements.map((element) => (new Promise((resolve) => {
|
|
116
|
+
// iframeLoaded is a once: true listener, so an element that already
|
|
117
|
+
// loaded will never fire again on a re-watch.
|
|
118
|
+
if (this.loadedInputIds.has(element.inputId)) {
|
|
119
|
+
resolve();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
72
122
|
element.addEventListener('iframeLoaded', () => {
|
|
123
|
+
this.loadedInputIds.add(element.inputId);
|
|
73
124
|
pending.delete(element.inputId);
|
|
74
125
|
resolve();
|
|
75
126
|
}, { once: true, signal });
|
|
@@ -93,6 +144,9 @@ export class BankAccountForm {
|
|
|
93
144
|
return;
|
|
94
145
|
this.iframeState = 'error';
|
|
95
146
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
147
|
+
if (pending.has('accountNumberConfirmation')) {
|
|
148
|
+
console.error('[bank-account-form] "Confirm Account Number" field failed to load.');
|
|
149
|
+
}
|
|
96
150
|
this.errorEvent.emit({
|
|
97
151
|
errorCode: ComponentErrorCodes.IFRAME_LOAD_ERROR,
|
|
98
152
|
message: ComponentErrorMessages.IFRAME_LOAD_ERROR,
|
|
@@ -117,9 +171,33 @@ export class BankAccountForm {
|
|
|
117
171
|
return (h("div", null, this.iframeState === 'loading' && h(BankAccountFormSkeleton, null), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", null), h("div", { class: "container-fluid p-0", style: {
|
|
118
172
|
opacity: this.isReady ? '1' : '0',
|
|
119
173
|
height: this.isReady ? 'auto' : '0',
|
|
120
|
-
} }, h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumber", ref: (el) => (this.accountNumberIframeElement = el), label: "Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}` })), h("div", { class: "row" }, h("iframe-input", { inputId: "routingNumber", ref: (el) => (this.routingNumberIframeElement = el), label: "Routing Number", iframeOrigin: `${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}` })))));
|
|
174
|
+
} }, h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumber", ref: (el) => (this.accountNumberIframeElement = el), label: "Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}` })), this.showAccountNumberConfirmation && (h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumberConfirmation", ref: (el) => (this.accountNumberConfirmationIframeElement = el), label: "Confirm Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumberConfirmation?tabId=${this.tabId}` }))), h("div", { class: "row" }, h("iframe-input", { inputId: "routingNumber", ref: (el) => (this.routingNumberIframeElement = el), label: "Routing Number", iframeOrigin: `${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}` })))));
|
|
121
175
|
}
|
|
122
176
|
static get is() { return "bank-account-form"; }
|
|
177
|
+
static get properties() {
|
|
178
|
+
return {
|
|
179
|
+
"showAccountNumberConfirmation": {
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "boolean",
|
|
184
|
+
"resolved": "boolean",
|
|
185
|
+
"references": {}
|
|
186
|
+
},
|
|
187
|
+
"required": false,
|
|
188
|
+
"optional": true,
|
|
189
|
+
"docs": {
|
|
190
|
+
"tags": [],
|
|
191
|
+
"text": ""
|
|
192
|
+
},
|
|
193
|
+
"getter": false,
|
|
194
|
+
"setter": false,
|
|
195
|
+
"reflect": false,
|
|
196
|
+
"attribute": "show-account-number-confirmation",
|
|
197
|
+
"defaultValue": "false"
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
123
201
|
static get states() {
|
|
124
202
|
return {
|
|
125
203
|
"iframeOrigin": {},
|
|
@@ -155,7 +233,7 @@ export class BankAccountForm {
|
|
|
155
233
|
return {
|
|
156
234
|
"validate": {
|
|
157
235
|
"complexType": {
|
|
158
|
-
"signature": "() => Promise<
|
|
236
|
+
"signature": "() => Promise<{ isValid: boolean; }>",
|
|
159
237
|
"parameters": [],
|
|
160
238
|
"references": {
|
|
161
239
|
"Promise": {
|
|
@@ -163,7 +241,7 @@ export class BankAccountForm {
|
|
|
163
241
|
"id": "global::Promise"
|
|
164
242
|
}
|
|
165
243
|
},
|
|
166
|
-
"return": "Promise<
|
|
244
|
+
"return": "Promise<{ isValid: boolean; }>"
|
|
167
245
|
},
|
|
168
246
|
"docs": {
|
|
169
247
|
"text": "",
|
|
@@ -5,6 +5,7 @@ import { Header3 } from "../../../ui-components";
|
|
|
5
5
|
import checkoutBillingStateOptions from "../../../utils/checkout-billing-state-options";
|
|
6
6
|
import { FormController } from "../../../ui-components/form/form";
|
|
7
7
|
import { checkoutStore, onChange } from "../../../store/checkout.store";
|
|
8
|
+
import { normalizePostalCode } from "../../../utils/postal-code";
|
|
8
9
|
export class BillingFormFull {
|
|
9
10
|
constructor() {
|
|
10
11
|
this.errors = {};
|
|
@@ -33,7 +34,10 @@ export class BillingFormFull {
|
|
|
33
34
|
(_a = this.unsubscribeFromStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
34
35
|
}
|
|
35
36
|
async getValues() {
|
|
36
|
-
|
|
37
|
+
const values = this.formController.values.getValue();
|
|
38
|
+
// checkoutStore values skip the input transform, so normalize on the way out.
|
|
39
|
+
return (values === null || values === void 0 ? void 0 : values.address_postal_code)
|
|
40
|
+
? Object.assign(Object.assign({}, values), { address_postal_code: normalizePostalCode(values.address_postal_code) }) : values;
|
|
37
41
|
}
|
|
38
42
|
async validate() {
|
|
39
43
|
const isValid = await this.formController.validate();
|
|
@@ -45,7 +49,7 @@ export class BillingFormFull {
|
|
|
45
49
|
return null;
|
|
46
50
|
}
|
|
47
51
|
const billingFormDefaultValue = this.formController.getInitialValues();
|
|
48
|
-
return (h("div", { part: billingForm, class: "mt-4" }, h(Header3, { text: "Billing address", class: "fs-6 fw-bold lh-lg mb-4" }), h("form", null, h("fieldset", null, this.legend && (h("legend", null, this.legend)), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-select", { name: 'address_state', label: 'State / Province', options: checkoutBillingStateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength:
|
|
52
|
+
return (h("div", { part: billingForm, class: "mt-4" }, h(Header3, { text: "Billing address", class: "fs-6 fw-bold lh-lg mb-4" }), h("form", null, h("fieldset", null, this.legend && (h("legend", null, this.legend)), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-select", { name: 'address_state', label: 'State / Province', options: checkoutBillingStateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, transformValue: normalizePostalCode, maxLength: 10 })))))));
|
|
49
53
|
}
|
|
50
54
|
static get is() { return "billing-form-full"; }
|
|
51
55
|
static get properties() {
|
|
@@ -3,6 +3,7 @@ import { postalOnlySchema } from "./billing-form-schema";
|
|
|
3
3
|
import { billingForm } from "../../../styles/parts";
|
|
4
4
|
import { FormController } from "../../../ui-components/form/form";
|
|
5
5
|
import { checkoutStore, onChange } from "../../../store/checkout.store";
|
|
6
|
+
import { normalizePostalCode } from "../../../utils/postal-code";
|
|
6
7
|
export class CardBillingFormSimple {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.errors = {};
|
|
@@ -31,7 +32,10 @@ export class CardBillingFormSimple {
|
|
|
31
32
|
(_a = this.unsubscribeFromStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
32
33
|
}
|
|
33
34
|
async getValues() {
|
|
34
|
-
|
|
35
|
+
const values = this.formController.values.getValue();
|
|
36
|
+
// checkoutStore values skip the input transform, so normalize on the way out.
|
|
37
|
+
return (values === null || values === void 0 ? void 0 : values.address_postal_code)
|
|
38
|
+
? Object.assign(Object.assign({}, values), { address_postal_code: normalizePostalCode(values.address_postal_code) }) : values;
|
|
35
39
|
}
|
|
36
40
|
async validate() {
|
|
37
41
|
const isValid = await this.formController.validate();
|
|
@@ -40,7 +44,7 @@ export class CardBillingFormSimple {
|
|
|
40
44
|
}
|
|
41
45
|
render() {
|
|
42
46
|
const billingFormDefaultValue = this.formController.getInitialValues();
|
|
43
|
-
return (h("div", { key: '
|
|
47
|
+
return (h("div", { key: 'afc6ba1fc118b81d3fd2963a86db38236c0871ac', part: billingForm }, h("form", { key: 'db49c3bdb2a243615704e42d9a2cedee6fbcc469' }, h("fieldset", { key: '9aa92c3a19f81f67e9be1a2a64b72975b96204d9' }, this.legend && (h("legend", { key: 'abdc6c1c28dc142ec7635871fa0b96f14de35c4e' }, this.legend)), h("div", { key: '19f69483b9fcd39d61cd8bdc20b8fa6ee80a5477', class: "row gy-3" }, h("div", { key: 'fff29f5a5920276125839cebeec10f8417b67805', class: "col-12" }, h("form-control-text", { key: 'd257c668d29a3c8f70ae125eff529a727cf7fcca', name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, transformValue: normalizePostalCode, maxLength: 10 })))))));
|
|
44
48
|
}
|
|
45
49
|
static get is() { return "card-billing-form-simple"; }
|
|
46
50
|
static get properties() {
|
|
@@ -2,12 +2,14 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import CardFormSkeleton from "./card-form-skeleton";
|
|
3
3
|
import { configState, waitForConfig } from "../../config-provider/config-state";
|
|
4
4
|
import { generateTabId } from "../../../utils/utils";
|
|
5
|
-
import {
|
|
5
|
+
import { detectDuplicateVersion } from "../../../utils/detect-duplicate-version";
|
|
6
6
|
import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, } from "../../../api";
|
|
7
7
|
import { Button } from "../../../ui-components";
|
|
8
8
|
export class CardForm {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.iframeState = 'loading';
|
|
11
|
+
/** Mask the card number to its last four digits when the field blurs. */
|
|
12
|
+
this.maskCardNumber = false;
|
|
11
13
|
this.reloadIframes = () => {
|
|
12
14
|
this.iframeState = 'loading';
|
|
13
15
|
this.iframeElements.forEach((element) => element.reload());
|
|
@@ -18,7 +20,7 @@ export class CardForm {
|
|
|
18
20
|
await waitForConfig();
|
|
19
21
|
this.iframeOrigin = configState.iframeOrigin;
|
|
20
22
|
this.tabId = generateTabId();
|
|
21
|
-
|
|
23
|
+
detectDuplicateVersion();
|
|
22
24
|
}
|
|
23
25
|
componentDidLoad() {
|
|
24
26
|
this.watchIframesLoad();
|
|
@@ -28,11 +30,13 @@ export class CardForm {
|
|
|
28
30
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
29
31
|
}
|
|
30
32
|
async validate() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
33
|
+
// Sequential on purpose: the parent correlates iframe replies by eventType
|
|
34
|
+
// alone, with no request id, so concurrent validates would cross replies.
|
|
35
|
+
const results = [];
|
|
36
|
+
for (const element of this.iframeElements) {
|
|
37
|
+
results.push(await element.validate());
|
|
38
|
+
}
|
|
39
|
+
return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
|
|
36
40
|
}
|
|
37
41
|
async tokenize({ clientId, paymentMethodMetadata, account, }) {
|
|
38
42
|
const result = await this.cardNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
|
|
@@ -93,12 +97,36 @@ export class CardForm {
|
|
|
93
97
|
return (h("div", null, h("form-alert", { text: ComponentErrorMessages.IFRAME_LOAD_ERROR, hideAlert: false }), h(Button, { variant: "link", clickHandler: this.reloadIframes, "aria-label": "Reload payment form", type: "button" }, "Try again")));
|
|
94
98
|
}
|
|
95
99
|
render() {
|
|
96
|
-
return (h("div", { key: '
|
|
100
|
+
return (h("div", { key: '6f1adaa489228ab15ee8803f5e8d94b4f38df172' }, this.iframeState === 'loading' && h(CardFormSkeleton, { key: '01f38bf843e382d8fb34e59011a603e3a0955847' }), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", { key: 'd4fe8201e7df2ffd00cf76314da60dfa375d0c92' }), h("div", { key: 'be021b08ea0cb9bbd4e4dbb9258fb1e4cf0715b7', class: "container-fluid p-0", style: {
|
|
97
101
|
opacity: this.isReady ? '1' : '0',
|
|
98
102
|
height: this.isReady ? 'auto' : '0',
|
|
99
|
-
} }, h("div", { key: '
|
|
103
|
+
} }, h("div", { key: '5771c79e70cc49c15d170d0f3f820e4d04ab203a', class: "mb-3" }, h("iframe-input", { key: 'f24efbd4677be8bd07c9cf3cd0bf77df7b98993e', inputId: "cardNumber", ref: (el) => (this.cardNumberIframeElement = el), label: "Card Number", maskCardNumber: this.maskCardNumber, iframeOrigin: `${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}` })), h("div", { key: '1d5923d02dbd23551cab1f8bb5d4ef3b5534f152', class: "row" }, h("div", { key: '1db376daa12621f2f17113a96ab693bfaae2fc38', class: "col-4 align-content-end" }, h("iframe-input", { key: '5cb8c4796ea7f609fecd0919709f70c52ae9c55c', inputId: "expirationMonth", ref: (el) => (this.expirationMonthIframeElement = el), label: "Expiration", iframeOrigin: `${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}` })), h("div", { key: '0cc0c04b35174c56097f687d2f843f874ed7fee0', class: "col-4 align-content-end" }, h("iframe-input", { key: '79cb809ad28c53c276903ddc5ece50b07fabfd56', inputId: "expirationYear", ref: (el) => (this.expirationYearIframeElement = el), label: "", iframeOrigin: `${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}` })), h("div", { key: 'e04d26f47245b1f4977e57e456b12f630b8c63cd', class: "col-4 align-content-end" }, h("iframe-input", { key: '6e5e2dabbf28725e7e2499455bff1b34f6aefcf9', inputId: "CVV", ref: (el) => (this.cvvIframeElement = el), label: "CVV", iframeOrigin: `${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}` }))))));
|
|
100
104
|
}
|
|
101
105
|
static get is() { return "card-form"; }
|
|
106
|
+
static get properties() {
|
|
107
|
+
return {
|
|
108
|
+
"maskCardNumber": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "boolean",
|
|
113
|
+
"resolved": "boolean",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": true,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": "Mask the card number to its last four digits when the field blurs."
|
|
121
|
+
},
|
|
122
|
+
"getter": false,
|
|
123
|
+
"setter": false,
|
|
124
|
+
"reflect": false,
|
|
125
|
+
"attribute": "mask-card-number",
|
|
126
|
+
"defaultValue": "false"
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
102
130
|
static get states() {
|
|
103
131
|
return {
|
|
104
132
|
"iframeOrigin": {},
|
|
@@ -134,7 +162,7 @@ export class CardForm {
|
|
|
134
162
|
return {
|
|
135
163
|
"validate": {
|
|
136
164
|
"complexType": {
|
|
137
|
-
"signature": "() => Promise<
|
|
165
|
+
"signature": "() => Promise<{ isValid: boolean; }>",
|
|
138
166
|
"parameters": [],
|
|
139
167
|
"references": {
|
|
140
168
|
"Promise": {
|
|
@@ -142,7 +170,7 @@ export class CardForm {
|
|
|
142
170
|
"id": "global::Promise"
|
|
143
171
|
}
|
|
144
172
|
},
|
|
145
|
-
"return": "Promise<
|
|
173
|
+
"return": "Promise<{ isValid: boolean; }>"
|
|
146
174
|
},
|
|
147
175
|
"docs": {
|
|
148
176
|
"text": "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import JustifiAnalytics from "../../api/Analytics";
|
|
3
|
-
import {
|
|
3
|
+
import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
|
|
4
4
|
import { checkoutStore } from "../../store/checkout.store";
|
|
5
5
|
import { checkoutSummary } from "../../styles/parts";
|
|
6
6
|
import { StyledHost } from "../../ui-components";
|
|
@@ -16,6 +16,8 @@ export class JustifiCheckout {
|
|
|
16
16
|
this.disablePaymentMethodGroup = false;
|
|
17
17
|
this.hideBankAccountBillingForm = false;
|
|
18
18
|
this.hideCardBillingForm = false;
|
|
19
|
+
/** Renders a "Confirm Account Number" field in the bank account form. */
|
|
20
|
+
this.showAccountNumberConfirmation = false;
|
|
19
21
|
}
|
|
20
22
|
propChanged() {
|
|
21
23
|
this.updateStore();
|
|
@@ -26,7 +28,7 @@ export class JustifiCheckout {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
componentWillLoad() {
|
|
29
|
-
|
|
31
|
+
detectDuplicateVersion();
|
|
30
32
|
this.analytics = new JustifiAnalytics(this);
|
|
31
33
|
}
|
|
32
34
|
disconnectedCallback() {
|
|
@@ -66,9 +68,9 @@ export class JustifiCheckout {
|
|
|
66
68
|
}
|
|
67
69
|
render() {
|
|
68
70
|
var _a, _b;
|
|
69
|
-
return (h(StyledHost, { key: '
|
|
71
|
+
return (h(StyledHost, { key: '17fb502cfbf3a09b1bd59ded0cf5900cb8f9d441' }, h("justifi-modular-checkout", { key: '726bfa331037983083c4246caaabf080e6d318a1', ref: (el) => {
|
|
70
72
|
this.modularCheckoutRef = el;
|
|
71
|
-
}, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '
|
|
73
|
+
}, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '791fcaec6a9dcae8b7388bdcd51d84acce4338d2', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '558b4603f48e7e60b51cfe01072c072020be3711', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: '560f2b20143721b0de9e43369aa7b1c80cdf462e', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: '6c32d796b8f9f5b3124454ffab7649decf40bf0a' }, h("justifi-checkout-summary", { key: 'ff259c5635a56d75f54489986533ff4bbc44f9e1' }))), h("div", { key: '8541d52ae153d6b10952f8b5f92fa23241989cba', class: "col-12 mt-4" }, h("slot", { key: '71d802a975a1c3cdd2fc5f4e2e97079533885d1e', name: "insurance" })), h("div", { key: 'bdc8639a188f5b141ed59df898731e3872d994a8', class: "col-12 mt-4" }, h("justifi-header", { key: '79f2374e4538c1478f0de462739d46c3d24dfc7f', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: '2220521026073d7bb93b26abaf2c2b91dd5d0be6', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: '4e809c7ba032149e32c97ce262254307ccd5e372', class: "d-flex flex-column" }, h("section", { key: '2b25ebfb62a2e0293728987e4c362e799197f301' }, h("div", { key: '1094a63702a042682b5de049968687db34d56340' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: 'ac2b2083a082000f605a623a2b4e937dc67f773b', class: "mb-3" }, h("justifi-apple-pay", { key: 'e8d6dfcf70c3e645a6b8beefa107a904738c8013' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: 'e7551b4165ccacbab1f305e2ff2e592ec6cb13c7', class: "mb-3" }, h("justifi-google-pay", Object.assign({ key: '3905dd687cafbfd59a496492bddaea368584e7fa', ref: (el) => (this.googlePayRef = el) }, (this.googlePayEnv != null ? { environment: this.googlePayEnv } : {}))))), this.availablePaymentMethods.includes(PAYMENT_METHODS.PAYPAL) && (h("div", { key: 'f11d39c2c4b7120b3b0fd8427bfc0c033115c28f', class: "mb-3" }, h("justifi-paypal", { key: '3560bd46b2b4b2957936b8cfe67e70c2cc4d1798' }))), h("justifi-saved-payment-methods", { key: '83298cc717152c8917b63c71c763812f8646f73e' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && !this.disableBnpl && (h("justifi-radio-list-item", { key: 'b5c94c614920fd238dd490f1aa957bc9dbe7ce3f', name: "paymentMethodType", value: PAYMENT_METHODS.SEZZLE, checked: ((_a = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.SEZZLE, label: h("justifi-sezzle-payment-method", { ref: (el) => (this.sezzlePaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.sezzlePaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), this.availablePaymentMethods.includes(PAYMENT_METHODS.PLAID) && (h("justifi-radio-list-item", { key: '53ce4f366dd81745c88987a5f88502c1d7cdc530', name: "paymentMethodType", value: PAYMENT_METHODS.PLAID, checked: ((_b = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.PLAID, label: h("justifi-plaid-payment-method", { ref: (el) => (this.plaidPaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.plaidPaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), h("justifi-tokenize-payment-method", { key: '051f49f4c0ac5a2c27fab834658f5d0f51f51889', ref: (el) => (this.tokenizePaymentMethodRef = el), authToken: this.authToken, accountId: checkoutStore.accountId, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, hideSubmitButton: true, paymentMethodGroupId: checkoutStore.paymentMethodGroupId, showAccountNumberConfirmation: this.showAccountNumberConfirmation }))))), h("div", { key: '9d0653c43d59b2c671e4fb07dac828f822f4e8bd', class: "mt-4" }, h("justifi-button", { key: 'b4dcb91c821577fa98f0f2129eff849e70e541c7', text: "Pay", type: "submit", variant: "primary", clickHandler: (e) => this.submit(e), disabled: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, isLoading: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, customStyle: { width: '100%', textAlign: "center" } }))))));
|
|
72
74
|
}
|
|
73
75
|
static get is() { return "justifi-checkout"; }
|
|
74
76
|
static get properties() {
|
|
@@ -277,6 +279,26 @@ export class JustifiCheckout {
|
|
|
277
279
|
},
|
|
278
280
|
"getter": false,
|
|
279
281
|
"setter": false
|
|
282
|
+
},
|
|
283
|
+
"showAccountNumberConfirmation": {
|
|
284
|
+
"type": "boolean",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "boolean",
|
|
288
|
+
"resolved": "boolean",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": true,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": "Renders a \"Confirm Account Number\" field in the bank account form."
|
|
296
|
+
},
|
|
297
|
+
"getter": false,
|
|
298
|
+
"setter": false,
|
|
299
|
+
"reflect": false,
|
|
300
|
+
"attribute": "show-account-number-confirmation",
|
|
301
|
+
"defaultValue": "false"
|
|
280
302
|
}
|
|
281
303
|
};
|
|
282
304
|
}
|
|
@@ -5,7 +5,7 @@ export class JustifiSaveNewPaymentMethod {
|
|
|
5
5
|
this.label = 'Save New Payment Method';
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(StyledHost, { key: '
|
|
8
|
+
return (h(StyledHost, { key: 'e5792a56b3a21bcf3d5fb0604fbf487ce536b498' }, h("save-new-payment-method", { key: 'f01b1546e90db73bc8da8edcab4a3d384e4f742e', label: this.label, hidden: this.hidden, onCheckboxChanged: (e) => this.checkboxChanged.emit(e.detail) })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "justifi-save-new-payment-method"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js
CHANGED
|
@@ -11,7 +11,7 @@ export class SaveNewPaymentMethod {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'b3dd9d66db6d192d31ea2eea5d1364957b0d6048', hidden: this.hidden }, h("form-control-checkbox", { key: 'e40dbe64979cae47936ce53841e62aea25774840', label: this.label || 'Save New Payment Method', name: "saveNewPaymentMethod", checked: this.isChecked, inputHandler: this.handleCheckboxChange })));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "save-new-payment-method"; }
|
|
17
17
|
static get properties() {
|
|
@@ -2,13 +2,13 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import QRCode from "qrcode";
|
|
3
3
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
4
4
|
import JustifiAnalytics from "../../api/Analytics";
|
|
5
|
-
import {
|
|
5
|
+
import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
|
|
6
6
|
export class JustifiCheckoutQrCode {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.size = 256;
|
|
9
9
|
}
|
|
10
10
|
componentWillLoad() {
|
|
11
|
-
|
|
11
|
+
detectDuplicateVersion();
|
|
12
12
|
this.analytics = new JustifiAnalytics(this);
|
|
13
13
|
}
|
|
14
14
|
componentDidLoad() {
|
|
@@ -53,8 +53,8 @@ export class JustifiCheckoutsListFilters {
|
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
55
|
const filterMenuParams = Object.assign({}, filterParams);
|
|
56
|
-
return (h(StyledHost, { key: '
|
|
57
|
-
convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: '
|
|
56
|
+
return (h(StyledHost, { key: 'a84f587608b49683633b26d23e548b576c5daba3' }, h("table-filters-menu", { key: 'd7a43576bb803d706755ce9deafda5f8732540c1', params: filterMenuParams, clearParams: clearParams, part: filterMenu }, h("div", { key: '6ce5861f974a8d2c7bc5bcb03b7b0df60e10d780', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '492714a0263fb27222e17794a640e3855c9ba6e1', class: "p-2" }, h("form-control-text", { key: '357b10f4f290c9500fb5fe24e4bc97ea80511e2c', name: "checkout_id", label: "Checkout ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.checkoutId || filterParams.checkout_id, disabled: !!this.checkoutId, part: filterParam })), h("div", { key: 'cc8535898de01f417080c984ed53f1582848fd74', class: "p-2" }, h("form-control-text", { key: '37aa831598c6496af4fd358f94c54a118f309d82', name: "successful_payment_id", label: "Successful Payment ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.successfulPaymentId || filterParams.successful_payment_id, disabled: !!this.successfulPaymentId, part: filterParam })), h("div", { key: '751c3f3b60b0140b9eb954de3a0e94f5feb6075f', class: "p-2" }, h("form-control-select", { key: 'afa69abd4be56a27d0cafce1508a7edeb119d7b0', name: "status", label: "Status", options: this.checkoutStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.checkoutStatus || filterParams.status || '', disabled: !!this.checkoutStatus, part: filterParam })), h("div", { key: '86c4e7121a67e4ef1bb96fcb6ccbe9a900378556', class: "p-2" }, h("form-control-select", { key: 'eaa9e1b1214fb3955de0f0421760da4bf1a773a2', name: "payment_mode", label: "Payment Mode", options: this.checkoutPaymentModeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.paymentMode || filterParams.payment_mode || '', disabled: !!this.paymentMode, part: filterParam })), h("div", { key: '8f28caa07d711135223507f1864343531d451a15', class: "p-2" }, h("form-control-date", { key: '038141b8b8fc669cca8c849d23cba1a7e2f1d5aa', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdAfter, { showInputDateTime: true }) ||
|
|
57
|
+
convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: 'ddb442863d596de25c392d14b8fb364db3afdaec', class: "p-2" }, h("form-control-date", { key: 'cee1d9337dd5f6f9c258892f89573a2b07c2180c', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdBefore, { showInputDateTime: true }) ||
|
|
58
58
|
convertToLocal(filterParams.created_before, { showInputDateTime: true }), showTime: true, disabled: !!this.createdBefore, part: filterParam }))))));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "justifi-checkouts-list-filters"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { pagingDefaults } from "../../api";
|
|
3
3
|
import { makeGetCheckouts } from "../../actions/checkout/get-checkouts";
|
|
4
|
-
import {
|
|
4
|
+
import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
|
|
5
5
|
import JustifiAnalytics from "../../api/Analytics";
|
|
6
6
|
import { CheckoutService } from "../../api/services/checkout.service";
|
|
7
7
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
@@ -36,7 +36,7 @@ export class JustifiCheckoutsList {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
componentWillLoad() {
|
|
39
|
-
|
|
39
|
+
detectDuplicateVersion();
|
|
40
40
|
this.analytics = new JustifiAnalytics(this);
|
|
41
41
|
this.checkoutsTable = new Table(this.checkouts, this.columns, checkoutTableColumns, checkoutTableCells);
|
|
42
42
|
this.initializeGetData();
|
|
@@ -178,8 +178,8 @@ export class JustifiCheckoutsList {
|
|
|
178
178
|
return !this.showEmptyState && !this.showErrorState && !this.loading;
|
|
179
179
|
}
|
|
180
180
|
render() {
|
|
181
|
-
return (h(StyledHost, { key: '
|
|
182
|
-
this.checkoutsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: '
|
|
181
|
+
return (h(StyledHost, { key: '5c72630838781f32e31d44510c9793ef71d863cd' }, h(TableWrapper, { key: '01c4456bfc252a55de1351bd54500ab6f9d22d2e' }, h(TableComponent, { key: '2a69c5b2d27caf1a648efed450e8eadf583e3858' }, h(TableHead, { key: 'f524af14960a68a035eb75cfa7d2c6255d0e0de3' }, h(TableHeadRow, { key: '2cbf9ac9228aa770da72e9d3d618e61094bb65b6' }, this.checkoutsTable.columnData.map((column) => column))), h(TableBody, { key: '2c246fa63dd49ff4bf4a29a25717d4191a904443' }, h(TableLoadingState, { key: '83fcebd9b8775ec50b614925ad2c153d6ac1888a', columnSpan: this.checkoutsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'a37d1f0001e1c5f793eda759f82e58e42be49321', isEmpty: this.showEmptyState, columnSpan: this.checkoutsTable.columnKeys.length }), h(TableErrorState, { key: '57cb26d7929f007ae9e14faf63b29b06b3097828', columnSpan: this.checkoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData &&
|
|
182
|
+
this.checkoutsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: 'edd82eb558b69329970c93f207f840cca8de2884' }, h(TableFootRow, { key: 'deed2dee3d311b76888003cbeffd00c5397cc6c8' }, h(TableFootCell, { key: 'b9845ccc21e916ccef0c3f3dba37e1187c80769d', colSpan: this.checkoutsTable.columnData.length }, h("pagination-menu", { key: '7af1644ff5e5cb8a2ca68705f481f5991c7a09b2', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) })))))))));
|
|
183
183
|
}
|
|
184
184
|
static get is() { return "justifi-checkouts-list"; }
|
|
185
185
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,8 +44,8 @@ export class DisputeNotification {
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
47
|
-
return (h("div", { key: '
|
|
48
|
-
_b.due_date, ") for this dispute has passed"), h("p", { key: '
|
|
47
|
+
return (h("div", { key: '12cd6c17c1f4f70e136fa0e9d6ff74d37af82a1e', class: "dispute-notification-root" }, this.isLoading && (h("div", { key: '33b1c6259abe1da5d92ac2aa37cfec9033fbb3d1', style: { marginBottom: '8px' } }, h(Skeleton, { key: '1f5bc2333a37587d3d11e545b58c9b85a2a145a5', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: '280e35a187319c7698922c3cd3f579457a187e7a', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: '3fd7f151a3d7516dd40835d6c42d2240d7170613', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && this.isDueDatePassed() && (h("div", { key: 'e78d3cf205ba862b8df5e5358e15c4961add1003', part: text }, h("h1", { key: 'c533f650a18a75ca7c9f1cb15a6d1da517317e54', class: "h4", part: heading4 }, "The due date (", (_b = this.dispute) === null || _b === void 0 ? void 0 :
|
|
48
|
+
_b.due_date, ") for this dispute has passed"), h("p", { key: '14f82547639777ab5179010f350d42f7b4082845' }, "You can no longer submit evidence to counter this dispute."))), ((_c = this.dispute) === null || _c === void 0 ? void 0 : _c.needsResponse) && !this.isDueDatePassed() && (h("div", { key: 'a2eefdc255af0c3b07091183fff4c5860f66af3a', part: text }, h("h1", { key: '043801fa6ac2f90ba10e6048feeecf670cc4e4dd', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: 'b4b115c46340ae96e43a63a1535b59f071efc7cc' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '451b315624efea9b5f1e619ae6b942611ba93135', class: "h5" }, "Dispute details"), h("div", { key: 'c7765f5f091a346de0eb7aa81c36d475832925d2', class: "d-table gap-2" }, h("div", { key: 'cb3ecb618099b579a488232d5ecafef28c7da235', class: "d-table-row gap-2" }, h("span", { key: '86475be18418565529a2d08a544962209f9766ac', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '5efe0ffd6f0236b906ab9e52f32bd9a0533240a2', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_d = this.dispute) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { key: '286b29d07ddb23ba80d4831aadebb4f550545c39', class: "d-table-row gap-2" }, h("span", { key: '2a8582b5e4c6e0b4ad1db9b7222148949accf10d', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: 'b8e43894965778696e0cb41204b3efe1aac9443e', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_e = this.dispute) === null || _e === void 0 ? void 0 : _e.reason)), h("div", { key: '4864005f755bdbdecb5ed28370452850dfc9f047', class: "d-table-row gap-2" }, h("span", { key: '64b10de9b84fe9992b07a88294caa38b2b63fdca', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Due Date"), h("span", { key: '5198c3cd3ebf4246c42d8b59603765bd39bae06b', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_f = this.dispute) === null || _f === void 0 ? void 0 : _f.due_date))), h("div", { key: '29c98ba58742d3195eca08571cbf793bc9d5a7c6', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '9ef19c0152cbb6342214aa5073ffed303fc85624', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '558126e83a05c0729e17a1abf5ce849e02574096', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.underReview) && (h("div", { key: 'f8c6fee1c63eef8cf2d2a00fb10051686c7572ae', part: text }, h("h1", { key: '23c4bb1c8ab00f4cf9a1447156c124f8ecd1f4b7', class: "h4", part: heading4 }, "This payment is disputed and under review"), h("p", { key: 'b1c469330757f22582e5c341c68adcd1aae3def3' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_h = this.dispute) === null || _h === void 0 ? void 0 : _h.won) && (h("div", { key: '46c92fe084337c67ce0bfedf11d89aca38bdc5e4', part: text }, h("h1", { key: 'ac06dc25f88d88d257ff56aec620d803a45d6344', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '30a26bceb37855460b8ae6ef54c20591900b5fcf' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_j = this.dispute) === null || _j === void 0 ? void 0 : _j.lost) && (h("div", { key: '2320aa515a8112a27bdbd9e3f1b3a8daf2c1b28e', part: text }, h("h1", { key: '32e0cfc6e8d27afe01194ab61ad342781ec31bf8', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '6a8b333f0be16d81ffc23609bcdcb8f70435d515' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "dispute-notification"; }
|
|
51
51
|
static get properties() {
|
package/dist/collection/components/dispute-management/dispute-response/additional-statement.js
CHANGED
|
@@ -29,7 +29,7 @@ export class AdditionalStatement {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
var _a, _b;
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '8dff14b5f29b28a18901b1eff60b3855d9094013' }, h("div", { key: '405d549adeb5150fd7ec834b699f83588892390e', class: "row gy-3" }, h("div", { key: 'a13e743d61fe9329e74b3a09712921cec6e253c2', class: "col-12" }, h("h2", { key: 'fbe30e865b8dbece987480e3ac804c3eabbf0746', class: "h5", part: heading5 }, "Additional Evidence")), h("div", { key: '921aa04960a0c30d9733bc0db71dee4fcd78af55', class: "col-12" }, h("form-control-textarea", { key: 'cc4a0136fa728cce0390e4d9dd456a7ad9095244', label: "Is there anything else you would like to say about this dispute?", name: "additional_statement", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.additional_statement, inputHandler: this.inputHandler, errorText: this.errors.additional_statement })), h("div", { key: '0b35f4914c18432ca326a01c002710690c15d685', class: "col-12" }, h("form-control-file-v2", { key: '8c6a32df62ea4c217fad64fa1283033a85885076', label: "Additional files", name: "uncategorized_file", multiple: true, helpText: "Upload any additional pieces of evidence that have not already been provided.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.uncategorized_file })))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "additional-statement"; }
|
|
35
35
|
static get properties() {
|