@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,77 +0,0 @@
|
|
|
1
|
-
import { p as packageJson } from './package-ccb774a9.js';
|
|
2
|
-
import { A as Api } from './Api-b09a2f6a.js';
|
|
3
|
-
|
|
4
|
-
class AnalyticsService {
|
|
5
|
-
async record(body) {
|
|
6
|
-
const endpoint = 'analytics';
|
|
7
|
-
return Api({ apiOrigin: "" }).post(endpoint, JSON.stringify(body));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @class JustifiAnalytics
|
|
13
|
-
* @description A class to track analytics for a component
|
|
14
|
-
* @param { component } ComponentInterface - The component to track
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
class JustifiAnalytics {
|
|
18
|
-
constructor(component) {
|
|
19
|
-
this.handleCustomEvent = async (data) => {
|
|
20
|
-
// Track the event
|
|
21
|
-
await this.service.record(data);
|
|
22
|
-
};
|
|
23
|
-
this.service = new AnalyticsService();
|
|
24
|
-
this.componentInstance = component;
|
|
25
|
-
this.setUpBasicData();
|
|
26
|
-
this.setupLifecycleTracking();
|
|
27
|
-
this.trackCustomEvents();
|
|
28
|
-
}
|
|
29
|
-
get resourceId() {
|
|
30
|
-
return (this.componentInstance.accountId ||
|
|
31
|
-
this.componentInstance.businessId ||
|
|
32
|
-
this.componentInstance.paymentId ||
|
|
33
|
-
this.componentInstance.payoutId ||
|
|
34
|
-
this.componentInstance.checkoutId);
|
|
35
|
-
}
|
|
36
|
-
setUpBasicData() {
|
|
37
|
-
this.basicData = {
|
|
38
|
-
component_name: this.componentInstance.tagName,
|
|
39
|
-
component_version: packageJson.version,
|
|
40
|
-
client_user_agent: navigator.userAgent,
|
|
41
|
-
// navigator.platform is deprecated, use navigator.userAgent instead
|
|
42
|
-
client_platform: navigator.userAgent,
|
|
43
|
-
client_origin: window.location.origin,
|
|
44
|
-
resource_id: this.resourceId,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
trackCustomEvents() {
|
|
48
|
-
this.eventEmitters = ['submitted', 'error-event'];
|
|
49
|
-
// for each event, add an event listener
|
|
50
|
-
this.eventEmitters.forEach((eventName) => {
|
|
51
|
-
// if this.componentInstance.addEventListener is a function add the event listener
|
|
52
|
-
if (typeof this.componentInstance.addEventListener === 'function') {
|
|
53
|
-
this.componentInstance.addEventListener(eventName, (event) => this.handleCustomEvent({
|
|
54
|
-
event_type: eventName,
|
|
55
|
-
data: Object.assign(Object.assign({}, this.basicData), { error: event.detail }),
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
setupLifecycleTracking() {
|
|
61
|
-
const originalComponentDidLoad = this.componentInstance.componentDidLoad;
|
|
62
|
-
this.componentInstance.componentDidLoad = () => {
|
|
63
|
-
this.service.record({ event_type: 'init', data: this.basicData });
|
|
64
|
-
if (originalComponentDidLoad) {
|
|
65
|
-
return originalComponentDidLoad.apply(this.componentInstance);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
cleanup() {
|
|
70
|
-
// Remove event listeners
|
|
71
|
-
this.eventEmitters.forEach((event) => {
|
|
72
|
-
this.componentInstance.removeEventListener(event, this.handleCustomEvent);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { JustifiAnalytics as J };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
const name = "@justifi/webcomponents";
|
|
2
|
-
const version = "4.19.3-rc-2";
|
|
3
|
-
const description = "JustiFi Web Components";
|
|
4
|
-
const collection = "dist/collection/collection-manifest.json";
|
|
5
|
-
const main = "dist/index.cjs.js";
|
|
6
|
-
const module = "dist/module/index.js";
|
|
7
|
-
const types = "dist/module/index.d.ts";
|
|
8
|
-
const repository = {
|
|
9
|
-
type: "git",
|
|
10
|
-
url: "git+https://github.com/justifi-tech/web-component-library.git"
|
|
11
|
-
};
|
|
12
|
-
const homepage = "https://storybook.justifi.ai/?path=/docs/introduction--docs";
|
|
13
|
-
const publishConfig = {
|
|
14
|
-
registry: "https://registry.npmjs.org"
|
|
15
|
-
};
|
|
16
|
-
const files = [
|
|
17
|
-
"dist/"
|
|
18
|
-
];
|
|
19
|
-
const scripts = {
|
|
20
|
-
build: "stencil build --docs",
|
|
21
|
-
dev: "stencil build --watch",
|
|
22
|
-
lint: "eslint . --max-warnings 0",
|
|
23
|
-
clean: "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
24
|
-
generate: "stencil generate",
|
|
25
|
-
test: "TZ=utc stencil test --spec",
|
|
26
|
-
"test:watch": "TZ=utc stencil test --spec --watchAll",
|
|
27
|
-
"test:file": "stencil test --spec --watch --"
|
|
28
|
-
};
|
|
29
|
-
const dependencies = {
|
|
30
|
-
"@stencil/core": "^4.0.5",
|
|
31
|
-
"@stencil/store": "^2.0.8",
|
|
32
|
-
bootstrap: "^5.2.3",
|
|
33
|
-
"chart.js": "^4.4.1",
|
|
34
|
-
"date-fns": "^2.29.3",
|
|
35
|
-
"dinero.js": "^1.9.1",
|
|
36
|
-
"iframe-resizer": "^4.3.7",
|
|
37
|
-
imask: "^7.6.0",
|
|
38
|
-
rxjs: "^7.8.1",
|
|
39
|
-
"ts-dedent": "^2.2.0",
|
|
40
|
-
uuid: "^9.0.0",
|
|
41
|
-
yup: "^1.0.0"
|
|
42
|
-
};
|
|
43
|
-
const devDependencies = {
|
|
44
|
-
"@babel/preset-env": "^7.21.5",
|
|
45
|
-
"@babel/preset-react": "^7.18.6",
|
|
46
|
-
"@babel/preset-typescript": "^7.21.5",
|
|
47
|
-
"@rollup/plugin-replace": "^5.0.7",
|
|
48
|
-
"@stencil/sass": "^3.0.1",
|
|
49
|
-
"@types/jest": "27.0.3",
|
|
50
|
-
"@types/react": "^18.0.37",
|
|
51
|
-
"@types/react-dom": "^18.0.11",
|
|
52
|
-
dotenv: "^16.3.1",
|
|
53
|
-
jest: "^29.7.0",
|
|
54
|
-
"jest-cli": "^29.7.0",
|
|
55
|
-
"jest-environment-node": "^29.7.0",
|
|
56
|
-
"ts-jest": "^29.1.2"
|
|
57
|
-
};
|
|
58
|
-
const license = "MIT";
|
|
59
|
-
const gitHead = "507bac1d941eae6e1f56e185ecd9bc9d22637783";
|
|
60
|
-
const packageJson = {
|
|
61
|
-
name: name,
|
|
62
|
-
version: version,
|
|
63
|
-
description: description,
|
|
64
|
-
collection: collection,
|
|
65
|
-
main: main,
|
|
66
|
-
module: module,
|
|
67
|
-
types: types,
|
|
68
|
-
repository: repository,
|
|
69
|
-
homepage: homepage,
|
|
70
|
-
publishConfig: publishConfig,
|
|
71
|
-
files: files,
|
|
72
|
-
scripts: scripts,
|
|
73
|
-
dependencies: dependencies,
|
|
74
|
-
devDependencies: devDependencies,
|
|
75
|
-
license: license,
|
|
76
|
-
gitHead: gitHead
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export { packageJson as p };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// These props should not be sent to the server
|
|
2
|
-
// This function is for the larger business form.
|
|
3
|
-
const parseBusiness = (values, initialValues) => {
|
|
4
|
-
var _a;
|
|
5
|
-
parseCoreInfo(values);
|
|
6
|
-
parseAddressInfo(values.legal_address);
|
|
7
|
-
parseIdentityInfo(values.representative);
|
|
8
|
-
((_a = initialValues.owners) === null || _a === void 0 ? void 0 : _a.length) && delete values.owners;
|
|
9
|
-
return values;
|
|
10
|
-
};
|
|
11
|
-
// These functions are for the stepped business form.
|
|
12
|
-
const parseCoreInfo = (values) => {
|
|
13
|
-
delete values.id;
|
|
14
|
-
delete values.documents;
|
|
15
|
-
delete values.bank_accounts;
|
|
16
|
-
delete values.product_categories;
|
|
17
|
-
delete values.created_at;
|
|
18
|
-
delete values.updated_at;
|
|
19
|
-
delete values.associated_accounts;
|
|
20
|
-
delete values.terms_conditions_accepted;
|
|
21
|
-
return values;
|
|
22
|
-
};
|
|
23
|
-
const parseAddressInfo = (values) => {
|
|
24
|
-
delete values.id;
|
|
25
|
-
delete values.created_at;
|
|
26
|
-
delete values.updated_at;
|
|
27
|
-
return values;
|
|
28
|
-
};
|
|
29
|
-
const parseIdentityInfo = (values) => {
|
|
30
|
-
delete values.id;
|
|
31
|
-
delete values.documents;
|
|
32
|
-
delete values.created_at;
|
|
33
|
-
delete values.updated_at;
|
|
34
|
-
delete values.address.id;
|
|
35
|
-
delete values.address.created_at;
|
|
36
|
-
delete values.address.updated_at;
|
|
37
|
-
delete values.business_id;
|
|
38
|
-
delete values.dob_full;
|
|
39
|
-
delete values.ssn_last4;
|
|
40
|
-
return values;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export { parseBusiness as a, parseIdentityInfo as b, parseAddressInfo as c, parseCoreInfo as p };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './p-fad19d75.js';
|
|
2
|
-
|
|
3
|
-
const FileInput = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
7
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
8
|
-
this.fileSelected = createEvent(this, "fileSelected", 7);
|
|
9
|
-
this.handleFormControlInput = (event) => {
|
|
10
|
-
const target = event.target;
|
|
11
|
-
const name = target.getAttribute('name');
|
|
12
|
-
this.inputHandler(name, target.value);
|
|
13
|
-
this.formControlInput.emit({ name, value: target.value });
|
|
14
|
-
};
|
|
15
|
-
this.changeHandler = () => {
|
|
16
|
-
const inputFileList = this.fileInput.files;
|
|
17
|
-
if (inputFileList) {
|
|
18
|
-
this.fileSelected.emit({
|
|
19
|
-
fileList: inputFileList,
|
|
20
|
-
document_type: this.documentType
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.files = undefined;
|
|
25
|
-
this.fileString = undefined;
|
|
26
|
-
this.label = undefined;
|
|
27
|
-
this.name = undefined;
|
|
28
|
-
this.helpText = undefined;
|
|
29
|
-
this.errorText = undefined;
|
|
30
|
-
this.multiple = undefined;
|
|
31
|
-
this.documentType = undefined;
|
|
32
|
-
this.inputHandler = undefined;
|
|
33
|
-
this.disabled = undefined;
|
|
34
|
-
}
|
|
35
|
-
componentDidLoad() {
|
|
36
|
-
this.fileInput = this.el.querySelector('input');
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
return (h(Host, { key: 'ed29128c1c4c811aa030697347adb88e0143b031', exportparts: "label,input,input-invalid" }, h("div", { key: '6c924bdbbccae8e98a382a92e54c5b9c288de8d4', class: "form-group d-flex flex-column" }, h("label", { key: 'dbacccea94e39815737683495e3df83b514b79af', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: 'a7eef53c9fff54eace8c6960b8c62a833d30bfa3', ref: (el) => this.fileInput = el, type: "file", name: this.name, part: `input ${this.errorText ? 'input-invalid ' : ''}${this.disabled ? ' input-disabled' : ''}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', multiple: this.multiple, disabled: this.disabled, onChange: this.changeHandler, onInput: this.handleFormControlInput, onBlur: () => this.formControlBlur.emit() }), h("form-control-help-text", { key: 'a5abacb92bdb3fb59d0a2265114e858540f2c4b7', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '6eeeef347237d363d3bc6616d58f19a7f0be7e3c', errorText: this.errorText, name: this.name }))));
|
|
40
|
-
}
|
|
41
|
-
get el() { return getElement(this); }
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { FileInput as form_control_file };
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
|
|
2
|
-
import { I as IMask } from './p-1ad5995e.js';
|
|
3
|
-
import { S as StateOptions } from './p-6078a370.js';
|
|
4
|
-
import { n as numberOnlyHandler } from './p-8df7bde8.js';
|
|
5
|
-
|
|
6
|
-
const DateInput = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
10
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
11
|
-
this.handleFormControlInput = (event) => {
|
|
12
|
-
const target = event.target;
|
|
13
|
-
const name = target.getAttribute('name');
|
|
14
|
-
this.inputHandler(name, target.value);
|
|
15
|
-
this.formControlInput.emit({ name, value: target.value });
|
|
16
|
-
};
|
|
17
|
-
this.label = undefined;
|
|
18
|
-
this.name = undefined;
|
|
19
|
-
this.helpText = undefined;
|
|
20
|
-
this.errorText = undefined;
|
|
21
|
-
this.defaultValue = undefined;
|
|
22
|
-
this.inputHandler = undefined;
|
|
23
|
-
this.disabled = undefined;
|
|
24
|
-
}
|
|
25
|
-
handleDefaultValueChange(newValue) {
|
|
26
|
-
this.updateInput(newValue);
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
this.updateInput(this.defaultValue);
|
|
30
|
-
}
|
|
31
|
-
updateInput(value) {
|
|
32
|
-
this.dateInput.value = value;
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (h(Host, { key: 'fa61a426a5a070d951fa425ae42a59add69a9d96', exportparts: "label,input,input-invalid" }, h("label", { key: 'e7679e6a66277a130414b59421b01d1f8e328cf2', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: 'b3fb4afd3181fec3eef3dfb851ab8965cb7bbfe7', type: "date", ref: el => (this.dateInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled }), h("form-control-help-text", { key: 'dbc9ac76d75521a7d1ee5cc34393471521ffa1c2', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '0f9731278250bde69dd7dee9a7b44e339d919774', errorText: this.errorText, name: this.name })));
|
|
36
|
-
}
|
|
37
|
-
static get watchers() { return {
|
|
38
|
-
"defaultValue": ["handleDefaultValueChange"]
|
|
39
|
-
}; }
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const NumberInputMasked = class {
|
|
43
|
-
constructor(hostRef) {
|
|
44
|
-
registerInstance(this, hostRef);
|
|
45
|
-
this.formControlInput = createEvent(this, "formControlInput", 7);
|
|
46
|
-
this.formControlBlur = createEvent(this, "formControlBlur", 7);
|
|
47
|
-
this.imask = null;
|
|
48
|
-
this.initializeIMask = () => {
|
|
49
|
-
if (!this.textInput)
|
|
50
|
-
return;
|
|
51
|
-
this.imask = IMask(this.textInput, {
|
|
52
|
-
mask: this.mask,
|
|
53
|
-
});
|
|
54
|
-
this.imask.on('accept', () => {
|
|
55
|
-
var _a;
|
|
56
|
-
const rawValue = (_a = this.imask) === null || _a === void 0 ? void 0 : _a.unmaskedValue;
|
|
57
|
-
if (rawValue !== undefined) {
|
|
58
|
-
this.inputHandler(this.name, rawValue);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
this.textInput.addEventListener('blur', () => this.formControlBlur.emit());
|
|
62
|
-
};
|
|
63
|
-
this.handleFormControlInput = (event) => {
|
|
64
|
-
const target = event.target;
|
|
65
|
-
const name = target.getAttribute('name');
|
|
66
|
-
this.formControlInput.emit({ name: name, value: target.value });
|
|
67
|
-
};
|
|
68
|
-
this.updateInput = (newValue) => {
|
|
69
|
-
if (this.imask && newValue) {
|
|
70
|
-
this.imask.value = String(newValue);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
this.label = undefined;
|
|
74
|
-
this.name = undefined;
|
|
75
|
-
this.helpText = undefined;
|
|
76
|
-
this.errorText = undefined;
|
|
77
|
-
this.defaultValue = undefined;
|
|
78
|
-
this.inputHandler = undefined;
|
|
79
|
-
this.mask = undefined;
|
|
80
|
-
this.disabled = undefined;
|
|
81
|
-
}
|
|
82
|
-
handleDefaultValueChange(newValue) {
|
|
83
|
-
this.initializeIMask();
|
|
84
|
-
this.updateInput(newValue);
|
|
85
|
-
}
|
|
86
|
-
disconnectedCallback() {
|
|
87
|
-
var _a;
|
|
88
|
-
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
89
|
-
}
|
|
90
|
-
componentDidLoad() {
|
|
91
|
-
if (this.textInput) {
|
|
92
|
-
this.initializeIMask();
|
|
93
|
-
this.updateInput(this.defaultValue);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
render() {
|
|
97
|
-
return (h(Host, { key: 'e0a59308376055c019233f3d4649c9a37af963d2', exportparts: "label,input,input-invalid" }, h("div", { key: '52d9440421342fed6a4f97b57586a43d517ded7d', class: "form-group d-flex flex-column" }, h("label", { key: '8302a9fa1111d3b72600304cd0b1fb2c6239d895', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '86653c7b7f4efb9609bae2ecf69bd5e396bd342b', ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText && 'input-invalid'}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h("form-control-help-text", { key: '71d4d44ff91d06229ccc22e70bc92e0a2050da90', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'b7d42462ae9165acbde68cf59da07eb956a91fd6', errorText: this.errorText, name: this.name }))));
|
|
98
|
-
}
|
|
99
|
-
static get watchers() { return {
|
|
100
|
-
"defaultValue": ["handleDefaultValueChange"]
|
|
101
|
-
}; }
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const IdentityAddressForm = class {
|
|
105
|
-
constructor(hostRef) {
|
|
106
|
-
registerInstance(this, hostRef);
|
|
107
|
-
this.inputHandler = (name, value) => {
|
|
108
|
-
this.address[name] = value;
|
|
109
|
-
this.address = Object.assign({}, this.address);
|
|
110
|
-
};
|
|
111
|
-
this.handleFormUpdate = undefined;
|
|
112
|
-
this.errors = undefined;
|
|
113
|
-
this.defaultValues = undefined;
|
|
114
|
-
this.address = {};
|
|
115
|
-
}
|
|
116
|
-
handleAddressChange(newValues) {
|
|
117
|
-
this.handleFormUpdate(newValues);
|
|
118
|
-
}
|
|
119
|
-
render() {
|
|
120
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
121
|
-
return (h(Host, { key: 'd090676d3bb1d9de9ae947ff25d94b5985ace914', exportparts: "label,input,input-invalid" }, h("div", { key: '64ddec6db508d27b709ad551f60fe58494631fe3', class: "row gy-3" }, h("div", { key: '7e0f89b7b8d5a466b89efad75498c5d1f2cac8ea', class: "col-12 col-md-8" }, h("form-control-text", { key: 'ea6055fb3457e28666b11b72173ad70b83a87659', name: "line1", label: "Street Address", defaultValue: (_a = this.defaultValues) === null || _a === void 0 ? void 0 : _a.line1, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line1, inputHandler: this.inputHandler })), h("div", { key: '5f6f456c573fb9318e58976decb67274b209fa23', class: "col-12 col-md-4" }, h("form-control-text", { key: '86fffd4641953d0445a7c24d332cda513121b65e', name: "line2", label: "Apartment, Suite, etc. (optional)", defaultValue: (_c = this.defaultValues) === null || _c === void 0 ? void 0 : _c.line2, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.line2, inputHandler: this.inputHandler })), h("div", { key: 'e06339cefebe37ae0629631fbc5101c9dbc040a6', class: "col-12" }, h("form-control-text", { key: 'd2af696b33092247b6741c8034aaf12ab51aa878', name: "city", label: "City", defaultValue: (_e = this.defaultValues) === null || _e === void 0 ? void 0 : _e.city, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.city, inputHandler: this.inputHandler })), h("div", { key: 'b655a66fb68f059fa91ae5f9f60fdebe0ae04fad', class: "col-12 col-md-6" }, h("form-control-select", { key: '50a65861a5a39daac199571c5a0273340556e476', name: "state", label: "State", defaultValue: (_g = this.defaultValues) === null || _g === void 0 ? void 0 : _g.state, options: StateOptions, errorText: (_h = this.errors) === null || _h === void 0 ? void 0 : _h.state, inputHandler: this.inputHandler })), h("div", { key: '30255517e0fa1ede35d7b2525625ebc389c44525', class: "col-12 col-md-6" }, h("form-control-text", { key: 'b7b0a773c7b2dbe05c4bf8e9fc7235a01bf36832', name: "postal_code", label: "Postal Code", defaultValue: (_j = this.defaultValues) === null || _j === void 0 ? void 0 : _j.postal_code, errorText: (_k = this.errors) === null || _k === void 0 ? void 0 : _k.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler, inputHandler: this.inputHandler })), h("div", { key: '804e9aa1ca7b4ae167ae64969107ad6352559ed7', class: "col-12" }, h("form-control-select", { key: '1aa3734e10502bc8f1732f386b60135b8a7d94a6', name: "country", label: "Country", options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: (_l = this.defaultValues) === null || _l === void 0 ? void 0 : _l.country, errorText: (_m = this.errors) === null || _m === void 0 ? void 0 : _m.country,
|
|
122
|
-
// just for now so we skip handling country specificities
|
|
123
|
-
disabled: true })))));
|
|
124
|
-
}
|
|
125
|
-
static get watchers() { return {
|
|
126
|
-
"address": ["handleAddressChange"]
|
|
127
|
-
}; }
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
export { DateInput as form_control_date, NumberInputMasked as form_control_number_masked, IdentityAddressForm as justifi_identity_address_form };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { d as MapPayoutStatusToBadge, f as formatCurrency, b as formatDate, c as formatTime } 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 PayoutDetailsCore = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
10
|
-
this.downloadCSV = () => {
|
|
11
|
-
this.getPayoutCSV({
|
|
12
|
-
payoutId: this.payout.id,
|
|
13
|
-
onError: ({ error, code, severity }) => {
|
|
14
|
-
this.errorMessage = error;
|
|
15
|
-
this.errorEvent.emit({
|
|
16
|
-
message: error,
|
|
17
|
-
errorCode: code,
|
|
18
|
-
severity,
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
this.getPayout = undefined;
|
|
24
|
-
this.getPayoutCSV = undefined;
|
|
25
|
-
this.payout = undefined;
|
|
26
|
-
this.loading = true;
|
|
27
|
-
this.errorMessage = null;
|
|
28
|
-
}
|
|
29
|
-
componentWillLoad() {
|
|
30
|
-
if (this.getPayout) {
|
|
31
|
-
this.fetchData();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
getPayoutWatcher() {
|
|
35
|
-
this.fetchData();
|
|
36
|
-
}
|
|
37
|
-
fetchData() {
|
|
38
|
-
this.loading = true;
|
|
39
|
-
this.getPayout({
|
|
40
|
-
onSuccess: (payout) => {
|
|
41
|
-
this.errorMessage = null;
|
|
42
|
-
this.payout = payout;
|
|
43
|
-
this.loading = false;
|
|
44
|
-
},
|
|
45
|
-
onError: ({ error, code, severity }) => {
|
|
46
|
-
this.errorMessage = error;
|
|
47
|
-
this.errorEvent.emit({
|
|
48
|
-
message: error,
|
|
49
|
-
errorCode: code,
|
|
50
|
-
severity,
|
|
51
|
-
});
|
|
52
|
-
this.loading = false;
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
57
|
-
var _a;
|
|
58
|
-
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 })))))));
|
|
59
|
-
}
|
|
60
|
-
static get watchers() { return {
|
|
61
|
-
"getPayout": ["getPayoutWatcher"]
|
|
62
|
-
}; }
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export { PayoutDetailsCore as payout_details_core };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { A as Api } from './p-29c0b182.js';
|
|
2
|
-
|
|
3
|
-
class BusinessService {
|
|
4
|
-
async fetchBusiness(businessId, authToken) {
|
|
5
|
-
const endpoint = `entities/business/${businessId}`;
|
|
6
|
-
return Api({ authToken, apiOrigin: "" }).get(endpoint);
|
|
7
|
-
}
|
|
8
|
-
async patchBusiness(authToken, businessId, payload) {
|
|
9
|
-
const endpoint = `entities/business/${businessId}`;
|
|
10
|
-
return Api({ authToken, apiOrigin: "" }).patch(endpoint, payload);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
class IdentityService {
|
|
14
|
-
async fetchIdentity(identityId, authToken) {
|
|
15
|
-
const endpoint = `entities/identity/${identityId}`;
|
|
16
|
-
return Api({ authToken, apiOrigin: "" }).get(endpoint);
|
|
17
|
-
}
|
|
18
|
-
async patchIdentity(authToken, identityId, payload) {
|
|
19
|
-
const endpoint = `entities/identity/${identityId}`;
|
|
20
|
-
return Api({ authToken, apiOrigin: "" }).patch(endpoint, payload);
|
|
21
|
-
}
|
|
22
|
-
async postIdentity(authToken, payload) {
|
|
23
|
-
const endpoint = `entities/identity`;
|
|
24
|
-
return Api({ authToken, apiOrigin: "" }).post(endpoint, payload);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { BusinessService as B, IdentityService as I };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
|
|
2
|
-
import { A as Api } from './p-29c0b182.js';
|
|
3
|
-
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
|
|
4
|
-
import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
|
|
5
|
-
import { E as ErrorState } from './p-dce846bf.js';
|
|
6
|
-
import { J as JustifiAnalytics } from './p-15eafa87.js';
|
|
7
|
-
import './p-2e8f4937.js';
|
|
8
|
-
|
|
9
|
-
class ReportsService {
|
|
10
|
-
async fetchGrossVolumeChartData(accountId, authToken) {
|
|
11
|
-
const api = Api({ authToken: authToken, apiOrigin: "" });
|
|
12
|
-
const endpoint = `account/${accountId}/reports/gross_volume`;
|
|
13
|
-
return api.get(endpoint);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const makeGetGrossPaymentChartData = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
|
|
18
|
-
var _a;
|
|
19
|
-
try {
|
|
20
|
-
const response = await service.fetchGrossVolumeChartData(id, authToken);
|
|
21
|
-
if (!response.error) {
|
|
22
|
-
onSuccess(response.data);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
const errorMessage = getErrorMessage(response.error);
|
|
26
|
-
const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
|
|
27
|
-
onError({
|
|
28
|
-
error: errorMessage,
|
|
29
|
-
code,
|
|
30
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
|
|
36
|
-
const errorMessage = getErrorMessage(error);
|
|
37
|
-
onError({
|
|
38
|
-
error: errorMessage,
|
|
39
|
-
code,
|
|
40
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const GrossPaymentChart = class {
|
|
46
|
-
constructor(hostRef) {
|
|
47
|
-
registerInstance(this, hostRef);
|
|
48
|
-
this.errorEvent = createEvent(this, "error-event", 7);
|
|
49
|
-
this.handleErrorEvent = (event) => {
|
|
50
|
-
this.errorMessage = event.detail.message;
|
|
51
|
-
this.errorEvent.emit(event.detail);
|
|
52
|
-
};
|
|
53
|
-
this.accountId = undefined;
|
|
54
|
-
this.authToken = undefined;
|
|
55
|
-
this.getGrossPayment = undefined;
|
|
56
|
-
this.errorMessage = null;
|
|
57
|
-
}
|
|
58
|
-
componentWillLoad() {
|
|
59
|
-
this.analytics = new JustifiAnalytics(this);
|
|
60
|
-
this.initializeGetGrossPayment();
|
|
61
|
-
}
|
|
62
|
-
disconnectedCallback() {
|
|
63
|
-
this.analytics.cleanup();
|
|
64
|
-
}
|
|
65
|
-
propChanged() {
|
|
66
|
-
this.initializeGetGrossPayment();
|
|
67
|
-
}
|
|
68
|
-
initializeGetGrossPayment() {
|
|
69
|
-
if (this.accountId && this.authToken) {
|
|
70
|
-
this.getGrossPayment = makeGetGrossPaymentChartData({
|
|
71
|
-
id: this.accountId,
|
|
72
|
-
authToken: this.authToken,
|
|
73
|
-
service: new ReportsService(),
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
this.errorMessage = 'Account ID and Auth Token are required';
|
|
78
|
-
this.errorEvent.emit({
|
|
79
|
-
errorCode: ComponentErrorCodes.MISSING_PROPS,
|
|
80
|
-
message: this.errorMessage,
|
|
81
|
-
severity: ComponentErrorSeverity.ERROR,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
render() {
|
|
86
|
-
if (this.errorMessage) {
|
|
87
|
-
return ErrorState(this.errorMessage);
|
|
88
|
-
}
|
|
89
|
-
return (h("gross-payment-chart-core", { getGrossPayment: this.getGrossPayment, "onError-event": this.handleErrorEvent }));
|
|
90
|
-
}
|
|
91
|
-
static get watchers() { return {
|
|
92
|
-
"accountId": ["propChanged"],
|
|
93
|
-
"authToken": ["propChanged"]
|
|
94
|
-
}; }
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export { GrossPaymentChart as justifi_gross_payment_chart };
|