@justifi/webcomponents 4.17.0 → 4.19.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/{Analytics-80336968.js → Analytics-ff013cbc.js} +1 -1
- package/dist/cjs/{Payment-24f22eca.js → Payment-1a8a8ca6.js} +0 -21
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +13 -13
- package/dist/cjs/business-details-core.cjs.entry.js +6 -9
- package/dist/cjs/{business-form-types-11130bab.js → business-form-types-6e1fcda3.js} +4 -7
- package/dist/cjs/business.service-f63650f5.js +32 -0
- package/dist/cjs/button-3f400a66.js +26 -0
- package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
- package/dist/cjs/{form-control-checkbox_5.cjs.entry.js → form-control-checkbox_9.cjs.entry.js} +437 -172
- package/dist/cjs/form-control-date_3.cjs.entry.js +15 -9
- package/dist/cjs/form-control-error-text_4.cjs.entry.js +3 -3
- package/dist/cjs/form-control-file.cjs.entry.js +2 -2
- package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
- package/dist/cjs/form-control-number.cjs.entry.js +2 -2
- package/dist/cjs/get-payout-csv-f3aee6d0.js +48 -0
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
- package/dist/cjs/{index-b4498996.js → index-fb499e95.js} +15 -3
- package/dist/cjs/input-handlers-cff032bb.js +20 -0
- package/dist/cjs/{insurance-state-3f044af7.js → insurance-state-80e24caf.js} +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +197 -482
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +6 -5
- package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +30 -0
- package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +14 -9
- package/dist/cjs/justifi-checkout.cjs.entry.js +6 -6
- package/dist/cjs/justifi-details.cjs.entry.js +4 -7
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +12 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +268 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-form.cjs.entry.js +11 -11
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +9 -8
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -65
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +16 -11
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +16 -13
- package/dist/cjs/justifi-refund-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +14 -9
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-7b63c02b.js → package-cb0f8cb1.js} +1 -1
- package/dist/cjs/pagination-menu.cjs.entry.js +25 -0
- package/dist/cjs/{payload-parsers-78445405.js → payload-parsers-1cbc3b57.js} +2 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +11 -14
- package/dist/cjs/payment-provisioning-actions-06466dda.js +185 -0
- package/dist/cjs/{payment.service-35298e95.js → payment.service-0a64f9cd.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +73 -44
- package/dist/cjs/payout-details-core.cjs.entry.js +19 -8
- package/dist/cjs/payouts-list-core.cjs.entry.js +96 -59
- package/dist/cjs/skeleton-748c5dde.js +43 -0
- package/dist/cjs/styled-host-cc053016.js +14 -0
- package/dist/cjs/table-loading-state-8b406852.js +38 -0
- package/dist/cjs/{utils-80191fbe.js → utils-89d86e29.js} +0 -33
- package/dist/cjs/{utils-0c3168ef.js → utils-c1d2e426.js} +1 -1
- package/dist/cjs/{utils-742da2e3.js → utils-ddacfc44.js} +0 -5
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Payment.js +0 -20
- package/dist/collection/api/services/business.service.js +18 -0
- package/dist/collection/api/services/payout.service.js +5 -0
- package/dist/collection/assets/download-icon.js +2 -0
- package/dist/collection/collection-manifest.json +9 -14
- package/dist/collection/components/bank-account-form/bank-account-form.js +1 -1
- package/dist/collection/components/billing-form/billing-form.css +2 -8162
- package/dist/collection/components/billing-form/billing-form.js +4 -3
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +2 -3
- package/dist/collection/components/business-details/business-details-core.js +5 -14
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +2 -3
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +2 -3
- package/dist/collection/components/business-details/owner-details/owner-details.js +2 -3
- package/dist/collection/components/business-details/representative-details/representative-details.js +2 -3
- package/dist/collection/components/business-details/shared-business-details.css +3 -0
- package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-form.css +5 -8768
- package/dist/collection/components/business-forms/business-form/business-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +1 -1
- package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +520 -0
- package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +80 -0
- package/dist/collection/components/business-forms/owner-form/owner-form.js +55 -225
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +235 -0
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +41 -121
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +255 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +42 -131
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +342 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +34 -189
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +81 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +229 -0
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +42 -133
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +23 -18
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-input-group.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-documents-on-file.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +238 -0
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +41 -124
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +122 -1
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +19 -8
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +6 -6
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -12
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -2
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.css +5 -763
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-text.js +2 -2
- package/dist/collection/components/business-forms/utils/business-form-types.js +4 -7
- package/dist/collection/components/business-forms/utils/input-handlers.js +13 -0
- package/dist/collection/components/business-forms/utils/payload-parsers.js +2 -0
- package/dist/collection/components/card-form/card-form.js +1 -1
- package/dist/collection/components/checkout/checkout-core.css +3 -8147
- package/dist/collection/components/checkout/checkout-core.js +7 -7
- package/dist/collection/components/checkout/checkout.js +2 -2
- package/dist/collection/components/checkout/form-check-input.css +20 -0
- package/dist/collection/components/checkout/header.css +4 -0
- package/dist/collection/components/checkout/new-payment-method.js +2 -2
- package/dist/collection/components/checkout/payment-method-options.css +1 -7088
- package/dist/collection/components/checkout/payment-method-options.js +4 -4
- package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
- package/dist/collection/components/checkout/saved-payment-method.js +2 -2
- package/dist/collection/components/checkout/sezzle-payment-method.js +2 -2
- package/dist/collection/components/details/details.js +3 -12
- package/dist/collection/components/form/form-control-checkbox.js +1 -1
- package/dist/collection/components/form/form-control-date.js +1 -1
- package/dist/collection/components/form/form-control-file.js +1 -1
- package/dist/collection/components/form/form-control-monetary.js +1 -1
- package/dist/collection/components/form/form-control-number-masked.js +11 -5
- package/dist/collection/components/form/form-control-number.js +1 -1
- package/dist/collection/components/form/form-control-select.js +1 -1
- package/dist/collection/components/form/form-control-text.js +1 -1
- package/dist/collection/components/form/utils.js +0 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +2 -2
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +1 -573
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.css +6 -8183
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +6 -7
- package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +6 -2
- package/dist/collection/components/pagination-menu/pagination-menu.js +3 -14
- package/dist/collection/components/payment-details/payment-details-core.js +9 -18
- package/dist/collection/components/payment-form/payment-form.css +3 -2513
- package/dist/collection/components/payment-form/payment-form.js +6 -7
- package/dist/collection/components/payment-form/payment-method-selector.css +5 -1881
- package/dist/collection/components/payment-form/payment-method-selector.js +2 -3
- package/dist/collection/components/payment-method-form/payment-method-form.js +2 -2
- package/dist/collection/components/payments-list/payments-list-core.js +70 -48
- package/dist/collection/components/payments-list/payments-list.js +3 -0
- package/dist/collection/components/payout-details/get-payout-csv.js +19 -0
- package/dist/collection/components/payout-details/payout-details-core.js +37 -12
- package/dist/collection/components/payout-details/payout-details.js +11 -4
- package/dist/collection/components/payouts-list/payouts-list-core.js +111 -65
- package/dist/collection/components/payouts-list/payouts-list.js +14 -6
- package/dist/collection/components/refund-form/refund-form.css +1 -7737
- package/dist/collection/components/refund-form/refund-form.js +4 -3
- package/dist/collection/ui-components/button-spinner.js +2 -0
- package/dist/collection/ui-components/button.js +19 -0
- package/dist/collection/ui-components/index.js +7 -0
- package/dist/collection/ui-components/skeleton.js +39 -0
- package/dist/collection/ui-components/styled-host/styled-host.js +5 -0
- package/dist/collection/ui-components/table-empty-state.js +8 -0
- package/dist/collection/ui-components/table-error-state.js +8 -0
- package/dist/collection/ui-components/table-loading-state.js +8 -0
- package/dist/collection/utils/utils.js +0 -21
- package/dist/docs.json +2153 -1711
- package/dist/esm/{Analytics-c52faca6.js → Analytics-33b8fa8d.js} +1 -1
- package/dist/esm/{Payment-3e94da9c.js → Payment-6bf26fe2.js} +1 -21
- package/dist/esm/additional-questions-details_5.entry.js +13 -13
- package/dist/esm/business-details-core.entry.js +6 -9
- package/dist/esm/{business-form-types-60f50b98.js → business-form-types-1bc5fe08.js} +5 -8
- package/dist/esm/business.service-74bd1212.js +29 -0
- package/dist/esm/button-34e75e0f.js +24 -0
- package/dist/esm/form-alert_5.entry.js +6 -6
- package/dist/esm/{form-control-checkbox_5.entry.js → form-control-checkbox_9.entry.js} +434 -173
- package/dist/esm/form-control-date_3.entry.js +15 -9
- package/dist/esm/form-control-error-text_4.entry.js +3 -3
- package/dist/esm/form-control-file.entry.js +2 -2
- package/dist/esm/form-control-monetary.entry.js +2 -2
- package/dist/esm/form-control-number.entry.js +2 -2
- package/dist/esm/get-payout-csv-b494abfe.js +45 -0
- package/dist/esm/gross-payment-chart-core.entry.js +5 -5
- package/dist/esm/{index-4bd1eae9.js → index-57431c24.js} +15 -3
- package/dist/esm/input-handlers-270ac806.js +16 -0
- package/dist/esm/{insurance-state-09754ab9.js → insurance-state-8ce01e59.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +198 -483
- package/dist/esm/justifi-bank-account-form.entry.js +4 -4
- package/dist/esm/justifi-billing-form_2.entry.js +6 -5
- package/dist/esm/justifi-business-details.entry.js +5 -5
- package/dist/esm/justifi-business-form.entry.js +9 -8
- package/dist/esm/justifi-business-representative-form-inputs.entry.js +26 -0
- package/dist/esm/justifi-card-form.entry.js +4 -4
- package/dist/esm/justifi-checkout-core.entry.js +14 -9
- package/dist/esm/justifi-checkout.entry.js +6 -6
- package/dist/esm/justifi-details.entry.js +4 -7
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +12 -9
- package/dist/esm/justifi-owner-form_3.entry.js +262 -0
- package/dist/esm/justifi-payment-details.entry.js +6 -6
- package/dist/esm/justifi-payment-form.entry.js +11 -11
- package/dist/esm/justifi-payment-method-form.entry.js +5 -5
- package/dist/esm/justifi-payment-method-selector.entry.js +4 -4
- package/dist/esm/justifi-payment-provisioning-core.entry.js +9 -8
- package/dist/esm/justifi-payment-provisioning.entry.js +8 -64
- package/dist/esm/justifi-payments-list.entry.js +6 -6
- package/dist/esm/justifi-payout-details.entry.js +15 -10
- package/dist/esm/justifi-payouts-list.entry.js +15 -12
- package/dist/esm/justifi-refund-form.entry.js +5 -4
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +14 -9
- package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-8ab448a3.js → package-3e407c6d.js} +1 -1
- package/dist/esm/pagination-menu.entry.js +21 -0
- package/dist/esm/{payload-parsers-57289fc4.js → payload-parsers-acb719d1.js} +2 -0
- package/dist/esm/payment-details-core.entry.js +11 -14
- package/dist/esm/payment-provisioning-actions-0635eff7.js +178 -0
- package/dist/esm/{payment.service-c62d82d3.js → payment.service-3ca4a492.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +73 -44
- package/dist/esm/payout-details-core.entry.js +19 -8
- package/dist/esm/payouts-list-core.entry.js +96 -59
- package/dist/esm/skeleton-145a80d4.js +41 -0
- package/dist/esm/styled-host-ab9da520.js +12 -0
- package/dist/esm/table-loading-state-356c7215.js +34 -0
- package/dist/esm/{utils-1e583166.js → utils-01413a95.js} +2 -2
- package/dist/esm/{utils-c7b3f21a.js → utils-3bb6347a.js} +1 -5
- package/dist/esm/{utils-5f4c4faa.js → utils-3c1dd2fa.js} +1 -31
- package/dist/esm/webcomponents.js +3 -3
- package/dist/module/Payment.js +1 -21
- package/dist/module/additional-questions-details2.js +3 -4
- package/dist/module/additional-questions.js +1 -1
- package/dist/module/billing-form.js +6 -5
- package/dist/module/business-additional-questions-form-step-core.js +141 -0
- package/dist/module/business-additional-questions-form-step.js +55 -100
- package/dist/module/business-additional-questions-schema.js +1 -1
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-bank-account-form-step.js +4 -4
- package/dist/module/business-core-info-form-step-core.js +151 -0
- package/dist/module/business-core-info-form-step.js +57 -106
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-core-info.js +1 -1
- package/dist/module/business-details-core2.js +5 -8
- package/dist/module/business-document-upload-form-step.js +34 -35
- package/dist/module/business-document-upload-input-group.js +2 -2
- package/dist/module/business-documents-on-file.js +1 -1
- package/dist/module/business-form-types.js +5 -8
- package/dist/module/business-identity-schema.js +1 -1
- package/dist/module/business-owners-form-step-core.js +216 -0
- package/dist/module/business-owners-form-step.js +67 -154
- package/dist/module/business-representative-form-inputs.js +85 -0
- package/dist/module/business-representative-form-step-core.js +152 -0
- package/dist/module/business-representative-form-step.js +63 -111
- package/dist/module/business-representative.js +1 -1
- package/dist/module/business-terms-conditions-form-step.js +3 -3
- package/dist/module/business-terms-conditions-text.js +2 -2
- package/dist/module/business.service.js +19 -1
- package/dist/module/button.js +24 -0
- package/dist/module/checkout-core.js +34 -35
- package/dist/module/details.js +3 -6
- package/dist/module/exported-parts.js +40 -0
- package/dist/module/form-control-checkbox2.js +1 -1
- package/dist/module/form-control-date2.js +1 -1
- package/dist/module/form-control-file2.js +1 -1
- package/dist/module/form-control-monetary2.js +1 -1
- package/dist/module/form-control-number-masked2.js +11 -5
- package/dist/module/form-control-number.js +1 -1
- package/dist/module/form-control-select2.js +1 -1
- package/dist/module/form-control-text2.js +1 -1
- package/dist/module/generic-info-details2.js +3 -4
- package/dist/module/get-payout-csv.js +45 -0
- package/dist/module/gross-payment-chart-core2.js +2 -2
- package/dist/module/identity-address-form.js +2 -2
- package/dist/module/input-handlers.js +16 -0
- package/dist/module/justifi-additional-questions-form-step-core.d.ts +11 -0
- package/dist/module/justifi-additional-questions-form-step-core.js +6 -0
- package/dist/module/justifi-bank-account-form.js +1 -1
- package/dist/module/justifi-business-core-info-form-step-core.d.ts +11 -0
- package/dist/module/justifi-business-core-info-form-step-core.js +6 -0
- package/dist/module/justifi-business-details.js +1 -1
- package/dist/module/justifi-business-form.js +5 -4
- package/dist/module/justifi-business-owners-form-step-core.d.ts +11 -0
- package/dist/module/justifi-business-owners-form-step-core.js +6 -0
- package/dist/module/justifi-business-representative-form-inputs.d.ts +11 -0
- package/dist/module/justifi-business-representative-form-inputs.js +6 -0
- package/dist/module/justifi-business-representative-form-step-core.d.ts +11 -0
- package/dist/module/justifi-business-representative-form-step-core.js +6 -0
- package/dist/module/justifi-card-form.js +1 -1
- package/dist/module/justifi-checkout.js +27 -33
- package/dist/module/justifi-gross-payment-chart.js +1 -1
- package/dist/module/justifi-legal-address-form-step-core.d.ts +11 -0
- package/dist/module/justifi-legal-address-form-step-core.js +6 -0
- package/dist/module/justifi-payment-details.js +2 -2
- package/dist/module/justifi-payment-form.js +8 -8
- package/dist/module/justifi-payment-provisioning.js +98 -114
- package/dist/module/justifi-payments-list.js +17 -5
- package/dist/module/justifi-payout-details.js +12 -6
- package/dist/module/justifi-payouts-list.js +28 -11
- package/dist/module/justifi-refund-form.js +5 -4
- package/dist/module/justifi-season-interruption-insurance.js +7 -3
- package/dist/module/legal-address-details2.js +3 -4
- package/dist/module/legal-address-form-step-core.js +138 -0
- package/dist/module/legal-address-form-step.js +53 -98
- package/dist/module/legal-address-form.js +2 -2
- package/dist/module/new-payment-method.js +1 -1
- package/dist/module/owner-details2.js +3 -4
- package/dist/module/{justifi-table.d.ts → owner-form-core.d.ts} +4 -4
- package/dist/module/owner-form-core.js +6 -0
- package/dist/module/owner-form-core2.js +264 -0
- package/dist/module/{justifi-skeleton.d.ts → owner-form-inputs.d.ts} +4 -4
- package/dist/module/owner-form-inputs.js +6 -0
- package/dist/module/owner-form-inputs2.js +85 -0
- package/dist/module/owner-form.js +62 -188
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +4 -9
- package/dist/module/payload-parsers.js +2 -0
- package/dist/module/payment-details-core2.js +9 -12
- package/dist/module/payment-method-form.js +2 -2
- package/dist/module/payment-method-options.js +7 -4
- package/dist/module/payment-method-selector.js +3 -4
- package/dist/module/payment-provisioning-actions.js +178 -0
- package/dist/module/payment-provisioning-core.js +104 -60
- package/dist/module/payment-provisioning-form-buttons.js +2 -2
- package/dist/module/payment-provisioning-form-steps.js +94 -52
- package/dist/module/payments-list-core2.js +85 -45
- package/dist/module/payout-details-core2.js +18 -6
- package/dist/module/payouts-list-core2.js +110 -60
- package/dist/module/representative-details2.js +3 -4
- package/dist/module/save-new-payment-method.js +1 -1
- package/dist/module/saved-payment-method.js +1 -1
- package/dist/module/schema-validations.js +1 -1
- package/dist/module/season-interruption-insurance-core.js +12 -7
- package/dist/module/sezzle-payment-method.js +1 -1
- package/dist/module/skeleton.js +18 -50
- package/dist/module/styled-host.js +12 -0
- package/dist/module/utils2.js +1 -31
- package/dist/module/utils3.js +23 -26
- package/dist/module/utils4.js +23 -24
- package/dist/types/api/Payment.d.ts +0 -28
- package/dist/types/api/services/business.service.d.ts +10 -0
- package/dist/types/api/services/payout.service.d.ts +2 -0
- package/dist/types/assets/download-icon.d.ts +1 -0
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +43 -0
- package/dist/types/components/business-forms/owner-form/owner-form-inputs.d.ts +9 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +9 -28
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +26 -0
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +5 -15
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +27 -0
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +6 -21
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.d.ts +35 -0
- package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +5 -21
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.d.ts +9 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +25 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +5 -17
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +26 -0
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.d.ts +5 -15
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-actions.d.ts +40 -1
- package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +2 -2
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +1 -1
- package/dist/types/components/business-forms/utils/business-form-types.d.ts +6 -11
- package/dist/types/components/business-forms/utils/input-handlers.d.ts +4 -0
- package/dist/types/components/checkout/checkout-core.d.ts +0 -1
- package/dist/types/components/form/utils.d.ts +0 -1
- package/dist/types/components/insurance/season-interruption/season-interruption-insurance.d.ts +3 -0
- package/dist/types/components/payments-list/payments-list-core.d.ts +13 -2
- package/dist/types/components/payments-list/payments-list.d.ts +3 -0
- package/dist/types/components/payout-details/get-payout-csv.d.ts +7 -0
- package/dist/types/components/payout-details/payout-details-core.d.ts +2 -0
- package/dist/types/components/payout-details/payout-details.d.ts +2 -1
- package/dist/types/components/payouts-list/payouts-list-core.d.ts +13 -3
- package/dist/types/components/payouts-list/payouts-list.d.ts +5 -1
- package/dist/types/components.d.ts +337 -482
- package/dist/types/ui-components/button-spinner.d.ts +1 -0
- package/dist/types/ui-components/button.d.ts +10 -0
- package/dist/types/ui-components/index.d.ts +7 -0
- package/dist/types/ui-components/skeleton.d.ts +13 -0
- package/dist/types/ui-components/styled-host/styled-host.d.ts +2 -0
- package/dist/types/ui-components/table-empty-state.d.ts +6 -0
- package/dist/types/ui-components/table-error-state.d.ts +6 -0
- package/dist/types/ui-components/table-loading-state.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +0 -3
- package/dist/webcomponents/p-07109641.entry.js +1 -0
- package/dist/webcomponents/p-08b0fb31.js +1 -0
- package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
- package/dist/webcomponents/p-17e4246f.entry.js +1 -0
- package/dist/webcomponents/{p-6006e085.entry.js → p-195f92e9.entry.js} +1 -1
- package/dist/webcomponents/p-1a43e355.entry.js +19 -0
- package/dist/webcomponents/p-23014988.entry.js +1 -0
- package/dist/webcomponents/{p-f7b6dcc4.js → p-2338affa.js} +1 -1
- package/dist/webcomponents/p-25dba252.entry.js +1 -0
- package/dist/webcomponents/{p-5309e887.entry.js → p-27981600.entry.js} +1 -1
- package/dist/webcomponents/{p-e7915927.entry.js → p-301e0493.entry.js} +1 -1
- package/dist/webcomponents/p-304dd644.entry.js +1 -0
- package/dist/webcomponents/p-30a493cd.entry.js +1 -0
- package/dist/webcomponents/p-462dc522.entry.js +1 -0
- package/dist/webcomponents/p-487b72a8.entry.js +1 -0
- package/dist/webcomponents/p-4abc17f0.entry.js +1 -0
- package/dist/webcomponents/{p-b7d9d9fa.js → p-4b4580dd.js} +1 -1
- package/dist/webcomponents/p-52021fa1.entry.js +1 -0
- package/dist/webcomponents/p-53e64f15.entry.js +1 -0
- package/dist/webcomponents/p-5968ff8a.js +1 -0
- package/dist/webcomponents/p-60a370fc.entry.js +1 -0
- package/dist/webcomponents/p-623a4479.entry.js +1 -0
- package/dist/webcomponents/p-62b32c4c.entry.js +1 -0
- package/dist/webcomponents/{p-edb605b3.js → p-63acf322.js} +1 -1
- package/dist/webcomponents/p-6f03b35a.entry.js +1 -0
- package/dist/webcomponents/p-75b4daef.js +1 -0
- package/dist/webcomponents/p-7d85af5c.js +1 -0
- package/dist/webcomponents/{p-e8c651b8.js → p-83125497.js} +1 -1
- package/dist/webcomponents/p-85fc69e5.js +1 -0
- package/dist/webcomponents/p-8603348a.js +1 -0
- package/dist/webcomponents/{p-a34c28af.entry.js → p-8c1e981b.entry.js} +1 -1
- package/dist/webcomponents/p-8df7bde8.js +1 -0
- package/dist/webcomponents/{p-a90a6703.entry.js → p-8e541a32.entry.js} +1 -1
- package/dist/webcomponents/p-9279aa49.entry.js +1 -0
- package/dist/webcomponents/{p-95c18035.entry.js → p-96b42e7d.entry.js} +1 -1
- package/dist/webcomponents/{p-fcf42299.entry.js → p-99022846.entry.js} +1 -1
- package/dist/webcomponents/p-9c9c7dac.js +1 -0
- package/dist/webcomponents/p-b16dfd5d.entry.js +1 -0
- package/dist/webcomponents/p-ba4bae6f.js +1 -0
- package/dist/webcomponents/p-bbed6107.entry.js +1 -0
- package/dist/webcomponents/p-bc92235c.entry.js +1 -0
- package/dist/webcomponents/p-be39c802.entry.js +1 -0
- package/dist/webcomponents/p-c4b87db2.entry.js +1 -0
- package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
- package/dist/webcomponents/{p-c2d6a5e2.entry.js → p-cd7105dd.entry.js} +1 -1
- package/dist/webcomponents/p-d101c5db.js +1 -0
- package/dist/webcomponents/{p-1c60004a.entry.js → p-d1fbeae5.entry.js} +1 -1
- package/dist/webcomponents/p-d8355f91.entry.js +1 -0
- package/dist/webcomponents/p-d89bad72.js +1 -0
- package/dist/webcomponents/{p-cb68e8fa.js → p-dce846bf.js} +1 -1
- package/dist/webcomponents/{p-e8706cc4.js → p-df21aaad.js} +1 -1
- package/dist/webcomponents/p-e2c88817.entry.js +1 -0
- package/dist/webcomponents/{p-9936c393.entry.js → p-e31f0f3e.entry.js} +1 -1
- package/dist/webcomponents/p-e333620e.js +1 -0
- package/dist/webcomponents/p-e7067ef2.entry.js +1 -0
- package/dist/webcomponents/{p-84b3cead.entry.js → p-f0866375.entry.js} +1 -1
- package/dist/webcomponents/p-fad19d75.js +2 -0
- package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
- package/dist/webcomponents/p-fe33151d.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +6 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/SubAccount-135ff8c8.js +0 -107
- package/dist/cjs/business.service-9214509a.js +0 -13
- package/dist/cjs/justifi-business-list.cjs.entry.js +0 -113
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +0 -89
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +0 -162
- package/dist/cjs/justifi-skeleton.cjs.entry.js +0 -54
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +0 -80
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +0 -105
- package/dist/cjs/justifi-table_2.cjs.entry.js +0 -84
- package/dist/cjs/payout.service-eec372aa.js +0 -22
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +0 -74
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +0 -23
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +0 -23
- package/dist/collection/api/Proceed.js +0 -41
- package/dist/collection/api/SubAccount.js +0 -103
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +0 -7348
- package/dist/collection/components/business-details/business-details.css +0 -6446
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +0 -7348
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +0 -7348
- package/dist/collection/components/business-details/owner-details/owner-details.css +0 -7348
- package/dist/collection/components/business-details/representative-details/representative-details.css +0 -7348
- package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.css +0 -9211
- package/dist/collection/components/business-list/business-list.css +0 -579
- package/dist/collection/components/business-list/business-list.js +0 -194
- package/dist/collection/components/business-list/business-list.stories.js +0 -68
- package/dist/collection/components/business-list/example.js +0 -12
- package/dist/collection/components/details/details.css +0 -7993
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +0 -153
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +0 -32
- package/dist/collection/components/payment-details/payment-details.css +0 -7993
- package/dist/collection/components/payments-list/payments-list.css +0 -579
- package/dist/collection/components/payout-details/payout-details.css +0 -7993
- package/dist/collection/components/payouts-list/payouts-list.css +0 -579
- package/dist/collection/components/proceeds-list/example.js +0 -12
- package/dist/collection/components/proceeds-list/proceeds-list.css +0 -579
- package/dist/collection/components/proceeds-list/proceeds-list.js +0 -214
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +0 -69
- package/dist/collection/components/skeleton/skeleton.css +0 -583
- package/dist/collection/components/skeleton/skeleton.js +0 -160
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +0 -70
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +0 -48
- package/dist/collection/components/subaccount-details/subaccount-details.css +0 -7993
- package/dist/collection/components/subaccount-details/subaccount-details.js +0 -145
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js +0 -25
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +0 -49
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +0 -49
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +0 -49
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +0 -7352
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +0 -48
- package/dist/collection/components/subaccounts-list/subaccounts-list.css +0 -3
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +0 -179
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +0 -69
- package/dist/collection/components/table/table.css +0 -8092
- package/dist/collection/components/table/table.js +0 -223
- package/dist/collection/components/table/utils.js +0 -4
- package/dist/esm/SubAccount-7fcb1450.js +0 -105
- package/dist/esm/business.service-19a0c8d3.js +0 -11
- package/dist/esm/justifi-business-list.entry.js +0 -109
- package/dist/esm/justifi-payment-balance-transactions.entry.js +0 -85
- package/dist/esm/justifi-proceeds-list.entry.js +0 -158
- package/dist/esm/justifi-skeleton.entry.js +0 -50
- package/dist/esm/justifi-subaccount-details.entry.js +0 -76
- package/dist/esm/justifi-subaccounts-list.entry.js +0 -101
- package/dist/esm/justifi-table_2.entry.js +0 -79
- package/dist/esm/payout.service-28b9594f.js +0 -20
- package/dist/esm/subaccount-account-details_4.entry.js +0 -67
- package/dist/esm/subaccount-bank-details.entry.js +0 -19
- package/dist/esm/subaccount-terms-details.entry.js +0 -19
- package/dist/module/SubAccount.js +0 -105
- package/dist/module/justifi-business-list.d.ts +0 -11
- package/dist/module/justifi-business-list.js +0 -150
- package/dist/module/justifi-payment-balance-transactions.d.ts +0 -11
- package/dist/module/justifi-payment-balance-transactions.js +0 -127
- package/dist/module/justifi-proceeds-list.d.ts +0 -11
- package/dist/module/justifi-proceeds-list.js +0 -201
- package/dist/module/justifi-skeleton.js +0 -6
- package/dist/module/justifi-subaccount-details.d.ts +0 -11
- package/dist/module/justifi-subaccount-details.js +0 -136
- package/dist/module/justifi-subaccounts-list.d.ts +0 -11
- package/dist/module/justifi-subaccounts-list.js +0 -144
- package/dist/module/justifi-table.js +0 -6
- package/dist/module/payout.service.js +0 -20
- package/dist/module/subaccount-account-details.d.ts +0 -11
- package/dist/module/subaccount-account-details.js +0 -6
- package/dist/module/subaccount-account-details2.js +0 -39
- package/dist/module/subaccount-bank-details.d.ts +0 -11
- package/dist/module/subaccount-bank-details.js +0 -40
- package/dist/module/subaccount-merchant-details.d.ts +0 -11
- package/dist/module/subaccount-merchant-details.js +0 -6
- package/dist/module/subaccount-merchant-details2.js +0 -38
- package/dist/module/subaccount-owners-details.d.ts +0 -11
- package/dist/module/subaccount-owners-details.js +0 -6
- package/dist/module/subaccount-owners-details2.js +0 -38
- package/dist/module/subaccount-representative-details.d.ts +0 -11
- package/dist/module/subaccount-representative-details.js +0 -6
- package/dist/module/subaccount-representative-details2.js +0 -38
- package/dist/module/subaccount-terms-details.d.ts +0 -11
- package/dist/module/subaccount-terms-details.js +0 -40
- package/dist/module/table.js +0 -94
- package/dist/types/api/Proceed.d.ts +0 -60
- package/dist/types/api/SubAccount.d.ts +0 -163
- package/dist/types/components/business-list/business-list.d.ts +0 -48
- package/dist/types/components/business-list/business-list.stories.d.ts +0 -9
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +0 -17
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +0 -8
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +0 -39
- package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +0 -9
- package/dist/types/components/skeleton/skeleton.d.ts +0 -12
- package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +0 -6
- package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +0 -5
- package/dist/types/components/subaccount-details/subaccount-details.d.ts +0 -16
- package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +0 -7
- package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +0 -5
- package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +0 -5
- package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +0 -5
- package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +0 -5
- package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +0 -19
- package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +0 -9
- package/dist/types/components/table/table.d.ts +0 -23
- package/dist/types/components/table/utils.d.ts +0 -3
- package/dist/webcomponents/p-00de4ae0.entry.js +0 -1
- package/dist/webcomponents/p-015ba24e.entry.js +0 -1
- package/dist/webcomponents/p-023fe908.entry.js +0 -1
- package/dist/webcomponents/p-0575daac.js +0 -1
- package/dist/webcomponents/p-0a09edbb.entry.js +0 -1
- package/dist/webcomponents/p-0fc18c89.entry.js +0 -1
- package/dist/webcomponents/p-100cb35c.entry.js +0 -1
- package/dist/webcomponents/p-189dee9f.entry.js +0 -1
- package/dist/webcomponents/p-30a7bebc.entry.js +0 -19
- package/dist/webcomponents/p-378bb067.entry.js +0 -1
- package/dist/webcomponents/p-404d7c56.entry.js +0 -1
- package/dist/webcomponents/p-43326623.entry.js +0 -1
- package/dist/webcomponents/p-4c5f9260.entry.js +0 -1
- package/dist/webcomponents/p-61e486ad.entry.js +0 -1
- package/dist/webcomponents/p-64d1aeb8.entry.js +0 -1
- package/dist/webcomponents/p-6700ac49.js +0 -1
- package/dist/webcomponents/p-68f3a7b0.entry.js +0 -1
- package/dist/webcomponents/p-738049aa.entry.js +0 -1
- package/dist/webcomponents/p-739f1e09.entry.js +0 -1
- package/dist/webcomponents/p-7f77d91f.entry.js +0 -1
- package/dist/webcomponents/p-8805d083.entry.js +0 -1
- package/dist/webcomponents/p-95c8c313.entry.js +0 -1
- package/dist/webcomponents/p-97220d5b.entry.js +0 -1
- package/dist/webcomponents/p-98985c7d.entry.js +0 -1
- package/dist/webcomponents/p-9d03464e.entry.js +0 -1
- package/dist/webcomponents/p-a63a6fb9.js +0 -2
- package/dist/webcomponents/p-a6477232.entry.js +0 -1
- package/dist/webcomponents/p-b1a24d24.entry.js +0 -1
- package/dist/webcomponents/p-b27d2ce1.entry.js +0 -1
- package/dist/webcomponents/p-b53d7b7f.js +0 -1
- package/dist/webcomponents/p-be049573.entry.js +0 -1
- package/dist/webcomponents/p-bfe69314.entry.js +0 -1
- package/dist/webcomponents/p-c4264aaf.js +0 -1
- package/dist/webcomponents/p-c69713c2.entry.js +0 -1
- package/dist/webcomponents/p-c8c08fe3.js +0 -1
- package/dist/webcomponents/p-ca39c89f.js +0 -1
- package/dist/webcomponents/p-d779f2f2.entry.js +0 -1
- package/dist/webcomponents/p-da313a7e.entry.js +0 -1
- package/dist/webcomponents/p-e04f7070.entry.js +0 -1
- package/dist/webcomponents/p-eb142b8a.entry.js +0 -1
- package/dist/webcomponents/p-ed844504.js +0 -1
- package/dist/webcomponents/p-efe744ce.entry.js +0 -1
- package/dist/webcomponents/p-f6858597.entry.js +0 -1
- package/dist/webcomponents/p-f68cf935.entry.js +0 -1
- package/dist/module/{index.esm.js → form.js} +2733 -2733
|
@@ -13,13 +13,12 @@ export class PaymentMethodSelector {
|
|
|
13
13
|
this.paymentMethodSelected.emit(event.target.value);
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: 'a0cd592094f7f69955469de84addde1d4bc5af4d', class: "btn-group jfi-btn-radio-group", role: "group", "aria-label": "Radio toggle group for payment method" }, this.paymentMethodTypes.map((paymentMethodType) => (h(Fragment, null, h("input", { id: paymentMethodType, type: "radio", name: "paymentMethodType", value: paymentMethodType, onChange: (event) => this.onChangeHandler(event), checked: this.selectedPaymentMethodType === paymentMethodType, class: "btn-check jfi-btn-radio" }), h("label", { htmlFor: paymentMethodType, class: "btn btn-outline-primary jfi-btn-radio-label" }, PaymentMethodLabels[paymentMethodType]))))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "justifi-payment-method-selector"; }
|
|
19
|
-
static get encapsulation() { return "shadow"; }
|
|
20
19
|
static get originalStyleUrls() {
|
|
21
20
|
return {
|
|
22
|
-
"$": ["payment-method-selector.
|
|
21
|
+
"$": ["payment-method-selector.css"]
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
24
|
static get styleUrls() {
|
|
@@ -13,6 +13,7 @@ export class PaymentMethodForm {
|
|
|
13
13
|
const eventTypeMessage = MessageEventType[this.paymentMethodFormType];
|
|
14
14
|
if (eventType === eventTypeMessage.ready) {
|
|
15
15
|
this.paymentMethodFormReady.emit(data);
|
|
16
|
+
this.sendStyleOverrides();
|
|
16
17
|
}
|
|
17
18
|
else if (eventType === eventTypeMessage.tokenize) {
|
|
18
19
|
this.paymentMethodFormTokenized.emit(data);
|
|
@@ -70,14 +71,13 @@ export class PaymentMethodForm {
|
|
|
70
71
|
(_a = this.frameService) === null || _a === void 0 ? void 0 : _a.addMessageListener(this.dispatchMessageEvent);
|
|
71
72
|
}
|
|
72
73
|
render() {
|
|
73
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '10987c92745fbff8bb85367db69b76e2bc786c88' }, h("iframe", { key: '0622dd0201a04a3c918fd3d175d2a29f24609759', id: `justifi-payment-method-form-${this.paymentMethodFormType}`, src: this.getIframeSrc(), ref: el => {
|
|
74
75
|
this.iframeElement = el;
|
|
75
76
|
this.initializeFrameCommunicationService();
|
|
76
77
|
}, onLoad: () => {
|
|
77
78
|
iFrameResize({
|
|
78
79
|
scrollbars: false,
|
|
79
80
|
}, this.iframeElement);
|
|
80
|
-
this.sendStyleOverrides();
|
|
81
81
|
} })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "justifi-payment-method-form"; }
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { pagingDefaults } from "../../api";
|
|
3
3
|
import { MapPaymentStatusToBadge, formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
4
|
+
import { tableExportedParts } from "../table/exported-parts";
|
|
5
|
+
import { StyledHost, TableEmptyState, TableErrorState, TableLoadingState } from "../../ui-components";
|
|
4
6
|
export class PaymentsListCore {
|
|
5
7
|
constructor() {
|
|
6
8
|
this.handleClickPrevious = (beforeCursor) => {
|
|
7
9
|
const newParams = Object.assign({}, this.params);
|
|
8
10
|
delete newParams.after_cursor;
|
|
9
|
-
this.params =
|
|
11
|
+
this.params = Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor });
|
|
10
12
|
};
|
|
11
13
|
this.handleClickNext = (afterCursor) => {
|
|
12
14
|
const newParams = Object.assign({}, this.params);
|
|
13
15
|
delete newParams.before_cursor;
|
|
14
|
-
this.params =
|
|
16
|
+
this.params = Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor });
|
|
17
|
+
};
|
|
18
|
+
this.rowClickHandler = (e) => {
|
|
19
|
+
const clickedPaymentID = e.target.closest('tr').dataset.rowEntityId;
|
|
20
|
+
if (!clickedPaymentID)
|
|
21
|
+
return;
|
|
22
|
+
this.rowClicked.emit(this.payments.find((payment) => payment.id === clickedPaymentID));
|
|
23
|
+
};
|
|
24
|
+
this.handleDateChange = (name, value) => {
|
|
25
|
+
this.params = Object.assign(Object.assign({}, this.params), { [name]: value });
|
|
15
26
|
};
|
|
16
27
|
this.getPayments = undefined;
|
|
17
28
|
this.payments = [];
|
|
@@ -20,14 +31,14 @@ export class PaymentsListCore {
|
|
|
20
31
|
this.paging = pagingDefaults;
|
|
21
32
|
this.params = undefined;
|
|
22
33
|
}
|
|
34
|
+
updateOnPropChange() {
|
|
35
|
+
this.fetchData();
|
|
36
|
+
}
|
|
23
37
|
componentWillLoad() {
|
|
24
38
|
if (this.getPayments) {
|
|
25
39
|
this.fetchData();
|
|
26
40
|
}
|
|
27
41
|
}
|
|
28
|
-
updateOnPropChange() {
|
|
29
|
-
this.fetchData();
|
|
30
|
-
}
|
|
31
42
|
fetchData() {
|
|
32
43
|
this.loading = true;
|
|
33
44
|
this.getPayments({
|
|
@@ -48,52 +59,63 @@ export class PaymentsListCore {
|
|
|
48
59
|
},
|
|
49
60
|
});
|
|
50
61
|
}
|
|
51
|
-
|
|
62
|
+
get entityId() {
|
|
63
|
+
return this.payments.map((payment) => payment.id);
|
|
64
|
+
}
|
|
65
|
+
get columnData() {
|
|
66
|
+
return [
|
|
67
|
+
['Made On', 'The date and time each payment was made'],
|
|
68
|
+
['Amount', 'The dollar amount of each payment'],
|
|
69
|
+
['Description', 'The payment description, if you provided one'],
|
|
70
|
+
['Cardholder', 'The name associated with the payment method'],
|
|
71
|
+
['Payment Method', 'The brand and last 4 digits of the payment method'],
|
|
72
|
+
['Status', 'The current status of each payment'],
|
|
73
|
+
['Payment ID', 'The unique identifier of each payment'],
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
get rowData() {
|
|
77
|
+
return this.payments.map((payment) => [
|
|
78
|
+
{
|
|
79
|
+
type: 'head',
|
|
80
|
+
value: `
|
|
81
|
+
<div class='fw-bold'>${formatDate(payment.created_at)}</div>
|
|
82
|
+
<div class='fw-bold'>${formatTime(payment.created_at)}</div>
|
|
83
|
+
`,
|
|
84
|
+
},
|
|
85
|
+
formatCurrency(payment.amount),
|
|
86
|
+
payment.description,
|
|
87
|
+
payment.payment_method.payersName,
|
|
88
|
+
payment.payment_method.lastFourDigits,
|
|
89
|
+
{
|
|
90
|
+
type: 'inner',
|
|
91
|
+
value: MapPaymentStatusToBadge(payment.status),
|
|
92
|
+
},
|
|
93
|
+
payment.id,
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
get showEmptyState() {
|
|
97
|
+
return !this.loading && !this.errorMessage && this.rowData.length < 1;
|
|
98
|
+
}
|
|
99
|
+
get showErrorState() {
|
|
100
|
+
return !this.loading && !!this.errorMessage;
|
|
101
|
+
}
|
|
102
|
+
get showRowData() {
|
|
103
|
+
return !this.showEmptyState && !this.showErrorState;
|
|
104
|
+
}
|
|
52
105
|
render() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
106
|
+
var _a, _b;
|
|
107
|
+
return (h(StyledHost, { key: 'e4a4b64b2927a009f7ad4e9e2ebb4c020401423c', exportparts: tableExportedParts }, h("div", { key: '6ac1c84338b84972ca9b001ecd2b90134c99de6b', class: "row gy-3 mb-4" }, h("div", { key: '1d279ec66bc0755b876e29f06ac24d51baa77caa', class: "col-2" }, h("form-control-date", { key: '65b29c031021f3f782c9a4597167dc5e3a44e7da', name: "created_after", label: "Start Date", inputHandler: this.handleDateChange })), h("div", { key: 'a032497a94cc8108fda6efbb741069407e1a5afe', class: "col-2" }, h("form-control-date", { key: '5dd62ebdbf3836567a9ccb03dec850ebe675cb79', name: "created_before", label: "End Date", inputHandler: this.handleDateChange }))), h("div", { key: 'be4094afd3aec1d742d9d3245c2f6fc50cb95fa0', class: "table-wrapper" }, h("table", { key: 'ed493e35f2bddd59d1034dffe2bcd8b54a6390d6', class: "table table-hover" }, h("thead", { key: 'fae77bda1ffc35ac5414743ab51c2fe1dfbbc29e', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: '5be3b1e9883d337046c386046565fb6ac3366324', class: "table-light text-nowrap", part: "table-head-row" }, (_a = this.columnData) === null || _a === void 0 ? void 0 : _a.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, !Array.isArray(column) ? column : column[0]))))), h("tbody", { key: 'ba950a1da1ec0dffd7bc8457cdb3ce65d0f8b69b', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '8d13d8f6b64377f560d06410c09d24293708b6a8', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: 'c75d61977b26ca5d4aa3711bae1ce6e571b3e3b2', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: '08e3f88116de5783f018a0c06d21d0d9cc4f5feb', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
|
|
108
|
+
this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => {
|
|
109
|
+
let nestedHtml = dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type;
|
|
110
|
+
if (nestedHtml) {
|
|
111
|
+
return h("td", { part: "table-cell", innerHTML: dataEntry.value });
|
|
57
112
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
['Description', 'The payment description, if you provided one'],
|
|
63
|
-
['Cardholder', 'The name associated with the payment method'],
|
|
64
|
-
['Payment Method', 'The brand and last 4 digits of the payment method'],
|
|
65
|
-
['Status', 'The current status of each payment'],
|
|
66
|
-
['Payment ID', 'The unique identifier of each payment']
|
|
67
|
-
], rowData: this.payments.map((payment) => ([
|
|
68
|
-
{
|
|
69
|
-
type: 'head',
|
|
70
|
-
value: `
|
|
71
|
-
<div class='fw-bold'>${formatDate(payment.created_at)}</div>
|
|
72
|
-
<div class='fw-bold'>${formatTime(payment.created_at)}</div>
|
|
73
|
-
`,
|
|
74
|
-
},
|
|
75
|
-
formatCurrency(payment.amount),
|
|
76
|
-
payment.description,
|
|
77
|
-
payment.payment_method.payersName,
|
|
78
|
-
payment.payment_method.lastFourDigits,
|
|
79
|
-
{
|
|
80
|
-
type: 'inner',
|
|
81
|
-
value: MapPaymentStatusToBadge(payment.status)
|
|
82
|
-
},
|
|
83
|
-
payment.id
|
|
84
|
-
])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
|
|
113
|
+
else {
|
|
114
|
+
return h("td", { part: "table-cell" }, dataEntry);
|
|
115
|
+
}
|
|
116
|
+
}))))), this.paging && (h("tfoot", { key: '728f671ab03923c90e11901a0d3aac4bc30e72a7', class: "sticky-bottom" }, h("tr", { key: 'd0df9b7c857287eec9568157ecf8f547a01f2fc5', class: "table-light align-middle" }, h("td", { key: 'e0de54912240b3e812f37ea675b2eef50d9545c4', part: "pagination-bar", colSpan: (_b = this.columnData) === null || _b === void 0 ? void 0 : _b.length }, h("pagination-menu", { key: 'f2d7846030a5aaa0c2311cad61f4d5865440a904', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
|
|
85
117
|
}
|
|
86
118
|
static get is() { return "payments-list-core"; }
|
|
87
|
-
static get originalStyleUrls() {
|
|
88
|
-
return {
|
|
89
|
-
"$": ["payments-list.scss"]
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
static get styleUrls() {
|
|
93
|
-
return {
|
|
94
|
-
"$": ["payments-list.css"]
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
119
|
static get properties() {
|
|
98
120
|
return {
|
|
99
121
|
"getPayments": {
|
|
@@ -5,6 +5,9 @@ import { ErrorState } from "../details/utils";
|
|
|
5
5
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
6
6
|
import JustifiAnalytics from "../../api/Analytics";
|
|
7
7
|
/**
|
|
8
|
+
* @exportedPart label: Label for inputs
|
|
9
|
+
* @exportedPart input: The input fields
|
|
10
|
+
* @exportedPart input-invalid: Invalid state for inputs
|
|
8
11
|
* @exportedPart table-head: Table head
|
|
9
12
|
* @exportedPart table-head-row: Head row
|
|
10
13
|
* @exportedPart table-head-cell: Individual head cell
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentErrorSeverity } from "../../api/ComponentError";
|
|
2
|
+
import { getErrorCode, getErrorMessage } from "../../api/services/utils";
|
|
3
|
+
export const makeGetPayoutCSV = ({ authToken, service }) => async ({ payoutId, onError }) => {
|
|
4
|
+
try {
|
|
5
|
+
const { data } = await service.fetchCSV(payoutId, authToken);
|
|
6
|
+
const a = document.createElement('a');
|
|
7
|
+
a.href = data.csv_url;
|
|
8
|
+
a.click();
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
const errorMessage = getErrorMessage(error);
|
|
12
|
+
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
13
|
+
onError({
|
|
14
|
+
error: errorMessage,
|
|
15
|
+
code,
|
|
16
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
2
|
import { MapPayoutStatusToBadge, formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
3
3
|
import { CodeBlock, DetailItem, DetailSectionTitle, EntityHeadInfo, EntityHeadInfoItem, ErrorState, LoadingState } from "../details/utils";
|
|
4
|
+
import { StyledHost } from "../../ui-components";
|
|
4
5
|
export class PayoutDetailsCore {
|
|
5
6
|
constructor() {
|
|
7
|
+
this.downloadCSV = () => {
|
|
8
|
+
this.getPayoutCSV({
|
|
9
|
+
payoutId: this.payout.id,
|
|
10
|
+
onError: ({ error, code, severity }) => {
|
|
11
|
+
this.errorMessage = error;
|
|
12
|
+
this.errorEvent.emit({
|
|
13
|
+
message: error,
|
|
14
|
+
errorCode: code,
|
|
15
|
+
severity,
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
};
|
|
6
20
|
this.getPayout = undefined;
|
|
21
|
+
this.getPayoutCSV = undefined;
|
|
7
22
|
this.payout = undefined;
|
|
8
23
|
this.loading = true;
|
|
9
24
|
this.errorMessage = null;
|
|
@@ -37,19 +52,9 @@ export class PayoutDetailsCore {
|
|
|
37
52
|
}
|
|
38
53
|
render() {
|
|
39
54
|
var _a;
|
|
40
|
-
return (h(
|
|
55
|
+
return (h(StyledHost, { key: 'fdf7905cdc7696414b765d61d0f78c7193cbbc76' }, this.loading && LoadingState(), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && this.payout && (h("justifi-details", { key: 'f79827c287d68484a87232ae956a1c15e3d7044d', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: 'dfa9c228f2cd1b0b2d14dc6ce44478ee8fc35d00', 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, { key: '6b5907e3f7753d4e2f6ba59bfe509d97e2a4c1c0', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}` }), h(EntityHeadInfoItem, { key: '63b7497217a00268190eaea1475639fc5e0b43ca', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}` }), h(EntityHeadInfoItem, { key: 'e26e56abbac3e12584c187f6f1b560b0f4b33a6f', title: "ID", value: this.payout.id }), h("div", { key: 'e84dd653fb1adc566b0afbfdfc87cce40ed47280', class: "m-4" }, h("button", { key: 'fac0022786dc03349a65dc54729dc2f508c9441f', class: "btn btn-outline-secondary d-flex align-items-center", onClick: this.downloadCSV }, "Export CSV"))), h("div", { key: '9cf642b803c59146895b762eaff40f5026c9f94b', slot: 'detail-sections' }, h(DetailSectionTitle, { key: '90ed8aafabf9eebb47da15c6c8b8d1f527d23557', sectionTitle: "Details" }), h("div", { key: '592b8489fa30441bbf11a52d3daf6a2debcc121f', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '0885f3ece509936d1e1bad64d4a998fbc487ee3a', title: "Date paid", value: formatDate(this.payout.deposits_at) }), h(DetailItem, { key: 'b8a7da2bfeada94c8c7c080b516c1bc7fc26f414', title: "Statement Description", value: this.payout.description }), h(DetailItem, { key: 'd8928341e89161d4bafc2940f1aa738b345779dd', title: "Payout Method", value: this.payout.delivery_method }), h(DetailItem, { key: '570bd2a2d44f094870e61debca61c2b5aa772679', title: "Amount", value: formatCurrency(this.payout.amount) }), h(DetailItem, { key: '2882865db185d1668103d819e62cf61edc711697', title: "Fee", value: formatCurrency(this.payout.fees_total) })), h(DetailSectionTitle, { key: 'f9735ff73c650ad318d771df5c22c7d8834a09f6', sectionTitle: "Account" }), h("div", { key: 'd7d53fd77e704035a19dc15bc04ee06dfaa0c51a', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '486ae1c4ae990928bf24cc687cb4456bbc6e18ea', title: "ID", value: this.payout.account_id }), h(DetailItem, { key: '528d7d6a299aa1019125f34fc903ea622d09de53', title: "Account Type", value: this.payout.bank_account.account_type }), h(DetailItem, { key: 'eafb132e84de81d41bd154aec55974d8496995dd', title: "Institution", value: this.payout.bank_account.account_type }), h(DetailItem, { key: '7f565f8dfacab4cf8edc7025d839dff1d8de2719', title: "Routing Number", value: this.payout.bank_account.routing_number }), h(DetailItem, { key: '61338f5ed539d70b4caa08ffa200d8e47f52ebde', title: "Account Number", value: this.payout.bank_account.account_number_last4 })), h(DetailSectionTitle, { key: 'cea128826f004ece9e6c29c97c07e98a3d45706c', sectionTitle: 'Metadata' }), h("div", { key: 'bf884c3dafa50cd1b8e0d98711f0fe5fc9d60391', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '2d92e2f8d6f032cbaff741da43ca97424b8decaf', metadata: this.payout.metadata })))))));
|
|
41
56
|
}
|
|
42
57
|
static get is() { return "payout-details-core"; }
|
|
43
|
-
static get originalStyleUrls() {
|
|
44
|
-
return {
|
|
45
|
-
"$": ["payout-details.scss"]
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
static get styleUrls() {
|
|
49
|
-
return {
|
|
50
|
-
"$": ["payout-details.css"]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
58
|
static get properties() {
|
|
54
59
|
return {
|
|
55
60
|
"getPayout": {
|
|
@@ -71,6 +76,26 @@ export class PayoutDetailsCore {
|
|
|
71
76
|
"tags": [],
|
|
72
77
|
"text": ""
|
|
73
78
|
}
|
|
79
|
+
},
|
|
80
|
+
"getPayoutCSV": {
|
|
81
|
+
"type": "unknown",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "Function",
|
|
85
|
+
"resolved": "Function",
|
|
86
|
+
"references": {
|
|
87
|
+
"Function": {
|
|
88
|
+
"location": "global",
|
|
89
|
+
"id": "global::Function"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": ""
|
|
98
|
+
}
|
|
74
99
|
}
|
|
75
100
|
};
|
|
76
101
|
}
|
|
@@ -4,6 +4,7 @@ import { makeGetPayoutDetails } from "./get-payout-details";
|
|
|
4
4
|
import { ErrorState } from "../details/utils";
|
|
5
5
|
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
6
6
|
import JustifiAnalytics from "../../api/Analytics";
|
|
7
|
+
import { makeGetPayoutCSV } from "./get-payout-csv";
|
|
7
8
|
export class PayoutDetails {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.handleErrorEvent = (event) => {
|
|
@@ -13,25 +14,30 @@ export class PayoutDetails {
|
|
|
13
14
|
this.payoutId = undefined;
|
|
14
15
|
this.authToken = undefined;
|
|
15
16
|
this.getPayout = undefined;
|
|
17
|
+
this.getPayoutCSV = undefined;
|
|
16
18
|
this.errorMessage = null;
|
|
17
19
|
}
|
|
18
20
|
componentWillLoad() {
|
|
19
21
|
this.analytics = new JustifiAnalytics(this);
|
|
20
|
-
this.
|
|
22
|
+
this.initializeServices();
|
|
21
23
|
}
|
|
22
24
|
disconnectedCallback() {
|
|
23
25
|
this.analytics.cleanup();
|
|
24
26
|
}
|
|
25
27
|
propChanged() {
|
|
26
|
-
this.
|
|
28
|
+
this.initializeServices();
|
|
27
29
|
}
|
|
28
|
-
|
|
30
|
+
initializeServices() {
|
|
29
31
|
if (this.payoutId && this.authToken) {
|
|
30
32
|
this.getPayout = makeGetPayoutDetails({
|
|
31
33
|
id: this.payoutId,
|
|
32
34
|
authToken: this.authToken,
|
|
33
35
|
service: new PayoutService()
|
|
34
36
|
});
|
|
37
|
+
this.getPayoutCSV = makeGetPayoutCSV({
|
|
38
|
+
authToken: this.authToken,
|
|
39
|
+
service: new PayoutService()
|
|
40
|
+
});
|
|
35
41
|
}
|
|
36
42
|
else {
|
|
37
43
|
this.errorMessage = 'Failed to load payout details. payoutId or authToken is not provided.';
|
|
@@ -46,7 +52,7 @@ export class PayoutDetails {
|
|
|
46
52
|
if (this.errorMessage) {
|
|
47
53
|
return ErrorState(this.errorMessage);
|
|
48
54
|
}
|
|
49
|
-
return (h("payout-details-core", { getPayout: this.getPayout, "onError-event": this.handleErrorEvent }));
|
|
55
|
+
return (h("payout-details-core", { getPayout: this.getPayout, getPayoutCSV: this.getPayoutCSV, "onError-event": this.handleErrorEvent }));
|
|
50
56
|
}
|
|
51
57
|
static get is() { return "justifi-payout-details"; }
|
|
52
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,6 +97,7 @@ export class PayoutDetails {
|
|
|
91
97
|
static get states() {
|
|
92
98
|
return {
|
|
93
99
|
"getPayout": {},
|
|
100
|
+
"getPayoutCSV": {},
|
|
94
101
|
"errorMessage": {}
|
|
95
102
|
};
|
|
96
103
|
}
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PayoutStatuses, PayoutStatusesSafeNames, pagingDefaults } from "../../api";
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { PayoutStatuses, PayoutStatusesSafeNames, pagingDefaults, } from "../../api";
|
|
3
3
|
import { formatCurrency, formatDate, formatTime } from "../../utils/utils";
|
|
4
|
+
import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
|
|
5
|
+
import { DownloadIcon } from "../../assets/download-icon";
|
|
4
6
|
import { tableExportedParts } from "../table/exported-parts";
|
|
7
|
+
import { StyledHost, TableEmptyState, TableErrorState, TableLoadingState } from "../../ui-components";
|
|
5
8
|
export class PayoutsListCore {
|
|
6
9
|
constructor() {
|
|
10
|
+
this.downloadCSV = (payoutId) => {
|
|
11
|
+
this.getPayoutCSV({
|
|
12
|
+
payoutId,
|
|
13
|
+
onError: () => {
|
|
14
|
+
this.errorEvent.emit({
|
|
15
|
+
errorCode: ComponentErrorCodes.FETCH_ERROR,
|
|
16
|
+
message: 'Failed to download CSV',
|
|
17
|
+
severity: ComponentErrorSeverity.ERROR,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
this.handleDateChange = (name, value) => {
|
|
23
|
+
this.params = Object.assign(Object.assign({}, this.params), { [name]: value });
|
|
24
|
+
};
|
|
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 });
|
|
34
|
+
};
|
|
7
35
|
this.mapStatusToBadge = (status) => {
|
|
8
36
|
switch (status) {
|
|
9
37
|
case PayoutStatuses.scheduled:
|
|
@@ -15,36 +43,33 @@ export class PayoutsListCore {
|
|
|
15
43
|
case PayoutStatuses.canceled:
|
|
16
44
|
return `<span class="badge bg-danger" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;
|
|
17
45
|
case PayoutStatuses.forwarded:
|
|
18
|
-
return `<span class="badge bg-secondary" title='
|
|
46
|
+
return `<span class="badge bg-secondary" title='The funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;
|
|
19
47
|
case PayoutStatuses.paid:
|
|
20
48
|
return `<span class="badge bg-success" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;
|
|
21
49
|
}
|
|
22
50
|
};
|
|
23
|
-
this.
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.handleClickNext = (afterCursor) => {
|
|
29
|
-
const newParams = Object.assign({}, this.params);
|
|
30
|
-
delete newParams.before_cursor;
|
|
31
|
-
this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
|
|
51
|
+
this.rowClickHandler = (e) => {
|
|
52
|
+
const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;
|
|
53
|
+
if (!clickedPayoutID)
|
|
54
|
+
return;
|
|
55
|
+
this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));
|
|
32
56
|
};
|
|
33
57
|
this.getPayouts = undefined;
|
|
58
|
+
this.getPayoutCSV = undefined;
|
|
34
59
|
this.payouts = [];
|
|
35
60
|
this.loading = true;
|
|
36
61
|
this.errorMessage = undefined;
|
|
37
62
|
this.paging = pagingDefaults;
|
|
38
63
|
this.params = undefined;
|
|
39
64
|
}
|
|
65
|
+
updateOnPropChange() {
|
|
66
|
+
this.fetchData();
|
|
67
|
+
}
|
|
40
68
|
componentWillLoad() {
|
|
41
69
|
if (this.getPayouts) {
|
|
42
70
|
this.fetchData();
|
|
43
71
|
}
|
|
44
72
|
}
|
|
45
|
-
updateOnPropChange() {
|
|
46
|
-
this.fetchData();
|
|
47
|
-
}
|
|
48
73
|
fetchData() {
|
|
49
74
|
this.loading = true;
|
|
50
75
|
this.getPayouts({
|
|
@@ -59,64 +84,65 @@ export class PayoutsListCore {
|
|
|
59
84
|
this.errorEvent.emit({
|
|
60
85
|
errorCode: code,
|
|
61
86
|
message: error,
|
|
62
|
-
severity
|
|
87
|
+
severity,
|
|
63
88
|
});
|
|
64
89
|
this.loading = false;
|
|
65
90
|
},
|
|
66
91
|
});
|
|
67
92
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return (h(Host, { key: 'dcbc7c461ec76c6a7b94328a4691f12fa4982c18', exportedparts: tableExportedParts }, h("justifi-table", { key: '7a90e1951f33b03fadb4cb9ac75f6932566042b1', rowClickHandler: (e) => {
|
|
71
|
-
const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;
|
|
72
|
-
if (!clickedPayoutID) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));
|
|
76
|
-
}, columnData: [
|
|
77
|
-
['Paid Out On', 'The date each transaction occurred'],
|
|
78
|
-
['Type', 'The type of each transaction'],
|
|
79
|
-
['Account', 'The ID of the account associated with each payout'],
|
|
80
|
-
['Paid Out To', 'The bank account to which each payout was transferred'],
|
|
81
|
-
['Payments', 'Sum of payments in each payout'],
|
|
82
|
-
['Refunds', 'Sum of refunds in each payout'],
|
|
83
|
-
['Fees', 'Sum of fees in each payout'],
|
|
84
|
-
['Other', 'Sum of less common transactions in each payout (disputes, ACH returns, fee refunds, and forwarded balances due to failed payouts)'],
|
|
85
|
-
['Payout Amount', 'The net sum of all transactions in each payout. This is the amount you\'ll see reflected on your bank statement'],
|
|
86
|
-
['Status', 'The real-time status of each payout']
|
|
87
|
-
], entityId: this.payouts.map((payout) => payout.id), rowData: this.payouts.map((payout) => ([
|
|
88
|
-
{
|
|
89
|
-
type: 'head',
|
|
90
|
-
value: `
|
|
91
|
-
<div class='fw-bold'>${formatDate(payout.created_at)}</div>
|
|
92
|
-
<div class='fw-bold'>${formatTime(payout.created_at)}</div>
|
|
93
|
-
`,
|
|
94
|
-
},
|
|
95
|
-
payout.payout_type,
|
|
96
|
-
payout.account_id,
|
|
97
|
-
`${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,
|
|
98
|
-
formatCurrency(payout.payments_total),
|
|
99
|
-
formatCurrency(payout.refunds_total),
|
|
100
|
-
formatCurrency(payout.fees_total),
|
|
101
|
-
formatCurrency(payout.other_total),
|
|
102
|
-
formatCurrency(payout.amount),
|
|
103
|
-
{
|
|
104
|
-
type: 'inner',
|
|
105
|
-
value: this.mapStatusToBadge(payout.status)
|
|
106
|
-
}
|
|
107
|
-
])), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
|
|
93
|
+
get entityId() {
|
|
94
|
+
return this.payouts.map((payout) => payout.id);
|
|
108
95
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
get columnData() {
|
|
97
|
+
return [
|
|
98
|
+
['Paid Out On', 'The date each transaction occurred'],
|
|
99
|
+
['Type', 'The type of each transaction'],
|
|
100
|
+
['Account', 'The ID of the account associated with each payout'],
|
|
101
|
+
['Paid Out To', 'The bank account to which each payout was transferred'],
|
|
102
|
+
['Payments', 'Sum of payments in each payout'],
|
|
103
|
+
['Refunds', 'Sum of refunds in each payout'],
|
|
104
|
+
['Fees', 'Sum of fees in each payout'],
|
|
105
|
+
['Other', 'Sum of less common transactions in each payout'],
|
|
106
|
+
['Payout Amount', 'The net sum of all transactions in each payout'],
|
|
107
|
+
['Status', 'The real-time status of each payout'],
|
|
108
|
+
['Actions', ''],
|
|
109
|
+
];
|
|
114
110
|
}
|
|
115
|
-
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
111
|
+
get rowData() {
|
|
112
|
+
return this.payouts.map((payout) => [
|
|
113
|
+
{
|
|
114
|
+
type: 'head',
|
|
115
|
+
value: `
|
|
116
|
+
<div class='fw-bold'>${formatDate(payout.created_at)}</div>
|
|
117
|
+
<div class='fw-bold'>${formatTime(payout.created_at)}</div>
|
|
118
|
+
`,
|
|
119
|
+
},
|
|
120
|
+
payout.payout_type,
|
|
121
|
+
payout.account_id,
|
|
122
|
+
`${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,
|
|
123
|
+
formatCurrency(payout.payments_total),
|
|
124
|
+
formatCurrency(payout.refunds_total),
|
|
125
|
+
formatCurrency(payout.fees_total),
|
|
126
|
+
formatCurrency(payout.other_total),
|
|
127
|
+
formatCurrency(payout.amount),
|
|
128
|
+
{ type: 'inner', value: this.mapStatusToBadge(payout.status) },
|
|
129
|
+
(h(DownloadIcon, { title: "Export CSV", onClick: () => this.downloadCSV(payout.id), style: { height: '24px', width: '24px', cursor: 'pointer' } })),
|
|
130
|
+
]);
|
|
119
131
|
}
|
|
132
|
+
get showEmptyState() {
|
|
133
|
+
return !this.loading && !this.errorMessage && this.rowData.length < 1;
|
|
134
|
+
}
|
|
135
|
+
get showErrorState() {
|
|
136
|
+
return !this.loading && !!this.errorMessage;
|
|
137
|
+
}
|
|
138
|
+
get showRowData() {
|
|
139
|
+
return !this.showEmptyState && !this.showErrorState;
|
|
140
|
+
}
|
|
141
|
+
render() {
|
|
142
|
+
return (h(StyledHost, { key: '594c52003f897f4c50f79935e42a7042fb5ec168', exportedparts: tableExportedParts }, h("div", { key: 'f2b1d971e1e7bc5596459c071c3aa931ba4cb4b9', class: "row gy-3 mb-4" }, h("div", { key: 'd98e3ed56421493a60bd0a285079aa99ae705506', class: "col-2" }, h("form-control-date", { key: 'c9c899884bcc6fa6d306b95473ef0a7354e57bd5', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), h("div", { key: '0059a75bf2f478b107d59bd9d7cc29de10dffe57', class: "col-2" }, h("form-control-date", { key: 'ef9a31ac8a8e7336386664b70289ee34677152a4', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), h("div", { key: '65da1114a66ac4cdf8d6ec012a42b2f760af5c76', class: "table-wrapper" }, h("table", { key: 'd68d8f61835cc4dc5dc988ff61843e6254494ace', class: "table table-hover" }, h("thead", { key: 'aa691db8fbfbcdad59acbdc1ef38497b552928ab', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: 'aa9f61cbf05b9420026861cb14e6a30a6c9e347e', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), h("tbody", { key: 'cf0127f26e8bc5b7afbbfc4a36fab4de948d1727', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: 'd6b832786c4959176974c7a343442c8d1c50b5c2', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: '398a20957f76ba14e1b0677fbd6fbfbacce61fbb', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: 'd9f755a07a6f8cd4967eac60beff92f36322dcdd', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
|
|
143
|
+
this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (h("tfoot", { key: '503fa3a3a7ffe5d52b614153b286dd0326c02091', class: "sticky-bottom" }, h("tr", { key: 'e3af74b96bfc1f5ac1f0f0655eaed096102d0e89', class: "table-light align-middle" }, h("td", { key: 'a53f9d37181ea29a9fcb6ab46b2daf7cc66509be', part: "pagination-bar", colSpan: this.columnData.length }, h("pagination-menu", { key: 'b0779289444747e0b18bb63e6a17cdc89bd390ca', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
|
|
144
|
+
}
|
|
145
|
+
static get is() { return "payouts-list-core"; }
|
|
120
146
|
static get properties() {
|
|
121
147
|
return {
|
|
122
148
|
"getPayouts": {
|
|
@@ -138,6 +164,26 @@ export class PayoutsListCore {
|
|
|
138
164
|
"tags": [],
|
|
139
165
|
"text": ""
|
|
140
166
|
}
|
|
167
|
+
},
|
|
168
|
+
"getPayoutCSV": {
|
|
169
|
+
"type": "unknown",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "Function",
|
|
173
|
+
"resolved": "Function",
|
|
174
|
+
"references": {
|
|
175
|
+
"Function": {
|
|
176
|
+
"location": "global",
|
|
177
|
+
"id": "global::Function"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
}
|
|
141
187
|
}
|
|
142
188
|
};
|
|
143
189
|
}
|