@justifi/webcomponents 6.15.0-rc.2 → 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-COhunq0p.js → Analytics-jQsZxClw.js} +4 -4
- package/dist/cjs/{Api-Do6SaltY.js → Api-DqXlEWR1.js} +1 -1
- package/dist/cjs/{Business-oBifyXkW.js → Business-CNaz-VLa.js} +5 -1
- package/dist/cjs/{Plaid-D85oV9FN.js → Plaid-BcOAKDaU.js} +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +14 -14
- package/dist/cjs/additional-questions_4.cjs.entry.js +3 -3
- package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +15 -9
- package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +2 -2
- package/dist/cjs/bank-account-form.cjs.entry.js +68 -14
- package/dist/cjs/{business-form-options-CnlrfbQ6.js → business-form-options-BHBs_yiK.js} +1 -1
- package/dist/cjs/{business-identity-schema-hpDJFnB4.js → business-identity-schema-DuOIMFjG.js} +3 -3
- package/dist/cjs/{business.service-72YETCdB.js → business.service-Ca-olopC.js} +3 -3
- package/dist/cjs/card-form.cjs.entry.js +16 -12
- package/dist/cjs/{checkout-actions-BRQFQ6n-.js → checkout-actions-CQyGpVPe.js} +2 -2
- package/dist/cjs/{checkout.service-CPsXfx0Z.js → checkout.service-DBHPH2ji.js} +3 -3
- package/dist/cjs/{checkout.store-DaV9lvEQ.js → checkout.store-B5lTwvUV.js} +1 -0
- package/dist/cjs/{country-config-C1bWmF8P.js → country-config-CFC3KuVD.js} +25 -3
- 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 +12 -12
- package/dist/cjs/{event-types-UHzCC7Ga.js → event-types-luy3xnYR.js} +3 -3
- package/dist/cjs/form-address-fields_3.cjs.entry.js +6 -6
- 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 +6 -6
- 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-business-BpaRbn5S.js → get-business-BVxtiSDs.js} +3 -3
- package/dist/cjs/{get-payment-details-Cmg8gWvo.js → get-payment-details-DR1GgpyX.js} +3 -3
- package/dist/cjs/{get-subaccounts-Bp7DOmM_.js → get-subaccounts-D11aTYj1.js} +4 -4
- package/dist/cjs/{input-handlers-_51J5q7J.js → input-handlers-v9h_2Ysi.js} +1 -1
- package/dist/cjs/internal-button.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +52 -30
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +8 -8
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +10 -9
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +11 -11
- package/dist/cjs/justifi-business-form.cjs.entry.js +14 -14
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +11 -8
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +7 -7
- package/dist/cjs/justifi-checkout.cjs.entry.js +12 -10
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -4
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -10
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +34 -21
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -12
- package/dist/cjs/justifi-payment-details.cjs.entry.js +18 -18
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payments-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payout-details.cjs.entry.js +13 -13
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +12 -12
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +10 -10
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -10
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -9
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +11 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-G3Vs7Jx5.js → package-B414Jbra.js} +1 -3
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment-provisioning-actions-DDooZhhk.js → payment-provisioning-actions-SVp7B8pR.js} +2 -2
- package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-CVwTrHEL.js → payment.service-CNTe8vrp.js} +3 -3
- package/dist/cjs/{payout.service-CL3VR0hN.js → payout.service-BmU3q9jO.js} +3 -3
- package/dist/cjs/{payouts-status-1IUtW-UQ.js → payouts-status-BvHeuy9v.js} +2 -2
- package/dist/cjs/{plaid.service-Cukg5wuY.js → plaid.service-d9LAwbnX.js} +3 -3
- 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-DehT309E.js → schema-validations-BDFa_oIq.js} +12 -5
- 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-C0KG7BqL.js → terminal.service-BkQWZv9b.js} +3 -3
- package/dist/cjs/{utils-CBriZzRC.js → utils-BScgWJC5.js} +1 -1
- package/dist/cjs/utils-Ct_X5q0U.js +62 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Business.js +2 -0
- package/dist/collection/api/Checkout.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-helpers.js +2 -1
- 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/business-forms/utils/helpers.js +3 -1
- 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 +4 -2
- package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +5 -5
- 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-apple-pay.js +7 -1
- 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 +287 -18
- package/dist/esm/{Analytics-3WmRTICF.js → Analytics-DihSSvAP.js} +4 -4
- package/dist/esm/{Api-83B3f28Q.js → Api-INJHjnya.js} +1 -1
- package/dist/esm/{Business-DaDqgDrb.js → Business-CTtGaVYs.js} +5 -1
- package/dist/esm/{Plaid-BP3xNxQF.js → Plaid-CRcTLeaz.js} +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +14 -14
- package/dist/esm/additional-questions_4.entry.js +3 -3
- package/dist/esm/additional-statement_8.entry.js +8 -8
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +15 -9
- package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
- package/dist/esm/bank-account-form.entry.js +68 -14
- package/dist/esm/{business-form-options-BxVQL9ar.js → business-form-options-DLRkVtee.js} +1 -1
- package/dist/esm/{business-identity-schema-BkmRlnQo.js → business-identity-schema-BLKCH6xV.js} +3 -3
- package/dist/esm/{business.service-CTqiKKy5.js → business.service-C8f7OSEu.js} +3 -3
- package/dist/esm/card-form.entry.js +16 -12
- package/dist/esm/{checkout-actions-0ftD0elo.js → checkout-actions-CWnrb317.js} +2 -2
- package/dist/esm/{checkout.service-wjFjBxIB.js → checkout.service-BYDkC7uy.js} +3 -3
- package/dist/esm/{checkout.store-B2mtQcB5.js → checkout.store-B8CGkx0o.js} +1 -0
- package/dist/esm/{country-config-CJwnhkdq.js → country-config-DJFj1v-Q.js} +24 -4
- 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 +12 -12
- package/dist/esm/{event-types-cqQHLwCy.js → event-types-S8CgMbPg.js} +3 -3
- package/dist/esm/form-address-fields_3.entry.js +6 -6
- 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 +6 -6
- 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-business-BLCT-zfN.js → get-business-IZpxKRZM.js} +3 -3
- package/dist/esm/{get-payment-details-BokzuPGl.js → get-payment-details-DSI41Pq5.js} +3 -3
- package/dist/esm/{get-subaccounts-ClGG-LRZ.js → get-subaccounts-BHWiH8q9.js} +4 -4
- package/dist/esm/{input-handlers-Dfuc6aDW.js → input-handlers-Dm8jO-BT.js} +1 -1
- package/dist/esm/internal-button.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_12.entry.js +52 -30
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +8 -8
- package/dist/esm/justifi-bank-account-form.entry.js +10 -9
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +11 -11
- package/dist/esm/justifi-business-form.entry.js +14 -14
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +11 -8
- package/dist/esm/justifi-checkout-qr-code.entry.js +7 -7
- package/dist/esm/justifi-checkout.entry.js +12 -10
- package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -4
- package/dist/esm/justifi-checkouts-list.entry.js +12 -12
- package/dist/esm/justifi-dispute-management.entry.js +10 -10
- package/dist/esm/justifi-gross-payment-chart.entry.js +34 -21
- package/dist/esm/justifi-order-terminals.entry.js +12 -12
- package/dist/esm/justifi-payment-details.entry.js +18 -18
- package/dist/esm/justifi-payment-provisioning.entry.js +10 -10
- package/dist/esm/justifi-payment-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
- package/dist/esm/justifi-payments-list.entry.js +10 -10
- package/dist/esm/justifi-payout-details.entry.js +13 -13
- package/dist/esm/justifi-payout-transactions-list.entry.js +10 -10
- package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +12 -12
- package/dist/esm/justifi-qr-terminal.entry.js +10 -10
- package/dist/esm/justifi-refund-payment.entry.js +10 -10
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -9
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
- package/dist/esm/justifi-terminal-orders-list.entry.js +10 -10
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +11 -11
- 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-provisioning-actions-VRIPjnAQ.js → payment-provisioning-actions-VtleD509.js} +2 -2
- package/dist/esm/payment-provisioning-form-buttons_2.entry.js +1 -1
- package/dist/esm/{payment.service-D7uv5vym.js → payment.service-CQXRsu6Y.js} +3 -3
- package/dist/esm/{payout.service-BoSyqft1.js → payout.service-RRyWfpEK.js} +3 -3
- package/dist/esm/{payouts-status-CaiC5qpn.js → payouts-status-CnIf4XDi.js} +2 -2
- package/dist/esm/{plaid.service-DufQkxDk.js → plaid.service-Cg3E3Plo.js} +3 -3
- 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-8dbMCACI.js → schema-validations-8GJ34Do1.js} +12 -5
- 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-BM2aebB6.js → terminal.service-Dy6D8bnl.js} +3 -3
- package/dist/esm/utils-Cpck08K0.js +59 -0
- package/dist/esm/{utils-YUOJKtjO.js → utils-DaPywmTI.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Business.js +5 -1
- package/dist/module/Plaid.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-apple-pay2.js +7 -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 +4 -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 +28 -15
- 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 +10 -3
- 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/api/Business.d.ts +2 -0
- package/dist/types/api/Checkout.d.ts +7 -7
- 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/checkouts-list/justifi-checkouts-list.d.ts +1 -1
- package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +9 -0
- package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +1 -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 +86 -4
- 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-1ff1dcc5.entry.js +20 -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-c5424fda.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-4d85dd63.entry.js +1 -0
- package/dist/webcomponents/p-521c534c.entry.js +1 -0
- package/dist/webcomponents/p-5babaaa9.entry.js +1 -0
- package/dist/webcomponents/{p-1cdbe8c1.entry.js → p-5c889829.entry.js} +1 -1
- package/dist/webcomponents/{p-f5358a80.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-ced6f6f1.entry.js → p-7ff788f8.entry.js} +1 -1
- package/dist/webcomponents/{p-c3818a5a.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-f3682c72.entry.js → p-956707a2.entry.js} +1 -1
- package/dist/webcomponents/p-9c1863d5.entry.js +1 -0
- package/dist/webcomponents/p-BDtSw_d-.js +1 -0
- package/dist/webcomponents/{p-CIpBEUtx.js → p-BG8NxEUn.js} +1 -1
- package/dist/webcomponents/p-BKtKrQzN.js +1 -0
- package/dist/webcomponents/p-BQpbTebi.js +1 -0
- package/dist/webcomponents/{p-nbKvRcwU.js → p-Bh5BNj74.js} +1 -1
- package/dist/webcomponents/{p-CLq3Og7o.js → p-BhpaUYtS.js} +1 -1
- package/dist/webcomponents/{p-vIQBTQmc.js → p-BtiJJJwv.js} +1 -1
- package/dist/webcomponents/{p-DZQBPUfH.js → p-Bxc0NRj8.js} +1 -1
- package/dist/webcomponents/p-BzESNgd8.js +1 -0
- package/dist/webcomponents/p-C9p1gWAC.js +1 -0
- package/dist/webcomponents/p-CTtGaVYs.js +1 -0
- package/dist/webcomponents/p-CgOgijHy.js +1 -0
- package/dist/webcomponents/p-CkrzG0pB.js +1 -0
- package/dist/webcomponents/p-Cl6irPVE.js +1 -0
- package/dist/webcomponents/p-Cpck08K0.js +1 -0
- package/dist/webcomponents/{p-OReJ-ZQb.js → p-CtlBL-X6.js} +1 -1
- package/dist/webcomponents/p-Cy_sz0Tx.js +1 -0
- package/dist/webcomponents/p-D42DvqTW.js +1 -0
- package/dist/webcomponents/p-D7nyPi2Q.js +1 -0
- package/dist/webcomponents/p-DBudSN_h.js +1 -0
- package/dist/webcomponents/p-DMzYgqml.js +1 -0
- package/dist/webcomponents/{p-B0DHIvEj.js → p-DQmijfCN.js} +1 -1
- package/dist/webcomponents/p-Dqxyi-uK.js +1 -0
- package/dist/webcomponents/p-FsWkrvEF.js +1 -0
- package/dist/webcomponents/p-MLQyjvrV.js +1 -0
- 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-5d7b3d71.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-6c94218c.entry.js → p-d35cde99.entry.js} +1 -1
- package/dist/webcomponents/{p-cb1cc88e.entry.js → p-d48f80d1.entry.js} +1 -1
- package/dist/webcomponents/{p-eb31024f.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-d98bc829.entry.js → p-e6d1e3e2.entry.js} +1 -1
- 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-bf3866b3.entry.js → p-f0084d20.entry.js} +1 -1
- package/dist/webcomponents/p-f0da2ca5.entry.js +1 -0
- package/dist/webcomponents/p-f23d7d13.entry.js +1 -0
- package/dist/webcomponents/p-f2c99647.entry.js +1 -0
- package/dist/webcomponents/{p-e55216fb.entry.js → p-f39889f2.entry.js} +1 -1
- package/dist/webcomponents/p-f458928d.entry.js +1 -0
- package/dist/webcomponents/{p-0aa96018.entry.js → p-f5686720.entry.js} +1 -1
- package/dist/webcomponents/p-f681f747.entry.js +1 -0
- package/dist/webcomponents/{p-6eb65d23.entry.js → p-f6efd9e0.entry.js} +1 -1
- package/dist/webcomponents/{p-7002286e.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-hdPjEOdB.js +1 -0
- package/dist/webcomponents/{p-CJEetAx7.js → p-l3JhjHLW.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +2 -4
- package/dist/cjs/check-pkg-version-BxGoSXGD.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-CmFl6VLH.js +0 -45
- package/dist/esm/package-CAVi_ne1.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-0fbc806f.entry.js +0 -1
- package/dist/webcomponents/p-10787684.entry.js +0 -1
- package/dist/webcomponents/p-1fa62eba.entry.js +0 -1
- package/dist/webcomponents/p-25f70d5f.entry.js +0 -1
- package/dist/webcomponents/p-27igUlku.js +0 -1
- package/dist/webcomponents/p-36340e63.entry.js +0 -1
- package/dist/webcomponents/p-3642e189.entry.js +0 -1
- package/dist/webcomponents/p-388082cd.entry.js +0 -1
- package/dist/webcomponents/p-3f2fb856.entry.js +0 -1
- package/dist/webcomponents/p-4cad48c1.entry.js +0 -1
- package/dist/webcomponents/p-50c2b8f0.entry.js +0 -1
- package/dist/webcomponents/p-5842d4e8.entry.js +0 -1
- package/dist/webcomponents/p-5c89dcdf.entry.js +0 -1
- package/dist/webcomponents/p-5dcb1713.entry.js +0 -1
- package/dist/webcomponents/p-5f8c30b6.entry.js +0 -1
- package/dist/webcomponents/p-68e88747.entry.js +0 -1
- package/dist/webcomponents/p-6931a1f2.entry.js +0 -1
- package/dist/webcomponents/p-72bb4aff.entry.js +0 -1
- package/dist/webcomponents/p-74575a99.entry.js +0 -1
- package/dist/webcomponents/p-7c405573.entry.js +0 -1
- package/dist/webcomponents/p-825a7ee6.entry.js +0 -1
- package/dist/webcomponents/p-909a9828.entry.js +0 -20
- package/dist/webcomponents/p-955c06d3.entry.js +0 -1
- package/dist/webcomponents/p-9e9a2546.entry.js +0 -1
- package/dist/webcomponents/p-9f0ef3f3.entry.js +0 -1
- package/dist/webcomponents/p-BAKuMxC9.js +0 -1
- package/dist/webcomponents/p-BEL8sLz6.js +0 -1
- package/dist/webcomponents/p-BSxXlu9H.js +0 -1
- package/dist/webcomponents/p-BnjCmwMr.js +0 -1
- package/dist/webcomponents/p-CAVi_ne1.js +0 -1
- package/dist/webcomponents/p-CXsRwohv.js +0 -1
- package/dist/webcomponents/p-CawcnSoV.js +0 -1
- package/dist/webcomponents/p-CbyGKcz_.js +0 -1
- package/dist/webcomponents/p-Cy2N3vAg.js +0 -1
- package/dist/webcomponents/p-CyOXIqHo.js +0 -1
- package/dist/webcomponents/p-D6uhYbLo.js +0 -1
- package/dist/webcomponents/p-DN7VhlTn.js +0 -1
- package/dist/webcomponents/p-DNuxxP2B.js +0 -1
- package/dist/webcomponents/p-D_84NsmN.js +0 -1
- package/dist/webcomponents/p-DaDqgDrb.js +0 -1
- package/dist/webcomponents/p-Do9dxNjh.js +0 -1
- package/dist/webcomponents/p-Fpaf7CLD.js +0 -1
- package/dist/webcomponents/p-PdwJswAy.js +0 -1
- package/dist/webcomponents/p-acb0b66c.entry.js +0 -1
- package/dist/webcomponents/p-b23dfa13.entry.js +0 -1
- package/dist/webcomponents/p-b98ea26a.entry.js +0 -1
- package/dist/webcomponents/p-ca13117d.entry.js +0 -1
- package/dist/webcomponents/p-ca6c5365.entry.js +0 -1
- package/dist/webcomponents/p-d59676ea.entry.js +0 -1
- package/dist/webcomponents/p-ee7fe3a8.entry.js +0 -1
- package/dist/webcomponents/p-f0434a13.entry.js +0 -1
- package/dist/webcomponents/p-f9f0cb1f.entry.js +0 -1
- package/dist/webcomponents/p-fda6f27d.entry.js +0 -1
- package/dist/webcomponents/p-fdd087d4.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-Ds_P-dB8.js";import{t as a,a8 as d}from"./p-Bu7gdOaV.js";import{B as r}from"./p-CU2Dwa94.js";import{S as c}from"./p-eBK-iWrz.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-D6uhYbLo.js";import{g as h,a as p}from"./p-CLq3Og7o.js";import{D as l,a as f}from"./p-CIpBEUtx.js";import{c as u}from"./p-BEL8sLz6.js";import{J as b}from"./p-nbKvRcwU.js";import"./p-HXpYMWUU.js";import"./p-vIQBTQmc.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-CAVi_ne1.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,u;return s("div",{key:"0f4474fa70e6ab3895132b703ab5a3b7f810554a",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"1bd7b07c15e6a88be6215dbca5e41cbcfc6e6e68",style:{marginBottom:"8px"}},s(c,{key:"a4436ec5cc58b0cccdcdc9ae3d25293fdfaeac40",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"cda7ba45ed518e762239864b766f65da8488e713",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"a0acf3c7c0ae988f8580bfbd8b2ff2b5c349fddb",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"2fd8a28d4c3eefc4a1a881d3bc47422428d4f016",part:a},s("h1",{key:"243ca1a43064800b65fb27e259598ff85746e55b",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"617f7b87510fee1d64ad121cf15f1ba193f6826c"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"d9ad4c30643e0991c7327a800d8015aa49d227ff",part:a},s("h1",{key:"c6e2b6a4a012ad2ce3d371ac765359f0db018166",class:"h4",part:d},"This payment is disputed"),s("p",{key:"491ca4d83029e8aec16ee745cd3eb78854298d19"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"3fd51e33e3440d6fda3fb6f2aa3f83cd783255fc",class:"h5"},"Dispute details"),s("div",{key:"edb7c85ffccd4a1af64cdb61a702ce39c86987a9",class:"d-table gap-2"},s("div",{key:"8d611ad34fa2a40d52f175c6874228254d235bf6",class:"d-table-row gap-2"},s("span",{key:"db4c9c3379b475ddb4c966336a1a9905f286335a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"9c61d28bc602dd3cdeaa0e99923c58fb20fb95bc",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"d7a84cd67c59bfdc2c63b7e847b82d423d3277a4",class:"d-table-row gap-2"},s("span",{key:"e98e2a8a8593b3358ecf6d5b857d2f3cffae1ef5",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"61f843068e6bf04d8bab69cefeb148e9b6792a5f",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"795fd5d907eb2e1456c737a201517dbe5434ea84",class:"d-table-row gap-2"},s("span",{key:"1dae1ba0dd7323756988c8f6d65be1fdf3c155e6",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"b44ff4fcfd0beb70af6468a216eee0489c566a79",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"f7e1ac7543ca231cc7904654bfb9fcb3e3f31dc1",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"35dfa1f4e0a7f02496751dc332a4c52b542fe538",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"0519e6959a2407315d600384121b6ad466de79eb",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"600db9506bed0de6efc3d0367fb5df63273bba14",part:a},s("h1",{key:"139a034878c8433edb1b936440c1b71d9d1022b2",class:"h4",part:d},"This payment is disputed and under review"),s("p",{key:"bd9b3d46e57ec998e5e1a5bc465d981129fc1fd2"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"c03393474cea2a44b864eba0f9e36b1fe63eb256",part:a},s("h1",{key:"3c19db3b8aefd25a363d4cd183eaaa2487d33f8c",class:"h4",part:d},"This payment was disputed"),s("p",{key:"45d95070b59c3a0da28bc5cda5356c2aa171d974"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(u=this.dispute)||void 0===u?void 0:u.lost)&&s("div",{key:"a8727df139e8d1eff3e67bc13359534281ceb795",part:a},s("h1",{key:"bb533bb65c20722002bda966782fcc4d165a139e",class:"h4",part:d},"This payment was disputed"),s("p",{key:"5901b10090d20523de1f96630ce7a9b71d9fdcac"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){u(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"57664882c2d3c6833f9a9cbe01452875119c6032",class:"dispute-response-root"},s("div",{key:"92c8e3b3426210b68063ad7474aeb13429fd4c76",class:"row gy-3"},s("div",{key:"0f7e1236d85765054a40a06d864199feba0cad21",class:"col-12"},s("h1",{key:"b12f3840caeb7c17d324829874b8a4089fcb123d",class:"h4",part:d},"Counter dispute")),s("div",{key:"c493a872abb1d058cd98fab46eefa6f68caaa351",class:"col-12"},this.currentStepComponent),s("div",{key:"06f7818c59490ec54c58e9e0a5d7effec11bf0a6",class:"col-12"},s("div",{key:"754852aaab1b5048ed52796a13e169228a6ac2d1",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-Ds_P-dB8.js";import{t as a,a8 as r}from"./p-Bu7gdOaV.js";import{B as d}from"./p-CU2Dwa94.js";import{S as c}from"./p-eBK-iWrz.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-Dqxyi-uK.js";import{g as h,a as p}from"./p-BhpaUYtS.js";import{D as l,a as f}from"./p-BG8NxEUn.js";import{d as u}from"./p-BzESNgd8.js";import{J as b}from"./p-Bh5BNj74.js";import"./p-HXpYMWUU.js";import"./p-BtiJJJwv.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-BQpbTebi.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,u;return s("div",{key:"12cd6c17c1f4f70e136fa0e9d6ff74d37af82a1e",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"33b1c6259abe1da5d92ac2aa37cfec9033fbb3d1",style:{marginBottom:"8px"}},s(c,{key:"1f5bc2333a37587d3d11e545b58c9b85a2a145a5",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"280e35a187319c7698922c3cd3f579457a187e7a",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"3fd7f151a3d7516dd40835d6c42d2240d7170613",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"e78d3cf205ba862b8df5e5358e15c4961add1003",part:a},s("h1",{key:"c533f650a18a75ca7c9f1cb15a6d1da517317e54",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"14f82547639777ab5179010f350d42f7b4082845"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"a2eefdc255af0c3b07091183fff4c5860f66af3a",part:a},s("h1",{key:"043801fa6ac2f90ba10e6048feeecf670cc4e4dd",class:"h4",part:r},"This payment is disputed"),s("p",{key:"b4b115c46340ae96e43a63a1535b59f071efc7cc"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"451b315624efea9b5f1e619ae6b942611ba93135",class:"h5"},"Dispute details"),s("div",{key:"c7765f5f091a346de0eb7aa81c36d475832925d2",class:"d-table gap-2"},s("div",{key:"cb3ecb618099b579a488232d5ecafef28c7da235",class:"d-table-row gap-2"},s("span",{key:"86475be18418565529a2d08a544962209f9766ac",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"5efe0ffd6f0236b906ab9e52f32bd9a0533240a2",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"286b29d07ddb23ba80d4831aadebb4f550545c39",class:"d-table-row gap-2"},s("span",{key:"2a8582b5e4c6e0b4ad1db9b7222148949accf10d",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"b8e43894965778696e0cb41204b3efe1aac9443e",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"4864005f755bdbdecb5ed28370452850dfc9f047",class:"d-table-row gap-2"},s("span",{key:"64b10de9b84fe9992b07a88294caa38b2b63fdca",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"5198c3cd3ebf4246c42d8b59603765bd39bae06b",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"29c98ba58742d3195eca08571cbf793bc9d5a7c6",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"9ef19c0152cbb6342214aa5073ffed303fc85624",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"558126e83a05c0729e17a1abf5ce849e02574096",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f8c6fee1c63eef8cf2d2a00fb10051686c7572ae",part:a},s("h1",{key:"23c4bb1c8ab00f4cf9a1447156c124f8ecd1f4b7",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"b1c469330757f22582e5c341c68adcd1aae3def3"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"46c92fe084337c67ce0bfedf11d89aca38bdc5e4",part:a},s("h1",{key:"ac06dc25f88d88d257ff56aec620d803a45d6344",class:"h4",part:r},"This payment was disputed"),s("p",{key:"30a26bceb37855460b8ae6ef54c20591900b5fcf"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(u=this.dispute)||void 0===u?void 0:u.lost)&&s("div",{key:"2320aa515a8112a27bdbd9e3f1b3a8daf2c1b28e",part:a},s("h1",{key:"32e0cfc6e8d27afe01194ab61ad342781ec31bf8",class:"h4",part:r},"This payment was disputed"),s("p",{key:"6a8b333f0be16d81ffc23609bcdcb8f70435d515"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){u(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"a558e22c9d41b40d01fd7317566b8e92b181396a",class:"dispute-response-root"},s("div",{key:"b5ccda631bb6b8d9587c97c5f72c73563b32a336",class:"row gy-3"},s("div",{key:"680cd57e4c08c919284911e03c31bf88e9ea27bd",class:"col-12"},s("h1",{key:"aa9cad23ec784d2d037a39f536f25547e52038fd",class:"h4",part:r},"Counter dispute")),s("div",{key:"39e1d9bb2cd0cca28841430139c301fd18863f81",class:"col-12"},this.currentStepComponent),s("div",{key:"3c87124fcab317c738b2ecfdaa454b008bd921fd",class:"col-12"},s("div",{key:"210414d3492ce600c34b8c93824c81cae12bb3b4",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as r}from"./p-CV0Pyo1O.js";import{J as s}from"./p-Bh5BNj74.js";import{d as a}from"./p-BzESNgd8.js";import{w as o}from"./p-B4vLfYnZ.js";import{S as i}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{c as p}from"./p-FsWkrvEF.js";import"./p-BQpbTebi.js";import"./p-BtiJJJwv.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";import"./p-DEx8fQeW.js";const e=class{constructor(r){t(this,r)}async componentWillLoad(){await o(),a(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.cardFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:r,account:s}){return this.cardFormElement.tokenize({clientId:t,paymentMethodMetadata:r,account:s})}render(){var t;return r(i,{key:"49cf4f202b0f327bd8ca4b4b3c892ae6df4a81f6"},r("card-form",{key:"480abf1238ed4b5bb1edd5362a432639fc9a7fb9",ref:t=>this.cardFormElement=t,maskCardNumber:null!==(t=this.maskCardNumber)&&void 0!==t?t:p.maskCardNumber}))}};export{e as justifi_card_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a,g as i}from"./p-CV0Pyo1O.js";import{F as r}from"./p-CLZcevBz.js";import{a3 as o,q as h,v as l,u as c,w as
|
|
1
|
+
import{r as t,c as e,h as s,H as a,g as i}from"./p-CV0Pyo1O.js";import{F as r}from"./p-CLZcevBz.js";import{a3 as o,q as h,v as l,u as c,w as f,x as n}from"./p-Bu7gdOaV.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.errorText="",this.inputHandler=()=>{},this.disabled=!1}render(){return s(a,{key:"da210da60328a5f8ee71a88b5fa8d4d67220239b",exportparts:"label,input,input-invalid"},s("div",{key:"f77db6dd47f4d9d64beace790a6d4fcd937c381c",class:"form-group d-flex flex-column"},s("div",{key:"ce25b3f690fed13cefa402d07f0afffc7c168f46",class:"d-flex align-items-start gap-2"},s("label",{key:"82d2d2cebee0b98849c90ab90a67cb56be8c239e",part:"label",class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"2593993d8ed2824c8ceaf0c7c9da194361edac25",helpText:this.helpText})),s("input",{key:"04d5a84a8c1a92b20ef26f47463b3a836027c8cb",type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?"input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onBlur:()=>this.formControlBlur.emit(),onChange:()=>this.errorText=""}),s(r,{key:"ccb9cc9b8e138f3f9e1ed96fe660f3d784de004f",errorText:this.errorText,name:this.name})))}get el(){return i(this)}},m=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.helpText="",this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("textarea");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?o:this.errorText?h:this.isFocused?l:this.disabled?c:f}render(){return s(a,{key:"c23d0ccb0e033048012cb1e1110f785a6270b163"},s("div",{key:"971db0fe032afae7ea976e0fa3845040a39aab28",class:"form-group d-flex flex-column"},s("label",{key:"b733fd61b5421aea811e3b9423d85c6c682493f0",part:n,class:"form-label",htmlFor:this.name},this.label),s("textarea",{key:"fa13e420ffdfa28d139418ebfa48bf9108710438",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled}),s("form-control-help-text",{key:"787e9ecc2833c827880c7a44c9a577c56f258375",helpText:this.helpText,name:this.name}),s("form-control-error-text",{key:"0f0915db581aee8672f6089d681596c9650b09c2",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_file_v2,m as form_control_textarea}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as d,p as s,c as l}from"./p-BLhz_ggG.js";import{f as c,a as i}from"./p-Bu7gdOaV.js";import{S as r}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{c as o,a as f}from"./p-Ds_P-dB8.js";import"./p-BFTU3MAI.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=o(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,account_holder:this.accountHolder,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}get paymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:"ecom"},{label:"ACH",value:"ach"},{label:"Card Present",value:"card_present"}]}render(){const e=Object.assign({},d);return a(r,{key:"fd6a6c240ed15d7d28d4d58db57085d9789e055c"},a("table-filters-menu",{key:"bc1524c293cc12f9d5976d1a7f888c4d35096b5a",params:e,clearParams:l,part:c},a("div",{key:"5180f595ac0d5c36e16fbcb8a6751c48ac88d166",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"2771ebb890c0a9f469e02f22523cb7cfb418d513",class:"p-2"},a("form-control-text",{key:"3c93cc523f8e5e2d9e63c1b6265e8e03c08377fa",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:i})),a("div",{key:"66e985568825d8992c4081f0d459807a7773fd49",class:"p-2"},a("form-control-text",{key:"63efc9b447218119d90a0601eb85528117197b42",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:i})),a("div",{key:"0147be1acda5af7b2ddd3ae76e61e0e2ec33ddcd",class:"p-2"},a("form-control-select",{key:"786ab3d3205d2feda8c11840a9c5429915f6ab4c",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:i})),a("div",{key:"e08cee43b808e3246989c277d1b5b870799b602d",class:"p-2"},a("form-control-select",{key:"b2edc5a654ad50a00ee8171f673c48a2f0b10699",name:"payment_mode",label:"Payment Mode",options:this.paymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:i})),a("div",{key:"9c393aed8075c68fa21e919fad3e66a75bf0801b",class:"p-2"},a("form-control-text",{key:"40967dca09780e59a096f117068c1f49dc7f68fb",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:i})),a("div",{key:"4c5177f35cd58c1e465f5750bdf92559119bbffa",class:"p-2"},a("form-control-text",{key:"4a905f81a07c1a10df4d72ba85657baad464cc87",name:"account_holder",label:"Account Holder",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.accountHolder||d.account_holder,disabled:!!this.accountHolder,part:i})),a("div",{key:"272f47c23883018d4fda9a215738b6b81764b99e",class:"p-2"},a("form-control-date",{key:"40f7c019ec33378c42b7093c9023eb80df7f787f",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:f(this.createdAfter,{showInputDateTime:!0})||f(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:i})),a("div",{key:"b714a400679ed1f4bcf96afe44e9100c6e52cef7",class:"p-2"},a("form-control-date",{key:"361a3d52c4f2c78aec9727cf6cfdd5b8d900bd3d",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:f(this.createdBefore,{showInputDateTime:!0})||f(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:i})))))}};export{n as justifi_payments_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-D9sqTVmd.js";import{a9 as d}from"./p-Bu7gdOaV.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"d87892b31a560cf5089bb8b94403deda25c75132"},a("div",{key:"a083b417adafd62cd32827014eb8566c8d8e431e",class:"row gy-3"},a("div",{key:"832973d1fd655582b7371dcb0906b5fed9d77727",class:"col-12"},a("h2",{key:"339e84637eb3e2080bc08c06379b436ed66cdbf3",class:"h5",part:d},"Additional Evidence")),a("div",{key:"a8228b7e9d8fd51f491f279975ba380a0f6f6029",class:"col-12"},a("form-control-textarea",{key:"966cd51de65c862e9371f2e013f9f666da5f049a",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"3c21b60e1da1d208c16b4e4003242660f28f42e5",class:"col-12"},a("form-control-file-v2",{key:"f767738c5ebf8a63d403d48e971042aabdf91224",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"b2b9de71bee44157e6f62cab9a759ca3a6fc7c91"},a("div",{key:"b54a10355e8b0dd0da69e9c07abaf4376f759f4b",class:"row gy-3"},a("div",{key:"ed43e475ed87fa9658060f403187a063bec1813c",class:"col-12"},a("h2",{key:"48e9d7955c066771d8c47b55abf4fc2498bcc11a",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"783da1c2a786ee85f412303583a778dd81331e8a",class:"col-12"},a("form-control-textarea",{key:"04267a5b01060f577eb88810c83013e6cb2bc437",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"340db58f52fa708a40a1548b84411174f1b7ca85",class:"col-12"},a("form-control-textarea",{key:"a8dafe6142a2ce7409d7d7dd60637e819bb99b9e",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"7ff48beda50edb31c80d0bbe5fe7948ce214a493",class:"col-12"},a("form-control-file-v2",{key:"2f3780f2036026f49db380d5201fc6a46d4b15c6",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"4217dd2605586a82ee34515e6c9b5a3ab6358b55"},a("div",{key:"42eb8a48d1161d329bddf574c863c92376a4bbc9",class:"row gy-3"},a("div",{key:"4d8d1267035ed1e81e6050d7e648ff80d369365d",class:"col-12"},a("h2",{key:"923c89d2959dd09fdbb60cfbca0d0021697dc5b8",class:"h5",part:d},"Customer Details")),a("div",{key:"5b3daa86ad6ce05babf3efd0c3c4f3a3264b4c6c",class:"col-12"},a("form-control-text",{key:"bd6eae36d75ec77e8d652686f2f070bbead4e385",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"3f8f8ff8fcb8a8e41053e3f9b55152296cb91d3e",class:"col-12"},a("form-control-text",{key:"ddf390a5e37e99b8f99b7673b6b07f3851a759f4",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"eed293a2acc46219bd33974f93affb3ca977fc57",class:"col-12"},a("form-control-textarea",{key:"4f5e5b9cfc9aefe48c2c85bba3a3a308215c36b9",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"0ccfa871557435a96350e8ace59179611c01dc2c",class:"col-12"},a("form-control-file-v2",{key:"e9d35062a5011f4e72d60e85855efb0d7ceed8c1",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"cb184b84ccc36bd51242dcb57c96ba2d85567e4a",class:"col-12"},a("form-control-file-v2",{key:"b7d1d427468cd0744001102e2c704e8ad65577b6",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"805b160927f30729b321ffbafc15fe78fed732c9"},a("div",{key:"fcc99471b08ea21905c1246849ec41e05194834f",class:"row gy-3"},a("div",{key:"f7259723ec39b5ae09aaa552a99f3a8a15b85fd8",class:"col-12"},a("h2",{key:"5f0719c624bce5542364120568079fb6921c7d6f",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"718c50ebae8b6ca9c146d81f261dad5007945a33",class:"col-12"},a("form-control-text",{key:"090a5f0e4ca359af300f655ad94296af1a28eef0",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"217b8e9b896412a1e74d138c20d6cc42760e7a54",class:"col-12"},a("form-control-textarea",{key:"d9ba9a25ccaa5848f17ec8f1dfde222c29624e06",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"eb26362fb100e775339b4a64959521a1b7cad394",class:"col-12"},a("form-control-file-v2",{key:"5753787dd59e736a7a2dea84268d93983cfdeae4",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"1de8dc7fafbd3dba15344a817fd2c008929ab0bc"},a("div",{key:"dda3c4b88713e0e1b9fe25c2a4fe2d015889f2b3",class:"row gy-3"},a("div",{key:"1638ff98ca047509306f9387e68ba83c9be5c885",class:"col-12"},a("h2",{key:"9ee705b8558a88bd4eebe2448e2da655fbcf9bf3",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"71a392aa19784a1e25654791544fab6e9fd482a6",class:"col-12"},a("form-control-text",{key:"b2ef47161c0c73f010461f326f39f60efb140ae8",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"0341ecbd1404b29e223d508e937752ed67a5f9e2",class:"col-12"},a("form-control-file-v2",{key:"00d8fd3c9bfded6f20ae8568aca1fd21564649df",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"3f2d1c2f4b0595e922712f8754ae1022b2d19261"},a("div",{key:"0ab14085510225a4d00b352014ea72f4dc0a059a",class:"row gy-3"},a("div",{key:"12271b714bf3e6b6756274674e3413018124fa4c",class:"col-12"},a("h2",{key:"9b6175bf1eb88788b909be3f7a46337a75856306",class:"h5",part:d},"Product & Service Details")),a("div",{key:"912e647000393b9146329e7d4cca78ee15837621",class:"col-12"},a("form-control-text",{key:"7b365315a58fdfa65fa7e1e6f009dc5c70c17d95",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"03d48b21fb83a4a4b07ed6f0f7b6f08a32c10ce5",class:"col-12"},a("form-control-date",{key:"fbd7c448acc69aa0012999f90d3b38f9374af933",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"74683fc2825cffa9403313b21d52a4ddb76db12e",class:"col-12"},a("form-control-file-v2",{key:"7d3e5f2f96375d884a98e207c22d2b3115ed6e1b",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"828ac1997382fa491920b9439099959ae5376c81"},a("div",{key:"8d0453e4c2ec424a2010cfd01885cb4a03020d93",class:"row gy-3"},a("div",{key:"d15021ea6df4b3939d4564a84951ebadb50cc7cd",class:"col-12"},a("h2",{key:"632eafab4924af0d433f28a3329877b98376ea27",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"cb55f0f106e68e9af4057a4496811db991f487d0",class:"col-12"},a("form-control-textarea",{key:"1fdca1aea95757a0dac55b338355eeffd351c6cb",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"6f6c35c4626a764e4119dc253aded2985ac6ffbc",class:"col-12"},a("form-control-textarea",{key:"6c0fcba48cad9f8c3cc9ed6c35d6b0e1301f9c35",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"1bf52c92c53313ab7542bfc1b2ed607e9d5db032",class:"col-12"},a("form-control-file-v2",{key:"67b266e26d5568e3370b3f8aaad2c0d6450f67f6",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"8994ee85c8a31fc709a0fa396d97e4da576e57c3",class:"col-12"},a("form-control-file-v2",{key:"c468b92349b6a92f02b6eef0dc06c71dfc924c4e",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"0d7695711048ad14596ba44e364b45e3aa3d1e39"},a("div",{key:"e6911e35f66ef8aaa591f54e389d67c202af8172",class:"row gy-3"},a("div",{key:"d59ab2fe6318a27c4b38650e4e9d07b9c851041f",class:"col-12"},a("h2",{key:"b8a8634fe9dcf11c332dab0c1736732e579aeb59",class:"h5",part:d},"Shipping Details")),a("div",{key:"5170b37a386805e194d8cf7c769ffdbac8db8fa2",class:"col-12"},a("form-control-text",{key:"7bc3f59737fa075134e2bc476fa26d79ddc4e26b",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"ef41052d0eec68b02d04638ce7cfdbc1477c16eb",class:"col-12"},a("form-control-text",{key:"b88d31bed47cdf09e04a29122c1adf955bdc4d25",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"743dea4d8f59e62103403fa58936ca86d7bbf216",class:"col-12"},a("form-control-date",{key:"4be255a38f91f9bf758428d780649d2775d22153",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"7b274a743a9ca8f3cb7b86facbe12b723b8695e4",class:"col-12"},a("form-control-textarea",{key:"833a03ac489cfa6fe6991e14a079b104b7b86ddc",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"a1363e8014fe90442e1d0f6820bf2b9cf9966c90",class:"col-12"},a("form-control-file-v2",{key:"beb99c4b9e898265f8a904984172fb1a6a52cb49",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as additional_statement,h as cancellation_policy,v as customer_details,m as duplicate_charge,_ as electronic_evidence,g as product_or_service,j as refund_policy,T as shipping_details}
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-D9sqTVmd.js";import{a9 as d}from"./p-Bu7gdOaV.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"8dff14b5f29b28a18901b1eff60b3855d9094013"},a("div",{key:"405d549adeb5150fd7ec834b699f83588892390e",class:"row gy-3"},a("div",{key:"a13e743d61fe9329e74b3a09712921cec6e253c2",class:"col-12"},a("h2",{key:"fbe30e865b8dbece987480e3ac804c3eabbf0746",class:"h5",part:d},"Additional Evidence")),a("div",{key:"921aa04960a0c30d9733bc0db71dee4fcd78af55",class:"col-12"},a("form-control-textarea",{key:"cc4a0136fa728cce0390e4d9dd456a7ad9095244",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"0b35f4914c18432ca326a01c002710690c15d685",class:"col-12"},a("form-control-file-v2",{key:"8c6a32df62ea4c217fad64fa1283033a85885076",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"bd649d7bc48208dec588f5677f2c87897bc43b8b"},a("div",{key:"63263cfe2db3bb2d6f53ddf3c01124a6f70e4994",class:"row gy-3"},a("div",{key:"457bc4393385a88d9d815bd590425c65ebf63d7b",class:"col-12"},a("h2",{key:"66eadc2605b0541fca47cb426c8cf5f373b003f8",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"dcdf62ecc017a197714207372104a355a42561f2",class:"col-12"},a("form-control-textarea",{key:"06e2d122d0cb677e86fdf697d48d11db72c3a360",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"e4b7de1e1820f7c59c7465784868ce4823244285",class:"col-12"},a("form-control-textarea",{key:"f57c5bd832f5bdf946341efe3ec0c594ebc27108",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"61e019cea906e3cb93952cf75fb01a6b9fc9cc66",class:"col-12"},a("form-control-file-v2",{key:"62e0f7432ae9445aa9b19b467323f9ed7d9161f6",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"66ed4497457aab5cd214c356b23067eb5ab977b9"},a("div",{key:"00b2241580f26aed52fb8c0dca06ffb8e07c2303",class:"row gy-3"},a("div",{key:"23fd971d66b3e753df7ec5e20b8155865307261f",class:"col-12"},a("h2",{key:"df3880ae4959e4fe6a5fa2e67287e4bb40b6fc75",class:"h5",part:d},"Customer Details")),a("div",{key:"1bd1010ba8c9bbdb4390e3d953a8cfc798a6745c",class:"col-12"},a("form-control-text",{key:"170576aa6fbda10dcb3c3928cd8894df1f201223",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"39a99685a01018afa466fa214fd9f217b5682200",class:"col-12"},a("form-control-text",{key:"8c99018cf0fe0c900512874be0261fb32578c803",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"6db37be2d5b9bef95c7e5e00a879847cbc89a9db",class:"col-12"},a("form-control-textarea",{key:"48de189acf3dad170e1727b950cee28278eeabc9",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"9a85ca65d2a80c54617034af5350e7301dd475f5",class:"col-12"},a("form-control-file-v2",{key:"0f6f2859e79998071e079bbb69fdb1b12e5b8c5d",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"8067bc3d834825f309fc3ed994b683233e2e9e90",class:"col-12"},a("form-control-file-v2",{key:"97105708f4f6e668a6e62cb2f516969c79bedef7",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"40c441cca0667d42a17b2d030cd11499b5fd0971"},a("div",{key:"9187708d76c4a631c8741e1ec60684fdb3b7c65f",class:"row gy-3"},a("div",{key:"9a388c46052814718253a4333da1a3e010316e14",class:"col-12"},a("h2",{key:"677c93c72112ac96e41e43080fba1d2750bc71de",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"475e5bd708aed12d866560dd12ddde92b8643f82",class:"col-12"},a("form-control-text",{key:"a47b1642e9ca1475d6165403d5589f874908b1c0",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"75890d7ba8e0e0f4117477f0c52f3af0a867f3b3",class:"col-12"},a("form-control-textarea",{key:"c86ae32a39e1ed3be449eb91efa8039ec78b18eb",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"81d2eb27f4350e57cc3e89170839816166339731",class:"col-12"},a("form-control-file-v2",{key:"a7456a1a8f3363d05361667d5d9a8e99c6581bf1",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"592472282564a406e318b5639e1f8e3f1aeb55bd"},a("div",{key:"0e49a34f48905ede20c17d4e2a8e529a3aaad2b9",class:"row gy-3"},a("div",{key:"9f15e709a8a31b6c2cf3ca43d543090a8dd8ca5d",class:"col-12"},a("h2",{key:"3223ed0c95dd5d08b5d8a481dfdc57d65ee3ea2f",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"f82434ae90705238088c1e01625c1d674337f823",class:"col-12"},a("form-control-text",{key:"81586970861191e628ba6d3d55d792081f868193",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"1ec47d1e437926e010e19f0352c6c237cb61aeaa",class:"col-12"},a("form-control-file-v2",{key:"8ee1599fc2142dd269ccddd08ef60cb1a337122a",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"466646e97a89d70914e592693918d5ea524504a8"},a("div",{key:"78f02a847c7474733400f2d4e8a6712c9689402e",class:"row gy-3"},a("div",{key:"0367c4de7453b26becfc2edfe7f5899e6b30f554",class:"col-12"},a("h2",{key:"10490c7e30a1ec7c23cd47f80a905e21bb874b38",class:"h5",part:d},"Product & Service Details")),a("div",{key:"a18c64c22a5efe19c5b6603d0497a17a54ac6fa8",class:"col-12"},a("form-control-text",{key:"7d35738871259b0b0bf83cbb6014062d09299a21",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"24a337727ad90599b1368c2c3fff6cea4c40d172",class:"col-12"},a("form-control-date",{key:"5222da0eed927c2bc61baba87d8c004bfbf674e0",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"1f422eea9d59d4d01d333e25e2003ecb3954656d",class:"col-12"},a("form-control-file-v2",{key:"8df9a14fc7311e1c47ca06c9a3a32ac09a291d4b",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"ec311e40104fb629ea148d4bd4e3b75b7384c271"},a("div",{key:"b520aca75b00bf6f698c551cd51efcd8ae8cddca",class:"row gy-3"},a("div",{key:"98c7a3ae28e9b9d8de6e9f860b26224ff83e5752",class:"col-12"},a("h2",{key:"334c7e259e7e8ba1202252e6135e1ff960ea34d4",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"bb6783c720ca99ae968580610a3af79a86bf6dc3",class:"col-12"},a("form-control-textarea",{key:"63fbdface8c0339b9989ddb2f9f0af427845118c",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"0a138ff7a02788003437e0d7f07dbe59e4cb05a7",class:"col-12"},a("form-control-textarea",{key:"9f2518ad7955096c93c74fd856514b68ef7d192a",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"18922e3843fa6b445b3aaa384b341aae5b2b2443",class:"col-12"},a("form-control-file-v2",{key:"0f34e5dd3901eb74bfd20d93eb9fe6087d808b5c",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"42a5952ae76b7468bde8d2c3edd8bcb0bfde5cd6",class:"col-12"},a("form-control-file-v2",{key:"ad4297e944e1ac01f0f290595d70d12a9a05a93a",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"6673b30e9af36cb2e560d0653776a42ab1777c22"},a("div",{key:"f687e69208f470a40699f870c4d09b04a0487faa",class:"row gy-3"},a("div",{key:"ffb1b65e29b6b912cefe862a2139e57f3d81087b",class:"col-12"},a("h2",{key:"2cea703b6f228aa127bbdb6f8c97f3f79e05d351",class:"h5",part:d},"Shipping Details")),a("div",{key:"fe2ae3034571b5ed2a8e5678ae5c32d84f750835",class:"col-12"},a("form-control-text",{key:"3b5c43c4b8baa62a756cc2dd7edb54fc0c118ede",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"807d7e0860265cb629083bb026e812e4d2ac06ff",class:"col-12"},a("form-control-text",{key:"5367ef8b37625d6e3ca42eb68eda5e142ff5d783",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"25e85572762af0d9964849d276dd18c5b8905d6e",class:"col-12"},a("form-control-date",{key:"821d218825643775282742b0c63f8c803a6c47e5",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"376e527d339217b897f02f0de111ea9377539769",class:"col-12"},a("form-control-textarea",{key:"f0130e6c0a7ca54e20f6406fbe6276fa8cffbf61",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"74699370d18065f453e68449749d5481772c4c08",class:"col-12"},a("form-control-file-v2",{key:"5d3f0d1a199b563c9ed433cb971f541a4cb54083",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as additional_statement,h as cancellation_policy,v as customer_details,m as duplicate_charge,_ as electronic_evidence,g as product_or_service,j as refund_policy,T as shipping_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-MLQyjvrV.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{e as i,C as r,b as o}from"./p-Dqxyi-uK.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as h,a as p}from"./p-BhpaUYtS.js";import{J as c}from"./p-Bh5BNj74.js";import{d}from"./p-BzESNgd8.js";import{S as m}from"./p-05AWudQe.js";import{T as f,a as l,b as u,c as y,d as b,e as g,f as v,g as j,h as _,i as k,j as w,k as C,l as T}from"./p-DZr0wLGh.js";import{T as P}from"./p-CZfYo5-1.js";import{M as D}from"./p-Bi_GCMx0.js";import{a as B}from"./p-Ds_P-dB8.js";import{a6 as S,a7 as O}from"./p-Bu7gdOaV.js";import{o as x,g as A}from"./p-BLhz_ggG.js";import"./p-BtiJJJwv.js";import"./p-BQpbTebi.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";import"./p-Dz8KJn2G.js";const M={created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each payment was made"},"Date"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each payment"},"Amount"),status:()=>t("th",{part:S,scope:"col",title:"The current status of each payment"},"Status"),payment_type:()=>t("th",{part:S,scope:"col",title:"The type of each payment"},"Type"),description:()=>t("th",{part:S,scope:"col",title:"The payment description, if you provided one"},"Description"),payers_name:()=>t("th",{part:S,scope:"col",title:"The name associated with the payment method"},"Account Holder"),last_four_digits:()=>t("th",{part:S,scope:"col",title:"The brand and last 4 digits of the payment method"},"Payment Method"),card_brand:()=>t("th",{part:S,scope:"col",title:"The brand of the payment method"},"Card Brand")},E={created_at:(e,a)=>t("td",{part:O(a)},t("div",{class:"fw-bold"},B(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},B(e.created_at,{showTime:!0}))),amount:(e,a)=>t("td",{part:O(a)},e.formattedPaymentAmount(e.amount)),status:(e,a)=>t("td",{part:O(a)},D(e.status)),payment_type:(e,a)=>t("td",{part:O(a)},e.payment_type),description:(e,a)=>t("td",{part:O(a)},e.description),payers_name:(e,a)=>t("td",{part:O(a)},e.payers_name),last_four_digits:(e,a)=>t("td",{part:O(a)},e.last_four_digits),card_brand:(e,a)=>{var s,i,r;return t("td",{part:O(a)},(r=(null===(s=e.payment_method.card)||void 0===s?void 0:s.brand)||(null===(i=e.payment_method.bank_account)||void 0===i?void 0:i.brand))?{visa:"VISA",mastercard:"Mastercard",american_express:"American Express",discover:"Discover",diners_club:"Diners Club",jcb:"JCB",china_unionpay:"China UnionPay",unknown:"Unknown"}[r.toLowerCase()]||r:"N/A")}},L=class{constructor(t){e(this,t),this.errorEvent=a(this,"error-event",7),this.clickEvent=a(this,"click-event",7),this.errorMessage=null,this.payments=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payment_type,description,payers_name,last_four_digits,card_brand",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.payments.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:a})}}componentWillLoad(){d(),this.analytics=new c(this),this.paymentsTable=new f(this.payments,this.columns,M,E),this.initializeGetPayments(),x("set",(()=>{this.pagingParams={},this.errorMessage=""})),x("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}updateOnPropChange(){this.fetchData()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:n,final:c})=>{var d,m;try{const c=await a.fetchPayments(t,e,s);if(c.error)return n({error:p(c.error),code:h(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},c.page_info);o({payments:(null===(d=c.data)||void 0===d?void 0:d.map((t=>new i(t))))||[],pagingInfo:t})}}catch(t){const e=h(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:r.ERROR})}finally{c()}})({id:this.accountId,authToken:this.authToken,service:new s}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}fetchData(){this.getPayments&&(this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:e})=>{this.payments=t,this.paging=e,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:a})},final:()=>{this.loading=!1}}))}get paymentParams(){const t=A();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(m,{key:"fb137fb2b6a63b506fcdbb81104100b099d2e8a6"},t(l,{key:"7a40c6312ae2603179973341dee87f722879fcf4"},t(u,{key:"a9ea88cafb2855a684bd1b33293e4587d809937e"},t(y,{key:"9d706bb769ccceb1cdfae4fcb4e790a2df54d22f"},t(b,{key:"1d9fdcd72297ca3ea68303a64088a34e07921b3b"},this.paymentsTable.columnData.map((t=>t)))),t(g,{key:"aa38c971f05ed8acf1fba3f8f8c528803656fe56"},t(v,{key:"e614cce077c4f2f44d7bd1be61f316e5b1607a26",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),t(j,{key:"90dbc6b25ca32387c148f3a1648780c187f3fde0",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),t(_,{key:"7098567bc972068166e5ac34ccc89bd6c0be55a4",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((e,a)=>t(k,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"906207a8e9913fd0ecffa03197e38ae8bb032809"},t(C,{key:"6ec53fc987659a181f9851052d472c634dbc9ef9"},t(T,{key:"f2247b1fa30f7327fd876ea4030d25243eaa849a",colSpan:this.paymentsTable.columnData.length},t("pagination-menu",{key:"dbff68af085c14a1adb8d800b2cf1acaa1d02a2b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{L as justifi_payments_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as a,q as s,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-CAVi_ne1.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,y=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"09ac1ea8407e3bf2df079f1188a7668e7d7b318e"},n("input",{key:"18b34d0fae7636e7640dd35a73ce9b369007afd5",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var v,x,k={exports:{}},z=f((v||(v=1,x=k,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){v("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),x.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){k("log",e,n,b(e))}function y(e,n){k("info",e,n,b(e))}function v(e,n){k("warn",e,n,!0)}function k(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(L),T(W),f("onResized",L)}),L,"init")}function t(e){var n=Number(u[W]["max"+e]),t=Number(u[W]["min"+e]),i=e.toLowerCase(),o=Number(L[i]);p(W,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(W,"Set "+i+" to min value")),o>n&&(o=n,p(W,"Set "+i+" to max value")),L[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(W),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(L.iframe):{x:0,y:0},t={x:Number(L.width)+n.x,y:Number(L.height)+n.y};p(W,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(W,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):v(W,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",s)?O():T(W)}function l(e){var n={};if(0===Number(L.width)&&0===Number(L.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:L.width,y:L.height};f(e,{iframe:L.iframe,screenX:Number(n.x),screenY:Number(n.y),type:L.type})}function f(e,n){return S(W,e,n)}var m,b,x,k,z,I,A=e.data,L={},W=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(k=(x=A.slice(13).split(":"))[1]?parseInt(x[1],10):0,z=u[x[0]]&&u[x[0]].iframe,I=getComputedStyle(z),L={iframe:z,id:x[0],height:k+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:x[2],type:x[3]},u[W=L.id]&&(u[W].loaded=!0),(b=L.type in{true:1,false:1,undefined:1})&&p(W,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,v(L.type+" No settings for "+e+". Message was: "+A)),n}(W)&&(p(W,"Received: "+A),m=!0,null===L.iframe&&(v(W,"IFrame ("+L.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[W]&&u[W].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(W,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(W,"Checking connection is from: "+(n=u[W]&&u[W].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+L.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[W]&&u[W].firstRun&&u[W]&&(u[W].firstRun=!1),L.type){case"close":F(L.iframe);break;case"message":m=i(6),p(W,"onMessage passed: {iframe: "+L.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:L.iframe,message:JSON.parse(m)}),p(W,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[W].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[W]&&u[W].iframe,W),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=W;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[W]&&u[W].stopPageInfo&&(u[W].stopPageInfo(),delete u[W].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(W,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(W,"--")):window.top===window.self?p(W,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(W,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(L);break;case"init":n(),f("onInit",L.iframe);break;default:0===Number(L.width)&&0===Number(L.height)?v("Unsupported message received ("+L.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):y(W,"Ignored: "+A)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function I(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){v(e)}S(t,"onClosed",t),p(t,"--"),I(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),L(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):v(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,v(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],v(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?v(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),s=N(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:F.bind(null,u[l].iframe),removeListeners:I.bind(null,u[l].iframe),resize:E.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function L(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function W(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),L((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),L((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",W),w(document,"-webkit-visibilitychange",W),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&v("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),k.exports));class S{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new S(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){return`${this.iframeOrigin}?${this.urlParams}`}render(){return n(t,{key:"7116bdbe3d3a69fac28965fa011d016d35ec5025",class:"form-group d-flex flex-column"},n("div",{key:"e784c6f81476eb282a07714d5b789f41342c4a2a",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"d0b4341c92a4c957ec4a03485357d6cef7f22426",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"9be8449ee6b3d37aa3607ff31d5649c73e3f4206",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"093b48e69a6e8a15a4fd9877424bb0c9a3f58ad7",id:this.inputId,name:this.inputId,src:this.iframeSrc,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(h,{key:"f5897f95387e6400f35c997b2921a60fb5f4f11b",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{w as form_alert,y as hidden_input,I as iframe_input}
|
|
1
|
+
import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as s,q as a,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-BQpbTebi.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,v=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?s:this.errorText?a:this.isFocused?c:d}render(){return n(t,{key:"09ac1ea8407e3bf2df079f1188a7668e7d7b318e"},n("input",{key:"18b34d0fae7636e7640dd35a73ce9b369007afd5",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var y,k,x={exports:{}},z=f((y||(y=1,k=x,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,s="[iFrameSizer]",a=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){y("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){L(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),k.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function y(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),R((function(){O(W),T(A),f("onResized",W)}),W,"init")}function t(e){var n=Number(u[A]["max"+e]),t=Number(u[A]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(A,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(A,"Set "+i+" to min value")),o>n&&(o=n,p(A,"Set "+i+" to max value")),W[i]=""+o}function i(e){return L.slice(L.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;N("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return F(A),{x:Math.floor(Number(n.left)+Number(a.x)),y:Math.floor(Number(n.top)+Number(a.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(A,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(a=t,d(),p(A,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):y(A,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",a)?C():T(A)}function l(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};f(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function f(e,n){return I(A,e,n)}var m,b,k,x,z,S,L=e.data,W={},A=null;"[iFrameResizerChild]Ready"===L?function(){for(var e in u)N("iFrame requested init",E(e),u[e].iframe,e)}():s===(""+L).slice(0,13)&&L.slice(13).split(":")[0]in u?(x=(k=L.slice(13).split(":"))[1]?parseInt(k[1],10):0,z=u[k[0]]&&u[k[0]].iframe,S=getComputedStyle(z),W={iframe:z,id:k[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(S)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(S),width:k[2],type:k[3]},u[A=W.id]&&(u[A].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(A,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,y(W.type+" No settings for "+e+". Message was: "+L)),n}(A)&&(p(A,"Received: "+L),m=!0,null===W.iframe&&(y(A,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[A]&&u[A].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(A,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(A,"Checking connection is from: "+(n=u[A]&&u[A].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[A]&&u[A].firstRun&&u[A]&&(u[A].firstRun=!1),W.type){case"close":M(W.iframe);break;case"message":m=i(6),p(A,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(A,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[A].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[A]&&u[A].iframe,A),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=A;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[A]&&u[A].stopPageInfo&&(u[A].stopPageInfo(),delete u[A].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",s=decodeURIComponent(t),(h=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(h),p(A,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),a={x:e.x,y:e.y},d(),p(A,"--")):window.top===window.self?p(A,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(A,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(W);break;case"init":n(),f("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?y("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,s,h,m}())):v(A,"Ignored: "+L)}function I(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function S(e){delete u[e.id]}function M(e){var t=e.id;if(!1!==I(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){y(e)}I(t,"onClosed",t),p(t,"--"),S(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function F(n){null===a&&p(n,"Get page position: "+(a={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+a.y)}function T(e){null!==a&&(window.scrollTo(a.x,a.y),p(e,"Set page position: "+a.x+","+a.y),C())}function C(){a=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),F(e.id),R((function(){O(e),N("reset","reset",e.iframe,e.id)}),e,"reset")}function O(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&N("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function R(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function N(e,n,t,i,o){var r,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,r)):y(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,y(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function E(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function L(t,r){function s(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],y(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?y(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(s,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),a=E(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&M(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){N("iFrame.onload",a,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),N("init",a,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:M.bind(null,u[l].iframe),removeListeners:S.bind(null,u[l].iframe),resize:N.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function W(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function A(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&N(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),L(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",A),w(document,"-webkit-visibilitychange",A),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&y("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),x.exports));class I{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const S=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.maskCardNumber=!1,this.hasLoaded=!1,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("loaded"===n&&(this.hasLoaded=!0,this.sendMaskCardNumber()),"focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}maskCardNumberChanged(){this.hasLoaded&&this.sendMaskCardNumber()}componentDidLoad(){const e=document.createElement("iframe");e.setAttribute("name",this.inputId),e.setAttribute("width","100%"),e.style.border="0",e.style.display="block",e.style.width="100%",e.style.boxSizing="border-box",e.addEventListener("load",(()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},e)})),this.iframeElement=e,this.initializeFrameCommunicationService(),e.setAttribute("src",this.iframeSrc),this.mountIframe()}connectedCallback(){var e;this.iframeElement&&!this.iframeElement.isConnected&&(null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent),this.mountIframe())}mountIframe(){const e=this.el.getRootNode(),n=11===e.nodeType&&e.host?e.host:null,t=this.iframeElement;if(n){if(n.getRootNode()!==document&&console.warn(`[justifi] hosted field "${this.inputId}" is inside a nested shadow tree; window.frames cannot reach it`),!this.wrapperElement.querySelector(`slot[name="${this.inputId}"]`)){const e=document.createElement("slot");e.name=this.inputId,this.wrapperElement.appendChild(e)}t.setAttribute("slot",this.inputId),n.appendChild(t)}else t.removeAttribute("slot"),this.wrapperElement.appendChild(t)}componentDidRender(){this.iframeElement&&this.iframeElement.getAttribute("src")!==this.renderedSrc&&this.iframeElement.setAttribute("src",this.renderedSrc)}disconnectedCallback(){var e,n,t,i,o;this.el.isConnected||(null===(e=this.frameService)||void 0===e||e.removeMessageListener(this.dispatchMessageEvent),null===(i=null===(t=null===(n=this.iframeElement)||void 0===n?void 0:n.iFrameResizer)||void 0===t?void 0:t.removeListeners)||void 0===i||i.call(t),null===(o=this.iframeElement)||void 0===o||o.remove())}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new I(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}sendMaskCardNumber(){var e;null===(e=this.frameService)||void 0===e||e.postMessage("setMaskCardNumber",{enabled:!!this.maskCardNumber})}get part(){return this.isFocused&&!this.isValid?s:this.isValid?this.isFocused?c:d:a}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){const e=this.iframeOrigin.includes("?")?"&":"?";return`${this.iframeOrigin}${e}${this.urlParams}`}render(){return this.renderedSrc=this.iframeSrc,n(t,{key:"4e4844f10dec9ddcb6f3f4ccaa5ffe7f254f1a33",class:"form-group d-flex flex-column"},n("div",{key:"65cf8392e8e5925560a2bfa80fb15209ec14e267",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"c33c671e062b2d91a6c7dcdc938faa973a320ac8",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"dd294ff2efac3747af3ec6baa73fc74aaad8b46b",ref:e=>this.wrapperElement=e,class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})}),n(h,{key:"a6a65814a1ba0fcb2ec4eff7f6b334a134763a8e",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}static get watchers(){return{maskCardNumber:["maskCardNumberChanged"]}}};export{w as form_alert,v as hidden_input,S as iframe_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-
|
|
1
|
+
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-Bh5BNj74.js";import{d as o}from"./p-BzESNgd8.js";import{T as c}from"./p-BKtKrQzN.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as d,a as p}from"./p-BhpaUYtS.js";import{m,S as u}from"./p-hdPjEOdB.js";import{S as l}from"./p-05AWudQe.js";import{T as f,a as b,b as v,c as g,d as j,e as k,f as y,g as T,h as w,i as _,j as C,k as S,l as D}from"./p-DZr0wLGh.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as B}from"./p-Dz8KJn2G.js";import{a6 as A,a7 as x}from"./p-Bu7gdOaV.js";import{j as I}from"./p-Ds_P-dB8.js";import{o as E,g as z}from"./p-BzjgvHHT.js";import"./p-BQpbTebi.js";import"./p-BtiJJJwv.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";const N={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},G={nickname:(e,i)=>t("td",{part:x(i)},e.nickname),model_name:(e,i)=>t("td",{part:x(i)},e.model_name),id:(e,i)=>t("td",{part:x(i)},e.id),provider:(e,i)=>t("td",{part:x(i)},I(e.provider)),provider_serial_number:(e,i)=>t("td",{part:x(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:x(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:x(i)},e.sub_account_name),status:(e,i)=>t("td",{part:x(i)},t(B,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},J=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,N,G),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),E("set",(()=>{this.pagingParams={}})),E("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=z();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"7aff8b07dcd19216c714f2318c1af5dbebc54147"},t(b,{key:"7daec7f4553f687b3ebbeb7d561fbf904049841b"},t(v,{key:"2f67e873333800bdd78d8c60f9db218c349097d0"},t(g,{key:"61499a69253f0add24f5e60c385b14fc3e6ba90f"},t(j,{key:"fcd5d3287d6dd3dbf4e20837ca06d9f6dcc74a16"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"664b70934aae39f8ccceeaaf012e1933a4c27c95"},t(y,{key:"3d5e79192be7a6a8e2611d9ac7d551e15a4a4207",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(T,{key:"60d4263bd934af2c6d204a3d2f0aee6639043d80",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(w,{key:"2d3340153f20d7a057e31f3eb2b570ec1d7c4e9f",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(_,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"b893b1cd12d3c0440b1c5cb015503aa8309a84e1"},t(S,{key:"532462ef72bc8c9fbbf8cae69c1f7ebd60b403b4"},t(D,{key:"c18d2a8f05cbc17f7dc21a18a814a7eb8c83d6ea",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"fd1aef3373787dfb79f517a69e2d771d61d5dee3",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{J as justifi_terminals_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as s,h as t,H as a}from"./p-CV0Pyo1O.js";import{r as e}from"./p-Bu7gdOaV.js";const r=class{constructor(t){i(this,t),this.radioClick=s(this,"radio-click",7),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return t(a,{key:"dde5efa79bdc1d9a7367474308d1a5955e134c9b"},t("div",{key:"0da16408e69f19e68d65031ab0579b3d1c972af8",class:`radio-list-item p-3 ${this.class||""}`,part:e,onClick:this.handleClick,hidden:this.hidden},t("form-control-radio",{key:"56ea84930e14226280818def685cfc8148f31c5a",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}};export{r as radio_list_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as a,h as t}from"./p-CV0Pyo1O.js";import{B as s,C as d,D as c}from"./p-Bu7gdOaV.js";const i=class{constructor(t){e(this,t),this.selectedQuantityChange=a(this,"selectedQuantityChange",7),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return t("div",{key:"38cd0765871fd366af0adc09910add544ecefb93",class:"rounded shadow-sm card p-2",part:c},t("div",{key:"5e367d97287d3fef28e4f24d78384c6d02ab1540",class:"d-flex gap-3"},t("div",{key:"e031d923a5a01665a7f1a37e1d7df529ba51b0b2",class:"d-flex align-items-center"},t("img",{key:"b520afcdbd4946105324410499aa4ede31da1a72",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:s})),t("div",{key:"5bdb4760b16241d9cd76e70245a19555dce6f723",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},t("div",{key:"598bab6407c43f94896a1782b60f048696361113",class:"row"},t("div",{key:"c340942cadb9dc0411f7d7815f1ccc9df75cbfbc",class:"col-6 d-flex gap-2"},this.modelName,t("form-control-tooltip",{key:"1f0a3deeb00abcf3e3cd01fecdeb0435f091cbac",helpText:this.description})),t("div",{key:"df8b8567640a567a4b8f238a21c6ed57d60e444a",class:"col-6 d-flex justify-content-end align-items-center"},t("button",{key:"baf59d5ede260d44a8ebfaaf95d8d134f3ef60da",class:"p-0 minus btn",onClick:this.removeUnit,part:d},"-"),t("div",{key:"cd3f528e9a56385cd17b23eb85185c51cd0dff67",class:"w-25 text-center"},this.selectedQuantity),t("button",{key:"6a55baa1403892f79600ff4ee85734c14a5f2ecc",class:"p-0 plus btn",onClick:this.addUnit,part:d},"+"))))))}};export{i as terminal_quantity_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as i}from"./p-CV0Pyo1O.js";import{P as s}from"./p-D42DvqTW.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{k as a,C as d,b as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as o,a as r}from"./p-BhpaUYtS.js";import{h,b as l,d as b}from"./p-Ds_P-dB8.js";import{a as f,b as n,D as p,c as v,C as u,E as y}from"./p-Bh6Q8AqQ.js";import{J as m}from"./p-Bh5BNj74.js";import{m as k,M as j}from"./p-Bxc0NRj8.js";import{d as g}from"./p-BzESNgd8.js";import{B as w}from"./p-CU2Dwa94.js";import{S as C}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-eBK-iWrz.js";import{a as B,B as D}from"./p-Dz8KJn2G.js";import"./p-BtiJJJwv.js";import"./p-BQpbTebi.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";const T=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(x,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(x,{width:"70%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"100%"})),e("div",{class:"col-12"},e(x,{width:"80%"}))),S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.recordClickEvent=i(this,"record-click-event",7),this.enableRecordClick=!1,this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i})}})},this.handleRecordClick=e=>{this.recordClickEvent.emit({id:e,type:"account"})}}componentWillLoad(){g(),this.analytics=new m(this),this.initializeServices(),this.getPayout&&this.fetchData()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeServices()}getPayoutWatcher(){this.fetchData()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:e,authToken:t,service:i})=>async({onSuccess:s,onError:c})=>{var h;try{const l=await i.fetchPayout(e,t);l.error?c({error:r(l.error),code:o(null===(h=l.error)||void 0===h?void 0:h.code),severity:d.ERROR}):s(new a(l.data))}catch(e){c({error:r(e),code:o(null==e?void 0:e.code),severity:d.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new s}),this.getPayoutCSV=k({authToken:this.authToken,service:new s})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i}),this.loading=!1}})}formatMethod(e){return"ach"===e?"ACH":h(e)}render(){var t,i,s,a;return e(C,{key:"0e371e863fbde66a5135b7c6789875d7a3266468"},this.loading&&e(T,{key:"44987c4fff48df008edd59702524bd51c3f935d3"}),!this.loading&&this.errorMessage&&y(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"ef6619ff38da13cb1c744e776f5b2239dcf68d25",errorMessage:this.errorMessage},e(f,{key:"ecbfef1736a2f21819bec8e19fc6a7788fc3343a",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},j(null===(t=this.payout)||void 0===t?void 0:t.status),e(B,"expedited"===this.payout.settlement_priority?{variant:D.WARNING,title:"Expedited",text:"Expedited"}:{variant:D.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(n,{key:"398051f5f80dd0c4e6bde71bfbc63ec3a6de6f48",classes:"border-1 border-end",title:"Updated At",value:`${l(this.payout.updated_at)} ${b(this.payout.updated_at)}`}),e(n,{key:"4c2ece5964655d60c5538acd745f74f11e98f4e5",classes:"border-1 border-end",title:"Created At",value:`${l(this.payout.created_at)} ${b(this.payout.created_at)}`}),e(n,{key:"84087a0dc42dc608181bbec1a2af0985813a56ea",title:"ID",value:this.payout.id}),e("div",{key:"9a3ac5b69e20980941b3de36e0715f3e25a01a0e",class:"m-4"},e(w,{key:"c2a122864b0b9cf83683633bf6fcc4c72002367a",variant:"outline-secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"63e118bc86b7c53388e4f66a4a5a417b48a78e8b",slot:"detail-sections"},e(p,{key:"2401d859d24ad131733365cb092444697d40f789",sectionTitle:"Details"}),e("div",{key:"d236343b8cbd6b6e64968f0fbb26ee895a99fad3",class:"d-flex flex-column gap-2 w-100"},e(v,{key:"fe26f4d1fb16ca68fcc7aca444b5d96278408ae0",title:"Date paid",value:l(this.payout.deposits_at)}),e(v,{key:"83151ee5457ddd9d982289d77cb0478105aadb99",title:"Statement Description",value:this.payout.description}),e(v,{key:"7e56cd9259390ba525df943b990ff5b21faa3d40",title:"Payout Method",value:this.formatMethod(this.payout.delivery_method)}),e(v,{key:"149f67385b9941098e15507d23975fb4b301ec56",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(v,{key:"64d7ff8c49d2ea7a0b814aded33307d119655965",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(p,{key:"b54b9a22b41fd7d816092dd1ee7204888bdb5725",sectionTitle:"Account"}),e("div",{key:"93d60c1e03bd9eec691d1added19357e743d9836",class:"d-flex flex-column gap-2 w-100"},e(v,{key:"e9431f2bac333427342dc4e550c588896ded6944",title:"ID",value:this.payout.account_id,onClick:this.enableRecordClick?()=>this.handleRecordClick(this.payout.account_id):void 0}),e(v,{key:"01a433869e93d9345550bdfbee788c60ee9f8cc3",title:"Account Type",value:null===(i=this.payout.bank_account)||void 0===i?void 0:i.account_type}),e(v,{key:"7e6e2ac81eb77a116b4a5614bc33345dc0e1976c",title:"Institution",value:null===(s=this.payout.bank_account)||void 0===s?void 0:s.account_type}),e(v,{key:"7ab5fa28f98c94dda6a4c7274176d2bb964ca5d2",title:"Routing Number",value:null===(a=this.payout.bank_account)||void 0===a?void 0:a.routing_number}),e(v,{key:"e05a54b74e01312708662e90c8a8b31ccfea4ec4",title:"Account Number",value:this.payout.bank_account?`**** ${this.payout.bank_account.account_number_last4}`:void 0})),this.payout.metadata&&[e(p,{key:"7adb41b7b602ccb4c1bab169401ca51d8e627fc6",sectionTitle:"Metadata"}),e("div",{key:"3a8c3d28a33fcde52acab0d67708c037e85ba6c2",class:"d-table gap-2 w-100"},e(u,{key:"77ec3c4cd674d61cbe94dca31d41fe4b0a888211",metadata:this.payout.metadata}))])))}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"],getPayout:["getPayoutWatcher"]}}};export{S as justifi_payout_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,h as e}from"./p-CV0Pyo1O.js";import{f as t,p as s,c as r}from"./p-CGnRD4wF.js";import{f as l,a as d}from"./p-Bu7gdOaV.js";import{S as f}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{c as i,a as o}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{P as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";const p=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{t[a]=e},this.handleDateInput=(a,e)=>{const t=i(e,{setEndOfDay:!0});this.setParamsOnChange(a,t)}}componentWillLoad(){Object.entries({status:this.status,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([a,e])=>{e&&(s[a]=e)}))}get statusOptions(){return[{label:"All",value:""},{label:c.paid,value:"paid"},{label:c.failed,value:"failed"},{label:c.forwarded,value:"forwarded"},{label:c.scheduled,value:"scheduled"},{label:c.in_transit,value:"in_transit"},{label:c.canceled,value:"canceled"}]}render(){const a=Object.assign({},t);return e(f,{key:"57aded74e21baf8bb4e48c372752a5f1160eede2"},e("table-filters-menu",{key:"28bd015a59ac27d25c91aa76a98d53a1d17f1ddd",params:a,clearParams:r,part:l},e("div",{key:"50afcc5bb969c562fc81ff4630a1cf0e778729b9",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"9066f408b3e80d84c1259376ea5f333c64efbd1a",class:"p-2"},e("form-control-select",{key:"49fa9695945cf0bec87fe80ab20783ab86868e42",name:"status",label:"Status",options:this.statusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.status||t.status||"",disabled:!!this.status,part:d})),e("div",{key:"169fd2190f8696a194436b8b8a22477c01e28c3f",class:"p-2"},e("form-control-date",{key:"edc8aa14f0162f74172a7eac92bb98bf7afe0185",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:o(this.createdAfter,{showInputDate:!0})||o(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:d})),e("div",{key:"6367da41915508aeb28ee8ff60f538322bfbd1c8",class:"p-2"},e("form-control-date",{key:"2768b468eccbfb746c62c1b9172c12213e70a4ed",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:o(this.createdBefore,{showInputDate:!0})||o(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:d})))))}};export{p as justifi_payouts_list_filters}
|