@justifi/webcomponents 5.3.6 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-f5280a80.js → Api-83d93333.js} +2 -2
- package/dist/cjs/{SubAccount-df3d28dc.js → SubAccount-9babbfd3.js} +4 -4
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
- package/dist/cjs/{badge-79e56b99.js → badge-591df67f.js} +1 -1
- package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +6 -6
- package/dist/cjs/bank-account-form_9.cjs.entry.js +4 -4
- package/dist/cjs/billing-form_3.cjs.entry.js +6 -6
- package/dist/cjs/business-details-core.cjs.entry.js +3 -3
- package/dist/cjs/{business.service-776142b1.js → business.service-27f67b29.js} +1 -1
- package/dist/cjs/{button-797bb3cc.js → button-7f272a63.js} +1 -1
- package/dist/cjs/{check-pkg-version-1f8b660c.js → check-pkg-version-52c7c2ab.js} +2 -2
- package/dist/cjs/{checkout.service-c01e2cd7.js → checkout.service-46a5b9f2.js} +2 -2
- package/dist/cjs/checkouts-list-core.cjs.entry.js +6 -6
- package/dist/cjs/{checkouts-table-61543249.js → checkouts-table-7f2081df.js} +2 -2
- package/dist/cjs/custom-popper.cjs.entry.js +2 -2
- package/dist/cjs/{dispute.service-399de502.js → dispute.service-a36c48bf.js} +2 -2
- package/dist/cjs/{event-types-666f1f22.js → event-types-921f3555.js} +2 -2
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/form-control-date.cjs.entry.js +2 -2
- package/dist/cjs/{form-control-error-text-b782cdd0.js → form-control-error-text-377bcf59.js} +1 -1
- package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
- package/dist/cjs/{form-control-help-text-ca3c8155.js → form-control-help-text-f7369e16.js} +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
- package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
- package/dist/cjs/form-control-number.cjs.entry.js +5 -5
- package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
- package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
- package/dist/cjs/{get-payout-csv-11a983a0.js → get-payout-csv-c1c7f03f.js} +2 -2
- package/dist/cjs/{get-subaccounts-224f9497.js → get-subaccounts-c1d559a0.js} +2 -2
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -3
- package/dist/cjs/{header-1-ff669f3f.js → header-1-a63a16d5.js} +1 -1
- package/dist/cjs/{header-3-f6642390.js → header-3-a6e0f274.js} +1 -1
- package/dist/cjs/{insurance-state-66c9bea7.js → insurance-state-ff4fca5a.js} +1 -1
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +4 -4
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +5 -5
- package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +8 -8
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +11 -11
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +70 -0
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +8 -8
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +10 -10
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-d34fcfa5.js → package-53904238.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
- package/dist/cjs/{parts-1fb925c2.js → parts-3118ab4b.js} +12 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +5 -5
- package/dist/cjs/{payment.service-f369b33c.js → payment.service-fedf131a.js} +2 -2
- package/dist/cjs/payments-list-core.cjs.entry.js +7 -7
- package/dist/cjs/{payments-status-ffdc54ff.js → payments-status-96156930.js} +1 -1
- package/dist/cjs/{payments-table-98b4e5e3.js → payments-table-6f87d43e.js} +2 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +6 -6
- package/dist/cjs/payouts-list-core.cjs.entry.js +7 -7
- package/dist/cjs/{payouts-status-64fd0c68.js → payouts-status-aa6842ac.js} +1 -1
- package/dist/cjs/{payouts-table-ecfb826b.js → payouts-table-d4c8bbbc.js} +2 -2
- package/dist/cjs/{skeleton-2ae76f16.js → skeleton-32198b92.js} +1 -1
- package/dist/cjs/{spinner-15764f3c.js → spinner-a5c0f3c0.js} +1 -1
- package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +22 -8
- package/dist/cjs/terminal-orders-list-params-state-c419078f.js +22 -0
- package/dist/cjs/{terminal-orders-table-f1bed365.js → terminal-orders-table-eb95b278.js} +2 -2
- package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
- package/dist/cjs/{terminal.service-4fd34835.js → terminal.service-ac44fc14.js} +4 -3
- package/dist/cjs/terminals-list-core.cjs.entry.js +7 -7
- package/dist/cjs/{terminals-table-30298ce4.js → terminals-table-3f0c33ea.js} +2 -2
- package/dist/cjs/{utils-3e3b8061.js → utils-97041614.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Api.js +2 -2
- package/dist/collection/api/TerminalOrder.js +2 -2
- package/dist/collection/api/services/terminal.service.js +2 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/order-terminals/order-terminals.js +2 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +15 -2
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +141 -0
- package/dist/collection/components/terminal-orders-list/terminal-orders-list-params-state.js +14 -0
- package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
- package/dist/collection/components/terminals-list/terminals-list.js +1 -1
- package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
- package/dist/collection/styles/parts.js +7 -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-file-v2.js +1 -1
- package/dist/collection/ui-components/form/form-control-file.js +2 -2
- package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
- package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
- package/dist/collection/ui-components/form/form-control-number.js +2 -2
- package/dist/collection/ui-components/form/form-control-radio.js +2 -2
- package/dist/collection/ui-components/form/form-control-text.js +2 -2
- package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
- package/dist/collection/ui-components/form/hidden-input.js +1 -1
- package/dist/collection/ui-components/form/iframe-input.js +3 -3
- package/dist/docs.json +170 -1
- package/dist/esm/{Api-391d00e2.js → Api-52242eb0.js} +2 -2
- package/dist/esm/{SubAccount-dbd4e50c.js → SubAccount-0248b5ab.js} +3 -3
- package/dist/esm/additional-questions-details_5.entry.js +2 -2
- package/dist/esm/{badge-6f5acf30.js → badge-1555ad1d.js} +1 -1
- package/dist/esm/bank-account-document-form-inputs_4.entry.js +6 -6
- package/dist/esm/bank-account-form_9.entry.js +4 -4
- package/dist/esm/billing-form_3.entry.js +6 -6
- package/dist/esm/business-details-core.entry.js +3 -3
- package/dist/esm/{business.service-f7c3b9f7.js → business.service-13890e74.js} +1 -1
- package/dist/esm/{button-79dcea75.js → button-1e756c34.js} +1 -1
- package/dist/esm/{check-pkg-version-8e7e585e.js → check-pkg-version-0557a5c4.js} +2 -2
- package/dist/esm/{checkout.service-382a16ec.js → checkout.service-fe338804.js} +2 -2
- package/dist/esm/checkouts-list-core.entry.js +6 -6
- package/dist/esm/{checkouts-table-8a53cef9.js → checkouts-table-e339bf0c.js} +2 -2
- package/dist/esm/custom-popper.entry.js +2 -2
- package/dist/esm/{dispute.service-97887804.js → dispute.service-3e1320fe.js} +2 -2
- package/dist/esm/{event-types-82515a49.js → event-types-359ef89e.js} +2 -2
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox.entry.js +5 -5
- package/dist/esm/form-control-date.entry.js +2 -2
- package/dist/esm/{form-control-error-text-466c252b.js → form-control-error-text-1391123f.js} +1 -1
- package/dist/esm/form-control-file-v2_2.entry.js +5 -5
- package/dist/esm/{form-control-help-text-242916e3.js → form-control-help-text-9918264e.js} +1 -1
- package/dist/esm/form-control-monetary.entry.js +5 -5
- package/dist/esm/form-control-number-masked_2.entry.js +4 -4
- package/dist/esm/form-control-number.entry.js +5 -5
- package/dist/esm/form-control-radio.entry.js +3 -3
- package/dist/esm/form-control-select_3.entry.js +4 -4
- package/dist/esm/{get-payout-csv-6826271a.js → get-payout-csv-9021a002.js} +2 -2
- package/dist/esm/{get-subaccounts-f21220dc.js → get-subaccounts-6b048fd1.js} +2 -2
- package/dist/esm/gross-payment-chart-core.entry.js +3 -3
- package/dist/esm/{header-1-b43590e5.js → header-1-adb520cc.js} +1 -1
- package/dist/esm/{header-3-b90e161e.js → header-3-ca58500e.js} +1 -1
- package/dist/esm/{insurance-state-9e4a3359.js → insurance-state-24af6ddb.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +4 -4
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +5 -5
- package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +6 -6
- package/dist/esm/justifi-business-form.entry.js +8 -8
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
- package/dist/esm/justifi-checkout-core.entry.js +5 -5
- package/dist/esm/justifi-checkout.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
- package/dist/esm/justifi-checkouts-list.entry.js +9 -9
- package/dist/esm/justifi-details.entry.js +2 -2
- package/dist/esm/justifi-dispute-management.entry.js +5 -5
- package/dist/esm/justifi-dispute-notification_3.entry.js +8 -8
- package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
- package/dist/esm/justifi-order-terminals.entry.js +11 -11
- package/dist/esm/justifi-owner-form_3.entry.js +4 -4
- package/dist/esm/justifi-payment-details.entry.js +7 -7
- package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +9 -9
- package/dist/esm/justifi-payout-details.entry.js +7 -7
- package/dist/esm/justifi-payouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +10 -10
- package/dist/esm/justifi-refund-form.entry.js +2 -2
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +3 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +66 -0
- package/dist/esm/justifi-terminal-orders-list.entry.js +8 -8
- package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +10 -10
- package/dist/esm/justifi-tokenize-payment-method.entry.js +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-46c7f3a6.js → package-25d5d805.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +1 -1
- package/dist/esm/{parts-2c5c609b.js → parts-ad835bef.js} +8 -1
- package/dist/esm/payment-details-core.entry.js +5 -5
- package/dist/esm/{payment.service-a8aa5be7.js → payment.service-2967c84b.js} +2 -2
- package/dist/esm/payments-list-core.entry.js +7 -7
- package/dist/esm/{payments-status-6e203ce4.js → payments-status-d011e114.js} +1 -1
- package/dist/esm/{payments-table-4c6093e1.js → payments-table-3e33b856.js} +2 -2
- package/dist/esm/payout-details-core.entry.js +6 -6
- package/dist/esm/payouts-list-core.entry.js +7 -7
- package/dist/esm/{payouts-status-66e830f1.js → payouts-status-181276c5.js} +1 -1
- package/dist/esm/{payouts-table-46fbedb6.js → payouts-table-199bdf64.js} +2 -2
- package/dist/esm/{skeleton-122648e6.js → skeleton-0cde7cb6.js} +1 -1
- package/dist/esm/{spinner-14cd9ac7.js → spinner-342e71ff.js} +1 -1
- package/dist/esm/table-filters-menu.entry.js +2 -2
- package/dist/esm/terminal-orders-list-core.entry.js +22 -8
- package/dist/esm/terminal-orders-list-params-state-8fec0a0b.js +16 -0
- package/dist/esm/{terminal-orders-table-83b905fd.js → terminal-orders-table-2884305a.js} +2 -2
- package/dist/esm/terminal-quantity-selector.entry.js +1 -1
- package/dist/esm/{terminal.service-20445fc1.js → terminal.service-4fab5adc.js} +4 -3
- package/dist/esm/terminals-list-core.entry.js +7 -7
- package/dist/esm/{terminals-table-dbbf9a99.js → terminals-table-4e1644e8.js} +2 -2
- package/dist/esm/{utils-4cb0d852.js → utils-96c6292c.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Api.js +2 -2
- package/dist/module/SubAccount.js +3 -3
- package/dist/module/custom-popper2.js +2 -2
- package/dist/module/form-control-checkbox2.js +2 -2
- package/dist/module/form-control-file-v22.js +1 -1
- package/dist/module/form-control-file2.js +2 -2
- package/dist/module/form-control-monetary2.js +2 -2
- package/dist/module/form-control-number-masked2.js +2 -2
- package/dist/module/form-control-number.js +2 -2
- package/dist/module/form-control-radio2.js +2 -2
- package/dist/module/form-control-text2.js +2 -2
- package/dist/module/form-control-textarea2.js +2 -2
- package/dist/module/hidden-input2.js +1 -1
- package/dist/module/iframe-input2.js +3 -3
- package/dist/module/justifi-order-terminals.js +2 -2
- package/dist/module/justifi-terminal-orders-list-filters.d.ts +11 -0
- package/dist/module/justifi-terminal-orders-list-filters.js +119 -0
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +2 -2
- package/dist/module/justifi-terminals-list.js +2 -2
- package/dist/module/justifi-tokenize-payment-method.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/module/parts.js +8 -1
- package/dist/module/terminal-orders-list-core2.js +15 -2
- package/dist/module/terminal-orders-list-params-state.js +16 -0
- package/dist/module/terminal.service.js +2 -1
- package/dist/module/terminals-list-core2.js +1 -1
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/TerminalOrder.d.ts +9 -3
- package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +1 -0
- package/dist/types/components/terminal-orders-list/terminal-orders-list-filters.d.ts +19 -0
- package/dist/types/components/terminal-orders-list/terminal-orders-list-params-state.d.ts +6 -0
- package/dist/types/components.d.ts +23 -2
- package/dist/types/styles/parts.d.ts +6 -0
- package/dist/webcomponents/{p-e400e31f.entry.js → p-00d55a4b.entry.js} +1 -1
- package/dist/webcomponents/{p-fae67ab3.js → p-04d59ef8.js} +1 -1
- package/dist/webcomponents/{p-69ac2640.entry.js → p-073f24ba.entry.js} +1 -1
- package/dist/webcomponents/p-07c13189.entry.js +1 -0
- package/dist/webcomponents/{p-b62403c2.entry.js → p-0bafaf49.entry.js} +1 -1
- package/dist/webcomponents/{p-d5a481e4.entry.js → p-0d01d245.entry.js} +1 -1
- package/dist/webcomponents/{p-cd68707b.entry.js → p-13d62477.entry.js} +1 -1
- package/dist/webcomponents/{p-fa987dcf.js → p-17c4edf7.js} +1 -1
- package/dist/webcomponents/{p-b69beb1c.js → p-17eea747.js} +1 -1
- package/dist/webcomponents/p-1b3a6c40.entry.js +1 -0
- package/dist/webcomponents/{p-8c461ebc.entry.js → p-1fb5677e.entry.js} +1 -1
- package/dist/webcomponents/p-24203209.entry.js +1 -0
- package/dist/webcomponents/{p-ee9d433f.js → p-251c8e97.js} +1 -1
- package/dist/webcomponents/{p-833ef79e.entry.js → p-258087a8.entry.js} +1 -1
- package/dist/webcomponents/{p-10e32428.entry.js → p-2759d157.entry.js} +1 -1
- package/dist/webcomponents/{p-a07afdcc.entry.js → p-2cd9b608.entry.js} +1 -1
- package/dist/webcomponents/p-2dd39017.js +1 -0
- package/dist/webcomponents/{p-34e18d17.entry.js → p-3030f5e6.entry.js} +1 -1
- package/dist/webcomponents/p-308ec9c7.entry.js +1 -0
- package/dist/webcomponents/{p-694078d2.js → p-324587d0.js} +1 -1
- package/dist/webcomponents/{p-b5addd78.js → p-34a95381.js} +1 -1
- package/dist/webcomponents/{p-547b51e9.js → p-365e56fc.js} +1 -1
- package/dist/webcomponents/{p-5efe9572.entry.js → p-36e32bc4.entry.js} +1 -1
- package/dist/webcomponents/{p-222fa126.entry.js → p-454acd29.entry.js} +1 -1
- package/dist/webcomponents/{p-0a60d356.entry.js → p-45e68bb3.entry.js} +1 -1
- package/dist/webcomponents/{p-7ed52fbc.entry.js → p-485df2fe.entry.js} +1 -1
- package/dist/webcomponents/{p-0c22225c.entry.js → p-50b012a3.entry.js} +1 -1
- package/dist/webcomponents/p-52e2cc5e.js +1 -0
- package/dist/webcomponents/{p-10a14943.entry.js → p-55e21977.entry.js} +1 -1
- package/dist/webcomponents/{p-6ef3de11.entry.js → p-56143442.entry.js} +1 -1
- package/dist/webcomponents/{p-b8ee505d.entry.js → p-5cf1898d.entry.js} +1 -1
- package/dist/webcomponents/p-5d600828.js +1 -0
- package/dist/webcomponents/{p-0e180654.js → p-5f6b4bc9.js} +1 -1
- package/dist/webcomponents/{p-33a17e80.entry.js → p-61a45f7d.entry.js} +1 -1
- package/dist/webcomponents/{p-3732aa87.js → p-646d007a.js} +1 -1
- package/dist/webcomponents/p-651c881b.js +1 -0
- package/dist/webcomponents/{p-19b8c3c8.entry.js → p-6a4b710e.entry.js} +1 -1
- package/dist/webcomponents/p-74f6cc28.entry.js +1 -0
- package/dist/webcomponents/{p-a173ccd5.entry.js → p-78255a04.entry.js} +1 -1
- package/dist/webcomponents/p-7d93c28b.js +1 -0
- package/dist/webcomponents/{p-c54f54ed.js → p-88af0d7d.js} +1 -1
- package/dist/webcomponents/p-8946edfd.js +1 -0
- package/dist/webcomponents/p-8ffd9f7c.js +1 -0
- package/dist/webcomponents/{p-f04dbd80.entry.js → p-92b18902.entry.js} +1 -1
- package/dist/webcomponents/{p-bd2340f7.entry.js → p-92f29922.entry.js} +1 -1
- package/dist/webcomponents/{p-e60867c6.js → p-944f1cc7.js} +1 -1
- package/dist/webcomponents/p-97f3a1b0.entry.js +1 -0
- package/dist/webcomponents/{p-3947a309.entry.js → p-9c57de4e.entry.js} +1 -1
- package/dist/webcomponents/p-9fcab358.entry.js +1 -0
- package/dist/webcomponents/{p-b4ed5a2c.js → p-a0f715d4.js} +1 -1
- package/dist/webcomponents/p-a35f3b5b.js +1 -0
- package/dist/webcomponents/{p-8fad4359.entry.js → p-a7594f8f.entry.js} +1 -1
- package/dist/webcomponents/{p-9dc9aaba.js → p-a81cabed.js} +1 -1
- package/dist/webcomponents/{p-087758d3.js → p-b19a37d4.js} +1 -1
- package/dist/webcomponents/{p-7e93eac9.entry.js → p-b7960f37.entry.js} +1 -1
- package/dist/webcomponents/{p-1a48d917.entry.js → p-b7ddb76f.entry.js} +1 -1
- package/dist/webcomponents/{p-6a2d6298.entry.js → p-b97f433a.entry.js} +1 -1
- package/dist/webcomponents/{p-1e300d41.js → p-ba113075.js} +1 -1
- package/dist/webcomponents/{p-8971f9da.entry.js → p-be6fea42.entry.js} +1 -1
- package/dist/webcomponents/p-beec0b60.js +1 -0
- package/dist/webcomponents/{p-71897cbc.js → p-c380213d.js} +1 -1
- package/dist/webcomponents/{p-b92f125b.entry.js → p-c3939138.entry.js} +1 -1
- package/dist/webcomponents/{p-b92aac9b.entry.js → p-c7c9725d.entry.js} +1 -1
- package/dist/webcomponents/p-cba7d0a7.entry.js +1 -0
- package/dist/webcomponents/{p-8066b866.js → p-d273f33b.js} +1 -1
- package/dist/webcomponents/p-d4724349.js +1 -0
- package/dist/webcomponents/{p-c5cc443e.entry.js → p-d575c2c1.entry.js} +1 -1
- package/dist/webcomponents/{p-046ecd01.js → p-d5960545.js} +1 -1
- package/dist/webcomponents/{p-b11468b5.entry.js → p-d78ea308.entry.js} +1 -1
- package/dist/webcomponents/p-d7bcf8f0.js +1 -0
- package/dist/webcomponents/{p-0cefd846.entry.js → p-d8ba9309.entry.js} +1 -1
- package/dist/webcomponents/p-da2a9dfa.entry.js +1 -0
- package/dist/webcomponents/{p-759f25a1.entry.js → p-dac9282d.entry.js} +1 -1
- package/dist/webcomponents/{p-030a8806.entry.js → p-dd3de924.entry.js} +1 -1
- package/dist/webcomponents/p-df9ff0ce.entry.js +1 -0
- package/dist/webcomponents/p-e1dd47e1.entry.js +1 -0
- package/dist/webcomponents/p-e52e9120.entry.js +1 -0
- package/dist/webcomponents/p-e545c079.entry.js +1 -0
- package/dist/webcomponents/{p-f3061f2a.entry.js → p-e5c60276.entry.js} +1 -1
- package/dist/webcomponents/p-e5de1a00.entry.js +1 -0
- package/dist/webcomponents/{p-685c7028.entry.js → p-ed3ad073.entry.js} +1 -1
- package/dist/webcomponents/{p-36edba41.entry.js → p-f1573cad.entry.js} +1 -1
- package/dist/webcomponents/p-f1d6e14f.js +1 -0
- package/dist/webcomponents/{p-e754d8e7.entry.js → p-f57d5d4f.entry.js} +1 -1
- package/dist/webcomponents/{p-9f1a3199.js → p-f87e871d.js} +1 -1
- package/dist/webcomponents/{p-eb05bd1e.entry.js → p-f8a95380.entry.js} +1 -1
- package/dist/webcomponents/{p-0137575f.entry.js → p-fa5688f7.entry.js} +1 -1
- package/dist/webcomponents/p-fbdc18e4.entry.js +1 -0
- package/dist/webcomponents/{p-e4514af8.entry.js → p-fdd244b1.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-039a09b8.entry.js +0 -1
- package/dist/webcomponents/p-0ba77d53.entry.js +0 -1
- package/dist/webcomponents/p-1705af62.js +0 -1
- package/dist/webcomponents/p-2027145a.entry.js +0 -1
- package/dist/webcomponents/p-382ab4e8.js +0 -1
- package/dist/webcomponents/p-3cbdca1b.js +0 -1
- package/dist/webcomponents/p-4d5c553d.entry.js +0 -1
- package/dist/webcomponents/p-5ee67fad.js +0 -1
- package/dist/webcomponents/p-638b91ff.entry.js +0 -1
- package/dist/webcomponents/p-7dc9fb75.js +0 -1
- package/dist/webcomponents/p-830f0971.entry.js +0 -1
- package/dist/webcomponents/p-a3d75257.js +0 -1
- package/dist/webcomponents/p-a957612b.entry.js +0 -1
- package/dist/webcomponents/p-aa21cdb1.entry.js +0 -1
- package/dist/webcomponents/p-aa923138.entry.js +0 -1
- package/dist/webcomponents/p-ad473d5c.entry.js +0 -1
- package/dist/webcomponents/p-b76f755a.entry.js +0 -1
- package/dist/webcomponents/p-bd2d9d29.entry.js +0 -1
- package/dist/webcomponents/p-bdf0ab42.js +0 -1
- package/dist/webcomponents/p-c406c0fa.js +0 -1
- package/dist/webcomponents/p-e366ef1e.js +0 -1
- package/dist/webcomponents/p-ede13cc8.js +0 -1
- package/dist/webcomponents/p-f2111e68.js +0 -1
- package/dist/webcomponents/p-fd4607f9.entry.js +0 -1
- package/dist/webcomponents/p-ffd0c24b.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import{p as
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import{p as i}from"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import{U as a,V as r}from"./p-2dd39017.js";import{T as c,a as h,b as o,c as d,d as n}from"./p-c380213d.js";import{t as p,a as b}from"./p-f87e871d.js";import{o as f,g as m}from"./p-f4739d31.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-5d600828.js";import"./p-34a95381.js";import"./p-f20b6ce1.js";const l=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:c.row,data:e})},this.getTerminals=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.terminals=[],this.terminalsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=i,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new h(this.terminals,this.columns,p,b),this.getTerminals&&this.getSubAccounts&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get terminalParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"b43bce610d87129e9f509a0b62e2c8ca25187c1b"},e("div",{key:"8a29d235532fbea5e8de8196ba11776dbd697b7e",class:"table-wrapper"},e("table",{key:"f52c104f03c014510c8b796d6fdaaf56d0f17cc4",class:"table table-hover",part:a},e("thead",{key:"c3690cf84b2208e5bf91ce781876bc42a468f96c",class:"table-head sticky-top"},e("tr",{key:"419b8dd4d311efe4435c4ca3a15f62985d4300f3",class:"table-light text-nowrap"},this.terminalsTable.columnData.map((t=>t)))),e("tbody",{key:"5c9ef7f9d6d53b2f63c907f35cd7e6afeb44481b",class:"table-body"},e(o,{key:"6b24dda78bd4c17751e8956127ff9394c720edf5",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"76d3646c7ba043f091947d5fdd536d4ac7df6902",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(n,{key:"0b418d8ca3268176b47aee6b80712d75181c8d9c",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"a46a3632e5610dd29f919d9c7b969cb1c07f67ac",class:"sticky-bottom"},e("tr",{key:"7ef9b68abdae3cb542ecce0c261746413f1e6321",class:"table-light align-middle"},e("td",{key:"72b477d84f6e58a5e457647e581de87ebc8f53c0",part:r,colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"de9635642f0ea24da62b8dd2c50e05c4a2c87f37",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{l as terminals_list_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-2783e363.js";import{a as e,b as a}from"./p-2ca5b5e4.js";import{B as c,a as o}from"./p-
|
|
1
|
+
import{h as t}from"./p-2783e363.js";import{a as e,b as a}from"./p-2ca5b5e4.js";import{B as c,a as o}from"./p-34a95381.js";import{k as p,m as s}from"./p-2dd39017.js";const r="created_at,payment_amount,payment_description,payment_mode,status",d={created_at:()=>t("th",{part:p,scope:"col",title:"The date each checkout occurred"},"Processed On"),payment_amount:()=>t("th",{part:p,scope:"col",title:"The dollar amount of each checkout"},"Payment Amount"),payment_description:()=>t("th",{part:p,scope:"col",title:"The description of each checkout"},"Payment Description"),sub_account_name:()=>t("th",{part:p,scope:"col",title:"The sub account associated with the checkout"},"Sub Account"),payment_mode:()=>t("th",{part:p,scope:"col",title:"The payment mode of each checkout"},"Payment Mode"),status:()=>t("th",{part:p,scope:"col",title:"The current status of each checkout"},"Status")},m={created_at:(c,o)=>t("td",{part:s(o)},t("div",{class:"fw-bold"},a(c.created_at)),t("div",{class:"fw-bold"},e(c.created_at))),payment_amount:(e,a)=>t("td",{part:s(a)},e.formattedPaymentAmount(e.payment_amount)),payment_description:(e,a)=>t("td",{part:s(a)},e.payment_description),sub_account_name:(e,a)=>t("td",{part:s(a)},e.sub_account_name),payment_mode:(e,a)=>t("td",{part:s(a)},e.payment_mode),status:(e,a)=>t("td",{part:s(a)},t(c,Object.assign({},{created:{variant:o.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:o.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:o.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:o.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))};export{m as a,d as c,r as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-5f6b4bc9.js";import{a}from"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import{g as r,a as o}from"./p-87f8c596.js";class s{async fetchPayouts(a,r,o,s="https://wc-proxy.justifi.ai"){return t({authToken:r,apiOrigin:s}).get(`account/${a}/payouts`,o)}async fetchPayout(a,r,o="https://wc-proxy.justifi.ai"){return t({authToken:r,apiOrigin:o}).get(`payouts/${a}`)}async fetchCSV(a,r,o="https://wc-proxy.justifi.ai"){return t({authToken:r,apiOrigin:o}).get(`reports/payouts/${a}`)}}const i=({authToken:t,service:s,apiOrigin:i})=>async({payoutId:p,onError:c})=>{try{const{data:a}=await s.fetchCSV(p,t,i),r=document.createElement("a");r.href=a.csv_url,r.click()}catch(t){c({error:r(t),code:o(null==t?void 0:t.code),severity:a.ERROR})}};export{s as P,i as m}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as i,h as t,H as o}from"./p-2783e363.js";import{E as r}from"./p-365e56fc.js";import{B as e}from"./p-a0f715d4.js";import{m as p}from"./p-f30cb232.js";import{C as a,a as d}from"./p-9dd8685c.js";import{c as h,J as m}from"./p-251c8e97.js";import"./p-2dd39017.js";import"./p-5f6b4bc9.js";import"./p-5d1d2fd7.js";import"./p-1ff8810b.js";import"./p-6078a370.js";import"./p-87f8c596.js";import"./p-d5960545.js";const n=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.businessId=void 0,this.authToken=void 0,this.errorMessage=void 0,this.getBusiness=void 0}componentWillLoad(){h(),this.analytics=new m(this),this.initializeGetBusiness()}disconnectedCallback(){this.analytics.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:a.MISSING_PROPS,message:this.errorMessage,severity:d.ERROR});this.getBusiness=p({id:this.businessId,authToken:this.authToken,service:new e})}render(){return t(o,null,this.errorMessage?r(this.errorMessage):t("business-details-core",{getBusiness:this.getBusiness}))}};export{n as justifi_business_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as t}from"./p-2783e363.js";import{c as e,J as o}from"./p-
|
|
1
|
+
import{r as s,c as i,h as t}from"./p-2783e363.js";import{c as e,J as o}from"./p-251c8e97.js";import{C as r,a as n}from"./p-9dd8685c.js";import{m as a,a as h}from"./p-b84ee6d8.js";import{B as p}from"./p-a0f715d4.js";import{A as d}from"./p-5f6b4bc9.js";import"./p-d5960545.js";import"./p-87f8c596.js";class c{async postProvisioning(s,i,t){const e={business_id:i,product_category:t};return d({authToken:s,apiOrigin:"https://wc-proxy.justifi.ai"}).post("entities/provisioning",e)}}const u=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.postProvisioning=void 0,this.getBusiness=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){e(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){this.analytics.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new p}),this.postProvisioning=h({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new c})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"ca4b13afe923312bd51d477eae50099876991599",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{u as justifi_payment_provisioning}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as s,h as t}from"./p-2783e363.js";import{B as e}from"./p-944f1cc7.js";import{S as a}from"./p-bfe9748b.js";import{c as o,J as d}from"./p-251c8e97.js";import{a as c,C as r}from"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import"./p-2dd39017.js";import"./p-d5960545.js";import"./p-5f6b4bc9.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";const h=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.authToken=void 0,this.accountId=void 0,this.paymentMethodGroupId=void 0,this.submitButtonText=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.hideSubmitButton=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin="https://components.justifi.ai",this.isLoading=!1}componentWillLoad(){o(),this.analytics=new d(this)}async tokenizePaymentMethod(i){let s;i&&i.preventDefault(),this.isLoading=!0;try{s=await this.paymentMethodOptionsRef.resolvePaymentMethod({isValid:!0}),s.error&&this.errorEvent.emit({errorCode:s.error.code,message:s.error.message,severity:c.ERROR})}catch(i){this.errorEvent.emit({errorCode:r.TOKENIZE_ERROR,message:i.message,severity:c.ERROR})}finally{return this.submitEvent.emit({response:s}),this.isLoading=!1,s}}async fillBillingForm(i){this.paymentMethodOptionsRef.fillBillingForm(i)}render(){return t(a,{key:"b4c878459fb1601d429140d80ce02b898d6ca2ed"},t("form",{key:"11917b591a4116e5711c0afd3e68b6599d064cae"},t("fieldset",{key:"b3c4ad0c42a424091a433e9aa8375108831e6c47"},t("div",{key:"bee2fa3c6c5de31d25cb102185fc977a5436a53b",class:"row gy-3"},t("div",{key:"fb32aa9f47716077a3dad2bfd7bfc950200014ba",class:"col-12"},t("justifi-payment-method-options",{key:"dca7ac67609a13e1b14bdc042eb131a07305e0d8",ref:i=>this.paymentMethodOptionsRef=i,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!1,paymentMethodGroupId:this.paymentMethodGroupId,"show-saved-payment-methods":!1,hideCardBillingForm:this.hideCardBillingForm,authToken:this.authToken,"account-id":this.accountId,iframeOrigin:this.iframeOrigin})),t("div",{key:"2218cb2eac22fd6187da4d205fc2437a980fa2a5",class:"col-12"},t(e,{key:"1299a5a10261b375cfec1b2599cc6de7f606bad9",variant:"primary",type:"submit",onClick:i=>this.tokenizePaymentMethod(i),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.hideSubmitButton},this.submitButtonText||"Submit"))))))}};export{h as justifi_tokenize_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./p-
|
|
1
|
+
import{p as t}from"./p-d5960545.js";import{A as s}from"./p-5f6b4bc9.js";class i{async record(t){return s({apiOrigin:"https://wc-proxy.justifi.ai"}).post("analytics",t)}}class e{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("storybook")||(this.service=new i,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(s=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:s.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}const a=async()=>{const s=t.version,i=t.name,e=await(async t=>{const s=await fetch("https://registry.npmjs.org/"+t+"/latest");return(await s.json()).version})(i),a=e.replace(/-rc.*/,""),n=s.split("."),o=e.split(".");n[0]!==o[0]&&console.warn(`The package ${i} is out of date. The latest version is ${a}. Please update.`)};export{e as J,a as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a}from"./p-2783e363.js";import{l as i,c as h,b as o,
|
|
1
|
+
import{r as t,c as e,h as s,H as a}from"./p-2783e363.js";import{l as i,c as h,b as o,a5 as r,a as c}from"./p-2dd39017.js";import{F as d}from"./p-d4724349.js";const l=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})},this.isFocused=!1,this.name=void 0,this.label=void 0,this.inputHandler=void 0,this.defaultValue=void 0,this.helpText=void 0,this.errorText=void 0,this.disabled=void 0,this.showTime=void 0,this.maxDate=this.currentDate}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=h;return this.errorText&&(t=o),this.disabled&&(t=r),this.isFocused&&(t=c),t}render(){return s(a,{key:"39efc4cf0cf20cd611c775f1e47ace6b445eab99"},s("div",{key:"82de246b4d67f3c1a234987c3d9259e8ed7fb3e5",class:"form-group d-flex flex-column"},s("div",{key:"033c637f965aa750c6130504f70f7fabb9d1a9da",class:"d-flex gap-2"},s("label",{key:"ce384aeee225254eac66cfcb6fbe8b6b5677cd5e",part:i,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"a8195ae52a1904bcdaa0ee082b77164bb399e5bc",helpText:this.helpText})),s("input",{key:"07bb64ebf4727c892bc5e873d6b8327cb0e89430",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(d,{key:"783b7b021819a5c26441a438be7b83dabb4cfce1",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{l as form_control_date}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as a,c as t}from"./p-2783e363.js";import{b as s,a as d,s as i}from"./p-2ca5b5e4.js";import{M as c}from"./p-
|
|
1
|
+
import{h as e,r as a,c as t}from"./p-2783e363.js";import{b as s,a as d,s as i}from"./p-2ca5b5e4.js";import{M as c}from"./p-88af0d7d.js";import{a as b,b as f,D as l,c as h,C as r,E as o}from"./p-365e56fc.js";import{S as y}from"./p-bfe9748b.js";import{S as n}from"./p-8946edfd.js";import"./p-34a95381.js";import"./p-2dd39017.js";const v=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(n,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(n,{width:"70%"})),e("div",{class:"col-12"},e(n,{width:"40%"})),e("div",{class:"col-12"},e(n,{width:"40%"})),e("div",{class:"col-12"},e(n,{width:"100%"})),e("div",{class:"col-12"},e(n,{width:"80%"}))),k=class{constructor(e){a(this,e),this.errorEvent=t(this,"error-event",7),this.getPaymentDetails=void 0,this.payment=void 0,this.loading=!0,this.errorMessage=void 0}componentWillLoad(){this.getPaymentDetails&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.loading=!1,this.errorMessage=null},onError:({error:e,code:a,severity:t})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:a,message:e,severity:t}),this.loading=!1}})}render(){return e(y,{key:"00ba42c81617d9593246956e97b6b962817cc167"},this.loading&&e(v,{key:"1c0fee27dec985cad2cc7d41f61d137246ffcc3e"}),!this.loading&&this.errorMessage&&o(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"e264b42451a8966a4e6313486bc9d1ccaea0141b","error-message":this.errorMessage},e(b,{key:"af96a0f502cce1be451160e8ac2f92074b0ee168",slot:"head-info",badge:c(this.payment.status),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(f,{key:"94f876bd62dd9ccaa6f63f25326390b03c9938d5",classes:"border-1 border-end",title:"Updated At",value:`${s(this.payment.updated_at)} ${d(this.payment.updated_at)}`}),e(f,{key:"96c629e2d1a99eca277ec7337cb3e00e88c1b31e",classes:"border-1 border-end",title:"Created At",value:`${s(this.payment.created_at)} ${d(this.payment.created_at)}`}),e(f,{key:"0d18abfae7e9fd0a692ac54640194033a5c36f41",title:"ID",value:this.payment.id})),e("div",{key:"7f9e14d7e0312ba1136cf5734754bf0af6c19774",slot:"detail-sections"},e(l,{key:"a11b47796dada4f9678487edf19dcd7928b08e94",sectionTitle:"Details"}),e("div",{key:"fa8a895e037adbbcf5856aae4f40306b789a90c8",class:"d-table gap-2 w-100"},e(h,{key:"84a8fa2b0dc39aa331501e00a8eb9bf93e8bb8c2",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(h,{key:"632fa4e703aabc7b606b939e95d1633a43fedfaa",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(h,{key:"bc37a80a15fea95932d04676f2c5a8a57276958b",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(h,{key:"588a76203897cd31b9d0c1c8de1b7b9b0b107421",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(h,{key:"c0fea24390417c591327c76568829cbf9f9147a9",title:"Status",value:c(this.payment.status)}),e(h,{key:"e332a896b55bb58f3fd26ee892556acb08ced52d",title:"Payment ID",value:this.payment.id}),e(h,{key:"844fdb40ed55ca0e2f848e7325dcb64f134fa5d6",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(h,{key:"dce95b409eb465e8d6373ad80b7b14a0eecc5aca",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(h,{key:"bed2051bd720b1a790ff59b50bee7f01e3fb222a",title:"Description",value:this.payment.description})),this.payment.payment_method.card&&[e(l,{key:"3283ea5236fab75a32fe569ad29d9b70c62b49a0",sectionTitle:"Payment Method"}),e("div",{key:"b9a0d9cfca791e3afb4a2e1e73b036319191d485",class:"d-table gap-2 w-100"},e(h,{key:"15da44c97292af05a14b3f7840b07bdcf34ae953",title:"ID",value:this.payment.payment_method.card.id}),e(h,{key:"d8a4a431c3e3ab0d14be8992521ee89b5e126a04",title:"Payment Type",value:"Card"}),e(h,{key:"1a8ed38a316ea943761d2dd7fda58490180ef3bc",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(h,{key:"db695d1b89896a7a73c83fd8a7d5837ad1e69909",title:"Brand",value:i(this.payment.payment_method.card.brand)}),e(h,{key:"d94879fb30ac0a05a16ce9ddb199fb5cb003a8c1",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(l,{key:"84dae904db3c22ff5ed03abaeb57d3b0736d1fbb",sectionTitle:"Payment Method"}),e("div",{key:"400801019a53feec0478273866fffa5683b408aa",class:"d-table gap-2 w-100"},e(h,{key:"ca7bb52e4275659b18daacfa6367de2f32617e70",title:"ID",value:this.payment.payment_method.bank_account.id}),e(h,{key:"4885d2b5f05b6a713d61074271c7a95b23604dca",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(h,{key:"604ec4efe78a12a1c36d8416c9fdec70351a6dad",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(h,{key:"1ef77a81232e19d1063af9e863f5c9ada183715f",title:"Account Owner",value:this.payment.payment_method.payersName}))],e(l,{key:"1d0a45dd7b7f44b2bad75db9ddb7886b9fc36c9c",sectionTitle:"Metadata"}),e("div",{key:"364dfb72b9585b672a510b11ecf794c8293ac88d",class:"d-table gap-2 w-100"},e(r,{key:"1b9254f2f5f81959ea4e190a3a84129d8c54eccd",metadata:this.payment.metadata})))))}static get watchers(){return{getPaymentDetails:["updateOnPropChange"]}}};export{k as payment_details_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a,H as t}from"./p-2783e363.js";import{U as d,h as l}from"./p-f2111e68.js";import{a as i,r as s,s as c,b as o}from"./p-c9b78275.js";import{C as r,T as n,P as f,S as b}from"./p-525db3e8.js";import{C as u}from"./p-5d1d2fd7.js";import{d as h}from"./p-1ff8810b.js";import{S as m}from"./p-6078a370.js";import{n as v}from"./p-e3c22aa9.js";const y=class{constructor(a){e(this,a),this.text=void 0,this.hideAlert=void 0}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:d},a("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:"},a("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"})),a("div",null,this.text)):null}},p=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,d,o,n,f,b,u,h,m,v,y,p,k,x;const j=this.formController.getInitialValues().additional_questions;return a(t,{key:"618736c7be498f1665c5cf4aa470dd90eed52334"},a("fieldset",{key:"fae6781f258757e72146d1c99b66654880d72cc0"},a("legend",{key:"96be34e12f5445c7b67b22c5636c74fc44e7532d",part:l},"Additional Questions"),a("div",{key:"cb2ee5e23c714bd950bd586d0cb72cc09489f2d3",class:"row gy-3"},a("div",{key:"f0f781b138c954b6ad1f9039d295b5c4134ed8ed",class:"col-12 col-md-6"},a("form-control-monetary",{key:"df81f8827a2a619570c3664873192219d6a01e7a",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(d=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===d?void 0:d.business_revenue,defaultValue:null==j?void 0:j.business_revenue,maskOptions:r.WHOLE})),a("div",{key:"1a051cae5f83329287f07b9964125757a3fb0965",class:"col-12 col-md-6"},a("form-control-monetary",{key:"d2662f5858e71554a318d17fb8ee4950ababb781",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(n=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===n?void 0:n.business_payment_volume,defaultValue:null==j?void 0:j.business_payment_volume,maskOptions:r.WHOLE})),a("div",{key:"04da123a8656cb50676a3b8981f3d5aba1188cc1",class:"col-12"},a("form-control-select",{key:"8fcc2ac015c53a82e412f6dfccad4e6759a5d0b6",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:i,defaultValue:null==j?void 0:j.business_when_service_received})),a("div",{key:"c12eca7ac3d5b58a792fc96dd79bc080ffd0d2f8",class:"col-12"},a("form-control-select",{key:"e77bc7b5daab33b00fe098cd0f5200ee200085e9",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:s,defaultValue:null==j?void 0:j.business_recurring_payments})),a("div",{key:"27a94ad5b8fe71c6eb775816422151e3cd865040",class:"col-12"},a("form-control-text",{key:"5ae2d05e20022b0d8d6b765df38bb0137537d122",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==j?void 0:j.business_recurring_payments_percentage})),a("div",{key:"370e2ced766d57fcada32adff6b67644b164acfd",class:"col-12"},a("form-control-select",{key:"1155dc7935f4ef243d1beec8136e5ccc10e808eb",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(p=null===(y=this.errors)||void 0===y?void 0:y.additional_questions)||void 0===p?void 0:p.business_seasonal,options:c,defaultValue:null==j?void 0:j.business_seasonal})),a("div",{key:"f303957137b424aa3893d7fca83f239512189b6e",class:"col-12"},a("form-control-text",{key:"1d5a1fe15fe3e85df4269f5b397e80a22b2f3bd4",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(x=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===x?void 0:x.business_other_payment_details,defaultValue:null==j?void 0:j.business_other_payment_details})))))}},k=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.coreInfo={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new u(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){const e=this.formController.getInitialValues();return a(t,{key:"0a54d6f8c056defa8cabdb4dc179c163221da666"},a("fieldset",{key:"4b0c98edb14fd99bdc1b69452f46176d13138521"},a("legend",{key:"ffa4420337c8c0007ea50ed903c2708fcda98027",part:l},"General Info"),a("div",{key:"2e81c755b2f5b8dc881dfac4bb0cb5c61efef68c",class:"row gy-3"},a("div",{key:"02cd06cd22a47c19fe0f7ef56332946383c8fb09",class:"col-12"},a("form-control-text",{key:"9eb76d9b46ca559acc02bd74146249c2d3b75032",name:"legal_name",label:"Legal Name",defaultValue:e.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"6b3e5d12395548523ec27109b3498e17d160ebb5",class:"col-12"},a("form-control-text",{key:"8ce4c6867f5ca0842b925448196eaae1299663de",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:e.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"b66a589959a2ac7095ab87b9d123e79ed31588ab",class:"col-12 col-md-8"},a("form-control-select",{key:"1ace9df2d442f1fc9411fba5c4f549a3d94f3e04",name:"classification",label:"Business Classification",options:o,defaultValue:e.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"008b69ab22ea29d8555db618734910de2a5d5740",class:"col-12 col-md-4"},a("form-control-date",{key:"19d75c0375ae52cdf139024aff14d9d8911f7ec3",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:e.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"dfa1903977fb2d0f2c7bbc8b990ab67d2040e9b1",class:"col-12 col-md-6"},a("form-control-text",{key:"fd7d05bd1401f86eb45b8c647d54714e14f2190a",name:"industry",label:"Industry",defaultValue:e.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"ae9e24843b6909b288553ec54f99c577b5931417",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"a19f2126f9b24d2fb14a5887a8f83b548f36f4ad",name:"tax_id",label:"Tax ID",defaultValue:e.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:n.US})),a("div",{key:"029aaf6b714d7a0e1240176fe43e9c7d80e256bf",class:"col-12"},a("form-control-text",{key:"a81b306b6ab4bbe5bd1aa67ff10a2fd1e9bf092e",name:"website_url",label:"Website URL",defaultValue:e.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"408bc1916656193648b306cad6b3f6bd343ffc3b",class:"col-12 col-md-6"},a("form-control-text",{key:"d15350befa68b8125c0d292e6ffe7d2a09af5590",name:"email",label:"Email Address",defaultValue:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"5835a78ff6cd8e08b364e4d0016df0fdffaa2fb6",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"4a8507cd54812937df751f69b90cc1d3df503de6",name:"phone",label:"Phone Number",defaultValue:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})))))}},x=class{constructor(a){e(this,a),this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=h(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))},this.formController=void 0,this.errors={},this.representative={}}get identificationNumberLabel(){return this.representative.ssn_last4?"Update SSN (optional)":"SSN"}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){const e=this.formController.getInitialValues().representative;return a(t,{key:"f6ec629438bef335e9a3e04fccc0223f7bafbc26"},a("fieldset",{key:"82eac6e79e74cbcc76438fe3180ef1af9ae467ac"},a("legend",{key:"31ca1bf5cc4e8eea0c28a690b28637dcd42ffa58",part:l},"Representative"),a("div",{key:"f9e554f72dfd3f0dec491158ad83dd47baf6d6cc",class:"row gy-3"},a("div",{key:"79350e59178a94a5af9dbacf13ed6b20fdde8d73",class:"col-12 col-md-8"},a("form-control-text",{key:"78ce85dafde41cd8343898baa4ab802ce2f2d166",name:"name",label:"Full Name",defaultValue:null==e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"0b145987fc92bce37bcf3543b544754ed77db31e",class:"col-12 col-md-4"},a("form-control-text",{key:"7d49c2ee8b342ca631cf55f57f529a77bd7c6e3f",name:"title",label:"Title",defaultValue:null==e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"a5c758e42bfed677f38b18298e550d1cbb753f3d",class:"col-12 col-md-6"},a("form-control-text",{key:"5e0e9672443f2b1a7b0b63b95d007c29eae0c64d",name:"email",label:"Email Address",defaultValue:null==e?void 0:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"32d63091cdc630f5d0908ff17f0cea17685ecb64",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"975381119e6dc8de8caf969c432ab498b600c156",name:"phone",label:"Phone Number",defaultValue:null==e?void 0:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})),a("div",{key:"86095ab1f1152242fcd68ad153e38b1d7f1ee98f",class:"col-12 col-md-4"},a("form-control-date",{key:"361690e38df5bfe260bfaa200856f6e41c0c624c",name:"dob_full",label:"Birth Date",defaultValue:null==e?void 0:e.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"b0a24f235e569fe65b518871fe90f3202a4c9666",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"54edaef9d4fed9e5dc2f6743e8168cda6e01c717",name:"identification_number",label:this.identificationNumberLabel,defaultValue:null==e?void 0:e.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:b})),a("div",{key:"efa8fb991a119b6640d876f48cca69fc19d19301",class:"col-12"},a("justifi-identity-address-form",{key:"50b7dcee0b96a38de05d04fbae8b986bb755c888",errors:this.errors.address,defaultValues:null==e?void 0:e.address,handleFormUpdate:this.onAddressFormUpdate})))))}},j=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.legal_address=void 0,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e,d,i,s,c,o,r,n,f,b,u,h;const y=this.formController.getInitialValues().legal_address;return a(t,{key:"a9e2d2fa0e1ac8bd37eef9b40ae3ebee44e6246f"},a("fieldset",{key:"defd51a5bdbc9ecf4e640d2008bb1f1f83de5dda"},a("legend",{key:"6d4d4563e426a02539f86c58a6eaa11927ec96e2",part:l},"Business Legal Address"),a("div",{key:"c4d0786717af5da9baca6aca93b4e81f474a1746",class:"row gy-3"},a("div",{key:"f8be78e845a720143e3f175eec6c9f9ee929d612",class:"col-12"},a("form-control-text",{key:"341d426271136e734d9dd8d1968de01938b5eebb",name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line1,errorText:null===(d=null===(e=this.errors)||void 0===e?void 0:e.legal_address)||void 0===d?void 0:d.line1})),a("div",{key:"ac5f410a9b12def5284636dd384560af93c982d6",class:"col-12"},a("form-control-text",{key:"b96a18e42af33fbfca0645d9aa039a2430dc0043",name:"line2",label:"Address Line 2",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line2,errorText:null===(s=null===(i=this.errors)||void 0===i?void 0:i.legal_address)||void 0===s?void 0:s.line2})),a("div",{key:"c3ac5227e34c525b6be906b5cf06a428bebe2ad4",class:"col-12"},a("form-control-text",{key:"972602adcf764500928eca67660b20344a1313ec",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.city,errorText:null===(o=null===(c=this.errors)||void 0===c?void 0:c.legal_address)||void 0===o?void 0:o.city})),a("div",{key:"8ca2e4c78b986f5156976c5adb6b5a63c584607b",class:"col-12"},a("form-control-select",{key:"2f0eacc656e741706064c10234e471fb53ca2be2",name:"state",label:"State",options:m,inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.state,errorText:null===(n=null===(r=this.errors)||void 0===r?void 0:r.legal_address)||void 0===n?void 0:n.state})),a("div",{key:"e4d51b2347c78f5c47d5ce309c46baa5fc07f7f5",class:"col-12"},a("form-control-text",{key:"e237d5830f0c24bf40e43ba8d2d6b0fd095405ed",name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.postal_code,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.legal_address)||void 0===b?void 0:b.postal_code,maxLength:5,keyDownHandler:v})),a("div",{key:"a7bdcd1a867ff4816f20e89f651fe80fed2193cf",class:"col-12"},a("form-control-select",{key:"d345dd93d46618572c3aea87893c135ac688bde5",name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.country,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.legal_address)||void 0===h?void 0:h.country,disabled:!0})))))}};export{y as form_alert,p as justifi_additional_questions,k as justifi_business_core_info,x as justifi_business_representative,j as justifi_legal_address_form}
|
|
1
|
+
import{r as e,h as a,H as t}from"./p-2783e363.js";import{Z as d,h as l}from"./p-2dd39017.js";import{a as i,r as s,s as c,b as o}from"./p-c9b78275.js";import{C as r,T as n,P as f,S as b}from"./p-525db3e8.js";import{C as u}from"./p-5d1d2fd7.js";import{d as h}from"./p-1ff8810b.js";import{S as m}from"./p-6078a370.js";import{n as v}from"./p-e3c22aa9.js";const y=class{constructor(a){e(this,a),this.text=void 0,this.hideAlert=void 0}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:d},a("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:"},a("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"})),a("div",null,this.text)):null}},p=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,d,o,n,f,b,u,h,m,v,y,p,k,x;const j=this.formController.getInitialValues().additional_questions;return a(t,{key:"618736c7be498f1665c5cf4aa470dd90eed52334"},a("fieldset",{key:"fae6781f258757e72146d1c99b66654880d72cc0"},a("legend",{key:"96be34e12f5445c7b67b22c5636c74fc44e7532d",part:l},"Additional Questions"),a("div",{key:"cb2ee5e23c714bd950bd586d0cb72cc09489f2d3",class:"row gy-3"},a("div",{key:"f0f781b138c954b6ad1f9039d295b5c4134ed8ed",class:"col-12 col-md-6"},a("form-control-monetary",{key:"df81f8827a2a619570c3664873192219d6a01e7a",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(d=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===d?void 0:d.business_revenue,defaultValue:null==j?void 0:j.business_revenue,maskOptions:r.WHOLE})),a("div",{key:"1a051cae5f83329287f07b9964125757a3fb0965",class:"col-12 col-md-6"},a("form-control-monetary",{key:"d2662f5858e71554a318d17fb8ee4950ababb781",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(n=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===n?void 0:n.business_payment_volume,defaultValue:null==j?void 0:j.business_payment_volume,maskOptions:r.WHOLE})),a("div",{key:"04da123a8656cb50676a3b8981f3d5aba1188cc1",class:"col-12"},a("form-control-select",{key:"8fcc2ac015c53a82e412f6dfccad4e6759a5d0b6",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:i,defaultValue:null==j?void 0:j.business_when_service_received})),a("div",{key:"c12eca7ac3d5b58a792fc96dd79bc080ffd0d2f8",class:"col-12"},a("form-control-select",{key:"e77bc7b5daab33b00fe098cd0f5200ee200085e9",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:s,defaultValue:null==j?void 0:j.business_recurring_payments})),a("div",{key:"27a94ad5b8fe71c6eb775816422151e3cd865040",class:"col-12"},a("form-control-text",{key:"5ae2d05e20022b0d8d6b765df38bb0137537d122",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==j?void 0:j.business_recurring_payments_percentage})),a("div",{key:"370e2ced766d57fcada32adff6b67644b164acfd",class:"col-12"},a("form-control-select",{key:"1155dc7935f4ef243d1beec8136e5ccc10e808eb",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(p=null===(y=this.errors)||void 0===y?void 0:y.additional_questions)||void 0===p?void 0:p.business_seasonal,options:c,defaultValue:null==j?void 0:j.business_seasonal})),a("div",{key:"f303957137b424aa3893d7fca83f239512189b6e",class:"col-12"},a("form-control-text",{key:"1d5a1fe15fe3e85df4269f5b397e80a22b2f3bd4",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(x=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===x?void 0:x.business_other_payment_details,defaultValue:null==j?void 0:j.business_other_payment_details})))))}},k=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.coreInfo={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new u(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){const e=this.formController.getInitialValues();return a(t,{key:"0a54d6f8c056defa8cabdb4dc179c163221da666"},a("fieldset",{key:"4b0c98edb14fd99bdc1b69452f46176d13138521"},a("legend",{key:"ffa4420337c8c0007ea50ed903c2708fcda98027",part:l},"General Info"),a("div",{key:"2e81c755b2f5b8dc881dfac4bb0cb5c61efef68c",class:"row gy-3"},a("div",{key:"02cd06cd22a47c19fe0f7ef56332946383c8fb09",class:"col-12"},a("form-control-text",{key:"9eb76d9b46ca559acc02bd74146249c2d3b75032",name:"legal_name",label:"Legal Name",defaultValue:e.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"6b3e5d12395548523ec27109b3498e17d160ebb5",class:"col-12"},a("form-control-text",{key:"8ce4c6867f5ca0842b925448196eaae1299663de",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:e.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"b66a589959a2ac7095ab87b9d123e79ed31588ab",class:"col-12 col-md-8"},a("form-control-select",{key:"1ace9df2d442f1fc9411fba5c4f549a3d94f3e04",name:"classification",label:"Business Classification",options:o,defaultValue:e.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"008b69ab22ea29d8555db618734910de2a5d5740",class:"col-12 col-md-4"},a("form-control-date",{key:"19d75c0375ae52cdf139024aff14d9d8911f7ec3",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:e.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"dfa1903977fb2d0f2c7bbc8b990ab67d2040e9b1",class:"col-12 col-md-6"},a("form-control-text",{key:"fd7d05bd1401f86eb45b8c647d54714e14f2190a",name:"industry",label:"Industry",defaultValue:e.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"ae9e24843b6909b288553ec54f99c577b5931417",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"a19f2126f9b24d2fb14a5887a8f83b548f36f4ad",name:"tax_id",label:"Tax ID",defaultValue:e.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:n.US})),a("div",{key:"029aaf6b714d7a0e1240176fe43e9c7d80e256bf",class:"col-12"},a("form-control-text",{key:"a81b306b6ab4bbe5bd1aa67ff10a2fd1e9bf092e",name:"website_url",label:"Website URL",defaultValue:e.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"408bc1916656193648b306cad6b3f6bd343ffc3b",class:"col-12 col-md-6"},a("form-control-text",{key:"d15350befa68b8125c0d292e6ffe7d2a09af5590",name:"email",label:"Email Address",defaultValue:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"5835a78ff6cd8e08b364e4d0016df0fdffaa2fb6",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"4a8507cd54812937df751f69b90cc1d3df503de6",name:"phone",label:"Phone Number",defaultValue:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})))))}},x=class{constructor(a){e(this,a),this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=h(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))},this.formController=void 0,this.errors={},this.representative={}}get identificationNumberLabel(){return this.representative.ssn_last4?"Update SSN (optional)":"SSN"}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){const e=this.formController.getInitialValues().representative;return a(t,{key:"f6ec629438bef335e9a3e04fccc0223f7bafbc26"},a("fieldset",{key:"82eac6e79e74cbcc76438fe3180ef1af9ae467ac"},a("legend",{key:"31ca1bf5cc4e8eea0c28a690b28637dcd42ffa58",part:l},"Representative"),a("div",{key:"f9e554f72dfd3f0dec491158ad83dd47baf6d6cc",class:"row gy-3"},a("div",{key:"79350e59178a94a5af9dbacf13ed6b20fdde8d73",class:"col-12 col-md-8"},a("form-control-text",{key:"78ce85dafde41cd8343898baa4ab802ce2f2d166",name:"name",label:"Full Name",defaultValue:null==e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"0b145987fc92bce37bcf3543b544754ed77db31e",class:"col-12 col-md-4"},a("form-control-text",{key:"7d49c2ee8b342ca631cf55f57f529a77bd7c6e3f",name:"title",label:"Title",defaultValue:null==e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"a5c758e42bfed677f38b18298e550d1cbb753f3d",class:"col-12 col-md-6"},a("form-control-text",{key:"5e0e9672443f2b1a7b0b63b95d007c29eae0c64d",name:"email",label:"Email Address",defaultValue:null==e?void 0:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"32d63091cdc630f5d0908ff17f0cea17685ecb64",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"975381119e6dc8de8caf969c432ab498b600c156",name:"phone",label:"Phone Number",defaultValue:null==e?void 0:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})),a("div",{key:"86095ab1f1152242fcd68ad153e38b1d7f1ee98f",class:"col-12 col-md-4"},a("form-control-date",{key:"361690e38df5bfe260bfaa200856f6e41c0c624c",name:"dob_full",label:"Birth Date",defaultValue:null==e?void 0:e.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"b0a24f235e569fe65b518871fe90f3202a4c9666",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"54edaef9d4fed9e5dc2f6743e8168cda6e01c717",name:"identification_number",label:this.identificationNumberLabel,defaultValue:null==e?void 0:e.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:b})),a("div",{key:"efa8fb991a119b6640d876f48cca69fc19d19301",class:"col-12"},a("justifi-identity-address-form",{key:"50b7dcee0b96a38de05d04fbae8b986bb755c888",errors:this.errors.address,defaultValues:null==e?void 0:e.address,handleFormUpdate:this.onAddressFormUpdate})))))}},j=class{constructor(a){e(this,a),this.formController=void 0,this.errors={},this.legal_address=void 0,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e,d,i,s,c,o,r,n,f,b,u,h;const y=this.formController.getInitialValues().legal_address;return a(t,{key:"a9e2d2fa0e1ac8bd37eef9b40ae3ebee44e6246f"},a("fieldset",{key:"defd51a5bdbc9ecf4e640d2008bb1f1f83de5dda"},a("legend",{key:"6d4d4563e426a02539f86c58a6eaa11927ec96e2",part:l},"Business Legal Address"),a("div",{key:"c4d0786717af5da9baca6aca93b4e81f474a1746",class:"row gy-3"},a("div",{key:"f8be78e845a720143e3f175eec6c9f9ee929d612",class:"col-12"},a("form-control-text",{key:"341d426271136e734d9dd8d1968de01938b5eebb",name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line1,errorText:null===(d=null===(e=this.errors)||void 0===e?void 0:e.legal_address)||void 0===d?void 0:d.line1})),a("div",{key:"ac5f410a9b12def5284636dd384560af93c982d6",class:"col-12"},a("form-control-text",{key:"b96a18e42af33fbfca0645d9aa039a2430dc0043",name:"line2",label:"Address Line 2",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line2,errorText:null===(s=null===(i=this.errors)||void 0===i?void 0:i.legal_address)||void 0===s?void 0:s.line2})),a("div",{key:"c3ac5227e34c525b6be906b5cf06a428bebe2ad4",class:"col-12"},a("form-control-text",{key:"972602adcf764500928eca67660b20344a1313ec",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.city,errorText:null===(o=null===(c=this.errors)||void 0===c?void 0:c.legal_address)||void 0===o?void 0:o.city})),a("div",{key:"8ca2e4c78b986f5156976c5adb6b5a63c584607b",class:"col-12"},a("form-control-select",{key:"2f0eacc656e741706064c10234e471fb53ca2be2",name:"state",label:"State",options:m,inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.state,errorText:null===(n=null===(r=this.errors)||void 0===r?void 0:r.legal_address)||void 0===n?void 0:n.state})),a("div",{key:"e4d51b2347c78f5c47d5ce309c46baa5fc07f7f5",class:"col-12"},a("form-control-text",{key:"e237d5830f0c24bf40e43ba8d2d6b0fd095405ed",name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.postal_code,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.legal_address)||void 0===b?void 0:b.postal_code,maxLength:5,keyDownHandler:v})),a("div",{key:"a7bdcd1a867ff4816f20e89f651fe80fed2193cf",class:"col-12"},a("form-control-select",{key:"d345dd93d46618572c3aea87893c135ac688bde5",name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.country,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.legal_address)||void 0===h?void 0:h.country,disabled:!0})))))}};export{y as form_alert,p as justifi_additional_questions,k as justifi_business_core_info,x as justifi_business_representative,j as justifi_legal_address_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a="font-family",e="background-color",t=`text color ${a}`,s=`text-danger ${t}`,i=`heading ${t}`,r=`heading-1 ${i}`,l=`heading-2 ${i}`,n=`heading-3 ${i}`,$=`heading-4 ${i}`,d=`heading-5 ${i}`,o=`button ${t}`,p=`button-primary ${o}`,m=`button-secondary ${o}`,c=`button-link ${o}`,u="button-loading",f=`button-disabled ${o}`,b=`label ${t}`,g=`input ${t} ${e}`,h=`input-group ${g}`,y=`input-invalid ${g}`,k=`input-disabled ${g}`,x=`input-focused ${g}`,v=`input-invalid-and-focused ${g}`,w="input-radio",j=`input-radio-focused ${w}`,q=`input-radio-checked ${w}`,z=`input-radio-checked-focused ${w}`,A=`input-radio-invalid ${w}`,B=`input-checkbox ${e}`,C=`input-checkbox-invalid ${B}`,D=`input-checkbox-focused ${B}`,E=`input-checkbox-checked ${B}`,F=`input-checkbox-checked-focused ${B}`,G=`alert-danger alert ${t}`,H=`tooltip ${t}`,I=`tooltip-icon ${t}`,J=`tooltip-inner ${t}`,K=`card ${t} ${e}`,L=`table ${t} ${e}`,M=`table-cell ${t} ${e}`,N=`table-head-cell ${M} ${t} ${e}`,O=`table-cell-even ${M} ${t} ${e}`,P=`table-cell-odd ${M} ${t} ${e}`,Q=a=>a%2?O:P,R=`table-empty ${t} ${e}`,S=`table-error ${t} ${e}`,T="loading-spinner",U=`badge ${a}`,V=`${U} badge-primary`,W=`${U} badge-secondary`,X=`${U} badge-success`,Y=`${U} badge-danger`,Z=`${U} badge-warning`,_=`${U} badge-info`,aa=`${U} badge-light`,ea=`${U} badge-dark`,ta=`dropdown-menu ${t}`,sa=`radio-list-item ${t}`,ia="skeleton",ra="image",la="billing-form",na="checkout-summary",$a="filter-menu",da=`${$a} payments-list-filter-menu`,oa="payments-list-filter-param",pa=`${oa} payment-id-payments-list-filter-param`,ma=`${oa} terminal-id-payments-list-filter-param`,ca=`${oa} payment-status-payments-list-filter-param`,ua=`${oa} created-after-payments-list-filter-param`,fa=`${oa} created-before-payments-list-filter-param`,ba=`${$a} payouts-list-filter-menu`,ga="payouts-list-filter-param",ha=`${ga} created-after-payouts-list-filter-param`,ya=`${ga} created-before-payouts-list-filter-param`,ka=`${$a} checkouts-list-filter-menu`,xa="checkouts-list-filter-param",va=`${xa} checkout-status-checkouts-list-filter-param`,wa=`${xa} payment-mode-checkouts-list-filter-param`,ja=`${$a} terminals-list-filter-menu`,qa="terminals-list-filter-param",za=`${qa} terminal-id-terminals-list-filter-param`,Aa=`${qa} terminal-status-terminals-list-filter-param`,Ba=`${$a} terminal-orders-list-filter-menu`,Ca="terminal-orders-list-filter-param",Da=`${Ca} order-status-terminal-orders-list-filter-param`,Ea=`${Ca} order-type-terminal-orders-list-filter-param`,Fa=`${Ca} created-after-terminal-orders-list-filter-param`,Ga=`${Ca} created-before-terminal-orders-list-filter-param`;export{n as $,wa as A,d as B,$ as C,da as D,pa as E,ma as F,ca as G,ua as H,fa as I,ba as J,ha as K,ya as L,Ba as M,Da as N,Ea as O,Fa as P,Ga as Q,ja as R,za as S,Aa as T,L as U,M as V,R as W,S as X,T as Y,G as Z,na as _,x as a,ra as a0,c as a1,la as a2,sa as a3,K as a4,k as a5,ta as a6,h as a7,A as a8,z as a9,q as aa,j as ab,w as ac,C as ad,F as ae,D as af,E as ag,B as ah,f as ai,H as aj,J as ak,I as al,y as b,g as c,s as d,r as e,u as f,p as g,l as h,v as i,m as j,N as k,b as l,Q as m,U as n,V as o,W as p,X as q,Y as r,ia as s,t,Z as u,_ as v,aa as w,ea as x,ka as y,va as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as a}from"./p-2783e363.js";import{i as
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-2783e363.js";import{i as o,a as h,b as r,c as d,l as c}from"./p-2dd39017.js";import{F as n}from"./p-f1d6e14f.js";import{F as f}from"./p-d4724349.js";const l=class{constructor(i){t(this,i),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.handleFormControlInput=t=>{const s=t.target,i=s.getAttribute("name");this.inputHandler(i,s.value),this.formControlInput.emit({name:i,value:s.value})},this.updateInput=t=>{const s=this.el.querySelector("input");s&&(s.value=t||"")},this.isFocused=!1,this.label=void 0,this.name=void 0,this.helpText=void 0,this.errorText=void 0,this.defaultValue=void 0,this.inputHandler=void 0,this.disabled=void 0}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?o:this.isFocused?h:this.errorText?r:d}render(){return i(e,{key:"bd8c24f0c1209334fde787d8dc7402e75ea1d91b"},i("div",{key:"d49ef47d17045ab070005a04a9edc5b11ba1b879",class:"form-group d-flex flex-column"},i("label",{key:"49bfca8efbaa753dae1f862f5490ab8943c6a9fd",part:c,class:"form-label",htmlFor:this.name},this.label),i("input",{key:"3b4ef4300374a4cdd37f85e2155fcc26d357fdca",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"number",disabled:this.disabled}),i(n,{key:"4bdb8dc58c7143ccdbcd50568784b62217459ba9",helpText:this.helpText,name:this.name}),i(f,{key:"0e5a0df13a356fe03dc389fc4bf6eba9000597fc",errorText:this.errorText,name:this.name})))}get el(){return a(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{l as form_control_number}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as a}from"./p-2783e363.js";import{l as t}from"./p-c6be72b0.js";import{f as s,p as i,c}from"./p-f4739d31.js";import{R as r,S as l,T as d}from"./p-2dd39017.js";import{S as o}from"./p-bfe9748b.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import{I as p}from"./p-651c881b.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a},this.terminalId=void 0,this.terminalStatus=void 0}componentWillLoad(){this.debouncedSetParamsOnChange=t.exports.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:p.connected},{label:"Disconnected",value:p.disconnected},{label:"Unknown",value:p.unknown}]}render(){const e=Object.assign({},s);return a(o,{key:"b731afdb3ffb0c9bc35c5e04177b0db9bc5b9a69"},a("table-filters-menu",{key:"8ee2d6e6f4e12e03a8236b35aae3132f5a72c204",params:e,clearParams:c,part:r},a("div",{key:"a8b6adb28c43a2f528554ee9ae582001bddcaac5",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"08cc61200740cb6fac0b123bd2005942ea9d6c3f",class:"p-2"},a("form-control-text",{key:"d0f572c893e3d44256d482e791b93588422bcf86",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:l})),a("div",{key:"a498de1139b122bad5416267ecc949debc43491d",class:"p-2"},a("form-control-select",{key:"6235e893b62882e993e798b9a3cc1fafc84f215c",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:d})))))}};export{b as justifi_terminals_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as s}from"./p-
|
|
1
|
+
import{A as s}from"./p-5f6b4bc9.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";class t{async fetchDispute(t,i){const p=`disputes/${t}`;return s({authToken:i,apiOrigin:"https://wc-proxy.justifi.ai"}).get(p)}async updateDisputeResponse(t,i,p){const e=`disputes/${t}/response`;return s({authToken:i,apiOrigin:"https://wc-proxy.justifi.ai"}).patch(e,p)}async submitDisputeResponse(t,i,p){const e=`disputes/${t}/response`;return s({authToken:i,apiOrigin:"https://wc-proxy.justifi.ai"}).post(e,p)}async createDisputeEvidence(t,i,p){const e=`disputes/${t}/evidence`;return s({authToken:i,apiOrigin:"https://wc-proxy.justifi.ai"}).put(e,p)}}export{t as D}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a}from"./p-2783e363.js";import{n as r,o as s,p as e,q as g,r as n,u as d,v as i,w as t,x as b}from"./p-
|
|
1
|
+
import{h as a}from"./p-2783e363.js";import{n as r,o as s,p as e,q as g,r as n,u as d,v as i,w as t,x as b}from"./p-2dd39017.js";var o;!function(a){a.PRIMARY="primary",a.SECONDARY="secondary",a.SUCCESS="success",a.DANGER="danger",a.WARNING="warning",a.INFO="info",a.LIGHT="light",a.DARK="dark"}(o||(o={}));const c=o=>{const{variant:c,text:p,title:f}=o,l={default:"badge",primary:"badge bg-primary",secondary:"badge bg-secondary",success:"badge bg-success",danger:"badge bg-danger",warning:"badge bg-warning",info:"badge bg-info",light:"badge bg-light",dark:"badge bg-dark"},u={default:r,primary:s,secondary:e,success:g,danger:n,warning:d,info:i,light:t,dark:b};return a("span",{class:l[c]||l.default,part:u[c]||u.default,title:f},p)};export{c as B,o as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a}from"./p-2783e363.js";import{t as s,h as l,e as t}from"./p-
|
|
1
|
+
import{h as a}from"./p-2783e363.js";import{t as s,h as l,e as t}from"./p-2dd39017.js";const e=l=>a("main",{class:"p-4 d-flex justify-content-center text-center",style:{fontSize:"1.2rem"}},a("p",{part:s},l)),p=s=>a("h2",{part:l,class:"mt-4 fs-5 border-bottom pb-3"},s.sectionTitle),r=({title:l,value:t})=>l&&t?a("div",{class:"d-table-row gap-2"},a("span",{class:"fw-bold d-table-cell px-2",part:s},l),a("span",{class:"flex-1 d-table-cell px-2 text-wrap",part:s},t)):null,c=({title:t,value:e,classes:p})=>a("div",{class:`d-flex flex-column ${p}`},a("span",{class:"fw-bold border-1 border-bottom ps-2 pe-2",part:l},t),a("span",{class:"pt-2 ps-2 pe-2",part:s},e)),o=({title:l,slot:e,badge:p},r)=>a("div",{slot:e,class:"p-2"},a("div",{class:"d-flex flex-row align-items-center gap-2 mb-2"},a("h1",{class:"m-0",part:t},l),p),a("div",{class:"d-flex flex-row align-items-top",part:s},r)),d=({metadata:s})=>s&&Object.keys(s).length?a("div",{class:"mt-4"},a("pre",{class:"p-2","aria-label":"metadata content"},a("code",null,JSON.stringify(s,null,2)))):null;export{d as C,p as D,e as E,o as a,c as b,r as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-2783e363.js";import{f as i}from"./p-2ca5b5e4.js";import{t as a,C as r}from"./p-f2111e68.js";import{B as d}from"./p-e60867c6.js";import{S as o}from"./p-bfe9748b.js";import{S as c}from"./p-a3d75257.js";import{a as n,C as h}from"./p-9dd8685c.js";import{g as p,a as f}from"./p-87f8c596.js";import{D as l}from"./p-694078d2.js";import{D as u}from"./p-667ebd79.js";import{c as b,J as y}from"./p-ee9d433f.js";import"./p-0e180654.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-abdbcd8e.js";import"./p-382ab4e8.js";import"./p-61f0a2ce.js";import"./p-046ecd01.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=(()=>{})})=>{var o;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:f(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=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),this.dispute=void 0,this.authToken=void 0,this.isLoading=void 0}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({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:u.respondToDispute})}render(){var e,t,n,h,p,f,l;return s(o,{key:"77119b1227200909f4742e24df0a45e1f631c65c"},this.isLoading&&s("div",{key:"f0766ff057fb2f4b75b34c7d4a386bde43e49652",style:{marginBottom:"8px"}},s(c,{key:"d7268194dea5ac2a3b87aea8e17573b4768e308f",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"f8863e45a917f56be302ca1b0b3d472119f6465c",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"c7b8c9c89d9488eea3be8ea0b4536f98a8151487",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"875fe7def317ce1c4547e04e83baf2b232209058",part:a},s("h1",{key:"09646afc2aac3bf4ef9737bc12442660bbafb2dd",class:"h4",part:r},"This payment is disputed"),s("p",{key:"14224cffb16726eaa589118be954e0f844ffaee8"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"415028b91872a2391796872fdffdbee837a2a511",class:"h5"},"Dispute details"),s("div",{key:"c2b8c6be3132f98eb8c686ab88a5a6a68f92a60e",class:"d-table gap-2"},s("div",{key:"d11bd8b3bc680183e8bee40281cc2c294aedbd5a",class:"d-table-row gap-2"},s("span",{key:"d77796c0d2764329c3b482ae49ceb8b4cac03d37",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"716d8af2a250c3237af6e23b43bf50e032e9f203",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"daba4379197533d2a4b246e81139d81cd15761c6",class:"d-table-row gap-2"},s("span",{key:"a039fbf47aff16445e3411c33a7b53716c42866d",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"19087aba5c516d0c71e9f84e8b3323a044ae532a",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"68ef78b15627df3b22bcde4b90f7c216466e7468",class:"d-table-row gap-2"},s("span",{key:"9463c281d76b5e201a55c2993253fc22d04168dc",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"5cffed27038f5571f37377c5023a88c8b7773a59",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"e856d924edac10116781425f6d7c4c8c6b26ced2",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"6d5278a91f79c2fe8fbdd9e391b109a6491b13b6",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"242b9076b482aae731ab6bedc1592a1a826e24c5",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"f3711546ce5bf8b6a4a8689f5db3fdbf58f45bf4"},s("h1",{key:"06e39be43cfacf667919adbd2f4f8c596702c340",class:"h4"},"This payment is disputed and under review"),s("p",{key:"b3bfef2d40e197f8dc9df6f71d9f13017a4b923d"},"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:"580144b1439d6e017726b9731b7bb15e71900092"},s("h1",{key:"42d74d215d23409672449af86e25c945aac33ea1",class:"h4"},"This payment was disputed"),s("p",{key:"4c337e89a32f62c8f03a53eb84737785f4b0bdb4"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"66c0f7bbada42053683dd25776a7c0abdb708315"},s("h1",{key:"273f2d82dbe73a15da3186946763579be2801aa4",class:"h4"},"This payment was disputed"),s("p",{key:"22172d1c6833eb5407c19dd31b85db805d07d177"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.errorMessage=null,this.authToken=void 0,this.disputeId=void 0,this.disputeResponse=void 0,this.apiOrigin="https://wc-proxy.justifi.ai"}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){this.analytics.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 o;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:f(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=(()=>{})})=>{var o;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:f(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(o,{key:"4c0cd0b8a082d9f2f4428868d88cbb9bde2a3a5d"},s("justifi-dispute-response-core",{key:"58bbf7f5b2ce8efea0467efddfeffe3c752a3402","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},j=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.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-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:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.currentStepComponentRef=void 0}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:"452cfcf106f40c27f34df05ae2923c0909de9245",class:"row gy-3"},s("div",{key:"d9b608a8d880310b96e98cd4a00cabfcca77dc79",class:"col-12"},s("h1",{key:"050aef1fa636d09880edc7d738d56eab2cf62e52",class:"h4",part:r},"Counter dispute")),s("div",{key:"4e6094f9240d4db3d4bc03c59754ab3d04fed5bc",class:"col-12"},this.currentStepComponent),s("div",{key:"9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc",class:"col-12"},s("div",{key:"d37cda5a7689d8bf9263283eb24e1074ee3d97a0",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"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-2783e363.js";import{f as i}from"./p-2ca5b5e4.js";import{t as a,C as r}from"./p-2dd39017.js";import{B as d}from"./p-944f1cc7.js";import{S as c}from"./p-bfe9748b.js";import{S as o}from"./p-8946edfd.js";import{a as n,C as h}from"./p-9dd8685c.js";import{g as p,a as f}from"./p-87f8c596.js";import{D as l}from"./p-324587d0.js";import{D as u}from"./p-667ebd79.js";import{c as b,J as y}from"./p-251c8e97.js";import"./p-5f6b4bc9.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-abdbcd8e.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import"./p-d5960545.js";const v=({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:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=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),this.dispute=void 0,this.authToken=void 0,this.isLoading=void 0}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({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:u.respondToDispute})}render(){var e,t,n,h,p,f,l;return s(c,{key:"77119b1227200909f4742e24df0a45e1f631c65c"},this.isLoading&&s("div",{key:"f0766ff057fb2f4b75b34c7d4a386bde43e49652",style:{marginBottom:"8px"}},s(o,{key:"d7268194dea5ac2a3b87aea8e17573b4768e308f",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"f8863e45a917f56be302ca1b0b3d472119f6465c",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"c7b8c9c89d9488eea3be8ea0b4536f98a8151487",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"875fe7def317ce1c4547e04e83baf2b232209058",part:a},s("h1",{key:"09646afc2aac3bf4ef9737bc12442660bbafb2dd",class:"h4",part:r},"This payment is disputed"),s("p",{key:"14224cffb16726eaa589118be954e0f844ffaee8"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"415028b91872a2391796872fdffdbee837a2a511",class:"h5"},"Dispute details"),s("div",{key:"c2b8c6be3132f98eb8c686ab88a5a6a68f92a60e",class:"d-table gap-2"},s("div",{key:"d11bd8b3bc680183e8bee40281cc2c294aedbd5a",class:"d-table-row gap-2"},s("span",{key:"d77796c0d2764329c3b482ae49ceb8b4cac03d37",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"716d8af2a250c3237af6e23b43bf50e032e9f203",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"daba4379197533d2a4b246e81139d81cd15761c6",class:"d-table-row gap-2"},s("span",{key:"a039fbf47aff16445e3411c33a7b53716c42866d",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"19087aba5c516d0c71e9f84e8b3323a044ae532a",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"68ef78b15627df3b22bcde4b90f7c216466e7468",class:"d-table-row gap-2"},s("span",{key:"9463c281d76b5e201a55c2993253fc22d04168dc",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"5cffed27038f5571f37377c5023a88c8b7773a59",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"e856d924edac10116781425f6d7c4c8c6b26ced2",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"6d5278a91f79c2fe8fbdd9e391b109a6491b13b6",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"242b9076b482aae731ab6bedc1592a1a826e24c5",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"f3711546ce5bf8b6a4a8689f5db3fdbf58f45bf4"},s("h1",{key:"06e39be43cfacf667919adbd2f4f8c596702c340",class:"h4"},"This payment is disputed and under review"),s("p",{key:"b3bfef2d40e197f8dc9df6f71d9f13017a4b923d"},"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:"580144b1439d6e017726b9731b7bb15e71900092"},s("h1",{key:"42d74d215d23409672449af86e25c945aac33ea1",class:"h4"},"This payment was disputed"),s("p",{key:"4c337e89a32f62c8f03a53eb84737785f4b0bdb4"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"66c0f7bbada42053683dd25776a7c0abdb708315"},s("h1",{key:"273f2d82dbe73a15da3186946763579be2801aa4",class:"h4"},"This payment was disputed"),s("p",{key:"22172d1c6833eb5407c19dd31b85db805d07d177"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.errorMessage=null,this.authToken=void 0,this.disputeId=void 0,this.disputeResponse=void 0,this.apiOrigin="https://wc-proxy.justifi.ai"}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){this.analytics.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:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),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:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"4c0cd0b8a082d9f2f4428868d88cbb9bde2a3a5d"},s("justifi-dispute-response-core",{key:"58bbf7f5b2ce8efea0467efddfeffe3c752a3402","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},j=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.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-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:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.currentStepComponentRef=void 0}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:"452cfcf106f40c27f34df05ae2923c0909de9245",class:"row gy-3"},s("div",{key:"d9b608a8d880310b96e98cd4a00cabfcca77dc79",class:"col-12"},s("h1",{key:"050aef1fa636d09880edc7d738d56eab2cf62e52",class:"h4",part:r},"Counter dispute")),s("div",{key:"4e6094f9240d4db3d4bc03c59754ab3d04fed5bc",class:"col-12"},this.currentStepComponent),s("div",{key:"9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc",class:"col-12"},s("div",{key:"d37cda5a7689d8bf9263283eb24e1074ee3d97a0",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"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import{p as a}from"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-daf0303f.js";import{p as a}from"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import{U as i,V as r}from"./p-2dd39017.js";import{T as c,a as h,b as o,c as d,d as n}from"./p-c380213d.js";import{c as b,a as p}from"./p-17c4edf7.js";import{o as f,g as m}from"./p-092515e0.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-5d600828.js";import"./p-34a95381.js";import"./p-f20b6ce1.js";const u=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:c.row,data:e})},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.checkouts=[],this.checkoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new h(this.checkouts,this.columns,b,p),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),f("set",(()=>{this.pagingParams={}})),f("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=m();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"ae6d3dfefad89fcd28b2ad883a1d1172fffd2218"},e("div",{key:"91329a7880cd774c71cf30722b7be49b8a0109e9",class:"table-wrapper"},e("table",{key:"75f974cc2140089a7a42738ef0cd3bd67729ca8d",class:"table table-hover",part:i},e("thead",{key:"6aaaee8db285ca1b94cea662f62a51040f2a0f06",class:"table-head sticky-top"},e("tr",{key:"68215e0698b97a8389083a521bd8a493c410a196",class:"table-light text-nowrap"},this.checkoutsTable.columnData.map((t=>t)))),e("tbody",{key:"b3aa9bd464fda772fae2e191e1cc4f4612bd514b",class:"table-body"},e(o,{key:"a874602fb597ee55def35b80474bd2228b918200",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(d,{key:"8c30048e8766be8ca14fbbd6f990aac019904b26",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(n,{key:"c567bbca2ebbdc42dcfa6c07ae2c61b538643cb7",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"f02cd5b963f2c087b1a8ab60f25f6b1081e735aa",class:"sticky-bottom"},e("tr",{key:"a651ab932931db6a4ad42888a9b43e7b89a58495",class:"table-light align-middle"},e("td",{key:"1fde503bccc4e79454d5786fac8f82bea67618e1",part:r,colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"6237a008bc148f44aa7e159d530470c5114b32e4",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{u as checkouts_list_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,F as i,r as t,c as e}from"./p-2783e363.js";import{E as l}from"./p-
|
|
1
|
+
import{h as s,F as i,r as t,c as e}from"./p-2783e363.js";import{E as l}from"./p-365e56fc.js";import{S as r}from"./p-bfe9748b.js";import{S as n}from"./p-8946edfd.js";import"./p-2dd39017.js";const o=()=>{const t=()=>s("div",{class:"mt-5"},s(n,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null)),s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null))));return s(i,null,s(t,null),s(t,null),s(t,null),s(t,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.getBusiness=void 0,this.business=void 0,this.renderState=a.LOADING,this.errorMessage="An error ocurred."}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:i,message:s,severity:t})}})}render(){return this.renderState===a.LOADING?s(r,null,s(o,null)):this.renderState===a.ERROR?s(r,null,l(this.errorMessage)):s(r,null,s("generic-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))}};export{d as business_details_core}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as o}from"./p-9dd8685c.js";import{c as a,J as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as o}from"./p-9dd8685c.js";import{c as a,J as r}from"./p-251c8e97.js";import{m as p,P as n}from"./p-17eea747.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import{P as c}from"./p-651c881b.js";import"./p-61f0a2ce.js";import{g as h,a as d}from"./p-87f8c596.js";import{m as l,S as m}from"./p-52e2cc5e.js";import{S as u}from"./p-bfe9748b.js";import{d as b}from"./p-ba113075.js";import"./p-d5960545.js";import"./p-5f6b4bc9.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-d273f33b.js";import"./p-34a95381.js";import"./p-2dd39017.js";const f=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getPayouts=void 0,this.getPayoutCSV=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=b}componentWillLoad(){a(),this.analytics=new r(this),this.initializeGetData()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new n,apiOrigin:this.apiOrigin};this.getPayouts=(({id:t,authToken:i,service:s,apiOrigin:o})=>async({params:a,onSuccess:r,onError:p})=>{var n,l;try{const m=await s.fetchPayouts(t,i,a,o);if(m.error)return p({error:h(m.error),code:d(null===(l=m.error)||void 0===l?void 0:l.code),severity:e.ERROR});{const t=Object.assign({},m.page_info);r({payouts:(null===(n=m.data)||void 0===n?void 0:n.map((t=>new c(t))))||[],pagingInfo:t})}}catch(t){const i=d(null==t?void 0:t.code);return p({error:t.message||t,code:i,severity:e.ERROR})}})(t),this.getPayoutCSV=p(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({accountId:this.accountId,authToken:this.authToken,service:new m,apiOrigin:this.apiOrigin}))}render(){return s(u,{key:"7456971cf903af6fd77385fd01dac69760b9df11",exportedparts:"\ntable-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\ntable-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\nempty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text\n"},s("payouts-list-core",{key:"6bf911cb5a793f49fb19903013c48e6df93f9866",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payouts_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-2783e363.js";import{P as r}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-2783e363.js";import{P as r}from"./p-a81cabed.js";import{a as e,C as o}from"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import{P as a}from"./p-9894484a.js";import"./p-651c881b.js";import"./p-61f0a2ce.js";import{g as p,a as n}from"./p-87f8c596.js";import{c as d,J as c}from"./p-251c8e97.js";import{S as h}from"./p-bfe9748b.js";import{d as m}from"./p-b19a37d4.js";import"./p-5f6b4bc9.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-d5960545.js";import"./p-88af0d7d.js";import"./p-34a95381.js";import"./p-2dd39017.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getPayments=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=m}componentWillLoad(){d(),this.analytics=new c(this),this.initializeGetPayments()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:i,apiOrigin:r})=>async({params:o,onSuccess:d,onError:c,final:h})=>{var m,f;try{const h=await i.fetchPayments(t,s,o,r);if(h.error)return c({error:p(h.error),code:n(null===(f=h.error)||void 0===f?void 0:f.code),severity:e.ERROR});{const t=Object.assign({},h.page_info);d({payments:(null===(m=h.data)||void 0===m?void 0:m.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:e.ERROR})}finally{return h()}})({id:this.accountId,authToken:this.authToken,service:new r,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR}))}render(){return i(h,{key:"ade68405b7b039032dc8d4a271bdafd6b5b3dfe8"},i("payments-list-core",{key:"30844738130c05a96bd93d670bad14d544368fb2",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payments_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o}from"./p-5f6b4bc9.js";import{a as r}from"./p-9dd8685c.js";import"./p-daf0303f.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import{S as s}from"./p-651c881b.js";import"./p-61f0a2ce.js";import{g as c,a as t}from"./p-87f8c596.js";class a{async fetchSubAccounts(r,s,c,t="https://wc-proxy.justifi.ai"){const a={Account:r};return o({authToken:s,apiOrigin:t}).get("sub_accounts",c,null,a)}}const i=({accountId:o,authToken:a,service:i,apiOrigin:n})=>async({params:p,onSuccess:e,onError:u})=>{var f,m;try{const d=await i.fetchSubAccounts(o,a,p,n);if(d.error){return u({error:c(d.error),code:t(null===(m=d.error)||void 0===m?void 0:m.code),severity:r.ERROR})}{const o=Object.assign({},d.page_info);e({subAccounts:(null===(f=d.data)||void 0===f?void 0:f.map((o=>new s(o))))||[],pagingInfo:o})}}catch(o){const s=t(null==o?void 0:o.code);return u({error:o.message||o,code:s,severity:r.ERROR})}};export{a as S,i as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as n,H as t,c as i,g as o}from"./p-2783e363.js";import{c as a,F as r}from"./p-5844a0f0.js";import{u as s,l as c,k as d,m as f,n as l,q as u}from"./p-95e55bb1.js";import{S as h}from"./p-6078a370.js";import{n as m}from"./p-e3c22aa9.js";import{F as b}from"./p-5ee67fad.js";import{p as w}from"./p-046ecd01.js";import{a as p}from"./p-4cc3c7f9.js";import{i as g,b as y,a as v,c as k,l as x}from"./p-f2111e68.js";import"./p-c9b78275.js";import"./p-5d1d2fd7.js";import"./p-1ff8810b.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";const j=a({name:s.required("Enter full name"),address_line1:c.required("Enter street address"),address_line2:d.nullable(),address_city:f.required("Enter city"),address_state:l.required("Select state"),address_postal_code:u.required("Enter postal code")}),I=a({address_postal_code:u.required("Enter postal code")}),z=class{constructor(n){e(this,n),this.inputHandler=(e,n)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:n}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new r(j)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return n(t,{key:"2763b7ac25e51e9d206d6a0bc6ed28ec13f54cc3"},n("form",{key:"758b52530cc945e9c3ce5a2ee11838a3776abc6b"},n("fieldset",{key:"2ab7312e043d3cbc03993f11ac5692692319af4b"},this.legend&&n("legend",{key:"8e324a5bb2fabc975742e866341a3434e1950a3c"},this.legend),n("div",{key:"fafd0d9fa2784341dc80fea8c53d081d2c84af5d",class:"row gy-3"},n("div",{key:"3aa18a756f3ea6ff9dcfa061cd845c714cab3540",class:"col-12"},n("form-control-text",{key:"4b75c876eef667f3d353c802376774e7c1af1b84",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),n("div",{key:"dddc81024aef4757c18b31db84204fc9e70f9ab1",class:"col-12"},n("form-control-text",{key:"d9d63301e3d87885de9414164c820df2013cb6ae",name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),n("div",{key:"f96675211a63fc785b9e759aef44f4dd4b22e0a3",class:"col-12"},n("form-control-text",{key:"f2c6a24150d640f9efbfa1748f577e32550b3507",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),n("div",{key:"83cf74afae2c4e899151cc5461a06632fef3c756",class:"col-12"},n("form-control-text",{key:"cbbf7dfac17eb69b2c9e80534051822cd4f94afd",name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),n("div",{key:"9331b691855dc4f9a60b746089552228a5b12942",class:"col-12"},n("form-control-select",{key:"f0f726fe2633ab45754691726a0008c4e50f41ac",name:"address_state",label:"State",options:h,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),n("div",{key:"0d1d00ca86d09a370330cd9f3807783a8cd981a4",class:"col-12"},n("form-control-text",{key:"0e43cfe70ca05a3d795d82f554453d12562b2ec9",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};var O,M={exports:{}};O=M,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,a=!1,r=7,s="[iFrameSizer]",c=s.length,d=null,f=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},h=null,m=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(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){C(t,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],P):O.exports=P(),window.iFrameResize=window.iFrameResize||P()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function y(e){return u[e]?u[e].log:o}function v(e,n){j("log",e,n,y(e))}function k(e,n){j("info",e,n,y(e))}function x(e,n){j("warn",e,n,!0)}function j(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 I(e){function n(){t("Height"),t("Width"),N((function(){H(_),S(W),m("onResized",_)}),_,"init")}function t(e){var n=Number(u[W]["max"+e]),t=Number(u[W]["min"+e]),i=e.toLowerCase(),o=Number(_[i]);v(W,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,v(W,"Set "+i+" to min value")),o>n&&(o=n,v(W,"Set "+i+" to max value")),_[i]=""+o}function i(e){return C.slice(C.indexOf(":")+r+e)}function o(e,n){var t,i;t=function(){var t,i;L("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=_.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)},b[i=n]||(b[i]=setTimeout((function(){b[i]=null,t()}),32))}function a(e){var n=e.getBoundingClientRect();return T(W),{x:Math.floor(Number(n.left)+Number(d.x)),y:Math.floor(Number(n.top)+Number(d.y))}}function f(e){var n=e?a(_.iframe):{x:0,y:0},t={x:Number(_.width)+n.x,y:Number(_.height)+n.y};v(W,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(d=t,l(),v(W,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):x(W,"Unable to scroll to requested position, window.parentIFrame not found")}function l(){!1===m("onScroll",d)?R():S(W)}function h(e){var n={};if(0===Number(_.width)&&0===Number(_.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:_.width,y:_.height};m(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function m(e,n){return z(W,e,n)}var w,y,j,I,O,M,C=e.data,_={},W=null;"[iFrameResizerChild]Ready"===C?function(){for(var e in u)L("iFrame requested init",V(e),u[e].iframe,e)}():s===(""+C).slice(0,c)&&C.slice(c).split(":")[0]in u?(I=(j=C.slice(c).split(":"))[1]?parseInt(j[1],10):0,O=u[j[0]]&&u[j[0]].iframe,M=getComputedStyle(O),_={iframe:O,id:j[0],height:I+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(M)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(M),width:j[2],type:j[3]},u[W=_.id]&&(u[W].loaded=!0),(y=_.type in{true:1,false:1,undefined:1})&&v(W,"Ignoring init message from meta parent page"),!y&&function(e){var n=!0;return u[e]||(n=!1,x(_.type+" No settings for "+e+". Message was: "+C)),n}(W)&&(v(W,"Received: "+C),w=!0,null===_.iframe&&(x(W,"IFrame ("+_.id+") not found"),w=!1),w&&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(v(W,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(v(W,"Checking connection is from: "+(n=u[W]&&u[W].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+_.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),_.type){case"close":F(_.iframe);break;case"message":c=i(6),v(W,"onMessage passed: {iframe: "+_.iframe.id+", message: "+c+"}"),m("onMessage",{iframe:_.iframe,message:JSON.parse(c)}),v(W,"--");break;case"mouseenter":h("onMouseEnter");break;case"mouseleave":h("onMouseLeave");break;case"autoResize":u[W].autoResize=JSON.parse(i(9));break;case"scrollTo":f(!1);break;case"scrollToOffset":f(!0);break;case"pageInfo":o(u[W]&&u[W].iframe,W),function(){function e(e,i){function a(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){v(t,e+n+" listener for sendPageInfo"),i(window,n,a)}))}function n(){e("Remove ",g)}var t=W;e("Add ",p),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]||"",r=decodeURIComponent(t),(s=document.getElementById(r)||document.getElementsByName(r)[0])?(e=a(s),v(W,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),d={x:e.x,y:e.y},l(),v(W,"--")):window.top===window.self?v(W,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):v(W,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":E(_);break;case"init":n(),m("onInit",_.iframe);break;default:0===Number(_.width)&&0===Number(_.height)?x("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,r,s,c}())):k(W,"Ignored: "+C)}function z(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 M(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==z(t,"onClose",t)){v(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}z(t,"onClosed",t),v(t,"--"),M(e),n&&(n.disconnect(),n=null)}else v(t,"Close iframe cancelled by onClose event")}function T(n){null===d&&v(n,"Get page position: "+(d={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+d.y)}function S(e){null!==d&&(window.scrollTo(d.x,d.y),v(e,"Set page position: "+d.x+","+d.y),R())}function R(){d=null}function E(e){v(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),T(e.id),N((function(){H(e),L("reset","reset",e.iframe,e.id)}),e,"reset")}function H(e){function n(n){a||"0"!==e[n]||(a=!0,v(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"))&&L("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){v("window","Mutation observed: "+n[0].target+" "+n[0].type),_(e,16)}var t,i=w();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",v(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):v("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 N(e,n,t){t!==n.type&&f&&!window.jasmine?(v(n.id,"Requesting animation frame"),f(e)):e()}function L(e,n,t,i,o){var a,r=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(v(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(a=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,a)):x(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||r||(r=!0,x(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 V(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 C(t,a){function r(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],x(d,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,d=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=a&&a.id||m.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(a||{}).log,v(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);d in u&&"iFrameResizer"in t?x(d,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[d]=Object.create(null),u[d].iframe=t,u[d].firstRun=!0,u[d].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(r,e),function(e){for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&(u[d][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:m[n])}(e),u[d]&&(u[d].targetOrigin=!0===u[d].checkOrigin?""===(n=u[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(a),function(){switch(v(d,"IFrame scrolling "+(u[d]&&u[d].scrolling?"enabled":"disabled")+" for "+d),t.style.overflow=!1===(u[d]&&u[d].scrolling)?"hidden":"auto",u[d]&&u[d].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[d]?u[d].scrolling:"no"}}(),function(){function e(e){var n=u[d][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,v(d,"Set "+e+" = "+t.style[e]))}function n(e){if(u[d]["min"+e]>u[d]["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[d]&&u[d].bodyMargin)&&"0"!==(u[d]&&u[d].bodyMargin)||(u[d].bodyMarginV1=u[d].bodyMargin,u[d].bodyMargin=u[d].bodyMargin+"px"),s=V(d),(c=w())&&(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)),p(t,"load",(function(){L("iFrame.onload",s,t,e,!0),(!u[d]||!u[d].firstRun)&&u[d]&&u[d].heightCalculationMethod in l&&E({iframe:t,height:0,width:0,type:"init"})})),L("init",s,t,e,!0),u[d]&&(u[d].iframe.iFrameResizer={close:F.bind(null,u[d].iframe),removeListeners:M.bind(null,u[d].iframe),resize:L.bind(null,"Window resize","resize",u[d].iframe),moveToAnchor:function(e){L("Move to anchor","moveToAnchor:"+e,u[d].iframe,d)},sendMessage:function(e){L("Send Message","message:"+(e=JSON.stringify(e)),u[d].iframe,d)}}))}function _(e,n){null===h&&(h=setTimeout((function(){h=null,e()}),n))}function W(){"hidden"!==document.visibilityState&&(v("document","Trigger event: Visibility change"),_((function(){A("Tab Visible","resize")}),16))}function A(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&L(e,n,u[t].iframe,t)}))}function P(){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+">")}(),C(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!f;e+=1)f=window[n[e]+"RequestAnimationFrame"];f?f=f.bind(window):v("setup","RequestAnimationFrame not supported")}(),p(window,"message",I),p(window,"resize",(function(){v("window","Trigger event: resize"),_((function(){A("Window resize","resize")}),16)})),p(document,"visibilitychange",W),p(document,"-webkit-visibilitychange",W),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&x("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}}}();const F=M.exports;class T{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.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))},this.isFocused=!1,this.isValid=!0,this.errorText=void 0,this.inputId=void 0,this.label=void 0,this.iframeOrigin=void 0}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:w.version})}initializeFrameCommunicationService(){var e;this.frameService=new T(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?g:this.isValid?this.isFocused?v:k:y}get style(){return this.isFocused?this.isValid?p.focused:p.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(p.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"e818cf95e3137d0e831ca05cb1fefeed7d8ea487",class:"form-group d-flex flex-column"},n("div",{key:"55d3af9ab22c267c4ee7d00fdcea3f4cb7339685",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"9999761a3925081bf9ebcbc3a229306fcf9902ae",class:"form-label",htmlFor:"",part:x},this.label||""),n("div",{key:"979c124113a08e50bbc8983549e98451823d0aaa",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:"3fc09b6a212b3d0f63f2d7cc9f0037be5afd6d58",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{F({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(b,{key:"a9d8f075d0b827bab2e00053d3a7575557b14464",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}},R=class{constructor(n){e(this,n),this.inputHandler=(e,n)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:n}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new r(I)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return n(t,{key:"e798e67c159b53a995e4a60246c6f6d6e872f1ec"},n("form",{key:"24d6980de772a360c0218e9ab50550dcee5786d5"},n("fieldset",{key:"9e990836becccdf5d12a9e15e2eb7f4078f74b08"},this.legend&&n("legend",{key:"12d445b392cf03114dbd2a37391ecc1b87304868"},this.legend),n("div",{key:"2d2fed9cf30b3869633b80b39b7684dfde66f6b7",class:"row gy-3"},n("div",{key:"8ec042863e646d5daffeb3fbb5395336406adcde",class:"col-12"},n("form-control-text",{key:"82a2c18c2a7eef7ba7ac46e53dfc9c975c8d28b7",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};export{z as billing_form,S as iframe_input,R as postal_form}
|
|
1
|
+
import{r as e,h as n,H as t,c as i,g as o}from"./p-2783e363.js";import{c as a,F as r}from"./p-5844a0f0.js";import{u as s,l as c,k as d,m as f,n as l,q as u}from"./p-95e55bb1.js";import{S as h}from"./p-6078a370.js";import{n as m}from"./p-e3c22aa9.js";import{F as b}from"./p-d4724349.js";import{p as w}from"./p-d5960545.js";import{a as p}from"./p-4cc3c7f9.js";import{i as g,b as y,a as v,c as k,l as x}from"./p-2dd39017.js";import"./p-c9b78275.js";import"./p-5d1d2fd7.js";import"./p-1ff8810b.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";const j=a({name:s.required("Enter full name"),address_line1:c.required("Enter street address"),address_line2:d.nullable(),address_city:f.required("Enter city"),address_state:l.required("Select state"),address_postal_code:u.required("Enter postal code")}),I=a({address_postal_code:u.required("Enter postal code")}),z=class{constructor(n){e(this,n),this.inputHandler=(e,n)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:n}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new r(j)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return n(t,{key:"2763b7ac25e51e9d206d6a0bc6ed28ec13f54cc3"},n("form",{key:"758b52530cc945e9c3ce5a2ee11838a3776abc6b"},n("fieldset",{key:"2ab7312e043d3cbc03993f11ac5692692319af4b"},this.legend&&n("legend",{key:"8e324a5bb2fabc975742e866341a3434e1950a3c"},this.legend),n("div",{key:"fafd0d9fa2784341dc80fea8c53d081d2c84af5d",class:"row gy-3"},n("div",{key:"3aa18a756f3ea6ff9dcfa061cd845c714cab3540",class:"col-12"},n("form-control-text",{key:"4b75c876eef667f3d353c802376774e7c1af1b84",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),n("div",{key:"dddc81024aef4757c18b31db84204fc9e70f9ab1",class:"col-12"},n("form-control-text",{key:"d9d63301e3d87885de9414164c820df2013cb6ae",name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),n("div",{key:"f96675211a63fc785b9e759aef44f4dd4b22e0a3",class:"col-12"},n("form-control-text",{key:"f2c6a24150d640f9efbfa1748f577e32550b3507",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),n("div",{key:"83cf74afae2c4e899151cc5461a06632fef3c756",class:"col-12"},n("form-control-text",{key:"cbbf7dfac17eb69b2c9e80534051822cd4f94afd",name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),n("div",{key:"9331b691855dc4f9a60b746089552228a5b12942",class:"col-12"},n("form-control-select",{key:"f0f726fe2633ab45754691726a0008c4e50f41ac",name:"address_state",label:"State",options:h,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),n("div",{key:"0d1d00ca86d09a370330cd9f3807783a8cd981a4",class:"col-12"},n("form-control-text",{key:"0e43cfe70ca05a3d795d82f554453d12562b2ec9",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};var O,M={exports:{}};O=M,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,a=!1,r=7,s="[iFrameSizer]",c=s.length,d=null,f=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},h=null,m=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(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){C(t,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],P):O.exports=P(),window.iFrameResize=window.iFrameResize||P()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function y(e){return u[e]?u[e].log:o}function v(e,n){j("log",e,n,y(e))}function k(e,n){j("info",e,n,y(e))}function x(e,n){j("warn",e,n,!0)}function j(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 I(e){function n(){t("Height"),t("Width"),N((function(){H(_),S(W),m("onResized",_)}),_,"init")}function t(e){var n=Number(u[W]["max"+e]),t=Number(u[W]["min"+e]),i=e.toLowerCase(),o=Number(_[i]);v(W,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,v(W,"Set "+i+" to min value")),o>n&&(o=n,v(W,"Set "+i+" to max value")),_[i]=""+o}function i(e){return C.slice(C.indexOf(":")+r+e)}function o(e,n){var t,i;t=function(){var t,i;L("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=_.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)},b[i=n]||(b[i]=setTimeout((function(){b[i]=null,t()}),32))}function a(e){var n=e.getBoundingClientRect();return T(W),{x:Math.floor(Number(n.left)+Number(d.x)),y:Math.floor(Number(n.top)+Number(d.y))}}function f(e){var n=e?a(_.iframe):{x:0,y:0},t={x:Number(_.width)+n.x,y:Number(_.height)+n.y};v(W,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(d=t,l(),v(W,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):x(W,"Unable to scroll to requested position, window.parentIFrame not found")}function l(){!1===m("onScroll",d)?R():S(W)}function h(e){var n={};if(0===Number(_.width)&&0===Number(_.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:_.width,y:_.height};m(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function m(e,n){return z(W,e,n)}var w,y,j,I,O,M,C=e.data,_={},W=null;"[iFrameResizerChild]Ready"===C?function(){for(var e in u)L("iFrame requested init",V(e),u[e].iframe,e)}():s===(""+C).slice(0,c)&&C.slice(c).split(":")[0]in u?(I=(j=C.slice(c).split(":"))[1]?parseInt(j[1],10):0,O=u[j[0]]&&u[j[0]].iframe,M=getComputedStyle(O),_={iframe:O,id:j[0],height:I+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(M)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(M),width:j[2],type:j[3]},u[W=_.id]&&(u[W].loaded=!0),(y=_.type in{true:1,false:1,undefined:1})&&v(W,"Ignoring init message from meta parent page"),!y&&function(e){var n=!0;return u[e]||(n=!1,x(_.type+" No settings for "+e+". Message was: "+C)),n}(W)&&(v(W,"Received: "+C),w=!0,null===_.iframe&&(x(W,"IFrame ("+_.id+") not found"),w=!1),w&&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(v(W,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(v(W,"Checking connection is from: "+(n=u[W]&&u[W].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+_.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),_.type){case"close":F(_.iframe);break;case"message":c=i(6),v(W,"onMessage passed: {iframe: "+_.iframe.id+", message: "+c+"}"),m("onMessage",{iframe:_.iframe,message:JSON.parse(c)}),v(W,"--");break;case"mouseenter":h("onMouseEnter");break;case"mouseleave":h("onMouseLeave");break;case"autoResize":u[W].autoResize=JSON.parse(i(9));break;case"scrollTo":f(!1);break;case"scrollToOffset":f(!0);break;case"pageInfo":o(u[W]&&u[W].iframe,W),function(){function e(e,i){function a(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){v(t,e+n+" listener for sendPageInfo"),i(window,n,a)}))}function n(){e("Remove ",g)}var t=W;e("Add ",p),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]||"",r=decodeURIComponent(t),(s=document.getElementById(r)||document.getElementsByName(r)[0])?(e=a(s),v(W,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),d={x:e.x,y:e.y},l(),v(W,"--")):window.top===window.self?v(W,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):v(W,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":E(_);break;case"init":n(),m("onInit",_.iframe);break;default:0===Number(_.width)&&0===Number(_.height)?x("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,r,s,c}())):k(W,"Ignored: "+C)}function z(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 M(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==z(t,"onClose",t)){v(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}z(t,"onClosed",t),v(t,"--"),M(e),n&&(n.disconnect(),n=null)}else v(t,"Close iframe cancelled by onClose event")}function T(n){null===d&&v(n,"Get page position: "+(d={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+d.y)}function S(e){null!==d&&(window.scrollTo(d.x,d.y),v(e,"Set page position: "+d.x+","+d.y),R())}function R(){d=null}function E(e){v(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),T(e.id),N((function(){H(e),L("reset","reset",e.iframe,e.id)}),e,"reset")}function H(e){function n(n){a||"0"!==e[n]||(a=!0,v(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"))&&L("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){v("window","Mutation observed: "+n[0].target+" "+n[0].type),_(e,16)}var t,i=w();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",v(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):v("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 N(e,n,t){t!==n.type&&f&&!window.jasmine?(v(n.id,"Requesting animation frame"),f(e)):e()}function L(e,n,t,i,o){var a,r=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(v(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(a=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,a)):x(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||r||(r=!0,x(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 V(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 C(t,a){function r(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],x(d,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,d=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=a&&a.id||m.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(a||{}).log,v(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);d in u&&"iFrameResizer"in t?x(d,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[d]=Object.create(null),u[d].iframe=t,u[d].firstRun=!0,u[d].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(r,e),function(e){for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&(u[d][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:m[n])}(e),u[d]&&(u[d].targetOrigin=!0===u[d].checkOrigin?""===(n=u[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(a),function(){switch(v(d,"IFrame scrolling "+(u[d]&&u[d].scrolling?"enabled":"disabled")+" for "+d),t.style.overflow=!1===(u[d]&&u[d].scrolling)?"hidden":"auto",u[d]&&u[d].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[d]?u[d].scrolling:"no"}}(),function(){function e(e){var n=u[d][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,v(d,"Set "+e+" = "+t.style[e]))}function n(e){if(u[d]["min"+e]>u[d]["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[d]&&u[d].bodyMargin)&&"0"!==(u[d]&&u[d].bodyMargin)||(u[d].bodyMarginV1=u[d].bodyMargin,u[d].bodyMargin=u[d].bodyMargin+"px"),s=V(d),(c=w())&&(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)),p(t,"load",(function(){L("iFrame.onload",s,t,e,!0),(!u[d]||!u[d].firstRun)&&u[d]&&u[d].heightCalculationMethod in l&&E({iframe:t,height:0,width:0,type:"init"})})),L("init",s,t,e,!0),u[d]&&(u[d].iframe.iFrameResizer={close:F.bind(null,u[d].iframe),removeListeners:M.bind(null,u[d].iframe),resize:L.bind(null,"Window resize","resize",u[d].iframe),moveToAnchor:function(e){L("Move to anchor","moveToAnchor:"+e,u[d].iframe,d)},sendMessage:function(e){L("Send Message","message:"+(e=JSON.stringify(e)),u[d].iframe,d)}}))}function _(e,n){null===h&&(h=setTimeout((function(){h=null,e()}),n))}function W(){"hidden"!==document.visibilityState&&(v("document","Trigger event: Visibility change"),_((function(){A("Tab Visible","resize")}),16))}function A(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&L(e,n,u[t].iframe,t)}))}function P(){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+">")}(),C(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!f;e+=1)f=window[n[e]+"RequestAnimationFrame"];f?f=f.bind(window):v("setup","RequestAnimationFrame not supported")}(),p(window,"message",I),p(window,"resize",(function(){v("window","Trigger event: resize"),_((function(){A("Window resize","resize")}),16)})),p(document,"visibilitychange",W),p(document,"-webkit-visibilitychange",W),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&x("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}}}();const F=M.exports;class T{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.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))},this.isFocused=!1,this.isValid=!0,this.errorText=void 0,this.inputId=void 0,this.label=void 0,this.iframeOrigin=void 0}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:w.version})}initializeFrameCommunicationService(){var e;this.frameService=new T(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?g:this.isValid?this.isFocused?v:k:y}get style(){return this.isFocused?this.isValid?p.focused:p.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(p.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"04753fb11bc73c5d62986e8a8da30290ad9ed57a",class:"form-group d-flex flex-column"},n("div",{key:"3c8e8df43e94ec2a4d7749a31fd05b913f0c3018",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"3604c232c38a73c555d1a0e7f574a7608a490862",class:"form-label",htmlFor:"",part:x},this.label||""),n("div",{key:"019c7844dcc29bc0ec39c3db999df25dabd06750",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:"1898018d792bc1d17bb8894d0c038e98ac8065a7",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{F({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(b,{key:"525d1fca8fdccc481aea9cbb6e8040b2c06b53ea",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}},R=class{constructor(n){e(this,n),this.inputHandler=(e,n)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:n}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new r(I)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return n(t,{key:"e798e67c159b53a995e4a60246c6f6d6e872f1ec"},n("form",{key:"24d6980de772a360c0218e9ab50550dcee5786d5"},n("fieldset",{key:"9e990836becccdf5d12a9e15e2eb7f4078f74b08"},this.legend&&n("legend",{key:"12d445b392cf03114dbd2a37391ecc1b87304868"},this.legend),n("div",{key:"2d2fed9cf30b3869633b80b39b7684dfde66f6b7",class:"row gy-3"},n("div",{key:"8ec042863e646d5daffeb3fbb5395336406adcde",class:"col-12"},n("form-control-text",{key:"82a2c18c2a7eef7ba7ac46e53dfc9c975c8d28b7",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};export{z as billing_form,S as iframe_input,R as postal_form}
|