@justifi/webcomponents 6.15.0 → 6.16.0-rc.2
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-CDE3KpL6.js} +2 -2
- package/dist/cjs/{Api-us3AxMRC.js → Api-CaEn8pKs.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 +64 -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-DIspRonp.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +12 -10
- package/dist/cjs/{checkout.service-B_qymeqJ.js → checkout.service-CM1Duar4.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-DyHHkx4J.js +29 -0
- package/dist/cjs/dispute-notification_2.cjs.entry.js +9 -9
- package/dist/cjs/{event-types-DmY59QXs.js → event-types-DNCxVTir.js} +1 -1
- package/dist/cjs/form-address-fields_3.cjs.entry.js +5 -5
- package/dist/cjs/form-alert_3.cjs.entry.js +122 -16
- 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-8LeFCTm6.js} +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +54 -32
- 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 +17 -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-DGrVUpde.js} +1 -3
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-DRXVT-uB.js → payment.service-By7aeVkC.js} +1 -1
- package/dist/cjs/{payout.service-CuQ-mXKB.js → payout.service-Dn0rXkmg.js} +1 -1
- package/dist/cjs/{plaid.service-B58nzlUE.js → plaid.service-CjaugrzX.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-C0_r_A60.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 +88 -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 +37 -11
- package/dist/collection/components/checkout/justifi-checkout.js +53 -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 +63 -19
- 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/frame-comunication-service.js +6 -1
- package/dist/collection/utils/postal-code.js +19 -0
- package/dist/docs.json +315 -17
- package/dist/esm/{Analytics-BtMYbHD0.js → Analytics-tBzmPsnT.js} +2 -2
- package/dist/esm/{Api-nVK-rgbk.js → Api-BH6Wa9CT.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 +64 -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-XOnczlAa.js} +1 -1
- package/dist/esm/card-form.entry.js +12 -10
- package/dist/esm/{checkout.service-JA7oTq5d.js → checkout.service-DvSxk9EZ.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-BD3-8NL2.js +27 -0
- package/dist/esm/dispute-notification_2.entry.js +9 -9
- package/dist/esm/{event-types-Dsf8IwD6.js → event-types-CM5AGGBD.js} +1 -1
- package/dist/esm/form-address-fields_3.entry.js +5 -5
- package/dist/esm/form-alert_3.entry.js +122 -16
- 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-P-x_RqL5.js} +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_12.entry.js +54 -32
- 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 +17 -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-DhrQechy.js +5 -0
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-B42sKlQE.js → payment.service-CBUnE4bP.js} +1 -1
- package/dist/esm/{payout.service-BIoAgNJJ.js → payout.service-DUYaYbeJ.js} +1 -1
- package/dist/esm/{plaid.service-C6Ltk2ef.js → plaid.service-Umm80G4q.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-DeunLqmo.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 +63 -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 +12 -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 +125 -16
- 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 +15 -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 +43 -19
- 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 +9 -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 +95 -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-de047614.entry.js → p-06ed3518.entry.js} +1 -1
- package/dist/webcomponents/p-12f5fdc0.entry.js +1 -0
- package/dist/webcomponents/p-1ceb65cc.entry.js +1 -0
- 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-357d14ee.entry.js +1 -0
- package/dist/webcomponents/{p-a10beb26.entry.js → p-3d02cb78.entry.js} +1 -1
- package/dist/webcomponents/{p-ead48010.entry.js → p-4450dbe9.entry.js} +1 -1
- package/dist/webcomponents/p-4dabcfd6.entry.js +1 -0
- package/dist/webcomponents/p-511bc0b2.entry.js +1 -0
- package/dist/webcomponents/p-51238f79.entry.js +1 -0
- package/dist/webcomponents/p-521c534c.entry.js +1 -0
- package/dist/webcomponents/{p-0e9351c4.entry.js → p-5331e011.entry.js} +1 -1
- package/dist/webcomponents/p-5be775e8.entry.js +1 -0
- package/dist/webcomponents/{p-cec7164e.entry.js → p-5e196140.entry.js} +1 -1
- package/dist/webcomponents/{p-f40fa614.entry.js → p-5f20b0da.entry.js} +1 -1
- package/dist/webcomponents/p-63e02d42.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-6f7756b7.entry.js +1 -0
- package/dist/webcomponents/p-80177bcb.entry.js +1 -0
- package/dist/webcomponents/p-8758aec4.entry.js +1 -0
- package/dist/webcomponents/p-87f8d4e7.entry.js +1 -0
- package/dist/webcomponents/{p-88a44a02.entry.js → p-89ed2d99.entry.js} +1 -1
- package/dist/webcomponents/p-91358854.entry.js +1 -0
- package/dist/webcomponents/p-9b930446.entry.js +1 -0
- package/dist/webcomponents/p-9c4ac3c5.entry.js +1 -0
- package/dist/webcomponents/{p-B_2zgnvM.js → p-B6kC9tX2.js} +1 -1
- package/dist/webcomponents/{p-D7fNBSlC.js → p-BKrZL95i.js} +1 -1
- package/dist/webcomponents/{p-rFpPIJgu.js → p-Bo7ndXwR.js} +1 -1
- package/dist/webcomponents/{p-iA-Amt2z.js → p-C8J9uVEs.js} +1 -1
- package/dist/webcomponents/{p-DC2djVls.js → p-CEGSQXGU.js} +1 -1
- package/dist/webcomponents/{p-BjjKkMO1.js → p-CEHwp4sh.js} +1 -1
- package/dist/webcomponents/{p-C60AkJ6a.js → p-CKL24GQA.js} +1 -1
- package/dist/webcomponents/{p-BmaQUnqv.js → p-CRaiEpKf.js} +1 -1
- 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-C6Jq8YDT.js → p-DCpGH4xL.js} +1 -1
- package/dist/webcomponents/{p-pueOrhXO.js → p-DEfLsy2W.js} +1 -1
- package/dist/webcomponents/p-DF7oFWnO.js +1 -0
- package/dist/webcomponents/p-DMzYgqml.js +1 -0
- package/dist/webcomponents/p-DhrQechy.js +1 -0
- package/dist/webcomponents/p-FsWkrvEF.js +1 -0
- package/dist/webcomponents/p-a1e1afa4.entry.js +1 -0
- package/dist/webcomponents/{p-13814028.entry.js → p-a1ef7674.entry.js} +1 -1
- package/dist/webcomponents/p-a2c4e99f.entry.js +1 -0
- package/dist/webcomponents/p-a8f1c9b3.entry.js +1 -0
- package/dist/webcomponents/p-aba3b0dc.entry.js +1 -0
- package/dist/webcomponents/{p-065b854f.entry.js → p-abebb03c.entry.js} +1 -1
- package/dist/webcomponents/{p-1cfa634a.entry.js → p-adaa1c98.entry.js} +1 -1
- package/dist/webcomponents/{p-f2b3c7d5.entry.js → p-b2b0303d.entry.js} +1 -1
- package/dist/webcomponents/{p-59b95eae.entry.js → p-b39c7414.entry.js} +1 -1
- package/dist/webcomponents/p-b925d666.entry.js +1 -0
- package/dist/webcomponents/p-bd4d2924.entry.js +1 -0
- package/dist/webcomponents/p-c172decb.entry.js +1 -0
- package/dist/webcomponents/p-d19d7d41.entry.js +1 -0
- package/dist/webcomponents/p-d59d6c23.entry.js +1 -0
- package/dist/webcomponents/p-deff4422.entry.js +1 -0
- package/dist/webcomponents/p-e1fbadea.entry.js +1 -0
- package/dist/webcomponents/{p-1365a46b.entry.js → p-e3c7b4e5.entry.js} +1 -1
- package/dist/webcomponents/{p-a7c594d1.entry.js → p-e5feca94.entry.js} +1 -1
- package/dist/webcomponents/p-e75d1756.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-f2c99647.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-fcc5af24.entry.js +1 -0
- package/dist/webcomponents/{p-0f7e3515.entry.js → p-fd1718e0.entry.js} +4 -4
- package/dist/webcomponents/p-ff67c8f7.entry.js +1 -0
- 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-6c7fca1a.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-9b43b90d.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-a71cc8e2.entry.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-f0434a13.entry.js +0 -1
- package/dist/webcomponents/p-f5cb6a26.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,22 @@ 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
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
59
|
+
const results = [];
|
|
60
|
+
for (const element of elements) {
|
|
61
|
+
results.push(await element.validate());
|
|
62
|
+
}
|
|
63
|
+
return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
|
|
45
64
|
}
|
|
46
65
|
async tokenize({ clientId, paymentMethodMetadata, account }) {
|
|
66
|
+
var _a, _b;
|
|
47
67
|
if (this.isAchDisabledForCheckout()) {
|
|
48
68
|
return {
|
|
49
69
|
error: {
|
|
@@ -51,25 +71,54 @@ export class BankAccountForm {
|
|
|
51
71
|
},
|
|
52
72
|
};
|
|
53
73
|
}
|
|
74
|
+
// tokenize() is a public @Method: an integrator with their own submit button
|
|
75
|
+
// can reach it without validate(), so the mismatch check has to live here too.
|
|
76
|
+
if (this.showAccountNumberConfirmation) {
|
|
77
|
+
const confirmation = await ((_a = this.accountNumberConfirmationIframeElement) === null || _a === void 0 ? void 0 : _a.validate());
|
|
78
|
+
if ((confirmation === null || confirmation === void 0 ? void 0 : confirmation.isValid) !== true) {
|
|
79
|
+
return {
|
|
80
|
+
error: {
|
|
81
|
+
code: 'validation_error',
|
|
82
|
+
message: ((_b = confirmation === null || confirmation === void 0 ? void 0 : confirmation.error) === null || _b === void 0 ? void 0 : _b.message) ||
|
|
83
|
+
'The entered value does not match the account number',
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
54
88
|
const result = await this.accountNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
|
|
55
89
|
return result;
|
|
56
90
|
}
|
|
57
91
|
get isReady() {
|
|
58
92
|
return this.iframeState === 'ready';
|
|
59
93
|
}
|
|
94
|
+
get expectedIframeCount() {
|
|
95
|
+
return this.showAccountNumberConfirmation ? 3 : 2;
|
|
96
|
+
}
|
|
60
97
|
get iframeElements() {
|
|
61
98
|
return [
|
|
62
99
|
this.accountNumberIframeElement,
|
|
100
|
+
...(this.showAccountNumberConfirmation
|
|
101
|
+
? [this.accountNumberConfirmationIframeElement]
|
|
102
|
+
: []),
|
|
63
103
|
this.routingNumberIframeElement,
|
|
64
|
-
];
|
|
104
|
+
].filter(Boolean);
|
|
65
105
|
}
|
|
66
106
|
watchIframesLoad() {
|
|
67
107
|
var _a;
|
|
68
108
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
69
109
|
const { signal } = (this.loadAbortController = new AbortController());
|
|
70
|
-
const pending = new Set(this.iframeElements
|
|
110
|
+
const pending = new Set(this.iframeElements
|
|
111
|
+
.filter((element) => !this.loadedInputIds.has(element.inputId))
|
|
112
|
+
.map((element) => element.inputId));
|
|
71
113
|
const loaded = Promise.all(this.iframeElements.map((element) => (new Promise((resolve) => {
|
|
114
|
+
// iframeLoaded is a once: true listener, so an element that already
|
|
115
|
+
// loaded will never fire again on a re-watch.
|
|
116
|
+
if (this.loadedInputIds.has(element.inputId)) {
|
|
117
|
+
resolve();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
72
120
|
element.addEventListener('iframeLoaded', () => {
|
|
121
|
+
this.loadedInputIds.add(element.inputId);
|
|
73
122
|
pending.delete(element.inputId);
|
|
74
123
|
resolve();
|
|
75
124
|
}, { once: true, signal });
|
|
@@ -93,6 +142,9 @@ export class BankAccountForm {
|
|
|
93
142
|
return;
|
|
94
143
|
this.iframeState = 'error';
|
|
95
144
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
145
|
+
if (pending.has('accountNumberConfirmation')) {
|
|
146
|
+
console.error('[bank-account-form] "Confirm Account Number" field failed to load.');
|
|
147
|
+
}
|
|
96
148
|
this.errorEvent.emit({
|
|
97
149
|
errorCode: ComponentErrorCodes.IFRAME_LOAD_ERROR,
|
|
98
150
|
message: ComponentErrorMessages.IFRAME_LOAD_ERROR,
|
|
@@ -117,9 +169,33 @@ export class BankAccountForm {
|
|
|
117
169
|
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
170
|
opacity: this.isReady ? '1' : '0',
|
|
119
171
|
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}` })))));
|
|
172
|
+
} }, 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
173
|
}
|
|
122
174
|
static get is() { return "bank-account-form"; }
|
|
175
|
+
static get properties() {
|
|
176
|
+
return {
|
|
177
|
+
"showAccountNumberConfirmation": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "boolean",
|
|
182
|
+
"resolved": "boolean",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": true,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": ""
|
|
190
|
+
},
|
|
191
|
+
"getter": false,
|
|
192
|
+
"setter": false,
|
|
193
|
+
"reflect": false,
|
|
194
|
+
"attribute": "show-account-number-confirmation",
|
|
195
|
+
"defaultValue": "false"
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
123
199
|
static get states() {
|
|
124
200
|
return {
|
|
125
201
|
"iframeOrigin": {},
|
|
@@ -155,7 +231,7 @@ export class BankAccountForm {
|
|
|
155
231
|
return {
|
|
156
232
|
"validate": {
|
|
157
233
|
"complexType": {
|
|
158
|
-
"signature": "() => Promise<
|
|
234
|
+
"signature": "() => Promise<{ isValid: boolean; }>",
|
|
159
235
|
"parameters": [],
|
|
160
236
|
"references": {
|
|
161
237
|
"Promise": {
|
|
@@ -163,7 +239,7 @@ export class BankAccountForm {
|
|
|
163
239
|
"id": "global::Promise"
|
|
164
240
|
}
|
|
165
241
|
},
|
|
166
|
-
"return": "Promise<
|
|
242
|
+
"return": "Promise<{ isValid: boolean; }>"
|
|
167
243
|
},
|
|
168
244
|
"docs": {
|
|
169
245
|
"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,11 @@ export class CardForm {
|
|
|
28
30
|
(_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
29
31
|
}
|
|
30
32
|
async validate() {
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
33
|
+
const results = [];
|
|
34
|
+
for (const element of this.iframeElements) {
|
|
35
|
+
results.push(await element.validate());
|
|
36
|
+
}
|
|
37
|
+
return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
|
|
36
38
|
}
|
|
37
39
|
async tokenize({ clientId, paymentMethodMetadata, account, }) {
|
|
38
40
|
const result = await this.cardNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
|
|
@@ -93,12 +95,36 @@ export class CardForm {
|
|
|
93
95
|
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
96
|
}
|
|
95
97
|
render() {
|
|
96
|
-
return (h("div", { key: '
|
|
98
|
+
return (h("div", { key: 'aa9433ca84a3c5d3d12970a0533247b10ef7a39c' }, this.iframeState === 'loading' && h(CardFormSkeleton, { key: 'af68a39d4d71d665699fd53efc436158eefeae60' }), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", { key: 'aee1ab56e4777181e1598a4047b4ac873da4416d' }), h("div", { key: '0f1603b84d701da90f05f10c8b7c2d7d26d706e8', class: "container-fluid p-0", style: {
|
|
97
99
|
opacity: this.isReady ? '1' : '0',
|
|
98
100
|
height: this.isReady ? 'auto' : '0',
|
|
99
|
-
} }, h("div", { key: '
|
|
101
|
+
} }, h("div", { key: '364249139cf19fa5567f9c694a2925e9ea26e4ae', class: "mb-3" }, h("iframe-input", { key: '46f1bf0510d8ca73c231f2e7cca44c14b7c8578a', inputId: "cardNumber", ref: (el) => (this.cardNumberIframeElement = el), label: "Card Number", maskCardNumber: this.maskCardNumber, iframeOrigin: `${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}` })), h("div", { key: '630569a17973f3aa17a07b0baccc85cae4c51bcc', class: "row" }, h("div", { key: '7d9b30a60da5a45ae1f635caad6293c867d4bc0f', class: "col-4 align-content-end" }, h("iframe-input", { key: 'a1b51799646a1d53d4f3ee4b5f8b057190a8de9b', inputId: "expirationMonth", ref: (el) => (this.expirationMonthIframeElement = el), label: "Expiration", iframeOrigin: `${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}` })), h("div", { key: '2fdc1625946783a048a9e2b2899987e8cdc449b8', class: "col-4 align-content-end" }, h("iframe-input", { key: '174b38998fe0a1fd278da55cb08a7ca1d0e8447f', inputId: "expirationYear", ref: (el) => (this.expirationYearIframeElement = el), label: "", iframeOrigin: `${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}` })), h("div", { key: '1238f5d1370f27ba0ac3841563e66b51a18eaaa0', class: "col-4 align-content-end" }, h("iframe-input", { key: '86d822f907b95ee86f1fcf6f2148da3449c41d48', inputId: "CVV", ref: (el) => (this.cvvIframeElement = el), label: "CVV", iframeOrigin: `${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}` }))))));
|
|
100
102
|
}
|
|
101
103
|
static get is() { return "card-form"; }
|
|
104
|
+
static get properties() {
|
|
105
|
+
return {
|
|
106
|
+
"maskCardNumber": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "boolean",
|
|
111
|
+
"resolved": "boolean",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": true,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": "Mask the card number to its last four digits when the field blurs."
|
|
119
|
+
},
|
|
120
|
+
"getter": false,
|
|
121
|
+
"setter": false,
|
|
122
|
+
"reflect": false,
|
|
123
|
+
"attribute": "mask-card-number",
|
|
124
|
+
"defaultValue": "false"
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
102
128
|
static get states() {
|
|
103
129
|
return {
|
|
104
130
|
"iframeOrigin": {},
|
|
@@ -134,7 +160,7 @@ export class CardForm {
|
|
|
134
160
|
return {
|
|
135
161
|
"validate": {
|
|
136
162
|
"complexType": {
|
|
137
|
-
"signature": "() => Promise<
|
|
163
|
+
"signature": "() => Promise<{ isValid: boolean; }>",
|
|
138
164
|
"parameters": [],
|
|
139
165
|
"references": {
|
|
140
166
|
"Promise": {
|
|
@@ -142,7 +168,7 @@ export class CardForm {
|
|
|
142
168
|
"id": "global::Promise"
|
|
143
169
|
}
|
|
144
170
|
},
|
|
145
|
-
"return": "Promise<
|
|
171
|
+
"return": "Promise<{ isValid: boolean; }>"
|
|
146
172
|
},
|
|
147
173
|
"docs": {
|
|
148
174
|
"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,15 @@ 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;
|
|
21
|
+
/**
|
|
22
|
+
* Mask the card number to its last four digits when the field loses focus,
|
|
23
|
+
* with an eye toggle to reveal it. Defaults to false.
|
|
24
|
+
*
|
|
25
|
+
* Anti-shoulder-surfing only, not a secrecy boundary.
|
|
26
|
+
*/
|
|
27
|
+
this.maskCardNumber = false;
|
|
19
28
|
}
|
|
20
29
|
propChanged() {
|
|
21
30
|
this.updateStore();
|
|
@@ -26,7 +35,7 @@ export class JustifiCheckout {
|
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
37
|
componentWillLoad() {
|
|
29
|
-
|
|
38
|
+
detectDuplicateVersion();
|
|
30
39
|
this.analytics = new JustifiAnalytics(this);
|
|
31
40
|
}
|
|
32
41
|
disconnectedCallback() {
|
|
@@ -66,9 +75,9 @@ export class JustifiCheckout {
|
|
|
66
75
|
}
|
|
67
76
|
render() {
|
|
68
77
|
var _a, _b;
|
|
69
|
-
return (h(StyledHost, { key: '
|
|
78
|
+
return (h(StyledHost, { key: '0458037995870159b8fae4036d6b5a4d0d5acd03' }, h("justifi-modular-checkout", { key: '698f0f48e8bd6fd7bf2102ed13308419cab53390', ref: (el) => {
|
|
70
79
|
this.modularCheckoutRef = el;
|
|
71
|
-
}, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '
|
|
80
|
+
}, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '71c1ff8052866846cd898e9068fe030bd938958a', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '9721762b2b13d5a06911c5bb43f6c5c987ad724d', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: 'bc9728f87907b00d2a80bdc0503547f08af135f4', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: '210d0455eb21b1471ae5cea863a98804677b8de2' }, h("justifi-checkout-summary", { key: '9e620e15ebd88ccf028930498981d6cddd18143b' }))), h("div", { key: '0c0a66263e8da3f387fb0df78a35df6b79506f94', class: "col-12 mt-4" }, h("slot", { key: 'aaa920ceb1af4b1aba963dc2c050dcafc6b2ecc3', name: "insurance" })), h("div", { key: 'b1f39a2a4bdf421e8db41a9e47d6a02298a22566', class: "col-12 mt-4" }, h("justifi-header", { key: 'da5ef3e4baa203c17bd3549b796854cf5d70bcd3', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: '37844f9005aca58bf4670b164f42b19ed1d057f0', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: 'bbbff8e463752aaed1c46feb71bc984c359558c6', class: "d-flex flex-column" }, h("section", { key: '6b4d3d5484a01d508abfc859c57c2407bc85e589' }, h("div", { key: '89a788a45217da8b919f1d8e6d1b091ab44557cb' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: '7b80b067d959b52ed86474ece9fdfa589945c816', class: "mb-3" }, h("justifi-apple-pay", { key: 'a7ff1ca0f3e00e91811f833dfc1c9f39b961cc76' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: 'a17235c7cd09f07a6c3ff765cfd4d1cd54a7605d', class: "mb-3" }, h("justifi-google-pay", Object.assign({ key: '602884b27b43a7a6848d390162e85a5c1fce973e', ref: (el) => (this.googlePayRef = el) }, (this.googlePayEnv != null ? { environment: this.googlePayEnv } : {}))))), this.availablePaymentMethods.includes(PAYMENT_METHODS.PAYPAL) && (h("div", { key: '38d3a64129e042cf5ab96ed3dddcb12f23015c5a', class: "mb-3" }, h("justifi-paypal", { key: '68dd2d65a1a4fa293a4145ef032022cf57196df4' }))), h("justifi-saved-payment-methods", { key: '6a87a633c879e700a671cb71e948128338a4c543' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && !this.disableBnpl && (h("justifi-radio-list-item", { key: 'ea96bafc139515bf352dfcef3e7aa25e9d7d1406', 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: 'f872c215b1d45c8ca594756fbcd296dbcff923a0', 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: '61354ab52513d256ca2eb29bee7403383981f487', 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, maskCardNumber: this.maskCardNumber }))))), h("div", { key: '87d0deb5342edf49d830df949cae666450e45404', class: "mt-4" }, h("justifi-button", { key: '0f8fa093c3442139604943768e0692370dfb7aba', 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
81
|
}
|
|
73
82
|
static get is() { return "justifi-checkout"; }
|
|
74
83
|
static get properties() {
|
|
@@ -277,6 +286,46 @@ export class JustifiCheckout {
|
|
|
277
286
|
},
|
|
278
287
|
"getter": false,
|
|
279
288
|
"setter": false
|
|
289
|
+
},
|
|
290
|
+
"showAccountNumberConfirmation": {
|
|
291
|
+
"type": "boolean",
|
|
292
|
+
"mutable": false,
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "boolean",
|
|
295
|
+
"resolved": "boolean",
|
|
296
|
+
"references": {}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": true,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "Renders a \"Confirm Account Number\" field in the bank account form."
|
|
303
|
+
},
|
|
304
|
+
"getter": false,
|
|
305
|
+
"setter": false,
|
|
306
|
+
"reflect": false,
|
|
307
|
+
"attribute": "show-account-number-confirmation",
|
|
308
|
+
"defaultValue": "false"
|
|
309
|
+
},
|
|
310
|
+
"maskCardNumber": {
|
|
311
|
+
"type": "boolean",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "boolean",
|
|
315
|
+
"resolved": "boolean",
|
|
316
|
+
"references": {}
|
|
317
|
+
},
|
|
318
|
+
"required": false,
|
|
319
|
+
"optional": true,
|
|
320
|
+
"docs": {
|
|
321
|
+
"tags": [],
|
|
322
|
+
"text": "Mask the card number to its last four digits when the field loses focus,\nwith an eye toggle to reveal it. Defaults to false.\n\nAnti-shoulder-surfing only, not a secrecy boundary."
|
|
323
|
+
},
|
|
324
|
+
"getter": false,
|
|
325
|
+
"setter": false,
|
|
326
|
+
"reflect": false,
|
|
327
|
+
"attribute": "mask-card-number",
|
|
328
|
+
"defaultValue": "false"
|
|
280
329
|
}
|
|
281
330
|
};
|
|
282
331
|
}
|
|
@@ -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() {
|