@justifi/webcomponents 4.6.4 → 4.7.0-rc.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-f76b337f.js → Api-548eaa62.js} +3 -17
- package/dist/cjs/Api-548eaa62.js.map +1 -0
- package/dist/cjs/Pagination-cae1dcbd.js +15 -0
- package/dist/cjs/Pagination-cae1dcbd.js.map +1 -0
- package/dist/cjs/{Payout-4906a445.js → Payout-68a99ee3.js} +22 -1
- package/dist/cjs/Payout-68a99ee3.js.map +1 -0
- package/dist/cjs/SubAccount-5d77adbf.js +109 -0
- package/dist/cjs/SubAccount-5d77adbf.js.map +1 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +84 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js.map +1 -0
- package/dist/cjs/{business-form-schema-725ec6f5.js → business-form-schema-fe831c30.js} +2 -2
- package/dist/cjs/business-form-schema-fe831c30.js.map +1 -0
- package/dist/cjs/form-1e732a9d.js +731 -0
- package/dist/cjs/form-1e732a9d.js.map +1 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +44 -20
- package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_3.cjs.entry.js +17 -32
- package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -1
- package/dist/cjs/helpers-c505d861.js +28 -0
- package/dist/cjs/helpers-c505d861.js.map +1 -0
- package/dist/cjs/{index-3533152c.js → index-ce7d512e.js} +5 -1
- package/dist/cjs/index-ce7d512e.js.map +1 -0
- package/dist/cjs/{index.esm-84a0a7a8.js → index.esm-91ec051e.js} +123 -1
- package/dist/cjs/index.esm-91ec051e.js.map +1 -0
- package/dist/cjs/{justifi-additional-questions_5.cjs.entry.js → justifi-additional-questions_6.cjs.entry.js} +41 -16
- package/dist/cjs/justifi-additional-questions_6.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +76 -0
- package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +130 -0
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-form.cjs.entry.js +12 -756
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-list.cjs.entry.js +36 -67
- package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-details.cjs.entry.js +4 -8
- package/dist/cjs/justifi-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +88 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +22 -17
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +23 -18
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +23 -18
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-refund-form.cjs.entry.js +104 -0
- package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +81 -0
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +104 -0
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-table_2.cjs.entry.js +80 -0
- package/dist/cjs/justifi-table_2.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +1 -1
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +72 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js.map +1 -0
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +24 -0
- package/dist/cjs/subaccount-bank-details.cjs.entry.js.map +1 -0
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +24 -0
- package/dist/cjs/subaccount-terms-details.cjs.entry.js.map +1 -0
- package/dist/cjs/utils-aaa6ab8b.js +37 -0
- package/dist/cjs/utils-aaa6ab8b.js.map +1 -0
- package/dist/cjs/{utils-0fd61dbd.js → utils-d9cbe26f.js} +91 -18
- package/dist/cjs/utils-d9cbe26f.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Api.js +2 -16
- package/dist/collection/api/Api.js.map +1 -1
- package/dist/collection/api/Business.js +0 -2
- package/dist/collection/api/Business.js.map +1 -1
- package/dist/collection/api/Pagination.js +8 -8
- package/dist/collection/api/Pagination.js.map +1 -1
- package/dist/collection/api/Payment.js +20 -0
- package/dist/collection/api/Payment.js.map +1 -1
- package/dist/collection/api/SubAccount.js +104 -0
- package/dist/collection/api/SubAccount.js.map +1 -0
- package/dist/collection/api/mockData/MockOnboardingData.js +118 -0
- package/dist/collection/api/mockData/MockOnboardingData.js.map +1 -0
- package/dist/collection/api/mockData/MockSubAccount.js +103 -0
- package/dist/collection/api/mockData/MockSubAccount.js.map +1 -0
- package/dist/collection/assets/info-icon.svg +5 -0
- package/dist/collection/collection-manifest.json +19 -1
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +1 -9
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +7341 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +57 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js.map +1 -0
- package/dist/collection/components/business-details/business-details.css +6439 -0
- package/dist/collection/components/business-details/business-details.js +127 -0
- package/dist/collection/components/business-details/business-details.js.map +1 -0
- package/dist/collection/components/business-details/business-details.stories.js +23 -0
- package/dist/collection/components/business-details/business-details.stories.js.map +1 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +7341 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +50 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js.map +1 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +7341 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +49 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js.map +1 -0
- package/dist/collection/components/business-details/owner-details/owner-details.css +7341 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js +57 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js.map +1 -0
- package/dist/collection/components/business-details/representative-details/representative-details.css +7341 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js +58 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js.map +1 -0
- package/dist/collection/components/business-form/additional-questions/additional-questions.js +1 -1
- package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -1
- package/dist/collection/components/business-form/business-form-schema.js +1 -1
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-form-stepped.css +7929 -0
- package/dist/collection/components/business-form/business-form-stepped.js +194 -0
- package/dist/collection/components/business-form/business-form-stepped.js.map +1 -0
- package/dist/collection/components/business-form/business-form-stepped.stories.js +131 -0
- package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -0
- package/dist/collection/components/business-form/business-form.js +4 -24
- package/dist/collection/components/business-form/business-form.js.map +1 -1
- package/dist/collection/components/business-form/business-form.stories.js +20 -8
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -5
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
- package/dist/collection/components/business-form/business-owners/business-owners.js +4 -5
- package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
- package/dist/collection/components/business-form/helpers.js +23 -0
- package/dist/collection/components/business-form/helpers.js.map +1 -0
- package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js.map +1 -0
- package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.js +3 -21
- package/dist/collection/components/business-form/legal-address-form/legal-address-form.js.map +1 -0
- package/dist/collection/components/business-list/business-list.js +70 -84
- package/dist/collection/components/business-list/business-list.js.map +1 -1
- package/dist/collection/components/business-list/business-list.stories.js +2 -2
- package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
- package/dist/collection/components/card-form/card-form.stories.js +1 -9
- package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
- package/dist/collection/components/details/details.js +2 -21
- package/dist/collection/components/details/details.js.map +1 -1
- package/dist/collection/components/details/utils.js +7 -8
- package/dist/collection/components/details/utils.js.map +1 -1
- package/dist/collection/components/form/form-control-number-masked.js +1 -1
- package/dist/collection/components/form/form-control-number-masked.js.map +1 -1
- package/dist/collection/components/form/form.js +4 -4
- package/dist/collection/components/form/form.js.map +1 -1
- package/dist/collection/components/pagination-menu/pagination-menu.js +78 -0
- package/dist/collection/components/pagination-menu/pagination-menu.js.map +1 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +153 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js.map +1 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +32 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js.map +1 -0
- package/dist/collection/components/payment-details/payment-details.js +11 -6
- package/dist/collection/components/payment-details/payment-details.js.map +1 -1
- package/dist/collection/components/payment-details/payment-details.stories.js +3 -4
- package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
- package/dist/collection/components/payment-form/payment-form.stories.js +2 -11
- package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +6 -6
- package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +14 -14
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.js +20 -13
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +3 -4
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.js +11 -3
- package/dist/collection/components/payout-details/payout-details.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.stories.js +3 -4
- package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.js +21 -14
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.stories.js +3 -4
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.js +21 -14
- package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +2 -2
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
- package/dist/collection/components/refund-form/refund-form-schema.js +14 -0
- package/dist/collection/components/refund-form/refund-form-schema.js.map +1 -0
- package/dist/collection/components/refund-form/refund-form.css +7785 -0
- package/dist/collection/components/refund-form/refund-form.js +228 -0
- package/dist/collection/components/refund-form/refund-form.js.map +1 -0
- package/dist/collection/components/refund-form/refund-form.stories.js +169 -0
- package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +71 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-details.css +7983 -0
- package/dist/collection/components/subaccount-details/subaccount-details.js +147 -0
- package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js +25 -0
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +51 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +50 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +22 -0
- package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js.map +1 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.css +3 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +179 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +69 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +10 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js.map +1 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +34 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js.map +1 -0
- package/dist/collection/components/table/table.js +27 -12
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/table/test/table.spec.js +2 -2
- package/dist/collection/components/table/test/table.spec.js.map +1 -1
- package/dist/collection/utils/utils.js +91 -17
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +2 -16
- package/dist/components/Api.js.map +1 -1
- package/dist/components/Pagination.js +12 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Payout.js +21 -1
- package/dist/components/Payout.js.map +1 -1
- package/dist/components/SubAccount.js +107 -0
- package/dist/components/SubAccount.js.map +1 -0
- package/dist/components/additional-questions-details.d.ts +11 -0
- package/dist/components/additional-questions-details.js +8 -0
- package/dist/components/additional-questions-details.js.map +1 -0
- package/dist/{cjs/justifi-table.cjs.entry.js → components/additional-questions-details2.js} +30 -61
- package/dist/components/additional-questions-details2.js.map +1 -0
- package/dist/components/additional-questions.js +1 -1
- package/dist/components/additional-questions.js.map +1 -1
- package/dist/components/business-generic-info.js +2 -5
- package/dist/components/business-generic-info.js.map +1 -1
- package/dist/components/business-owners.js +4 -5
- package/dist/components/business-owners.js.map +1 -1
- package/dist/components/business-representative.js +1 -1
- package/dist/components/business-representative.js.map +1 -1
- package/dist/components/details.js +6 -33
- package/dist/components/details.js.map +1 -1
- package/dist/components/form-control-number-masked2.js +1 -1
- package/dist/components/form-control-number-masked2.js.map +1 -1
- package/dist/components/form.js +729 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/generic-info-details.d.ts +11 -0
- package/dist/components/generic-info-details.js +8 -0
- package/dist/components/generic-info-details.js.map +1 -0
- package/dist/components/generic-info-details2.js +38 -0
- package/dist/components/generic-info-details2.js.map +1 -0
- package/dist/components/helpers.js +26 -0
- package/dist/components/helpers.js.map +1 -0
- package/dist/components/index.esm.js +122 -1
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/justifi-business-details.d.ts +11 -0
- package/dist/components/justifi-business-details.js +126 -0
- package/dist/components/justifi-business-details.js.map +1 -0
- package/dist/components/justifi-business-form-stepped.d.ts +11 -0
- package/dist/components/justifi-business-form-stepped.js +221 -0
- package/dist/components/justifi-business-form-stepped.js.map +1 -0
- package/dist/components/justifi-business-form.js +6 -750
- package/dist/components/justifi-business-form.js.map +1 -1
- package/dist/components/justifi-business-list.js +42 -65
- package/dist/components/justifi-business-list.js.map +1 -1
- package/dist/components/justifi-payment-balance-transactions.d.ts +11 -0
- package/dist/components/justifi-payment-balance-transactions.js +123 -0
- package/dist/components/justifi-payment-balance-transactions.js.map +1 -0
- package/dist/components/justifi-payment-details.js +6 -6
- package/dist/components/justifi-payment-details.js.map +1 -1
- package/dist/components/justifi-payment-form.js +3 -2
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +29 -16
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payout-details.js +6 -4
- package/dist/components/justifi-payout-details.js.map +1 -1
- package/dist/components/justifi-payouts-list.js +30 -17
- package/dist/components/justifi-payouts-list.js.map +1 -1
- package/dist/components/justifi-proceeds-list.js +29 -16
- package/dist/components/justifi-proceeds-list.js.map +1 -1
- package/dist/components/justifi-refund-form.d.ts +11 -0
- package/dist/components/justifi-refund-form.js +139 -0
- package/dist/components/justifi-refund-form.js.map +1 -0
- package/dist/components/justifi-subaccount-details.d.ts +11 -0
- package/dist/components/justifi-subaccount-details.js +133 -0
- package/dist/components/justifi-subaccount-details.js.map +1 -0
- package/dist/components/justifi-subaccounts-list.d.ts +11 -0
- package/dist/components/justifi-subaccounts-list.js +138 -0
- package/dist/components/justifi-subaccounts-list.js.map +1 -0
- package/dist/components/legal-address-details.d.ts +11 -0
- package/dist/components/legal-address-details.js +8 -0
- package/dist/components/legal-address-details.js.map +1 -0
- package/dist/components/legal-address-details2.js +37 -0
- package/dist/components/legal-address-details2.js.map +1 -0
- package/dist/components/legal-address-form.js +1 -3
- package/dist/components/legal-address-form.js.map +1 -1
- package/dist/components/owner-details.d.ts +11 -0
- package/dist/components/owner-details.js +8 -0
- package/dist/components/owner-details.js.map +1 -0
- package/dist/components/owner-details2.js +37 -0
- package/dist/components/owner-details2.js.map +1 -0
- package/dist/components/pagination-menu.d.ts +11 -0
- package/dist/components/pagination-menu.js +8 -0
- package/dist/components/pagination-menu.js.map +1 -0
- package/dist/{esm/justifi-table.entry.js → components/pagination-menu2.js} +35 -55
- package/dist/components/pagination-menu2.js.map +1 -0
- package/dist/components/payment-method-form.js +5 -5
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/representative-details.d.ts +11 -0
- package/dist/components/representative-details.js +8 -0
- package/dist/components/representative-details.js.map +1 -0
- package/dist/components/representative-details2.js +38 -0
- package/dist/components/representative-details2.js.map +1 -0
- package/dist/components/subaccount-account-details.d.ts +11 -0
- package/dist/components/subaccount-account-details.js +8 -0
- package/dist/components/subaccount-account-details.js.map +1 -0
- package/dist/components/subaccount-account-details2.js +39 -0
- package/dist/components/subaccount-account-details2.js.map +1 -0
- package/dist/components/subaccount-bank-details.d.ts +11 -0
- package/dist/components/subaccount-bank-details.js +40 -0
- package/dist/components/subaccount-bank-details.js.map +1 -0
- package/dist/components/subaccount-merchant-details.d.ts +11 -0
- package/dist/components/subaccount-merchant-details.js +8 -0
- package/dist/components/subaccount-merchant-details.js.map +1 -0
- package/dist/components/subaccount-merchant-details2.js +38 -0
- package/dist/components/subaccount-merchant-details2.js.map +1 -0
- package/dist/components/subaccount-owners-details.d.ts +11 -0
- package/dist/components/subaccount-owners-details.js +8 -0
- package/dist/components/subaccount-owners-details.js.map +1 -0
- package/dist/components/subaccount-owners-details2.js +38 -0
- package/dist/components/subaccount-owners-details2.js.map +1 -0
- package/dist/components/subaccount-representative-details.d.ts +11 -0
- package/dist/components/subaccount-representative-details.js +8 -0
- package/dist/components/subaccount-representative-details.js.map +1 -0
- package/dist/components/subaccount-representative-details2.js +38 -0
- package/dist/components/subaccount-representative-details2.js.map +1 -0
- package/dist/components/subaccount-terms-details.d.ts +11 -0
- package/dist/components/subaccount-terms-details.js +40 -0
- package/dist/components/subaccount-terms-details.js.map +1 -0
- package/dist/components/table.js +12 -21
- package/dist/components/table.js.map +1 -1
- package/dist/components/utils.js +27 -3909
- package/dist/components/utils.js.map +1 -1
- package/dist/{esm/utils-ad0bbe03.js → components/utils2.js} +87 -19
- package/dist/{cjs/utils-0fd61dbd.js.map → components/utils2.js.map} +1 -1
- package/dist/esm/{Api-cca120a8.js → Api-c65d3ed8.js} +3 -17
- package/dist/esm/Api-c65d3ed8.js.map +1 -0
- package/dist/esm/Pagination-31f770d6.js +12 -0
- package/dist/esm/Pagination-31f770d6.js.map +1 -0
- package/dist/esm/{Payout-9a1f2859.js → Payout-fcf16887.js} +22 -2
- package/dist/esm/Payout-fcf16887.js.map +1 -0
- package/dist/esm/SubAccount-cf29d050.js +107 -0
- package/dist/esm/SubAccount-cf29d050.js.map +1 -0
- package/dist/esm/additional-questions-details_5.entry.js +76 -0
- package/dist/esm/additional-questions-details_5.entry.js.map +1 -0
- package/dist/esm/{business-form-schema-5885d3d6.js → business-form-schema-30a3eadd.js} +2 -2
- package/dist/esm/business-form-schema-30a3eadd.js.map +1 -0
- package/dist/esm/form-32cf3d1e.js +729 -0
- package/dist/esm/form-32cf3d1e.js.map +1 -0
- package/dist/esm/form-control-datepart_2.entry.js +44 -20
- package/dist/esm/form-control-datepart_2.entry.js.map +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-number_3.entry.js +17 -32
- package/dist/esm/form-control-number_3.entry.js.map +1 -1
- package/dist/esm/helpers-1d5ecdc8.js +26 -0
- package/dist/esm/helpers-1d5ecdc8.js.map +1 -0
- package/dist/esm/{index-fe877d03.js → index-b02f9a6e.js} +5 -1
- package/dist/esm/index-b02f9a6e.js.map +1 -0
- package/dist/esm/{index.esm-89fe6af9.js → index.esm-9397ffa0.js} +123 -2
- package/dist/esm/index.esm-9397ffa0.js.map +1 -0
- package/dist/esm/{justifi-additional-questions_5.entry.js → justifi-additional-questions_6.entry.js} +41 -17
- package/dist/esm/justifi-additional-questions_6.entry.js.map +1 -0
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +72 -0
- package/dist/esm/justifi-business-details.entry.js.map +1 -0
- package/dist/esm/justifi-business-form-stepped.entry.js +126 -0
- package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -0
- package/dist/esm/justifi-business-form.entry.js +11 -755
- package/dist/esm/justifi-business-form.entry.js.map +1 -1
- package/dist/esm/justifi-business-list.entry.js +35 -66
- package/dist/esm/justifi-business-list.entry.js.map +1 -1
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-details.entry.js +4 -8
- package/dist/esm/justifi-details.entry.js.map +1 -1
- package/dist/esm/justifi-payment-balance-transactions.entry.js +84 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js.map +1 -0
- package/dist/esm/justifi-payment-details.entry.js +8 -9
- package/dist/esm/justifi-payment-details.entry.js.map +1 -1
- package/dist/esm/justifi-payment-form.entry.js +4 -3
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +6 -6
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +21 -16
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payout-details.entry.js +8 -7
- package/dist/esm/justifi-payout-details.entry.js.map +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +22 -17
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
- package/dist/esm/justifi-proceeds-list.entry.js +22 -17
- package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
- package/dist/esm/justifi-refund-form.entry.js +100 -0
- package/dist/esm/justifi-refund-form.entry.js.map +1 -0
- package/dist/esm/justifi-subaccount-details.entry.js +77 -0
- package/dist/esm/justifi-subaccount-details.entry.js.map +1 -0
- package/dist/esm/justifi-subaccounts-list.entry.js +100 -0
- package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -0
- package/dist/esm/justifi-table_2.entry.js +75 -0
- package/dist/esm/justifi-table_2.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/select-input_2.entry.js +1 -1
- package/dist/esm/subaccount-account-details_4.entry.js +65 -0
- package/dist/esm/subaccount-account-details_4.entry.js.map +1 -0
- package/dist/esm/subaccount-bank-details.entry.js +20 -0
- package/dist/esm/subaccount-bank-details.entry.js.map +1 -0
- package/dist/esm/subaccount-terms-details.entry.js +20 -0
- package/dist/esm/subaccount-terms-details.entry.js.map +1 -0
- package/dist/esm/utils-d647dd96.js +29 -0
- package/dist/esm/utils-d647dd96.js.map +1 -0
- package/dist/esm/utils-fcf19fd5.js +3979 -0
- package/dist/esm/utils-fcf19fd5.js.map +1 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/api/Api.d.ts +4 -4
- package/dist/types/api/Business.d.ts +12 -4
- package/dist/types/api/Pagination.d.ts +12 -6
- package/dist/types/api/Payment.d.ts +28 -0
- package/dist/types/api/SubAccount.d.ts +165 -0
- package/dist/types/api/mockData/MockOnboardingData.d.ts +8 -0
- package/dist/types/api/mockData/MockSubAccount.d.ts +3 -0
- package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -7
- package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +13 -0
- package/dist/types/components/business-details/business-details.d.ts +28 -0
- package/dist/types/components/business-details/business-details.stories.d.ts +7 -0
- package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +5 -0
- package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +5 -0
- package/dist/types/components/business-details/owner-details/owner-details.d.ts +13 -0
- package/dist/types/components/business-details/representative-details/representative-details.d.ts +13 -0
- package/dist/types/components/business-form/business-form-stepped.d.ts +29 -0
- package/dist/types/components/business-form/business-form-stepped.stories.d.ts +27 -0
- package/dist/types/components/business-form/business-form.d.ts +0 -1
- package/dist/types/components/business-form/business-form.stories.d.ts +6 -0
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +5 -1
- package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +2 -0
- package/dist/types/components/business-form/helpers.d.ts +1 -0
- package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.d.ts +1 -2
- package/dist/types/components/business-list/business-list.d.ts +34 -21
- package/dist/types/components/card-form/card-form.stories.d.ts +0 -7
- package/dist/types/components/details/details.d.ts +0 -3
- package/dist/types/components/details/utils.d.ts +5 -2
- package/dist/types/components/form/form.d.ts +1 -1
- package/dist/types/components/pagination-menu/pagination-menu.d.ts +10 -0
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +17 -0
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +8 -0
- package/dist/types/components/payment-details/payment-details.d.ts +8 -0
- package/dist/types/components/payment-form/payment-form.stories.d.ts +1 -9
- package/dist/types/components/payments-list/payments-list.d.ts +5 -4
- package/dist/types/components/payout-details/payout-details.d.ts +8 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +5 -4
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +5 -3
- package/dist/types/components/refund-form/refund-form-schema.d.ts +11 -0
- package/dist/types/components/refund-form/refund-form.d.ts +58 -0
- package/dist/types/components/refund-form/refund-form.stories.d.ts +27 -0
- package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +6 -0
- package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-details.d.ts +16 -0
- package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +7 -0
- package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +5 -0
- package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +19 -0
- package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +9 -0
- package/dist/types/components/table/table.d.ts +3 -7
- package/dist/types/components.d.ts +602 -7
- package/dist/types/utils/utils.d.ts +18 -0
- package/dist/webcomponents/p-014b2f3a.entry.js +2 -0
- package/dist/webcomponents/p-014b2f3a.entry.js.map +1 -0
- package/dist/webcomponents/p-05cc444a.entry.js +2 -0
- package/dist/webcomponents/p-05cc444a.entry.js.map +1 -0
- package/dist/webcomponents/p-07059336.entry.js +2 -0
- package/dist/webcomponents/p-07059336.entry.js.map +1 -0
- package/dist/webcomponents/{p-d92116e6.entry.js → p-08311783.entry.js} +2 -2
- package/dist/webcomponents/p-0c5afcbc.js +3 -0
- package/dist/webcomponents/p-0c5afcbc.js.map +1 -0
- package/dist/webcomponents/p-0d5d02d7.js +2 -0
- package/dist/webcomponents/p-0d5d02d7.js.map +1 -0
- package/dist/webcomponents/p-14391341.entry.js +2 -0
- package/dist/webcomponents/p-14391341.entry.js.map +1 -0
- package/dist/webcomponents/{p-69a1bec2.entry.js → p-1b5bd8f8.entry.js} +2 -2
- package/dist/webcomponents/p-1b5bd8f8.entry.js.map +1 -0
- package/dist/webcomponents/{p-cd0eca25.entry.js → p-1d42e416.entry.js} +2 -2
- package/dist/webcomponents/p-23f600d3.entry.js +2 -0
- package/dist/webcomponents/p-23f600d3.entry.js.map +1 -0
- package/dist/webcomponents/p-26b1a61d.entry.js +2 -0
- package/dist/webcomponents/p-26b1a61d.entry.js.map +1 -0
- package/dist/webcomponents/p-2806a2d6.js +2 -0
- package/dist/webcomponents/p-2806a2d6.js.map +1 -0
- package/dist/webcomponents/{p-640bfa9f.entry.js → p-2ac4e73d.entry.js} +2 -2
- package/dist/webcomponents/p-2f741cd2.entry.js +2 -0
- package/dist/webcomponents/p-2f741cd2.entry.js.map +1 -0
- package/dist/webcomponents/p-37b8106d.entry.js +2 -0
- package/dist/webcomponents/p-37b8106d.entry.js.map +1 -0
- package/dist/webcomponents/p-3e0f6758.entry.js +2 -0
- package/dist/webcomponents/p-3e0f6758.entry.js.map +1 -0
- package/dist/webcomponents/p-43c04b00.entry.js +2 -0
- package/dist/webcomponents/p-43c04b00.entry.js.map +1 -0
- package/dist/webcomponents/{p-9346ae33.js → p-4d37473a.js} +2 -2
- package/dist/webcomponents/{p-9346ae33.js.map → p-4d37473a.js.map} +1 -1
- package/dist/webcomponents/p-526cb161.js +2 -0
- package/dist/webcomponents/p-526cb161.js.map +1 -0
- package/dist/webcomponents/{p-f9e127a5.js → p-59860ac8.js} +2 -2
- package/dist/webcomponents/p-59860ac8.js.map +1 -0
- package/dist/webcomponents/{p-dabeb3df.entry.js → p-5b378f8d.entry.js} +2 -2
- package/dist/webcomponents/p-5b378f8d.entry.js.map +1 -0
- package/dist/webcomponents/{p-2b6f5e35.entry.js → p-5dd71882.entry.js} +2 -2
- package/dist/webcomponents/p-5dd71882.entry.js.map +1 -0
- package/dist/webcomponents/{p-9d1c7e6a.entry.js → p-5f434e8b.entry.js} +2 -2
- package/dist/webcomponents/{p-9d1c7e6a.entry.js.map → p-5f434e8b.entry.js.map} +1 -1
- package/dist/webcomponents/{p-1beaaba3.entry.js → p-6642d95b.entry.js} +2 -2
- package/dist/webcomponents/p-6b5fcbff.entry.js +2 -0
- package/dist/webcomponents/p-6b5fcbff.entry.js.map +1 -0
- package/dist/webcomponents/p-756629e9.entry.js +2 -0
- package/dist/webcomponents/p-756629e9.entry.js.map +1 -0
- package/dist/webcomponents/p-76983a7e.js +2 -0
- package/dist/webcomponents/p-76983a7e.js.map +1 -0
- package/dist/webcomponents/p-7d58db66.js +2 -0
- package/dist/webcomponents/p-7d58db66.js.map +1 -0
- package/dist/webcomponents/p-8471740f.entry.js +2 -0
- package/dist/webcomponents/p-8471740f.entry.js.map +1 -0
- package/dist/webcomponents/{p-c46241ba.js → p-8f37e3ee.js} +2 -2
- package/dist/webcomponents/p-8f37e3ee.js.map +1 -0
- package/dist/webcomponents/p-92872bbe.entry.js +2 -0
- package/dist/webcomponents/p-92872bbe.entry.js.map +1 -0
- package/dist/webcomponents/p-99b3925f.entry.js +2 -0
- package/dist/webcomponents/{p-f6cc37a6.entry.js.map → p-99b3925f.entry.js.map} +1 -1
- package/dist/webcomponents/p-a1a94012.entry.js +2 -0
- package/dist/webcomponents/p-a1a94012.entry.js.map +1 -0
- package/dist/webcomponents/p-a3211bb2.js +2 -0
- package/dist/webcomponents/p-a3211bb2.js.map +1 -0
- package/dist/webcomponents/p-b157f6ae.js +2 -0
- package/dist/webcomponents/p-b157f6ae.js.map +1 -0
- package/dist/webcomponents/{p-a922b908.entry.js → p-b4f185c5.entry.js} +2 -2
- package/dist/webcomponents/p-c52d63b1.entry.js +2 -0
- package/dist/webcomponents/p-c52d63b1.entry.js.map +1 -0
- package/dist/webcomponents/p-c9373e73.entry.js +2 -0
- package/dist/webcomponents/p-c9373e73.entry.js.map +1 -0
- package/dist/webcomponents/p-d18c0273.entry.js +2 -0
- package/dist/webcomponents/p-d18c0273.entry.js.map +1 -0
- package/dist/webcomponents/p-e83f93cd.entry.js +2 -0
- package/dist/webcomponents/p-e83f93cd.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/Api-f76b337f.js.map +0 -1
- package/dist/cjs/Payout-4906a445.js.map +0 -1
- package/dist/cjs/business-form-schema-725ec6f5.js.map +0 -1
- package/dist/cjs/form-control-select.cjs.entry.js +0 -47
- package/dist/cjs/form-control-select.cjs.entry.js.map +0 -1
- package/dist/cjs/index-3533152c.js.map +0 -1
- package/dist/cjs/index.esm-84a0a7a8.js.map +0 -1
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +0 -1
- package/dist/cjs/justifi-table.cjs.entry.js.map +0 -1
- package/dist/cjs/table-utils-617126e5.js +0 -13
- package/dist/cjs/table-utils-617126e5.js.map +0 -1
- package/dist/cjs/utils-d95b09c2.js +0 -35
- package/dist/cjs/utils-d95b09c2.js.map +0 -1
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +0 -1
- package/dist/collection/components/legal-address-form/legal-address-form.js.map +0 -1
- package/dist/collection/components/table/table-utils.js +0 -8
- package/dist/collection/components/table/table-utils.js.map +0 -1
- package/dist/config.js +0 -6
- package/dist/config.js.map +0 -1
- package/dist/esm/Api-cca120a8.js.map +0 -1
- package/dist/esm/Payout-9a1f2859.js.map +0 -1
- package/dist/esm/business-form-schema-5885d3d6.js.map +0 -1
- package/dist/esm/form-control-select.entry.js +0 -43
- package/dist/esm/form-control-select.entry.js.map +0 -1
- package/dist/esm/index-fe877d03.js.map +0 -1
- package/dist/esm/index.esm-89fe6af9.js.map +0 -1
- package/dist/esm/justifi-additional-questions_5.entry.js.map +0 -1
- package/dist/esm/justifi-table.entry.js.map +0 -1
- package/dist/esm/table-utils-6cdcaa8c.js +0 -11
- package/dist/esm/table-utils-6cdcaa8c.js.map +0 -1
- package/dist/esm/utils-1e7d6279.js +0 -28
- package/dist/esm/utils-1e7d6279.js.map +0 -1
- package/dist/esm/utils-ad0bbe03.js.map +0 -1
- package/dist/types/components/table/table-utils.d.ts +0 -14
- package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +0 -5
- package/dist/webcomponents/p-26392ae3.entry.js +0 -2
- package/dist/webcomponents/p-26392ae3.entry.js.map +0 -1
- package/dist/webcomponents/p-2b6f5e35.entry.js.map +0 -1
- package/dist/webcomponents/p-2e66512d.entry.js +0 -2
- package/dist/webcomponents/p-2e66512d.entry.js.map +0 -1
- package/dist/webcomponents/p-523cbe04.js +0 -2
- package/dist/webcomponents/p-523cbe04.js.map +0 -1
- package/dist/webcomponents/p-641883b2.entry.js +0 -2
- package/dist/webcomponents/p-641883b2.entry.js.map +0 -1
- package/dist/webcomponents/p-69a1bec2.entry.js.map +0 -1
- package/dist/webcomponents/p-6a0c8dec.entry.js +0 -2
- package/dist/webcomponents/p-6a0c8dec.entry.js.map +0 -1
- package/dist/webcomponents/p-87410719.entry.js +0 -2
- package/dist/webcomponents/p-87410719.entry.js.map +0 -1
- package/dist/webcomponents/p-881edb4d.entry.js +0 -2
- package/dist/webcomponents/p-881edb4d.entry.js.map +0 -1
- package/dist/webcomponents/p-ab0756ff.js +0 -2
- package/dist/webcomponents/p-ab0756ff.js.map +0 -1
- package/dist/webcomponents/p-c46241ba.js.map +0 -1
- package/dist/webcomponents/p-ccb0e1c5.js +0 -2
- package/dist/webcomponents/p-ccb0e1c5.js.map +0 -1
- package/dist/webcomponents/p-dabeb3df.entry.js.map +0 -1
- package/dist/webcomponents/p-db9945b1.entry.js +0 -2
- package/dist/webcomponents/p-db9945b1.entry.js.map +0 -1
- package/dist/webcomponents/p-e1f6c8ec.entry.js +0 -2
- package/dist/webcomponents/p-e1f6c8ec.entry.js.map +0 -1
- package/dist/webcomponents/p-e41fb562.entry.js +0 -2
- package/dist/webcomponents/p-e41fb562.entry.js.map +0 -1
- package/dist/webcomponents/p-e6695628.js +0 -2
- package/dist/webcomponents/p-e6695628.js.map +0 -1
- package/dist/webcomponents/p-e70b2a21.js +0 -3
- package/dist/webcomponents/p-e70b2a21.js.map +0 -1
- package/dist/webcomponents/p-f6cc37a6.entry.js +0 -2
- package/dist/webcomponents/p-f8067330.entry.js +0 -2
- package/dist/webcomponents/p-f8067330.entry.js.map +0 -1
- package/dist/webcomponents/p-f9e127a5.js.map +0 -1
- /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.js +0 -0
- /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.css +0 -0
- /package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.d.ts +0 -0
- /package/dist/webcomponents/{p-d92116e6.entry.js.map → p-08311783.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-cd0eca25.entry.js.map → p-1d42e416.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-640bfa9f.entry.js.map → p-2ac4e73d.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-1beaaba3.entry.js.map → p-6642d95b.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-a922b908.entry.js.map → p-b4f185c5.entry.js.map} +0 -0
|
@@ -5,77 +5,77 @@ describe('justifi-payment-method-form', () => {
|
|
|
5
5
|
it('renders an iframe', async () => {
|
|
6
6
|
const page = await newSpecPage({
|
|
7
7
|
components: [PaymentMethodForm],
|
|
8
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
8
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'card' }),
|
|
9
9
|
});
|
|
10
10
|
expect(page.root).toEqualHtml(`
|
|
11
11
|
<justifi-payment-method-form>
|
|
12
|
-
<iframe id=
|
|
12
|
+
<iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>
|
|
13
13
|
</justifi-payment-method-form>
|
|
14
14
|
`);
|
|
15
15
|
});
|
|
16
16
|
it('renders a card iframe when paymentMethodFormType is card', async () => {
|
|
17
17
|
const page = await newSpecPage({
|
|
18
18
|
components: [PaymentMethodForm],
|
|
19
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
19
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'card' }),
|
|
20
20
|
});
|
|
21
21
|
expect(page.root).toEqualHtml(`
|
|
22
22
|
<justifi-payment-method-form>
|
|
23
|
-
<iframe id=
|
|
23
|
+
<iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>
|
|
24
24
|
</justifi-payment-method-form>
|
|
25
25
|
`);
|
|
26
26
|
});
|
|
27
27
|
it('renders a bank iframe when paymentMethodFormType is bank', async () => {
|
|
28
28
|
const page = await newSpecPage({
|
|
29
29
|
components: [PaymentMethodForm],
|
|
30
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
30
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'bankAccount' }),
|
|
31
31
|
});
|
|
32
32
|
expect(page.root).toEqualHtml(`
|
|
33
33
|
<justifi-payment-method-form>
|
|
34
|
-
<iframe id=
|
|
34
|
+
<iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount'></iframe>
|
|
35
35
|
</justifi-payment-method-form>
|
|
36
36
|
`);
|
|
37
37
|
});
|
|
38
38
|
it('renders a card iframe with validationMode when paymentMethodFormType is card and paymentMethodFormValidationMode is set', async () => {
|
|
39
39
|
const page = await newSpecPage({
|
|
40
40
|
components: [PaymentMethodForm],
|
|
41
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
41
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'bankAccount', paymentMethodFormValidationMode: 'onChange' }),
|
|
42
42
|
});
|
|
43
43
|
expect(page.root).toEqualHtml(`
|
|
44
44
|
<justifi-payment-method-form>
|
|
45
|
-
<iframe id=
|
|
45
|
+
<iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount?validationMode=onChange'></iframe>
|
|
46
46
|
</justifi-payment-method-form>
|
|
47
47
|
`);
|
|
48
48
|
});
|
|
49
49
|
it('renders a card iframe with validationMode when paymentMethodFormType is card and paymentMethodFormValidationMode is set', async () => {
|
|
50
50
|
const page = await newSpecPage({
|
|
51
51
|
components: [PaymentMethodForm],
|
|
52
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
52
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'bankAccount', paymentMethodFormValidationMode: 'onBlur' }),
|
|
53
53
|
});
|
|
54
54
|
expect(page.root).toEqualHtml(`
|
|
55
55
|
<justifi-payment-method-form>
|
|
56
|
-
<iframe id=
|
|
56
|
+
<iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount?validationMode=onBlur'></iframe>
|
|
57
57
|
</justifi-payment-method-form>
|
|
58
58
|
`);
|
|
59
59
|
});
|
|
60
60
|
it('renders a card iframe with iframeOrigin when paymentMethodFormType is card and iframeOrigin is set', async () => {
|
|
61
61
|
const page = await newSpecPage({
|
|
62
62
|
components: [PaymentMethodForm],
|
|
63
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
63
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'card', iframeOrigin: '${process.env.IFRAME_ORIGIN}' }),
|
|
64
64
|
});
|
|
65
65
|
expect(page.root).toEqualHtml(`
|
|
66
66
|
<justifi-payment-method-form>
|
|
67
|
-
<iframe id=
|
|
67
|
+
<iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>
|
|
68
68
|
</justifi-payment-method-form>
|
|
69
69
|
`);
|
|
70
70
|
});
|
|
71
71
|
it('renders a card iframe with singleLine when paymentMethodFormType is card and singleLine is set', async () => {
|
|
72
72
|
const page = await newSpecPage({
|
|
73
73
|
components: [PaymentMethodForm],
|
|
74
|
-
template: () => h("justifi-payment-method-form", { paymentMethodFormType:
|
|
74
|
+
template: () => h("justifi-payment-method-form", { paymentMethodFormType: 'card', singleLine: true }),
|
|
75
75
|
});
|
|
76
76
|
expect(page.root).toEqualHtml(`
|
|
77
77
|
<justifi-payment-method-form>
|
|
78
|
-
<iframe id=
|
|
78
|
+
<iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card?singleLine=true'></iframe>
|
|
79
79
|
</justifi-payment-method-form>
|
|
80
80
|
`);
|
|
81
81
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-method-form.spec.js","sourceRoot":"","sources":["../../../../../src/components/payment-method-form/test/payment-method-form.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;EAC3C,EAAE,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;IACjC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,iBAAiB,CAAC;MAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,mCAA6B,qBAAqB,EAAC,MAAM,GAA+B;KACzG,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"payment-method-form.spec.js","sourceRoot":"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DAE2B,OAAO,CAAC,GAAG,CAAC,aAAa;;KAEjF,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,gGAAgG,EAAE,KAAK,IAAI,EAAE;IAC9G,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,iBAAiB,CAAC;MAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,mCAA6B,qBAAqB,EAAC,MAAM,EAAC,UAAU,EAAE,IAAI,GAAgC;KAC3H,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;6DAE2B,OAAO,CAAC,GAAG,CAAC,aAAa;;KAEjF,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { PaymentMethodForm } from '../payment-method-form';\n\ndescribe('justifi-payment-method-form', () => {\n it('renders an iframe', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='card'></justifi-payment-method-form>,\n });\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a card iframe when paymentMethodFormType is card', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='card'></justifi-payment-method-form>,\n });\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a bank iframe when paymentMethodFormType is bank', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='bankAccount'></justifi-payment-method-form>,\n });\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a card iframe with validationMode when paymentMethodFormType is card and paymentMethodFormValidationMode is set', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='bankAccount' paymentMethodFormValidationMode='onChange'></justifi-payment-method-form>,\n });\n\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount?validationMode=onChange'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a card iframe with validationMode when paymentMethodFormType is card and paymentMethodFormValidationMode is set', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='bankAccount' paymentMethodFormValidationMode='onBlur'></justifi-payment-method-form>,\n });\n\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-bankAccount' src='${process.env.IFRAME_ORIGIN}/bankAccount?validationMode=onBlur'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a card iframe with iframeOrigin when paymentMethodFormType is card and iframeOrigin is set', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='card' iframeOrigin='${process.env.IFRAME_ORIGIN}'></justifi-payment-method-form>,\n });\n\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card'></iframe>\n </justifi-payment-method-form>\n `);\n });\n\n it('renders a card iframe with singleLine when paymentMethodFormType is card and singleLine is set', async () => {\n const page = await newSpecPage({\n components: [PaymentMethodForm],\n template: () => <justifi-payment-method-form paymentMethodFormType='card' singleLine={true}></justifi-payment-method-form>,\n });\n\n expect(page.root).toEqualHtml(`\n <justifi-payment-method-form>\n <iframe id='justifi-payment-method-form-card' src='${process.env.IFRAME_ORIGIN}/card?singleLine=true'></iframe>\n </justifi-payment-method-form>\n `);\n });\n});\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { Api, Payment } from "../../api";
|
|
2
|
+
import { Api, Payment, pagingDefaults } from "../../api";
|
|
3
3
|
import { MapPaymentStatusToBadge, formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
4
|
-
import { pagingDefaults } from "../table/table-utils";
|
|
5
4
|
/**
|
|
6
5
|
* @exportedPart table-head: Table head
|
|
7
6
|
* @exportedPart table-head-row: Head row
|
|
@@ -23,10 +22,15 @@ import { pagingDefaults } from "../table/table-utils";
|
|
|
23
22
|
*/
|
|
24
23
|
export class PaymentsList {
|
|
25
24
|
constructor() {
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
25
|
+
this.handleClickPrevious = (beforeCursor) => {
|
|
26
|
+
const newParams = Object.assign({}, this.params);
|
|
27
|
+
delete newParams.after_cursor;
|
|
28
|
+
this.params = (Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor }));
|
|
29
|
+
};
|
|
30
|
+
this.handleClickNext = (afterCursor) => {
|
|
31
|
+
const newParams = Object.assign({}, this.params);
|
|
32
|
+
delete newParams.before_cursor;
|
|
33
|
+
this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
|
|
30
34
|
};
|
|
31
35
|
this.accountId = undefined;
|
|
32
36
|
this.authToken = undefined;
|
|
@@ -34,6 +38,7 @@ export class PaymentsList {
|
|
|
34
38
|
this.loading = true;
|
|
35
39
|
this.errorMessage = undefined;
|
|
36
40
|
this.paging = pagingDefaults;
|
|
41
|
+
this.params = undefined;
|
|
37
42
|
}
|
|
38
43
|
updateOnPropChange() {
|
|
39
44
|
this.fetchData();
|
|
@@ -41,7 +46,7 @@ export class PaymentsList {
|
|
|
41
46
|
connectedCallback() {
|
|
42
47
|
this.fetchData();
|
|
43
48
|
}
|
|
44
|
-
async fetchData(
|
|
49
|
+
async fetchData() {
|
|
45
50
|
var _a;
|
|
46
51
|
if (!this.accountId || !this.authToken) {
|
|
47
52
|
this.errorMessage = "Can not fetch any data without an AccountID and an AuthToken";
|
|
@@ -49,11 +54,9 @@ export class PaymentsList {
|
|
|
49
54
|
return;
|
|
50
55
|
}
|
|
51
56
|
this.loading = true;
|
|
57
|
+
const api = Api(this.authToken, process.env.PROXY_API_ORIGIN);
|
|
52
58
|
const endpoint = `account/${this.accountId}/payments`;
|
|
53
|
-
const response = await
|
|
54
|
-
paging: this.paging,
|
|
55
|
-
direction: direction
|
|
56
|
-
});
|
|
59
|
+
const response = await api.get(endpoint, this.params);
|
|
57
60
|
if (!response.error) {
|
|
58
61
|
this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
|
|
59
62
|
const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Payment(dataItem));
|
|
@@ -99,7 +102,7 @@ export class PaymentsList {
|
|
|
99
102
|
value: MapPaymentStatusToBadge(payment.status)
|
|
100
103
|
},
|
|
101
104
|
payment.id
|
|
102
|
-
])), loading: this.loading, "error-message": this.errorMessage, paging: Object.assign(Object.assign({}, this.paging), {
|
|
105
|
+
])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
|
|
103
106
|
}
|
|
104
107
|
static get is() { return "justifi-payments-list"; }
|
|
105
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -156,7 +159,8 @@ export class PaymentsList {
|
|
|
156
159
|
"payments": {},
|
|
157
160
|
"loading": {},
|
|
158
161
|
"errorMessage": {},
|
|
159
|
-
"paging": {}
|
|
162
|
+
"paging": {},
|
|
163
|
+
"params": {}
|
|
160
164
|
};
|
|
161
165
|
}
|
|
162
166
|
static get events() {
|
|
@@ -190,6 +194,9 @@ export class PaymentsList {
|
|
|
190
194
|
}, {
|
|
191
195
|
"propName": "authToken",
|
|
192
196
|
"methodName": "updateOnPropChange"
|
|
197
|
+
}, {
|
|
198
|
+
"propName": "params",
|
|
199
|
+
"methodName": "updateOnPropChange"
|
|
193
200
|
}];
|
|
194
201
|
}
|
|
195
202
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments-list.js","sourceRoot":"","sources":["../../../../src/components/payments-list/payments-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"payments-list.js","sourceRoot":"","sources":["../../../../src/components/payments-list/payments-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,GAAG,EAAsD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7G,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpG;;;;;;;;;;;;;;;;;;EAkBE;AAOF,MAAM,OAAO,YAAY;;IAwBvB,wBAAmB,GAAG,CAAC,YAAoB,EAAE,EAAE;MAC7C,MAAM,SAAS,qBAAa,IAAI,CAAC,MAAM,CAAE,CAAC;MAC1C,OAAO,SAAS,CAAC,YAAY,CAAC;MAC9B,IAAI,CAAC,MAAM,GAAG,iCAAM,SAAS,KAAE,aAAa,EAAE,YAAY,IAAG,CAAC;IAChE,CAAC,CAAC;IAEF,oBAAe,GAAG,CAAC,WAAmB,EAAE,EAAE;MACxC,MAAM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;YACZ,KAAK,EAAE;2BACE,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC;2BAC9B,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC;mBACtC;WACF;UACD,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC;UAC9B,OAAO,CAAC,WAAW;UACnB,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI;UAClD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,cAAc;UAC5D;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC;WAC/C;UACD,OAAO,CAAC,EAAE;SACX,CACF,CAAC,EAEJ,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,MAE/C,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Api, IApiResponseCollection, IPaymentMethod, PagingInfo, Payment, pagingDefaults } from '../../api';\nimport { MapPaymentStatusToBadge, formatCurrency, formatDate, formatTime } from '../../utils/utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-payments-list',\n styleUrl: 'payments-list.scss',\n shadow: true,\n})\n\nexport class PaymentsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() payments: Payment[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any;\n @Event({\n eventName: 'payment-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Payment>;\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n \n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n }; \n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n\n this.loading = true;\n\n const api = Api(this.authToken, process.env.PROXY_API_ORIGIN);\n const endpoint = `account/${this.accountId}/payments`;\n\n const response: IApiResponseCollection<Payment[]> = await api.get(endpoint, this.params);\n\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Payment(dataItem));\n this.payments = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n getPaymentMethod(paymentMethod: IPaymentMethod) {\n return paymentMethod.card || paymentMethod.bank_account\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={e => {\n const clickedPaymentID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedPaymentID) { return }\n this.rowClicked.emit(this.payments.find((payment) => payment.id === clickedPaymentID));\n }}\n entityId={this.payments.map((payment) => payment.id)}\n columnData={[\n ['Made On', 'The date and time each payment was made'],\n ['Amount', 'The dollar amount of each payment'],\n ['Description', 'The payment description, if you provided one'],\n ['Cardholder', 'The name associated with the payment method'],\n ['Payment Method', 'The brand and last 4 digits of the payment method'],\n ['Status', 'The current status of each payment'],\n ['Payment ID', 'The unique identifier of each payment']\n ]}\n rowData={\n this.payments.map((payment) => (\n [\n {\n type: 'head',\n value: `\n <div>${formatDate(payment.created_at)}</div>\n <div>${formatTime(payment.created_at)}</div>\n `,\n },\n formatCurrency(payment.amount),\n payment.description,\n this.getPaymentMethod(payment.payment_method).name,\n this.getPaymentMethod(payment.payment_method).acct_last_four,\n {\n type: 'inner',\n value: MapPaymentStatusToBadge(payment.status)\n },\n payment.id\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import config from "../../../config";
|
|
2
1
|
export default {
|
|
3
|
-
title: '
|
|
2
|
+
title: 'Components/PaymentsList',
|
|
4
3
|
component: 'justifi-payments-list',
|
|
5
4
|
parameters: {},
|
|
6
5
|
decorators: [
|
|
@@ -16,8 +15,8 @@ export default {
|
|
|
16
15
|
};
|
|
17
16
|
class PaymentsListArgs {
|
|
18
17
|
constructor(args) {
|
|
19
|
-
this['auth-token'] = args['auth-token'] ||
|
|
20
|
-
this['account-id'] = args['account-id'] ||
|
|
18
|
+
this['auth-token'] = args['auth-token'] || process.env.PROXY_AUTH_TOKEN;
|
|
19
|
+
this['account-id'] = args['account-id'] || process.env.EXAMPLE_PAYMENTS_ACCOUNT_ID;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
const Template = (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments-list.stories.js","sourceRoot":"","sources":["../../../../src/components/payments-list/payments-list.stories.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"payments-list.stories.js","sourceRoot":"","sources":["../../../../src/components/payments-list/payments-list.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,yBAAyB;EAChC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;EACd,UAAU,EAAE;IACV,CAAC,KAAK,EAAE,EAAE,CAAC;QACP,KAAK,EAAE;;;;;;KAMV;GACF;CACF,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACxE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;EACrF,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,UAAU,GAAG;EACrB,CAAC,KAAK,EAAE,EAAE,CAAC;;QAEL,KAAK,EAAE;;GAEZ;CACF,CAAA;AACD,SAAS,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["export default {\n title: 'Components/PaymentsList',\n component: 'justifi-payments-list',\n parameters: {},\n decorators: [\n (Story) => `\n ${Story()}\n <script>\n window.addEventListener('payment-row-clicked', (e) => {\n console.log(e);\n })\n </script>\n `\n ]\n};\n\nclass PaymentsListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || process.env.PROXY_AUTH_TOKEN;\n this['account-id'] = args['account-id'] || process.env.EXAMPLE_PAYMENTS_ACCOUNT_ID;\n }\n}\n\nconst Template = (args: PaymentsListArgs) => {\n return (`\n <justifi-payments-list\n data-testid=\"justifi-payments-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PaymentsListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PaymentsListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payments-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-payments-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-payments-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-payments-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-payments-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-payments-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-payments-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n\nexport const Contained = Template.bind({});\nContained.decorators = [\n (Story) => `\n <div style=\"position: relative; width: 900px; height: 300px; overflow-x: hidden;\">\n ${Story()}\n </div>\n `\n]\nContained.args = new PaymentsListArgs({});\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { Api } from "../../api";
|
|
3
3
|
import { MapPayoutStatusToBadge, formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
4
|
-
import { DetailItem, DetailSection, EntityHeadInfo, EntityHeadInfoItem, ErrorState, LoadingState } from "../details/utils";
|
|
4
|
+
import { CodeBlock, DetailItem, DetailSection, EntityHeadInfo, EntityHeadInfoItem, ErrorState, LoadingState } from "../details/utils";
|
|
5
5
|
/**
|
|
6
6
|
* @exportedPart detail-loading-spinner
|
|
7
7
|
* @exportedPart detail-loading-state
|
|
@@ -17,6 +17,14 @@ import { DetailItem, DetailSection, EntityHeadInfo, EntityHeadInfoItem, ErrorSta
|
|
|
17
17
|
* @exportedPart detail-metadata-title
|
|
18
18
|
* @exportedPart detail-method-title
|
|
19
19
|
* @exportedPart detail-method-data
|
|
20
|
+
* @exportedPart detail-section
|
|
21
|
+
* @exportedPart detail-section-title
|
|
22
|
+
* @exportedPart detail-section-item-title
|
|
23
|
+
* @exportedPart detail-section-item-data
|
|
24
|
+
* @exportedPart detail-head-info
|
|
25
|
+
* @exportedPart detail-head-info-item
|
|
26
|
+
* @exportedPart detail-head-info-item-title
|
|
27
|
+
* @exportedPart detail-head-info-item-data
|
|
20
28
|
*/
|
|
21
29
|
export class PaymentDetails {
|
|
22
30
|
constructor() {
|
|
@@ -41,7 +49,7 @@ export class PaymentDetails {
|
|
|
41
49
|
}
|
|
42
50
|
this.loading = true;
|
|
43
51
|
const endpoint = `payouts/${this.payoutId}`;
|
|
44
|
-
const response = await Api(this.authToken).get(endpoint);
|
|
52
|
+
const response = await Api(this.authToken, process.env.PROXY_API_ORIGIN).get(endpoint);
|
|
45
53
|
if (!response.error) {
|
|
46
54
|
this.payout = response.data;
|
|
47
55
|
}
|
|
@@ -54,7 +62,7 @@ export class PaymentDetails {
|
|
|
54
62
|
var _a;
|
|
55
63
|
return (h(Host, null, this.loading ? LoadingState :
|
|
56
64
|
!this.payout ? ErrorState(this.errorMessage) :
|
|
57
|
-
h("justifi-details", { "error-message": this.errorMessage
|
|
65
|
+
h("justifi-details", { "error-message": this.errorMessage }, h(EntityHeadInfo, { slot: "head-info", badge: h("span", { slot: 'badge', innerHTML: MapPayoutStatusToBadge((_a = this.payout) === null || _a === void 0 ? void 0 : _a.status) }), title: `${formatCurrency(this.payout.amount)} ${this.payout.currency.toUpperCase()}` }, h(EntityHeadInfoItem, { classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}` }), h(EntityHeadInfoItem, { classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}` }), h(EntityHeadInfoItem, { title: "ID", value: this.payout.id })), h("div", { slot: 'detail-sections' }, h(DetailSection, { sectionTitle: "Details" }, h(DetailItem, { title: "Date paid", value: formatDate(this.payout.deposits_at) }), h(DetailItem, { title: "Statement Description", value: this.payout.description }), h(DetailItem, { title: "Payout Method", value: this.payout.delivery_method }), h(DetailItem, { title: "Amount", value: formatCurrency(this.payout.amount) }), h(DetailItem, { title: "Fee", value: formatCurrency(this.payout.fees_total) })), h(DetailSection, { sectionTitle: "Account" }, h(DetailItem, { title: "ID", value: this.payout.account_id }), h(DetailItem, { title: "Account Type", value: this.payout.bank_account.account_type }), h(DetailItem, { title: "Institution", value: this.payout.bank_account.account_type }), h(DetailItem, { title: "Routing Number", value: this.payout.bank_account.routing_number }), h(DetailItem, { title: "Account Number", value: this.payout.bank_account.account_number_last4 })), h(DetailSection, { sectionTitle: 'Metadata' }, h(CodeBlock, { metadata: this.payout.metadata }))))));
|
|
58
66
|
}
|
|
59
67
|
static get is() { return "justifi-payout-details"; }
|
|
60
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout-details.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAAkC,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"payout-details.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,GAAG,EAAkC,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtI;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAOF,MAAM,OAAO,cAAc;;;;;mBAIG,IAAI;;;EAKhC,kBAAkB;IACh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MAAM,CAAC,GAAI;cACxE,EAAC,UAAU,IAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAI,CAC3D;YAChB,EAAC,aAAa,IAAC,YAAY,EAAC,SAAS;cACnC,EAAC,UAAU,IAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,GAAI;cACxD,EAAC,UAAU,IAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,GAAI;cACjF,EAAC,UAAU,IAAC,KAAK,EAAC,aAAa,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,GAAI;cAChF,EAAC,UAAU,IAAC,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,GAAI;cACrF,EAAC,UAAU,IAAC,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,GAAI,CAC7E;YAChB,EAAC,aAAa,IAAC,YAAY,EAAC,UAAU;cACpC,EAAC,SAAS,IAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAI,CAC/B,CACZ,CACU,CAEnB,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { Api, IApiResponseCollection, Payout } from '../../api';\nimport { MapPayoutStatusToBadge, formatCurrency, formatDate, formatTime } from '../../utils/utils';\nimport { CodeBlock, DetailItem, DetailSection, EntityHeadInfo, EntityHeadInfoItem, ErrorState, LoadingState } from '../details/utils';\n\n/**\n * @exportedPart detail-loading-spinner\n * @exportedPart detail-loading-state\n * @exportedPart detail-empty-state\n * @exportedPart detail-head\n * @exportedPart detail-title\n * @exportedPart detail-method\n * @exportedPart detail-info\n * @exportedPart detail-info-item\n * @exportedPart detail-info-item-title\n * @exportedPart detail-info-item-data\n * @exportedPart detail-metadata\n * @exportedPart detail-metadata-title\n * @exportedPart detail-method-title\n * @exportedPart detail-method-data\n * @exportedPart detail-section\n * @exportedPart detail-section-title\n * @exportedPart detail-section-item-title\n * @exportedPart detail-section-item-data\n * @exportedPart detail-head-info\n * @exportedPart detail-head-info-item\n * @exportedPart detail-head-info-item-title\n * @exportedPart detail-head-info-item-data\n*/\n@Component({\n tag: 'justifi-payout-details',\n styleUrl: 'payout-details.scss',\n shadow: true,\n})\n\nexport class PaymentDetails {\n @Prop() payoutId: string;\n @Prop() authToken: string;\n @State() payout: Payout;\n @State() loading: boolean = true;\n @State() errorMessage: string;\n\n @Watch('payoutId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n async fetchData(): Promise<void> {\n this.errorMessage = '';\n if (!this.payoutId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without a PayoutID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `payouts/${this.payoutId}`;\n\n const response: IApiResponseCollection<Payout> = await Api(this.authToken, process.env.PROXY_API_ORIGIN).get(endpoint);\n if (!response.error) {\n this.payout = response.data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n {\n this.loading ? LoadingState :\n !this.payout ? ErrorState(this.errorMessage) :\n <justifi-details error-message={this.errorMessage}>\n <EntityHeadInfo slot=\"head-info\" badge={<span slot='badge' innerHTML={MapPayoutStatusToBadge(this.payout?.status)} />} title={`${formatCurrency(this.payout.amount)} ${this.payout.currency.toUpperCase()}`}>\n <EntityHeadInfoItem\n classes=\"border-1 border-end\"\n title=\"Updated At\"\n value={`${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}`}\n />\n <EntityHeadInfoItem\n classes=\"border-1 border-end\"\n title=\"Created At\"\n value={`${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}`}\n />\n <EntityHeadInfoItem title=\"ID\" value={this.payout.id} />\n </EntityHeadInfo>\n <div slot='detail-sections'>\n <DetailSection sectionTitle=\"Details\">\n <DetailItem title=\"Date paid\" value={formatDate(this.payout.deposits_at)} />\n <DetailItem title=\"Statement Description\" value={this.payout.description} />\n <DetailItem title=\"Payout Method\" value={this.payout.delivery_method} />\n <DetailItem title=\"Amount\" value={formatCurrency(this.payout.amount)} />\n <DetailItem title=\"Fee\" value={formatCurrency(this.payout.fees_total)} />\n </DetailSection>\n <DetailSection sectionTitle=\"Account\">\n <DetailItem title=\"ID\" value={this.payout.account_id} />\n <DetailItem title=\"Account Type\" value={this.payout.bank_account.account_type} />\n <DetailItem title=\"Institution\" value={this.payout.bank_account.account_type} />\n <DetailItem title=\"Routing Number\" value={this.payout.bank_account.routing_number} />\n <DetailItem title=\"Account Number\" value={this.payout.bank_account.account_number_last4} />\n </DetailSection>\n <DetailSection sectionTitle='Metadata'>\n <CodeBlock metadata={this.payout.metadata} />\n </DetailSection>\n </div>\n </justifi-details>\n }\n </Host>\n )\n }\n}"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import config from "../../../config";
|
|
2
1
|
export default {
|
|
3
|
-
title: '
|
|
2
|
+
title: 'Components/PayoutDetails',
|
|
4
3
|
component: 'justifi-payout-details',
|
|
5
4
|
parameters: {}
|
|
6
5
|
};
|
|
7
6
|
class PayoutDetailsArgs {
|
|
8
7
|
constructor(args) {
|
|
9
|
-
this['auth-token'] = args['auth-token'] ||
|
|
10
|
-
this['
|
|
8
|
+
this['auth-token'] = args['auth-token'] || process.env.PROXY_AUTH_TOKEN;
|
|
9
|
+
this['payout-id'] = args['payout-id'] || process.env.EXAMPLE_PAYOUT_ID;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
12
|
const Template = (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout-details.stories.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.stories.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"payout-details.stories.js","sourceRoot":"","sources":["../../../../src/components/payout-details/payout-details.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,0BAA0B;EACjC,SAAS,EAAE,wBAAwB;EACnC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,iBAAiB;EAIrB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACxE,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;EACzE,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAuB,EAAE,EAAE;EAC3C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;mBACnB,IAAI,CAAC,WAAW,CAAC;;GAEjC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;GAkBV;CACF,CAAA","sourcesContent":["export default {\n title: 'Components/PayoutDetails',\n component: 'justifi-payout-details',\n parameters: {}\n};\n\nclass PayoutDetailsArgs {\n 'auth-token': string;\n 'payout-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || process.env.PROXY_AUTH_TOKEN;\n this['payout-id'] = args['payout-id'] || process.env.EXAMPLE_PAYOUT_ID;\n }\n}\n\nconst Template = (args: PayoutDetailsArgs) => {\n return (`\n <justifi-payout-details\n data-testid=\"justifi-payout-details\"\n auth-token=\"${args['auth-token']}\"\n payout-id=\"${args['payout-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new PayoutDetailsArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new PayoutDetailsArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-payout-details::part(detail-head) {\n background-color: rgba(100, 200, 250, 0.2);\n border-left: 4px solid rgba(100, 200, 250, 1);\n }\n justifi-payout-details::part(detail-info-item-title),\n justifi-payout-details::part(detail-method-item-title) {\n border-radius: 3px;\n background-color: rgba(0, 0, 0, 0.8);\n text-align: center;\n padding: 0 10px;\n color: white !important;\n }\n justifi-payout-details::part(detail-metadata) {\n background-color: rgba(100,100,100,0.2)\n }\n </style>\n `\n]\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { Api, Payout, PayoutStatuses, PayoutStatusesSafeNames } from "../../api";
|
|
2
|
+
import { Api, Payout, PayoutStatuses, PayoutStatusesSafeNames, pagingDefaults } from "../../api";
|
|
3
3
|
import { formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
4
|
-
import { pagingDefaults } from "../table/table-utils";
|
|
5
4
|
/**
|
|
6
5
|
* @exportedPart table-head: Table head
|
|
7
6
|
* @exportedPart table-head-row: Head row
|
|
@@ -23,11 +22,6 @@ import { pagingDefaults } from "../table/table-utils";
|
|
|
23
22
|
*/
|
|
24
23
|
export class PayoutsList {
|
|
25
24
|
constructor() {
|
|
26
|
-
this.onPageChange = (direction) => {
|
|
27
|
-
return () => {
|
|
28
|
-
this.fetchData(direction);
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
25
|
this.mapStatusToBadge = (status) => {
|
|
32
26
|
switch (status) {
|
|
33
27
|
case PayoutStatuses.scheduled:
|
|
@@ -44,12 +38,23 @@ export class PayoutsList {
|
|
|
44
38
|
return `<span class="badge bg-success" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;
|
|
45
39
|
}
|
|
46
40
|
};
|
|
41
|
+
this.handleClickPrevious = (beforeCursor) => {
|
|
42
|
+
const newParams = Object.assign({}, this.params);
|
|
43
|
+
delete newParams.after_cursor;
|
|
44
|
+
this.params = (Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor }));
|
|
45
|
+
};
|
|
46
|
+
this.handleClickNext = (afterCursor) => {
|
|
47
|
+
const newParams = Object.assign({}, this.params);
|
|
48
|
+
delete newParams.before_cursor;
|
|
49
|
+
this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
|
|
50
|
+
};
|
|
47
51
|
this.accountId = undefined;
|
|
48
52
|
this.authToken = undefined;
|
|
49
53
|
this.payouts = [];
|
|
50
54
|
this.loading = true;
|
|
51
55
|
this.errorMessage = undefined;
|
|
52
56
|
this.paging = pagingDefaults;
|
|
57
|
+
this.params = undefined;
|
|
53
58
|
}
|
|
54
59
|
updateOnPropChange() {
|
|
55
60
|
this.fetchData();
|
|
@@ -57,7 +62,7 @@ export class PayoutsList {
|
|
|
57
62
|
connectedCallback() {
|
|
58
63
|
this.fetchData();
|
|
59
64
|
}
|
|
60
|
-
async fetchData(
|
|
65
|
+
async fetchData() {
|
|
61
66
|
var _a;
|
|
62
67
|
if (!this.accountId || !this.authToken) {
|
|
63
68
|
this.errorMessage = "Can not fetch any data without an AccountID and an AuthToken";
|
|
@@ -65,11 +70,9 @@ export class PayoutsList {
|
|
|
65
70
|
return;
|
|
66
71
|
}
|
|
67
72
|
this.loading = true;
|
|
73
|
+
const api = Api(this.authToken, process.env.PROXY_API_ORIGIN);
|
|
68
74
|
const endpoint = `account/${this.accountId}/payouts`;
|
|
69
|
-
const response = await
|
|
70
|
-
paging: this.paging,
|
|
71
|
-
direction: direction
|
|
72
|
-
});
|
|
75
|
+
const response = await api.get(endpoint, this.params);
|
|
73
76
|
if (!response.error) {
|
|
74
77
|
this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
|
|
75
78
|
const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Payout(dataItem));
|
|
@@ -118,7 +121,7 @@ export class PayoutsList {
|
|
|
118
121
|
type: 'inner',
|
|
119
122
|
value: this.mapStatusToBadge(payout.status)
|
|
120
123
|
}
|
|
121
|
-
])), loading: this.loading, "error-message": this.errorMessage, paging: Object.assign(Object.assign({}, this.paging), {
|
|
124
|
+
])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
|
|
122
125
|
}
|
|
123
126
|
static get is() { return "justifi-payouts-list"; }
|
|
124
127
|
static get encapsulation() { return "shadow"; }
|
|
@@ -175,7 +178,8 @@ export class PayoutsList {
|
|
|
175
178
|
"payouts": {},
|
|
176
179
|
"loading": {},
|
|
177
180
|
"errorMessage": {},
|
|
178
|
-
"paging": {}
|
|
181
|
+
"paging": {},
|
|
182
|
+
"params": {}
|
|
179
183
|
};
|
|
180
184
|
}
|
|
181
185
|
static get events() {
|
|
@@ -209,6 +213,9 @@ export class PayoutsList {
|
|
|
209
213
|
}, {
|
|
210
214
|
"propName": "authToken",
|
|
211
215
|
"methodName": "updateOnPropChange"
|
|
216
|
+
}, {
|
|
217
|
+
"propName": "params",
|
|
218
|
+
"methodName": "updateOnPropChange"
|
|
212
219
|
}];
|
|
213
220
|
}
|
|
214
221
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payouts-list.js","sour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CAAC,YAAY,CAAC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,oBAAoB,EAAE;UAC9E,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC;UACrC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC;UACpC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC;UACjC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC;UAClC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC;UAC7B;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;WAC5C;SACF,CACF,CAAC,EAEJ,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACjC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAEnC,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Api, IApiResponseCollection, Payout, PayoutStatuses, PayoutStatusesSafeNames } from '../../api';\nimport { formatCurrency, formatDate, formatTime } from '../../utils/utils';\nimport { PagingInfo, pagingDefaults } from '../table/table-utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-payouts-list',\n styleUrl: 'payouts-list.scss',\n shadow: true,\n})\n\nexport class PayoutsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() payouts: Payout[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @Event({\n eventName: 'payout-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Payout>;\n\n @Watch('accountId')\n @Watch('authToken')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n onPageChange = (direction: string) => {\n return () => {\n this.fetchData(direction);\n }\n }\n\n mapStatusToBadge = (status: PayoutStatuses) => {\n switch (status) {\n case PayoutStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;\n }\n }\n\n async fetchData(direction?: string): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `account/${this.accountId}/payouts`;\n\n const response: IApiResponseCollection<Payout[]> = await Api(this.authToken).get(endpoint, {\n paging: this.paging,\n direction: direction\n });\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Payout(dataItem));\n this.payouts = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedPayoutID) { return }\n this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));\n }}\n columnData={[\n ['Paid Out On', 'The date each transaction occurred'],\n ['Type', 'The type of each transaction'],\n ['Account', 'The ID of the account associated with each payout'],\n ['Paid Out To', 'The bank account to which each payout was transferred'],\n ['Payments', 'Sum of payments in each payout'],\n ['Refunds', 'Sum of refunds in each payout'],\n ['Fees', 'Sum of fees in each payout'],\n ['Other', 'Sum of less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Payout Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement'],\n ['Status', 'The real-time status of each payout']\n ]}\n entityId={this.payouts.map((payout) => payout.id)}\n rowData={\n this.payouts.map((payout) => (\n [\n {\n type: 'head',\n value: `\n <div>${formatDate(payout.created_at)}</div>\n <div>${formatTime(payout.created_at)}</div>\n `,\n },\n payout.payout_type,\n payout.account_id,\n `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,\n formatCurrency(payout.payments_total),\n formatCurrency(payout.refunds_total),\n formatCurrency(payout.fees_total),\n formatCurrency(payout.other_total),\n formatCurrency(payout.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(payout.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n paging={{\n ...this.paging,\n onPrev: this.onPageChange('prev'),\n onNext: this.onPageChange('next')\n }}\n />\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"payouts-list.js","sourceRoot":"","sources":["../../../../src/components/payouts-list/payouts-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC5F,OAAO,EACL,GAAG,EAGH,MAAM,EACN,cAAc,EACd,uBAAuB,EACvB,cAAc,EACf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;;;;;;;;;;;;;;EAkBE;AAOF,MAAM,OAAO,WAAW;;IAwBtB,qBAAgB,GAAG,CAAC,MAAsB,EAAE,EAAE;MAC5C,QAAQ,MAAM,EAAE;QACd,KAAK,cAAc,CAAC,SAAS;UAC3B,OAAO,kFAAkF,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QACpI,KAAK,cAAc,CAAC,UAAU;UAC5B,OAAO,2FAA2F,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7I,KAAK,cAAc,CAAC,MAAM;UACxB,OAAO,8EAA8E,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAChI,KAAK,cAAc,CAAC,QAAQ;UAC1B,OAAO,8EAA8E,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QAChI,KAAK,cAAc,CAAC,SAAS;UAC3B,OAAO,uIAAuI,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;QACzL,KAAK,cAAc,CAAC,IAAI;UACtB,OAAO,wFAAwF,uBAAuB,CAAC,MAAM,CAAC,SAAS,CAAC;OAC3I;IACH,CAAC,CAAA;IAED,wBAAmB,GAAG,CAAC,YAAoB,EAAE,EAAE;MAC7C,MAAM,SAAS,qBAAa,IAAI,CAAC,MAA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AE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EACjD,OAAO,EACL,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC3B;UACE;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE;2BACE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;2BAC7B,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC;mBACrC;WACF;UACD,MAAM,CAAC,WAAW;UAClB,MAAM,CAAC,UAAU;UACjB,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,IAAI,MAAM,CAAC,YAAY,CAAC,oBAAoB,EAAE;UAC9E,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC;UACrC,cAAc,CAAC,MAAM,CAAC,aAAa,CAAC;UACpC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC;UACjC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC;UAClC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC;UAC7B;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;WAC5C;SACF,CACF,CAAC,EAEJ,OAAO,EAAE,IAAI,CAAC,OAAO,mBACN,IAAI,CAAC,YAAY,EAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,kCACD,IAAI,CAAC,MAAM,KACd,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,MAE/C,CACG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport { \n Api, \n IApiResponseCollection, \n PagingInfo, \n Payout, \n PayoutStatuses, \n PayoutStatusesSafeNames, \n pagingDefaults \n} from '../../api';\nimport { formatCurrency, formatDate, formatTime } from '../../utils/utils';\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart button-disabled: Disabled state for paging buttons\n * @exportedPart previous-button-text: Text for Previous button\n * @exportedPart next-button-text: Text for Next button\n*/\n@Component({\n tag: 'justifi-payouts-list',\n styleUrl: 'payouts-list.scss',\n shadow: true,\n})\n\nexport class PayoutsList {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @State() payouts: Payout[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n @Event({\n eventName: 'payout-row-clicked',\n bubbles: true,\n }) rowClicked: EventEmitter<Payout>;\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapStatusToBadge = (status: PayoutStatuses) => {\n switch (status) {\n case PayoutStatuses.scheduled:\n return `<span class=\"badge bg-primary\" title='Batched and scheduled to be transferred'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.in_transit:\n return `<span class=\"badge bg-primary\" title='Transfer to your bank account has been initiated'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.failed:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.canceled:\n return `<span class=\"badge bg-danger\" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.forwarded:\n return `<span class=\"badge bg-secondary\" title='This payout initially failed; the funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;\n case PayoutStatuses.paid:\n return `<span class=\"badge bg-success\" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;\n }\n }\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n }; \n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage = \"Can not fetch any data without an AccountID and an AuthToken\";\n this.loading = false;\n return;\n }\n this.loading = true;\n\n const api = Api(this.authToken, process.env.PROXY_API_ORIGIN);\n const endpoint = `account/${this.accountId}/payouts`;\n\n const response: IApiResponseCollection<Payout[]> = await api.get(endpoint, this.params);\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info\n }\n\n const data = response?.data?.map(dataItem => new Payout(dataItem));\n this.payouts = data;\n } else {\n this.errorMessage = typeof response.error === 'string' ? response.error : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n rowClickHandler={(e) => {\n const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;\n if (!clickedPayoutID) { return }\n this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));\n }}\n columnData={[\n ['Paid Out On', 'The date each transaction occurred'],\n ['Type', 'The type of each transaction'],\n ['Account', 'The ID of the account associated with each payout'],\n ['Paid Out To', 'The bank account to which each payout was transferred'],\n ['Payments', 'Sum of payments in each payout'],\n ['Refunds', 'Sum of refunds in each payout'],\n ['Fees', 'Sum of fees in each payout'],\n ['Other', 'Sum of less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],\n ['Payout Amount', 'The net sum of all transactions in each payout. This is the amount you\\'ll see reflected on your bank statement'],\n ['Status', 'The real-time status of each payout']\n ]}\n entityId={this.payouts.map((payout) => payout.id)}\n rowData={\n this.payouts.map((payout) => (\n [\n {\n type: 'head',\n value: `\n <div>${formatDate(payout.created_at)}</div>\n <div>${formatTime(payout.created_at)}</div>\n `,\n },\n payout.payout_type,\n payout.account_id,\n `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,\n formatCurrency(payout.payments_total),\n formatCurrency(payout.refunds_total),\n formatCurrency(payout.fees_total),\n formatCurrency(payout.other_total),\n formatCurrency(payout.amount),\n {\n type: 'inner',\n value: this.mapStatusToBadge(payout.status)\n }\n ]\n ))\n }\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import config from "../../../config";
|
|
2
1
|
export default {
|
|
3
|
-
title: '
|
|
2
|
+
title: 'Components/PayoutsList',
|
|
4
3
|
component: 'justifi-payouts-list',
|
|
5
4
|
parameters: {},
|
|
6
5
|
decorators: [
|
|
@@ -16,8 +15,8 @@ export default {
|
|
|
16
15
|
};
|
|
17
16
|
class PayoutsListArgs {
|
|
18
17
|
constructor(args) {
|
|
19
|
-
this['auth-token'] = args['auth-token'] ||
|
|
20
|
-
this['
|
|
18
|
+
this['auth-token'] = args['auth-token'] || process.env.PROXY_AUTH_TOKEN;
|
|
19
|
+
this['account-id'] = args['account-id'] || process.env.EXAMPLE_PAYMENTS_ACCOUNT_ID;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
const Template = (args) => {
|