@justifi/webcomponents 4.19.3-rc-2 → 4.19.3
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-adc90fc6.js → Analytics-a0a86d82.js} +4 -3
- package/dist/cjs/{Api-3bc6e43f.js → Api-b98b256f.js} +3 -3
- package/dist/cjs/{Business-aacbe893.js → Business-aa799fec.js} +104 -9
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
- package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-26b0eecb.js} +1 -1
- package/dist/cjs/{business-form-options-582467fe.js → business-form-options-5db0bd5e.js} +2 -2
- package/dist/cjs/{payload-parsers-1cbc3b57.js → business-identity-schema-503ecb77.js} +1 -47
- package/dist/cjs/{business.service-090a21e1.js → business.service-031c0084.js} +7 -6
- package/dist/cjs/config-05767cba.js +15 -0
- package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +26 -26
- package/dist/cjs/{get-payout-csv-238e839a.js → get-payout-csv-3a3260ec.js} +5 -4
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +15 -14
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +6 -5
- package/dist/cjs/justifi-business-form.cjs.entry.js +14 -13
- package/dist/cjs/justifi-card-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +6 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +10 -12
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -11
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +8 -7
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +4 -3
- package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -5
- package/dist/cjs/{package-22d30c5d.js → package-99f4d813.js} +2 -2
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-c92635c8.js → payment.service-4b1c0a20.js} +4 -3
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/payout-details-core.cjs.entry.js +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{schema-validations-2733de42.js → schema-validations-0a7e46a3.js} +1 -1
- package/dist/cjs/{utils-89d86e29.js → utils-af1b60a9.js} +0 -16
- package/dist/collection/api/Api.js +3 -3
- package/dist/collection/api/Business.js +66 -7
- package/dist/collection/api/Identity.js +39 -3
- package/dist/collection/api/services/analytics.service.js +2 -1
- package/dist/collection/api/services/business.service.js +6 -5
- package/dist/collection/api/services/checkout.service.js +3 -2
- package/dist/collection/api/services/insurance.service.js +3 -2
- package/dist/collection/api/services/payment.service.js +3 -2
- package/dist/collection/api/services/payout.service.js +4 -3
- package/dist/collection/api/services/provision.service.js +2 -1
- package/dist/collection/api/services/reports.service.js +2 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-form.js +5 -5
- package/dist/collection/components/business-forms/owner-form/owner-form-core.js +4 -5
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +4 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +3 -5
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +3 -3
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +3 -4
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +4 -3
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +3 -4
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +4 -3
- package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
- package/dist/collection/components/card-form/card-form.js +4 -3
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +4 -6
- package/dist/collection/components/checkout/payment-method-options.js +4 -3
- package/dist/collection/components/checkout/saved-payment-method.js +4 -3
- package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
- package/dist/collection/components/payment-form/payment-form.js +4 -3
- package/dist/collection/components/refund-form/refund-form.js +3 -2
- package/dist/config.js +11 -0
- package/dist/docs.json +9 -9
- package/dist/{webcomponents/p-15eafa87.js → esm/Analytics-e460ab05.js} +4 -3
- package/dist/esm/{Api-b09a2f6a.js → Api-c8abc2e0.js} +3 -3
- package/dist/esm/{Business-e218b4f4.js → Business-b73d5055.js} +104 -9
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-a5583cf8.js} +1 -1
- package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-d790973e.js} +2 -2
- package/dist/esm/{payload-parsers-acb719d1.js → business-identity-schema-9e3269fb.js} +2 -44
- package/dist/esm/{business.service-37d0cc72.js → business.service-1f589b6e.js} +7 -6
- package/dist/esm/config-27764a9d.js +13 -0
- package/dist/esm/form-alert_5.entry.js +2 -2
- package/dist/esm/form-control-checkbox_9.entry.js +21 -21
- package/dist/esm/{get-payout-csv-a702a0d9.js → get-payout-csv-93427146.js} +5 -4
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +15 -14
- package/dist/esm/justifi-bank-account-form.entry.js +6 -5
- package/dist/esm/justifi-billing-form_2.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +6 -5
- package/dist/esm/justifi-business-form.entry.js +13 -12
- package/dist/esm/justifi-card-form.entry.js +6 -5
- package/dist/esm/justifi-checkout-core.entry.js +4 -4
- package/dist/esm/justifi-checkout.entry.js +6 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +5 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +10 -12
- package/dist/esm/justifi-owner-form_3.entry.js +11 -10
- package/dist/esm/justifi-payment-details.entry.js +5 -4
- package/dist/esm/justifi-payment-form.entry.js +8 -7
- package/dist/esm/justifi-payment-method-form.entry.js +2 -2
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payments-list.entry.js +5 -4
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -4
- package/dist/esm/justifi-refund-form.entry.js +4 -3
- package/dist/esm/justifi-season-interruption-insurance-core.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -5
- package/dist/{webcomponents/p-2e8f4937.js → esm/package-0935c5e5.js} +2 -2
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-9359fe15.js → payment.service-02c596b9.js} +4 -3
- package/dist/esm/payments-list-core.entry.js +1 -1
- package/dist/esm/payout-details-core.entry.js +1 -1
- package/dist/esm/payouts-list-core.entry.js +1 -1
- package/dist/esm/{schema-validations-a83ff220.js → schema-validations-e725d701.js} +2 -2
- package/dist/esm/{utils-3c1dd2fa.js → utils-e66d8bca.js} +1 -16
- package/dist/module/Analytics.js +2 -1
- package/dist/module/Api.js +3 -3
- package/dist/module/Business.js +104 -9
- package/dist/module/business-additional-questions-form-step-core.js +3 -3
- package/dist/module/business-bank-account-form-step.js +4 -3
- package/dist/module/business-core-info-form-step-core.js +3 -5
- package/dist/module/business-document-upload-form-step.js +4 -3
- package/dist/module/business-document-upload-input-group.js +1 -1
- package/dist/module/business-documents-on-file.js +1 -1
- package/dist/module/business-form-options.js +1 -1
- package/dist/module/business-owners-form-step-core.js +3 -3
- package/dist/module/business-representative-form-step-core.js +3 -4
- package/dist/module/business-terms-conditions-form-step.js +4 -3
- package/dist/module/business.service.js +6 -5
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/config.js +13 -0
- package/dist/module/get-payout-csv.js +4 -3
- package/dist/module/justifi-bank-account-form.js +3 -2
- package/dist/module/justifi-business-form.js +5 -5
- package/dist/module/justifi-card-form.js +3 -2
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-payment-form.js +4 -3
- package/dist/module/justifi-payment-provisioning.js +2 -1
- package/dist/module/justifi-refund-form.js +3 -2
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/legal-address-form-step-core.js +3 -4
- package/dist/module/new-payment-method.js +3 -5
- package/dist/module/owner-form-core2.js +4 -5
- package/dist/module/package.js +2 -2
- package/dist/module/payment-details-core2.js +1 -1
- package/dist/module/payment-method-options.js +3 -2
- package/dist/module/payment.service.js +3 -2
- package/dist/module/payments-list-core2.js +1 -1
- package/dist/module/payout-details-core2.js +1 -1
- package/dist/module/payouts-list-core2.js +1 -1
- package/dist/module/saved-payment-method.js +4 -3
- package/dist/module/sezzle-payment-method.js +3 -2
- package/dist/module/utils2.js +1 -16
- package/dist/types/api/Business.d.ts +87 -1
- package/dist/types/api/Identity.d.ts +45 -1
- package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +44 -1
- package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +11 -1
- package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +11 -1
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +24 -1
- package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +11 -1
- package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
- package/dist/webcomponents/index.esm.js +0 -1
- package/dist/webcomponents/p-056e75be.entry.js +1 -0
- package/dist/webcomponents/p-07109641.entry.js +1 -0
- package/dist/webcomponents/p-08b0fb31.js +1 -41
- package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
- package/dist/webcomponents/p-11b6ed0c.entry.js +1 -0
- package/dist/webcomponents/p-124c1ecd.entry.js +1 -0
- package/dist/webcomponents/p-14c91ffd.js +1 -20
- package/dist/webcomponents/p-15976984.entry.js +1 -0
- package/dist/webcomponents/p-1815a43b.js +1 -0
- package/dist/webcomponents/p-1ad5995e.js +1 -3599
- package/dist/webcomponents/p-1cf90026.entry.js +1 -0
- package/dist/webcomponents/p-1eee25f3.entry.js +19 -0
- package/dist/webcomponents/p-1ff8810b.js +1 -29
- package/dist/webcomponents/p-2338affa.js +1 -213
- package/dist/webcomponents/p-277aee05.js +1 -0
- package/dist/webcomponents/p-2b6c9c4f.js +1 -7
- package/dist/webcomponents/p-2eab3c90.js +1 -3052
- package/dist/webcomponents/p-3423ddfd.entry.js +1 -0
- package/dist/webcomponents/p-39c6f36a.entry.js +1 -0
- package/dist/webcomponents/p-401d6607.js +1 -0
- package/dist/webcomponents/p-421ed39d.entry.js +1 -0
- package/dist/webcomponents/p-487b72a8.entry.js +1 -0
- package/dist/webcomponents/p-4e017b58.js +1 -0
- package/dist/webcomponents/p-4e01fec8.entry.js +1 -0
- package/dist/webcomponents/p-5022f21c.js +1 -0
- package/dist/webcomponents/p-525db3e8.js +1 -22
- package/dist/webcomponents/p-55182a59.js +1 -0
- package/dist/webcomponents/p-56f6ce4c.js +1 -10
- package/dist/webcomponents/p-5968ff8a.js +1 -178
- package/dist/webcomponents/p-5a62fca2.js +1 -0
- package/dist/webcomponents/p-5e2c9ec8.js +1 -0
- package/dist/webcomponents/p-5e7c60d8.js +1 -0
- package/dist/webcomponents/p-6078a370.js +1 -244
- package/dist/webcomponents/p-69c18f39.entry.js +1 -0
- package/dist/webcomponents/p-6abb2a04.entry.js +1 -0
- package/dist/webcomponents/p-6ac806ff.entry.js +1 -0
- package/dist/webcomponents/p-721dcf51.entry.js +1 -0
- package/dist/webcomponents/p-7d3be485.js +1 -0
- package/dist/webcomponents/p-7d85af5c.js +1 -16
- package/dist/webcomponents/p-7ff329b1.js +1 -0
- package/dist/webcomponents/p-8115b2f4.js +1 -28
- package/dist/webcomponents/p-817da23c.entry.js +1 -0
- package/dist/webcomponents/p-8df7bde8.js +1 -27
- package/dist/webcomponents/p-9c9c7dac.js +1 -24
- package/dist/webcomponents/p-a99032e1.entry.js +1 -0
- package/dist/webcomponents/p-ad47f37c.entry.js +1 -0
- package/dist/webcomponents/p-aedb421f.entry.js +1 -0
- package/dist/webcomponents/p-b676bca5.entry.js +1 -0
- package/dist/webcomponents/p-b6c3b7bc.entry.js +1 -0
- package/dist/webcomponents/p-ba4bae6f.js +1 -12
- package/dist/webcomponents/p-bbed6107.entry.js +1 -0
- package/dist/webcomponents/p-bd278ff4.entry.js +1 -0
- package/dist/webcomponents/p-be39c802.entry.js +1 -0
- package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
- package/dist/webcomponents/p-d4a44a1e.entry.js +1 -0
- package/dist/webcomponents/p-d76002d5.entry.js +1 -0
- package/dist/webcomponents/p-d78eb6ce.js +1 -0
- package/dist/webcomponents/p-d8355f91.entry.js +1 -0
- package/dist/webcomponents/p-d89bad72.js +1 -39
- package/dist/webcomponents/p-da1d174d.entry.js +1 -0
- package/dist/webcomponents/p-dce846bf.js +1 -27
- package/dist/webcomponents/p-df21aaad.js +1 -120
- package/dist/webcomponents/p-e1255160.js +1 -3
- package/dist/webcomponents/p-e2b2213f.entry.js +1 -0
- package/dist/webcomponents/p-e2c88817.entry.js +1 -0
- package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
- package/dist/webcomponents/p-e333620e.js +1 -34
- package/dist/webcomponents/p-e3f4a2a6.js +1 -0
- package/dist/webcomponents/p-e3fab0e2.js +1 -43
- package/dist/webcomponents/p-e7fd1357.entry.js +1 -0
- package/dist/webcomponents/p-eccf2e8e.entry.js +1 -0
- package/dist/webcomponents/p-edb62047.entry.js +1 -0
- package/dist/webcomponents/p-f0866375.entry.js +1 -0
- package/dist/webcomponents/p-f5ebca3e.entry.js +1 -0
- package/dist/webcomponents/p-fad19d75.js +2 -1638
- package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +4 -362
- package/dist/webcomponents/webcomponents.esm.js +1 -20
- package/package.json +2 -2
- package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
- package/dist/esm/Analytics-a8eb7344.js +0 -77
- package/dist/esm/package-ccb774a9.js +0 -79
- package/dist/module/payload-parsers.js +0 -43
- package/dist/types/components/business-forms/utils/payload-parsers.d.ts +0 -4
- package/dist/webcomponents/p-01a404ca.entry.js +0 -44
- package/dist/webcomponents/p-03d35880.entry.js +0 -130
- package/dist/webcomponents/p-06ff0429.entry.js +0 -65
- package/dist/webcomponents/p-0e1bc91e.js +0 -28
- package/dist/webcomponents/p-10875f3d.entry.js +0 -97
- package/dist/webcomponents/p-157acba8.entry.js +0 -98
- package/dist/webcomponents/p-18fa0479.entry.js +0 -131
- package/dist/webcomponents/p-1a5120f4.entry.js +0 -145
- package/dist/webcomponents/p-24dc023a.entry.js +0 -791
- package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
- package/dist/webcomponents/p-27d87fe2.entry.js +0 -133
- package/dist/webcomponents/p-29c0b182.js +0 -114
- package/dist/webcomponents/p-3395e896.entry.js +0 -74
- package/dist/webcomponents/p-3fd13ca3.js +0 -52
- package/dist/webcomponents/p-47d79529.js +0 -18
- package/dist/webcomponents/p-53ecc8b9.entry.js +0 -261
- package/dist/webcomponents/p-5482d030.entry.js +0 -21
- package/dist/webcomponents/p-576826b1.entry.js +0 -43
- package/dist/webcomponents/p-5f835b89.entry.js +0 -606
- package/dist/webcomponents/p-6124b1b3.entry.js +0 -80
- package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
- package/dist/webcomponents/p-7582b554.entry.js +0 -18
- package/dist/webcomponents/p-75fd6367.entry.js +0 -149
- package/dist/webcomponents/p-79646550.entry.js +0 -61
- package/dist/webcomponents/p-800d31fe.entry.js +0 -162
- package/dist/webcomponents/p-83125497.js +0 -4027
- package/dist/webcomponents/p-85fc69e5.js +0 -90
- package/dist/webcomponents/p-89887332.js +0 -301
- package/dist/webcomponents/p-8eb774df.entry.js +0 -54
- package/dist/webcomponents/p-9e17630d.entry.js +0 -1684
- package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
- package/dist/webcomponents/p-a4e8573e.entry.js +0 -94
- package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
- package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
- package/dist/webcomponents/p-ab4816e1.entry.js +0 -117
- package/dist/webcomponents/p-ac086069.entry.js +0 -58
- package/dist/webcomponents/p-af244664.js +0 -126
- package/dist/webcomponents/p-b4b8b531.js +0 -44
- package/dist/webcomponents/p-b82c146f.entry.js +0 -111
- package/dist/webcomponents/p-ba5fae28.js +0 -90
- package/dist/webcomponents/p-bd66f9d2.entry.js +0 -101
- package/dist/webcomponents/p-cc39384f.entry.js +0 -99
- package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
- package/dist/webcomponents/p-dad3e069.entry.js +0 -298
- package/dist/webcomponents/p-e1e7525b.entry.js +0 -73
- package/dist/webcomponents/p-e356f280.entry.js +0 -29
- package/dist/webcomponents/p-e9a5cb95.entry.js +0 -94
- package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
- package/dist/webcomponents/p-edc37d1f.entry.js +0 -75
- package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
- package/dist/{globals.d.ts → types/global.d.ts} +1 -1
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { M as MapPaymentStatusToBadge, f as formatCurrency, b as formatDate, c as formatTime, s as snakeCaseToHumanReadable } from './p-83125497.js';
|
|
3
|
-
import { a as EntityHeadInfo, b as EntityHeadInfoItem, D as DetailSectionTitle, c as DetailItem, C as CodeBlock, E as ErrorState, L as LoadingState } from './p-dce846bf.js';
|
|
4
|
-
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
5
|
-
|
|
6
|
-
const PaymentDetailsCore = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
10
|
-
this.getPaymentDetails = undefined;
|
|
11
|
-
this.payment = undefined;
|
|
12
|
-
this.loading = true;
|
|
13
|
-
this.errorMessage = undefined;
|
|
14
|
-
}
|
|
15
|
-
componentWillLoad() {
|
|
16
|
-
if (this.getPaymentDetails) {
|
|
17
|
-
this.fetchData();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
updateOnPropChange() {
|
|
21
|
-
this.fetchData();
|
|
22
|
-
}
|
|
23
|
-
fetchData() {
|
|
24
|
-
this.loading = true;
|
|
25
|
-
this.getPaymentDetails({
|
|
26
|
-
onSuccess: ({ payment }) => {
|
|
27
|
-
this.payment = payment;
|
|
28
|
-
this.loading = false;
|
|
29
|
-
this.errorMessage = null;
|
|
30
|
-
},
|
|
31
|
-
onError: ({ error, code, severity }) => {
|
|
32
|
-
this.errorMessage = error;
|
|
33
|
-
this.errorEvent.emit({
|
|
34
|
-
errorCode: code,
|
|
35
|
-
message: error,
|
|
36
|
-
severity,
|
|
37
|
-
});
|
|
38
|
-
this.loading = false;
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
var _a;
|
|
44
|
-
return (h(StyledHost, { key: 'aaaea4076938af5a74197256dba1093265f0e2d6' }, this.loading && LoadingState(), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && !this.errorMessage &&
|
|
45
|
-
this.payment && (h("justifi-details", { key: '12f06fa05915380403e244cbed053d0c04bfa1d4', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: '4d496def6abfc728e6f184fb0729ac648fb2deaf', slot: "head-info", badge: h("span", { slot: 'badge', innerHTML: MapPaymentStatusToBadge(this.payment.status) }), title: `${formatCurrency(this.payment.amount)} ${(_a = this.payment) === null || _a === void 0 ? void 0 : _a.currency.toUpperCase()}` }, h(EntityHeadInfoItem, { key: '78dcff13206646d594bdc80f6297d45dc9932694', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payment.updated_at)} ${formatTime(this.payment.updated_at)}` }), h(EntityHeadInfoItem, { key: 'dfa0de667ebd28efd217b6bdf548b9b1b728b57e', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payment.created_at)} ${formatTime(this.payment.created_at)}` }), h(EntityHeadInfoItem, { key: 'b449b180034f28504007a9c2fb0598607dc00efb', title: "ID", value: this.payment.id })), h("div", { key: '62af84e244e38b24b32f791d13f1b21b49942597', slot: 'detail-sections' }, h(DetailSectionTitle, { key: '0ddb0366b4ab737c7b08a37764b8ce2f7ec4a1e9', sectionTitle: "Details" }), h("div", { key: 'cb699194db16cb8608834779f560e882f6f9da7c', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '3b6eb4a8b782668951bba90be3b5d522f3f7c69b', title: "Amount", value: formatCurrency(this.payment.amount) }), h(DetailItem, { key: '7a59ab0b12a263c38c40a98acbff6492d370b28b', title: "Fees", value: formatCurrency(this.payment.fee_amount) }), h(DetailItem, { key: 'a9eaa5d1959425205c144dc2aa7c7fad77014290', title: "Refunded", value: formatCurrency(this.payment.amount_refunded) }), h(DetailItem, { key: 'd70c3a4bf48c9c69625d5f27f1095f9b0744a71e', title: "Net", value: formatCurrency(this.payment.balance) }), h(DetailItem, { key: '28f526b1adcd475c2ae88a8bf09ae4aea7935df6', title: "Status", value: MapPaymentStatusToBadge(this.payment.status) }), h(DetailItem, { key: '700f51d787f20f575e3e11aa72a8da29a9587c2a', title: "Payment ID", value: this.payment.id }), h(DetailItem, { key: 'ea72ecc9c2f5055d4b0f6b37cd16cb318f9a797c', title: "Processing Fees", value: formatCurrency(this.payment.fee_amount) }), h(DetailItem, { key: '9d66af2c0c0baef4e8b7b021daf0b4d6adb267d2', title: "Statement Descriptor", value: this.payment.statement_descriptor }), h(DetailItem, { key: '3f21501c1e08feeee1e7427a42faf1c5d1d9c84d', title: "Description", value: this.payment.description })), this.payment.payment_method.card && [
|
|
46
|
-
h(DetailSectionTitle, { key: 'b7767b93e090c0195aca6c99b66b48d61b6134b3', sectionTitle: "Payment Method" }),
|
|
47
|
-
h("div", { key: 'a363c7a7e69932a8ffeddb5e0d53f7df13119a9a', class: "d-table gap-2 w-100" }, h(DetailItem, { key: 'fb0e1f64fcec23e513590b3048593565685d8400', title: "ID", value: this.payment.payment_method.card.id }), h(DetailItem, { key: 'bc181b1b94039e1aad341a8e563ba923976c806b', title: "Payment Type", value: "Card" }), h(DetailItem, { key: '88b21dd2368b88232cd0f464c381d4423fe3c774', title: "Last 4 Numbers", value: this.payment.payment_method.lastFourDigits }), h(DetailItem, { key: '040fd71315ead633f9c89e9a9dad906889759d77', title: "Brand", value: snakeCaseToHumanReadable(this.payment.payment_method.card.brand) }), h(DetailItem, { key: '35ebc74de2c5c8fafd95fc5b15ff4f2ca85220cc', title: "Cardholder", value: this.payment.payment_method.payersName }))
|
|
48
|
-
], this.payment.payment_method.bank_account && [
|
|
49
|
-
h(DetailSectionTitle, { key: 'f10eef0b4e4067fb78dbff16719a6f266f4e6bab', sectionTitle: "Payment Method" }),
|
|
50
|
-
h("div", { key: '6c1ef713b5dcabba5b516f3cbbd088d098873303', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '8880fd0fb2b16ee6f177aba15d6f4485c95af252', title: "ID", value: this.payment.payment_method.bank_account.id }), h(DetailItem, { key: 'baa70304d2972f69ce8a5d077a076b16f986745b', title: "Last 4 Numbers", value: this.payment.payment_method.lastFourDigits }), h(DetailItem, { key: 'dcb63b9258bea698bf2d165c611dfa05cb320f30', title: "Bank Name", value: this.payment.payment_method.bank_account.brand }), h(DetailItem, { key: '806696c15aa5ef242c230d9c9aea642ddfdfd93d', title: "Account Owner", value: this.payment.payment_method.payersName }))
|
|
51
|
-
], h(DetailSectionTitle, { key: '83289d8f2cf57a624678260555f00af4ea96a566', sectionTitle: 'Metadata' }), h("div", { key: '02e248b962e0c06f4d83bae75a5759b234fea36b', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '5d81879c7815102219ed010dab9f573ad6b7985d', metadata: this.payment.metadata })))))));
|
|
52
|
-
}
|
|
53
|
-
static get watchers() { return {
|
|
54
|
-
"getPaymentDetails": ["updateOnPropChange"]
|
|
55
|
-
}; }
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { PaymentDetailsCore as payment_details_core };
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { f as filterNumber, c as constructDate, g as getStateAbbreviation } from './p-1ff8810b.js';
|
|
2
|
-
|
|
3
|
-
class Owner {
|
|
4
|
-
constructor(owner) {
|
|
5
|
-
this.address = Object.assign({}, new Address(owner.address || {}));
|
|
6
|
-
this.created_at = owner.created_at;
|
|
7
|
-
this.dob_day = filterNumber(owner.dob_day);
|
|
8
|
-
this.dob_month = filterNumber(owner.dob_month);
|
|
9
|
-
this.dob_year = owner.dob_year;
|
|
10
|
-
this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
|
|
11
|
-
this.documents = owner.documents;
|
|
12
|
-
this.email = owner.email;
|
|
13
|
-
this.id = owner.id;
|
|
14
|
-
this.business_id = owner.business_id;
|
|
15
|
-
this.is_owner = owner.is_owner;
|
|
16
|
-
this.metadata = owner.metadata;
|
|
17
|
-
this.name = owner.name;
|
|
18
|
-
this.phone = owner.phone;
|
|
19
|
-
this.platform_account_id = owner.platform_account_id;
|
|
20
|
-
this.identification_number = owner.identification_number;
|
|
21
|
-
this.ssn_last4 = owner.ssn_last4;
|
|
22
|
-
this.title = owner.title;
|
|
23
|
-
this.updated_at = owner.updated_at;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
class Representative {
|
|
27
|
-
constructor(representative) {
|
|
28
|
-
this.address = Object.assign({}, new Address(representative.address || {}));
|
|
29
|
-
this.created_at = representative.created_at;
|
|
30
|
-
this.dob_day = filterNumber(representative.dob_day);
|
|
31
|
-
this.dob_month = filterNumber(representative.dob_month);
|
|
32
|
-
this.dob_year = representative.dob_year;
|
|
33
|
-
this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
|
|
34
|
-
this.documents = representative.documents;
|
|
35
|
-
this.email = representative.email;
|
|
36
|
-
this.id = representative.id;
|
|
37
|
-
this.business_id = representative.business_id;
|
|
38
|
-
this.is_owner = representative.is_owner;
|
|
39
|
-
this.metadata = representative.metadata;
|
|
40
|
-
this.name = representative.name;
|
|
41
|
-
this.phone = representative.phone;
|
|
42
|
-
this.platform_account_id = representative.platform_account_id;
|
|
43
|
-
this.identification_number = representative.identification_number;
|
|
44
|
-
this.ssn_last4 = representative.ssn_last4;
|
|
45
|
-
this.title = representative.title;
|
|
46
|
-
this.updated_at = representative.updated_at;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var BusinessClassification;
|
|
51
|
-
(function (BusinessClassification) {
|
|
52
|
-
BusinessClassification["sole_proprietor"] = "sole_proprietor";
|
|
53
|
-
BusinessClassification["partnership"] = "partnership";
|
|
54
|
-
BusinessClassification["corporation"] = "corporation";
|
|
55
|
-
BusinessClassification["public_company"] = "public_company";
|
|
56
|
-
BusinessClassification["limited"] = "limited";
|
|
57
|
-
BusinessClassification["non_profit"] = "non_profit";
|
|
58
|
-
BusinessClassification["government"] = "government";
|
|
59
|
-
})(BusinessClassification || (BusinessClassification = {}));
|
|
60
|
-
class Address {
|
|
61
|
-
constructor(address) {
|
|
62
|
-
this.id = address.id;
|
|
63
|
-
this.platform_account_id = address.platform_account_id;
|
|
64
|
-
this.line1 = address.line1;
|
|
65
|
-
this.line2 = address.line2;
|
|
66
|
-
this.postal_code = address.postal_code;
|
|
67
|
-
this.city = address.city;
|
|
68
|
-
this.state = getStateAbbreviation(address.state);
|
|
69
|
-
this.country = address.country || 'USA';
|
|
70
|
-
this.created_at = address.created_at;
|
|
71
|
-
this.updated_at = address.updated_at;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
class AdditionalQuestions {
|
|
75
|
-
constructor(additionalQuestions) {
|
|
76
|
-
this.business_revenue = additionalQuestions.business_revenue;
|
|
77
|
-
this.business_payment_volume = additionalQuestions.business_payment_volume;
|
|
78
|
-
this.business_when_service_received = additionalQuestions.business_when_service_received;
|
|
79
|
-
this.business_recurring_payments = additionalQuestions.business_recurring_payments;
|
|
80
|
-
this.business_recurring_payments_percentage = additionalQuestions.business_recurring_payments_percentage;
|
|
81
|
-
this.business_seasonal = additionalQuestions.business_seasonal;
|
|
82
|
-
this.business_other_payment_details = additionalQuestions.business_other_payment_details;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
class CoreBusinessInfo {
|
|
86
|
-
constructor(coreBusinessInfo) {
|
|
87
|
-
this.classification = coreBusinessInfo.classification;
|
|
88
|
-
this.legal_name = coreBusinessInfo.legal_name;
|
|
89
|
-
this.doing_business_as = coreBusinessInfo.doing_business_as;
|
|
90
|
-
this.industry = coreBusinessInfo.industry;
|
|
91
|
-
this.tax_id = coreBusinessInfo.tax_id;
|
|
92
|
-
this.website_url = coreBusinessInfo.website_url;
|
|
93
|
-
this.email = coreBusinessInfo.email;
|
|
94
|
-
this.phone = coreBusinessInfo.phone;
|
|
95
|
-
this.date_of_incorporation = coreBusinessInfo.date_of_incorporation;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
class Business {
|
|
99
|
-
constructor(business) {
|
|
100
|
-
this.additional_questions = Object.assign({}, new AdditionalQuestions(business.additional_questions || {}));
|
|
101
|
-
this.associated_accounts = business.associated_accounts;
|
|
102
|
-
this.classification = business.classification;
|
|
103
|
-
this.bank_accounts = business.bank_accounts;
|
|
104
|
-
this.created_at = business.created_at;
|
|
105
|
-
this.documents = business.documents;
|
|
106
|
-
this.doing_business_as = business.doing_business_as;
|
|
107
|
-
this.email = business.email;
|
|
108
|
-
this.id = business.id;
|
|
109
|
-
this.industry = business.industry;
|
|
110
|
-
this.legal_address = Object.assign({}, new Address(business.legal_address || {}));
|
|
111
|
-
this.legal_name = business.legal_name;
|
|
112
|
-
this.metadata = business.metadata;
|
|
113
|
-
this.owners = business.owners;
|
|
114
|
-
this.phone = business.phone;
|
|
115
|
-
this.platform_account_id = business.platform_account_id;
|
|
116
|
-
this.product_categories = business.product_categories;
|
|
117
|
-
this.representative = Object.assign({}, new Representative(business.representative || {}));
|
|
118
|
-
this.tax_id = business.tax_id;
|
|
119
|
-
this.terms_conditions_accepted = business.terms_conditions_accepted;
|
|
120
|
-
this.updated_at = business.updated_at;
|
|
121
|
-
this.website_url = business.website_url;
|
|
122
|
-
this.date_of_incorporation = business.date_of_incorporation;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { AdditionalQuestions as A, Business as B, CoreBusinessInfo as C, Owner as O, Representative as R, BusinessClassification as a, Address as b };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { A as Api } from './p-29c0b182.js';
|
|
2
|
-
import './p-56f6ce4c.js';
|
|
3
|
-
import './p-df21aaad.js';
|
|
4
|
-
import './p-e3fab0e2.js';
|
|
5
|
-
import { C as ComponentErrorSeverity } from './p-14c91ffd.js';
|
|
6
|
-
import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
|
|
7
|
-
|
|
8
|
-
class PayoutService {
|
|
9
|
-
async fetchPayouts(accountId, authToken, params) {
|
|
10
|
-
const api = Api({ authToken, apiOrigin: "" });
|
|
11
|
-
const endpoint = `account/${accountId}/payouts`;
|
|
12
|
-
return api.get(endpoint, params);
|
|
13
|
-
}
|
|
14
|
-
async fetchPayout(payoutId, authToken) {
|
|
15
|
-
const api = Api({ authToken, apiOrigin: "" });
|
|
16
|
-
const endpoint = `payouts/${payoutId}`;
|
|
17
|
-
return api.get(endpoint);
|
|
18
|
-
}
|
|
19
|
-
async fetchCSV(payoutId, authToken) {
|
|
20
|
-
const api = Api({ authToken, apiOrigin: "" });
|
|
21
|
-
const endpoint = `reports/payouts/${payoutId}`;
|
|
22
|
-
return api.get(endpoint);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const makeGetPayoutCSV = ({ authToken, service }) => async ({ payoutId, onError }) => {
|
|
27
|
-
try {
|
|
28
|
-
const { data } = await service.fetchCSV(payoutId, authToken);
|
|
29
|
-
const a = document.createElement('a');
|
|
30
|
-
a.href = data.csv_url;
|
|
31
|
-
a.click();
|
|
32
|
-
}
|
|
33
|
-
catch (error) {
|
|
34
|
-
const errorMessage = getErrorMessage(error);
|
|
35
|
-
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
36
|
-
onError({
|
|
37
|
-
error: errorMessage,
|
|
38
|
-
code,
|
|
39
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { PayoutService as P, makeGetPayoutCSV as m };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './p-fad19d75.js';
|
|
2
|
-
|
|
3
|
-
const FormControlErrorText = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.errorText = undefined;
|
|
7
|
-
this.name = undefined;
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
if (!this.errorText) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return (h("small", { class: 'form-text text-danger', id: `form-error-text-${this.name}` }, this.errorText));
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const FormControlHelpText = class {
|
|
18
|
-
constructor(hostRef) {
|
|
19
|
-
registerInstance(this, hostRef);
|
|
20
|
-
this.helpText = undefined;
|
|
21
|
-
this.name = undefined;
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
if (!this.helpText) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
return (h("small", { class: 'form-text text-muted', id: `form-help-text-${this.name}` }, this.helpText));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const SelectInput = class {
|
|
32
|
-
constructor(hostRef) {
|
|
33
|
-
registerInstance(this, hostRef);
|
|
34
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
35
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
36
|
-
this.handleFormControlInput = (event) => {
|
|
37
|
-
const target = event.target;
|
|
38
|
-
const name = target.getAttribute('name');
|
|
39
|
-
this.inputHandler(name, target.value);
|
|
40
|
-
this.formControlInput.emit(target.value);
|
|
41
|
-
};
|
|
42
|
-
this.updateInput = (newValue) => {
|
|
43
|
-
this.selectElement.value = newValue;
|
|
44
|
-
};
|
|
45
|
-
this.label = undefined;
|
|
46
|
-
this.name = undefined;
|
|
47
|
-
this.helpText = undefined;
|
|
48
|
-
this.errorText = undefined;
|
|
49
|
-
this.defaultValue = undefined;
|
|
50
|
-
this.inputHandler = undefined;
|
|
51
|
-
this.options = undefined;
|
|
52
|
-
this.disabled = undefined;
|
|
53
|
-
}
|
|
54
|
-
handleDefaultValueChange(newValue) {
|
|
55
|
-
this.updateInput(newValue);
|
|
56
|
-
}
|
|
57
|
-
componentDidLoad() {
|
|
58
|
-
this.updateInput(this.defaultValue);
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
var _a;
|
|
62
|
-
return (h(Host, { key: '99449e3724103b12af7f2a4573831961074a484a', exportparts: "label,input,input-invalid" }, h("div", { key: 'd73e89d43da9968b687afece24794d9472fec6b5', class: "form-group d-flex flex-column" }, h("label", { key: '6964c55858fc3cf96a137e1061c7f66831105348', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { key: '5b1a09a607ad9638915f5e70f2164f6010020438', ref: el => (this.selectElement = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText ? 'input-invalid' : ''}`, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h("form-control-help-text", { key: '62d862921d463c98e56888293c878624f7311548', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '0b1c4d4752965fb058208c72c7f1c3872d1e0561', errorText: this.errorText, name: this.name }))));
|
|
63
|
-
}
|
|
64
|
-
static get watchers() { return {
|
|
65
|
-
"defaultValue": ["handleDefaultValueChange"]
|
|
66
|
-
}; }
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const TextInput = class {
|
|
70
|
-
constructor(hostRef) {
|
|
71
|
-
registerInstance(this, hostRef);
|
|
72
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
73
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
74
|
-
this.handleFormControlInput = (event) => {
|
|
75
|
-
const target = event.target;
|
|
76
|
-
const name = target.getAttribute('name');
|
|
77
|
-
this.inputHandler(name, target.value);
|
|
78
|
-
this.formControlInput.emit({ name, value: target.value });
|
|
79
|
-
};
|
|
80
|
-
this.updateInput = (newValue) => {
|
|
81
|
-
const inputElement = this.el.querySelector('input');
|
|
82
|
-
if (inputElement) {
|
|
83
|
-
inputElement.value = newValue || '';
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
this.label = undefined;
|
|
87
|
-
this.name = undefined;
|
|
88
|
-
this.helpText = undefined;
|
|
89
|
-
this.errorText = undefined;
|
|
90
|
-
this.defaultValue = undefined;
|
|
91
|
-
this.maxLength = undefined;
|
|
92
|
-
this.inputHandler = undefined;
|
|
93
|
-
this.keyDownHandler = undefined;
|
|
94
|
-
this.disabled = undefined;
|
|
95
|
-
}
|
|
96
|
-
handleDefaultValueChange(newValue) {
|
|
97
|
-
this.updateInput(newValue);
|
|
98
|
-
}
|
|
99
|
-
componentDidLoad() {
|
|
100
|
-
this.updateInput(this.defaultValue);
|
|
101
|
-
}
|
|
102
|
-
render() {
|
|
103
|
-
return (h(Host, { key: '1194532f81831734543bad80860da14f8a5ad856', exportparts: "label,input,input-invalid" }, h("div", { key: '296538cf90b62f8041e21620aa06b4074f68b71a', class: "form-group d-flex flex-column" }, h("label", { key: '7c009ce96124e58f9657dba2565ef298225f10f7', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '4b33cb700aecf4d0a359366ba2e0d248c602d904', id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: `input ${this.errorText ? 'input-invalid ' : ''}${this.disabled ? ' input-disabled' : ''}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h("form-control-help-text", { key: '7a279d72bb262fcb044b5b0cc31703878ce9f444', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '00bea288a99f626806697a98b6dca3f3298dc0b3', errorText: this.errorText, name: this.name }))));
|
|
104
|
-
}
|
|
105
|
-
get el() { return getElement(this); }
|
|
106
|
-
static get watchers() { return {
|
|
107
|
-
"defaultValue": ["handleDefaultValueChange"]
|
|
108
|
-
}; }
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export { FormControlErrorText as form_control_error_text, FormControlHelpText as form_control_help_text, SelectInput as form_control_select, TextInput as form_control_text };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { a as BusinessClassification } from './p-af244664.js';
|
|
2
|
-
|
|
3
|
-
const businessClassificationOptions = [
|
|
4
|
-
{
|
|
5
|
-
label: 'Choose business classification',
|
|
6
|
-
value: '',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
label: 'Sole Proprietor',
|
|
10
|
-
value: BusinessClassification.sole_proprietor,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: 'Partnership',
|
|
14
|
-
value: BusinessClassification.partnership,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
label: 'Corporation',
|
|
18
|
-
value: BusinessClassification.corporation,
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: 'Public Company',
|
|
22
|
-
value: BusinessClassification.public_company,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: 'Limited',
|
|
26
|
-
value: BusinessClassification.limited,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: 'Non Profit',
|
|
30
|
-
value: BusinessClassification.non_profit,
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: 'Government',
|
|
34
|
-
value: BusinessClassification.government,
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
const businessServiceReceivedOptions = [
|
|
38
|
-
{
|
|
39
|
-
label: 'Within 7 days',
|
|
40
|
-
value: 'Within 7 days',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: 'Within 30 days',
|
|
44
|
-
value: 'Within 30 days',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: 'Within 90 days',
|
|
48
|
-
value: 'Within 90 days',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: 'Within 120 days',
|
|
52
|
-
value: 'Within 120 days',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: 'More than 120 days',
|
|
56
|
-
value: 'More than 120 days',
|
|
57
|
-
}
|
|
58
|
-
];
|
|
59
|
-
const recurringPaymentsOptions = [
|
|
60
|
-
{
|
|
61
|
-
label: 'Yes',
|
|
62
|
-
value: 'Yes',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: 'No',
|
|
66
|
-
value: 'No',
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
const seasonalBusinessOptions = [
|
|
70
|
-
{
|
|
71
|
-
label: 'Yes. The majority of the business revenue is generated in 3-6 months.',
|
|
72
|
-
value: 'Yes',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: 'No. The business revenue is generated evenly throughout the year.',
|
|
76
|
-
value: 'No',
|
|
77
|
-
}
|
|
78
|
-
];
|
|
79
|
-
const bankAccountTypeOptions = [
|
|
80
|
-
{
|
|
81
|
-
label: 'Checking',
|
|
82
|
-
value: 'checking',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: 'Savings',
|
|
86
|
-
value: 'savings',
|
|
87
|
-
}
|
|
88
|
-
];
|
|
89
|
-
|
|
90
|
-
export { businessServiceReceivedOptions as a, businessClassificationOptions as b, bankAccountTypeOptions as c, recurringPaymentsOptions as r, seasonalBusinessOptions as s };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { c as create$3, d as create$5, F as FormController } from './p-2eab3c90.js';
|
|
3
|
-
import { A as Api } from './p-29c0b182.js';
|
|
4
|
-
import './p-56f6ce4c.js';
|
|
5
|
-
import './p-df21aaad.js';
|
|
6
|
-
import './p-e3fab0e2.js';
|
|
7
|
-
import { C as CURRENCY_MASK } from './p-525db3e8.js';
|
|
8
|
-
import { S as StyledHost } from './p-ba4bae6f.js';
|
|
9
|
-
|
|
10
|
-
const RefundFormSchema = create$3().shape({
|
|
11
|
-
amount: create$5()
|
|
12
|
-
.required('Amount is required')
|
|
13
|
-
.typeError('Amount must be a number')
|
|
14
|
-
.positive('Amount must be positive')
|
|
15
|
-
.test('amount', 'Refund amount cannot be more than the original payment amount', function (value) {
|
|
16
|
-
return value <= this.options.context.amount;
|
|
17
|
-
})
|
|
18
|
-
.nullable(),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const refundFormCss = ":host{display:block}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}.btn{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.btn:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.btn:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}";
|
|
22
|
-
const JustifiRefundFormStyle0 = refundFormCss;
|
|
23
|
-
|
|
24
|
-
const RefundForm = class {
|
|
25
|
-
constructor(hostRef) {
|
|
26
|
-
registerInstance(this, hostRef);
|
|
27
|
-
this.submitted = createEvent(this, "submitted", 7);
|
|
28
|
-
this.authToken = undefined;
|
|
29
|
-
this.paymentId = undefined;
|
|
30
|
-
this.amount = 0;
|
|
31
|
-
this.submitButtonText = 'Submit';
|
|
32
|
-
this.withButton = undefined;
|
|
33
|
-
this.refundInfoText = undefined;
|
|
34
|
-
this.errors = {};
|
|
35
|
-
this.isSubmitting = false;
|
|
36
|
-
}
|
|
37
|
-
componentWillLoad() {
|
|
38
|
-
this.formController = new FormController(RefundFormSchema);
|
|
39
|
-
this.formController.setInitialValues({
|
|
40
|
-
amount: this.amount,
|
|
41
|
-
message: '',
|
|
42
|
-
});
|
|
43
|
-
this.initializeApi();
|
|
44
|
-
}
|
|
45
|
-
componentDidLoad() {
|
|
46
|
-
this.formController.errors.subscribe(errors => {
|
|
47
|
-
this.errors = Object.assign({}, errors);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Handles the form submission.
|
|
52
|
-
* Prevents the default form action, validates the form, and emits the 'submitted' event.
|
|
53
|
-
*/
|
|
54
|
-
async handleSubmit(event) {
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
this.formController.validateAndSubmit(this.submitRefund.bind(this), {
|
|
57
|
-
amount: this.amount,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Submits the refund request to the API.
|
|
62
|
-
*/
|
|
63
|
-
async submitRefund() {
|
|
64
|
-
this.isSubmitting = true;
|
|
65
|
-
const refundFields = this.formController.values.getValue();
|
|
66
|
-
try {
|
|
67
|
-
await this.api.post(`payments/${this.paymentId}/refunds`, refundFields);
|
|
68
|
-
this.submitted.emit(refundFields);
|
|
69
|
-
}
|
|
70
|
-
catch (error) {
|
|
71
|
-
console.error('Error submitting refund:', error);
|
|
72
|
-
this.submitted.emit(error);
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
this.isSubmitting = false;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Handles input changes, updating the refundFields state.
|
|
80
|
-
*/
|
|
81
|
-
handleInput(field, value) {
|
|
82
|
-
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [field]: value }));
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Initializes the API with the given authentication token.
|
|
86
|
-
* Logs a warning if the auth token is missing.
|
|
87
|
-
*/
|
|
88
|
-
initializeApi() {
|
|
89
|
-
if (!this.authToken) {
|
|
90
|
-
console.warn('Warning: Missing auth-token.');
|
|
91
|
-
}
|
|
92
|
-
this.api = Api({ authToken: this.authToken, apiOrigin: "" });
|
|
93
|
-
}
|
|
94
|
-
render() {
|
|
95
|
-
var _a;
|
|
96
|
-
return (h(StyledHost, { key: '8d31f1a9bf936c9e11f8eca1dc55e614b9fa5939' }, h("h1", { key: 'be589740535ee8a5ab6d4af7151d7ae026f08002' }, "Refund"), this.refundInfoText && (h("div", { key: 'b1d40507dec53bac422f99a3d62678c78c0c2038', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: 'cc76014eef0d826bec5ec09355dc5fc747fd2070', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: 'c2efa0f2acdf3faaa6e2974d0535f48799e3cbbd', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '68220114781378f6507651414c87532171bebb31', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: '075545e9837316fe160760e0dba9a5104654dd2b', class: "form-group" }, h("form-control-monetary", { key: 'c8ff8a822d2b74b2f80b33cd6cd2b42ceebbff11', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '92093284e763466be5138ea6d788145d5d47bd87', class: "form-group" }, h("form-control-text", { key: 'ddf9e221d43d84ad7436261c5755e673224aa82e', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: '58abbbabce09d82da4032ef0e08e6cfac1433153', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '3e703ef633e0d45ba70425dc6d58bcd2d590ce1b', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
RefundForm.style = JustifiRefundFormStyle0;
|
|
100
|
-
|
|
101
|
-
export { RefundForm as justifi_refund_form };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { m as makeGetPayoutCSV, P as PayoutService } from './p-b4b8b531.js';
|
|
3
|
-
import './p-56f6ce4c.js';
|
|
4
|
-
import './p-df21aaad.js';
|
|
5
|
-
import { P as Payout } from './p-e3fab0e2.js';
|
|
6
|
-
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
|
|
7
|
-
import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
|
|
8
|
-
import { E as ErrorState } from './p-dce846bf.js';
|
|
9
|
-
import { J as JustifiAnalytics } from './p-15eafa87.js';
|
|
10
|
-
import './p-29c0b182.js';
|
|
11
|
-
import './p-2e8f4937.js';
|
|
12
|
-
|
|
13
|
-
const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
14
|
-
var _a;
|
|
15
|
-
try {
|
|
16
|
-
const response = await service.fetchPayout(id, authToken);
|
|
17
|
-
if (!response.error) {
|
|
18
|
-
const payout = new Payout(response.data);
|
|
19
|
-
onSuccess(payout);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const errorMessage = getErrorMessage(response.error);
|
|
23
|
-
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
24
|
-
onError({
|
|
25
|
-
error: errorMessage,
|
|
26
|
-
code,
|
|
27
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
const errorMessage = getErrorMessage(error);
|
|
33
|
-
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
34
|
-
onError({
|
|
35
|
-
error: errorMessage,
|
|
36
|
-
code,
|
|
37
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const PayoutDetails = class {
|
|
43
|
-
constructor(hostRef) {
|
|
44
|
-
registerInstance(this, hostRef);
|
|
45
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
46
|
-
this.handleErrorEvent = (event) => {
|
|
47
|
-
this.errorMessage = event.detail.message;
|
|
48
|
-
this.errorEvent.emit(event.detail);
|
|
49
|
-
};
|
|
50
|
-
this.payoutId = undefined;
|
|
51
|
-
this.authToken = undefined;
|
|
52
|
-
this.getPayout = undefined;
|
|
53
|
-
this.getPayoutCSV = undefined;
|
|
54
|
-
this.errorMessage = null;
|
|
55
|
-
}
|
|
56
|
-
componentWillLoad() {
|
|
57
|
-
this.analytics = new JustifiAnalytics(this);
|
|
58
|
-
this.initializeServices();
|
|
59
|
-
}
|
|
60
|
-
disconnectedCallback() {
|
|
61
|
-
this.analytics.cleanup();
|
|
62
|
-
}
|
|
63
|
-
propChanged() {
|
|
64
|
-
this.initializeServices();
|
|
65
|
-
}
|
|
66
|
-
initializeServices() {
|
|
67
|
-
if (this.payoutId && this.authToken) {
|
|
68
|
-
this.getPayout = makeGetPayoutDetails({
|
|
69
|
-
id: this.payoutId,
|
|
70
|
-
authToken: this.authToken,
|
|
71
|
-
service: new PayoutService()
|
|
72
|
-
});
|
|
73
|
-
this.getPayoutCSV = makeGetPayoutCSV({
|
|
74
|
-
authToken: this.authToken,
|
|
75
|
-
service: new PayoutService()
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.errorMessage = 'Failed to load payout details. payoutId or authToken is not provided.';
|
|
80
|
-
this.errorEvent.emit({
|
|
81
|
-
message: this.errorMessage,
|
|
82
|
-
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
83
|
-
severity: ComponentErrorSeverity.ERROR
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
render() {
|
|
88
|
-
if (this.errorMessage) {
|
|
89
|
-
return ErrorState(this.errorMessage);
|
|
90
|
-
}
|
|
91
|
-
return (h("payout-details-core", { getPayout: this.getPayout, getPayoutCSV: this.getPayoutCSV, "onError-event": this.handleErrorEvent }));
|
|
92
|
-
}
|
|
93
|
-
static get watchers() { return {
|
|
94
|
-
"payoutId": ["propChanged"],
|
|
95
|
-
"authToken": ["propChanged"]
|
|
96
|
-
}; }
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export { PayoutDetails as justifi_payout_details };
|