@justifi/webcomponents 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-7303478d.js → Api-d2df6e84.js} +16 -4
- package/dist/cjs/Api-d2df6e84.js.map +1 -0
- package/dist/cjs/Payout-4906a445.js +116 -0
- package/dist/cjs/Payout-4906a445.js.map +1 -0
- package/dist/cjs/{business-form-schema-63b311b2.js → business-form-schema-725ec6f5.js} +40 -22
- package/dist/cjs/business-form-schema-725ec6f5.js.map +1 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +107 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js +65 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js.map +1 -0
- package/dist/cjs/{form-control-select_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +99 -12
- package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -0
- package/dist/cjs/form-control-select.cjs.entry.js +47 -0
- package/dist/cjs/form-control-select.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-83b2ec02.js → index-3533152c.js} +10 -6
- package/dist/cjs/index-3533152c.js.map +1 -0
- package/dist/cjs/index-5a880722.js +3233 -0
- package/dist/cjs/index-5a880722.js.map +1 -0
- package/dist/cjs/{index.esm-7e12ce07.js → index.esm-84a0a7a8.js} +1 -19
- package/dist/cjs/index.esm-84a0a7a8.js.map +1 -0
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +396 -0
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +98 -16
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-list.cjs.entry.js +189 -0
- package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-details.cjs.entry.js +30 -0
- package/dist/cjs/justifi-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js +63 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1487 -19
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +49 -47
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payout-details.cjs.entry.js +61 -0
- package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +64 -54
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +156 -0
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-table.cjs.entry.js +68 -0
- package/dist/cjs/justifi-table.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +1 -1
- package/dist/cjs/table-utils-617126e5.js +13 -0
- package/dist/cjs/table-utils-617126e5.js.map +1 -0
- package/dist/cjs/{utils-4ee7e080.js → utils-0fd61dbd.js} +43 -104
- package/dist/cjs/utils-0fd61dbd.js.map +1 -0
- package/dist/cjs/utils-d95b09c2.js +35 -0
- package/dist/cjs/utils-d95b09c2.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/cjs/webcomponents.cjs.js.map +1 -1
- package/dist/collection/api/Api.js +15 -3
- package/dist/collection/api/Api.js.map +1 -1
- package/dist/collection/api/Business.js +50 -0
- package/dist/collection/api/Business.js.map +1 -0
- package/dist/collection/api/Payment.js.map +1 -1
- package/dist/collection/api/Payout.js +9 -0
- package/dist/collection/api/Payout.js.map +1 -1
- package/dist/collection/api/Proceed.js +42 -0
- package/dist/collection/api/Proceed.js.map +1 -0
- package/dist/collection/api/shared.js +2 -0
- package/dist/collection/api/shared.js.map +1 -0
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +6 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -1
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +8 -0
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
- package/dist/collection/components/business-form/additional-questions/additional-questions.js +59 -0
- package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -0
- package/dist/collection/components/business-form/business-address/business-address-form.js +1 -1
- package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -1
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js +22 -18
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -1
- package/dist/collection/components/business-form/business-form-schema.js +48 -37
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-form.css +5283 -43
- package/dist/collection/components/business-form/business-form.js +83 -6
- package/dist/collection/components/business-form/business-form.js.map +1 -1
- package/dist/collection/components/business-form/{businessForm.stories.js → business-form.stories.js} +8 -8
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +10 -17
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
- package/dist/collection/components/business-form/business-owners/business-owners.css +5283 -0
- package/dist/collection/components/business-form/business-owners/business-owners.js +48 -37
- package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js +12 -17
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
- package/dist/collection/components/business-form/test/business-form.spec.js +44 -0
- package/dist/collection/components/business-form/test/business-form.spec.js.map +1 -0
- package/dist/collection/components/business-list/business-list.css +576 -0
- package/dist/collection/components/business-list/business-list.js +209 -0
- package/dist/collection/components/business-list/business-list.js.map +1 -0
- package/dist/collection/components/business-list/business-list.stories.js +68 -0
- package/dist/collection/components/business-list/business-list.stories.js.map +1 -0
- package/dist/collection/components/business-list/example.js +12 -0
- package/dist/collection/components/card-form/card-form.js +6 -1
- package/dist/collection/components/card-form/card-form.js.map +1 -1
- package/dist/collection/components/card-form/card-form.stories.js +8 -0
- package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
- package/dist/collection/components/details/details.css +7983 -0
- package/dist/collection/components/details/details.js +66 -0
- package/dist/collection/components/details/details.js.map +1 -0
- package/dist/collection/components/details/utils.js +10 -0
- package/dist/collection/components/details/utils.js.map +1 -0
- package/dist/collection/components/form/form-control-datepart.js +233 -0
- package/dist/collection/components/form/form-control-datepart.js.map +1 -0
- package/dist/collection/components/form/form-control-monetary.js +186 -0
- package/dist/collection/components/form/form-control-monetary.js.map +1 -0
- package/dist/collection/components/form/form-control-number-masked.js +217 -0
- package/dist/collection/components/form/form-control-number-masked.js.map +1 -0
- package/dist/collection/components/form/form-control-number.css +1818 -0
- package/dist/collection/components/form/form-control-number.js +194 -0
- package/dist/collection/components/form/form-control-number.js.map +1 -0
- package/dist/collection/components/form/form-control-select.css +6 -0
- package/dist/collection/components/form/form-control-select.js +36 -4
- package/dist/collection/components/form/form-control-select.js.map +1 -1
- package/dist/collection/components/form/form-control-text.css +7 -0
- package/dist/collection/components/form/form-control-text.js +45 -3
- package/dist/collection/components/form/form-control-text.js.map +1 -1
- package/dist/collection/components/form/form.js +16 -8
- package/dist/collection/components/form/form.js.map +1 -1
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js +11 -0
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +1 -0
- package/dist/collection/components/legal-address-form/legal-address-form.css +2489 -0
- package/dist/collection/components/legal-address-form/legal-address-form.js +90 -0
- package/dist/collection/components/legal-address-form/legal-address-form.js.map +1 -0
- package/dist/collection/components/payment-details/example.js +12 -0
- package/dist/collection/components/payment-details/payment-details.css +7983 -0
- package/dist/collection/components/payment-details/payment-details.js +129 -0
- package/dist/collection/components/payment-details/payment-details.js.map +1 -0
- package/dist/collection/components/payment-details/payment-details.stories.js +47 -0
- package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -0
- package/dist/collection/components/payment-method-form/payment-method-form.css +5 -0
- package/dist/collection/components/payment-method-form/payment-method-form.js +25 -35
- package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +7 -7
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.css +0 -7380
- package/dist/collection/components/payments-list/payments-list.js +69 -43
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +10 -10
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
- package/dist/collection/components/payments-list/test/payments-list.spec.js +3 -54
- package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
- package/dist/collection/components/payout-details/example.js +12 -0
- package/dist/collection/components/payout-details/payout-details.css +7983 -0
- package/dist/collection/components/payout-details/payout-details.js +126 -0
- package/dist/collection/components/payout-details/payout-details.js.map +1 -0
- package/dist/collection/components/payout-details/payout-details.stories.js +47 -0
- package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -0
- package/dist/collection/components/payouts-list/example.js +12 -0
- package/dist/collection/components/payouts-list/payouts-list.css +0 -7407
- package/dist/collection/components/payouts-list/payouts-list.js +82 -48
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.stories.js +10 -10
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
- package/dist/collection/components/proceeds-list/example.js +12 -0
- package/dist/collection/components/proceeds-list/proceeds-list.css +576 -0
- package/dist/collection/components/proceeds-list/proceeds-list.js +207 -0
- package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -0
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +69 -0
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -0
- package/dist/collection/components/table/table-utils.js +8 -0
- package/dist/collection/components/table/table-utils.js.map +1 -0
- package/dist/collection/components/table/table.css +8077 -0
- package/dist/collection/components/table/table.js +215 -0
- package/dist/collection/components/table/table.js.map +1 -0
- package/dist/collection/components/table/test/table.spec.js +59 -0
- package/dist/collection/components/table/test/table.spec.js.map +1 -0
- package/dist/collection/utils/country-options.js +202 -0
- package/dist/collection/utils/country-options.js.map +1 -0
- package/dist/collection/utils/phone-masks.js +4 -0
- package/dist/collection/utils/phone-masks.js.map +1 -0
- package/dist/collection/utils/utils.js +40 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +15 -3
- package/dist/components/Api.js.map +1 -1
- package/dist/components/Payout.js +113 -0
- package/dist/components/Payout.js.map +1 -0
- package/dist/components/additional-questions.js +51 -0
- package/dist/components/additional-questions.js.map +1 -0
- package/dist/components/business-address-form.js +8 -2
- package/dist/components/business-address-form.js.map +1 -1
- package/dist/components/business-generic-info.js +61 -35
- package/dist/components/business-generic-info.js.map +1 -1
- package/dist/components/business-owners.js +52 -36
- package/dist/components/business-owners.js.map +1 -1
- package/dist/components/business-representative.js +31 -15
- package/dist/components/business-representative.js.map +1 -1
- package/dist/components/details.js +66 -0
- package/dist/components/details.js.map +1 -0
- package/dist/components/form-control-datepart.d.ts +11 -0
- package/dist/components/form-control-datepart.js +8 -0
- package/dist/components/form-control-datepart.js.map +1 -0
- package/dist/components/form-control-datepart2.js +97 -0
- package/dist/components/form-control-datepart2.js.map +1 -0
- package/dist/components/form-control-monetary.d.ts +11 -0
- package/dist/components/form-control-monetary.js +8 -0
- package/dist/components/form-control-monetary.js.map +1 -0
- package/dist/components/form-control-monetary2.js +82 -0
- package/dist/components/form-control-monetary2.js.map +1 -0
- package/dist/components/form-control-number-masked.d.ts +11 -0
- package/dist/components/form-control-number-masked.js +8 -0
- package/dist/components/form-control-number-masked.js.map +1 -0
- package/dist/components/form-control-number-masked2.js +81 -0
- package/dist/components/form-control-number-masked2.js.map +1 -0
- package/dist/components/form-control-number.d.ts +11 -0
- package/dist/components/form-control-number.js +8 -0
- package/dist/components/form-control-number.js.map +1 -0
- package/dist/components/form-control-number2.js +70 -0
- package/dist/components/form-control-number2.js.map +1 -0
- package/dist/components/form-control-select.js +2 -2
- package/dist/components/form-control-select2.js +20 -7
- package/dist/components/form-control-select2.js.map +1 -1
- package/dist/components/form-control-text2.js +23 -4
- package/dist/components/form-control-text2.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.esm.js +1 -18
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +3231 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/justifi-additional-questions.d.ts +11 -0
- package/dist/components/justifi-additional-questions.js +8 -0
- package/dist/components/justifi-additional-questions.js.map +1 -0
- package/dist/components/justifi-bank-account-form.js +2 -0
- package/dist/components/justifi-bank-account-form.js.map +1 -1
- package/dist/components/justifi-business-form.js +146 -28
- package/dist/components/justifi-business-form.js.map +1 -1
- package/dist/components/justifi-business-generic-info.js +1 -1
- package/dist/components/justifi-business-list.d.ts +11 -0
- package/dist/components/justifi-business-list.js +215 -0
- package/dist/components/justifi-business-list.js.map +1 -0
- package/dist/components/justifi-card-form.js +2 -0
- package/dist/components/justifi-card-form.js.map +1 -1
- package/dist/components/justifi-details.d.ts +11 -0
- package/dist/components/justifi-details.js +8 -0
- package/dist/components/justifi-details.js.map +1 -0
- package/dist/components/justifi-legal-address-form.d.ts +11 -0
- package/dist/components/justifi-legal-address-form.js +8 -0
- package/dist/components/justifi-legal-address-form.js.map +1 -0
- package/dist/components/justifi-payment-details.d.ts +11 -0
- package/dist/components/justifi-payment-details.js +88 -0
- package/dist/components/justifi-payment-details.js.map +1 -0
- package/dist/components/justifi-payment-form.js +2 -1
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +52 -45
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payout-details.d.ts +11 -0
- package/dist/components/justifi-payout-details.js +86 -0
- package/dist/components/justifi-payout-details.js.map +1 -0
- package/dist/components/justifi-payouts-list.js +65 -50
- package/dist/components/justifi-payouts-list.js.map +1 -1
- package/dist/components/justifi-proceeds-list.d.ts +11 -0
- package/dist/components/justifi-proceeds-list.js +182 -0
- package/dist/components/justifi-proceeds-list.js.map +1 -0
- package/dist/components/justifi-table.d.ts +11 -0
- package/dist/components/justifi-table.js +8 -0
- package/dist/components/justifi-table.js.map +1 -0
- package/dist/components/legal-address-form.js +271 -0
- package/dist/components/legal-address-form.js.map +1 -0
- package/dist/components/payment-method-form.js +1488 -21
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/phone-masks.js +7 -0
- package/dist/components/phone-masks.js.map +1 -0
- package/dist/components/table.js +94 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/utils.js +41 -102
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/{Api-436dfa09.js → Api-a95f17ac.js} +16 -4
- package/dist/esm/Api-a95f17ac.js.map +1 -0
- package/dist/esm/Payout-9a1f2859.js +113 -0
- package/dist/esm/Payout-9a1f2859.js.map +1 -0
- package/dist/esm/{business-form-schema-30c48693.js → business-form-schema-5885d3d6.js} +40 -22
- package/dist/esm/business-form-schema-5885d3d6.js.map +1 -0
- package/dist/esm/form-control-datepart_2.entry.js +102 -0
- package/dist/esm/form-control-datepart_2.entry.js.map +1 -0
- package/dist/esm/form-control-monetary.entry.js +61 -0
- package/dist/esm/form-control-monetary.entry.js.map +1 -0
- package/dist/esm/{form-control-select_2.entry.js → form-control-number_3.entry.js} +98 -12
- package/dist/esm/form-control-number_3.entry.js.map +1 -0
- package/dist/esm/form-control-select.entry.js +43 -0
- package/dist/esm/form-control-select.entry.js.map +1 -0
- package/dist/esm/index-5ed53c20.js +3231 -0
- package/dist/esm/index-5ed53c20.js.map +1 -0
- package/dist/esm/{index-c8f391de.js → index-fe877d03.js} +10 -7
- package/dist/esm/index-fe877d03.js.map +1 -0
- package/dist/esm/{index.esm-be2cd327.js → index.esm-89fe6af9.js} +2 -19
- package/dist/esm/index.esm-89fe6af9.js.map +1 -0
- package/dist/esm/justifi-additional-questions_5.entry.js +388 -0
- package/dist/esm/justifi-additional-questions_5.entry.js.map +1 -0
- package/dist/esm/justifi-bank-account-form.entry.js +3 -1
- package/dist/esm/justifi-bank-account-form.entry.js.map +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +98 -16
- package/dist/esm/justifi-business-form.entry.js.map +1 -1
- package/dist/esm/justifi-business-list.entry.js +185 -0
- package/dist/esm/justifi-business-list.entry.js.map +1 -0
- package/dist/esm/justifi-card-form.entry.js +3 -1
- package/dist/esm/justifi-card-form.entry.js.map +1 -1
- package/dist/esm/justifi-details.entry.js +26 -0
- package/dist/esm/justifi-details.entry.js.map +1 -0
- package/dist/esm/justifi-payment-details.entry.js +59 -0
- package/dist/esm/justifi-payment-details.entry.js.map +1 -0
- package/dist/esm/justifi-payment-form.entry.js +3 -2
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +1487 -19
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +47 -45
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payout-details.entry.js +57 -0
- package/dist/esm/justifi-payout-details.entry.js.map +1 -0
- package/dist/esm/justifi-payouts-list.entry.js +60 -50
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
- package/dist/esm/justifi-proceeds-list.entry.js +152 -0
- package/dist/esm/justifi-proceeds-list.entry.js.map +1 -0
- package/dist/esm/justifi-table.entry.js +64 -0
- package/dist/esm/justifi-table.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/select-input_2.entry.js +1 -1
- package/dist/esm/table-utils-6cdcaa8c.js +11 -0
- package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
- package/dist/esm/utils-1e7d6279.js +28 -0
- package/dist/esm/utils-1e7d6279.js.map +1 -0
- package/dist/esm/{utils-e7782126.js → utils-ad0bbe03.js} +42 -103
- package/dist/esm/utils-ad0bbe03.js.map +1 -0
- package/dist/esm/webcomponents.js +4 -4
- package/dist/esm/webcomponents.js.map +1 -1
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/Business.d.ts +133 -0
- package/dist/types/api/Payment.d.ts +1 -0
- package/dist/types/api/Payout.d.ts +10 -12
- package/dist/types/api/Proceed.d.ts +60 -0
- package/dist/types/api/shared.d.ts +11 -0
- package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +6 -0
- package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
- package/dist/types/components/business-form/business-form-schema.d.ts +47 -21
- package/dist/types/components/business-form/business-form.d.ts +7 -2
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +1 -2
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +3 -2
- package/dist/types/components/business-form/business-representative/business-representative.d.ts +1 -2
- package/dist/types/components/business-list/business-list.d.ts +35 -0
- package/dist/types/components/business-list/business-list.stories.d.ts +9 -0
- package/dist/types/components/card-form/card-form.stories.d.ts +6 -0
- package/dist/types/components/details/details.d.ts +7 -0
- package/dist/types/components/details/utils.d.ts +19 -0
- package/dist/types/components/form/form-control-datepart.d.ts +19 -0
- package/dist/types/components/form/form-control-monetary.d.ts +17 -0
- package/dist/types/components/form/form-control-number-masked.d.ts +19 -0
- package/dist/types/components/form/form-control-number.d.ts +18 -0
- package/dist/types/components/form/form-control-select.d.ts +6 -1
- package/dist/types/components/form/form-control-text.d.ts +6 -0
- package/dist/types/components/form/form.d.ts +5 -4
- package/dist/types/components/legal-address-form/legal-address-form-schema.d.ts +17 -0
- package/dist/types/components/legal-address-form/legal-address-form.d.ts +16 -0
- package/dist/types/components/payment-details/payment-details.d.ts +28 -0
- package/dist/types/components/payment-details/payment-details.stories.d.ts +8 -0
- package/dist/types/components/payment-method-form/payment-method-form.d.ts +1 -3
- package/dist/types/components/payments-list/payments-list.d.ts +6 -14
- package/dist/types/components/payments-list/payments-list.stories.d.ts +1 -8
- package/dist/types/components/payout-details/payout-details.d.ts +28 -0
- package/dist/types/components/payout-details/payout-details.stories.d.ts +8 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +7 -15
- package/dist/types/components/payouts-list/payouts-list.stories.d.ts +1 -8
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +37 -0
- package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +9 -0
- package/dist/types/components/table/table-utils.d.ts +14 -0
- package/dist/types/components/table/table.d.ts +28 -0
- package/dist/types/components.d.ts +637 -12
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/dist/types/utils/country-options.d.ts +5 -0
- package/dist/types/utils/phone-masks.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/dist/webcomponents/{p-1953797f.entry.js → p-1beaaba3.entry.js} +2 -2
- package/dist/webcomponents/{p-33d69eb5.entry.js → p-2b6f5e35.entry.js} +2 -2
- package/dist/webcomponents/p-2b6f5e35.entry.js.map +1 -0
- package/dist/webcomponents/p-2c2cde2d.js +2 -0
- package/dist/webcomponents/p-2c2cde2d.js.map +1 -0
- package/dist/webcomponents/p-2e66512d.entry.js +2 -0
- package/dist/webcomponents/p-2e66512d.entry.js.map +1 -0
- package/dist/webcomponents/p-640bfa9f.entry.js +2 -0
- package/dist/webcomponents/p-640bfa9f.entry.js.map +1 -0
- package/dist/webcomponents/p-641883b2.entry.js +2 -0
- package/dist/webcomponents/p-641883b2.entry.js.map +1 -0
- package/dist/webcomponents/p-6d549d84.entry.js +2 -0
- package/dist/webcomponents/p-6d549d84.entry.js.map +1 -0
- package/dist/webcomponents/p-75292cca.entry.js +2 -0
- package/dist/webcomponents/p-75292cca.entry.js.map +1 -0
- package/dist/webcomponents/p-7d6c309d.entry.js +2 -0
- package/dist/webcomponents/p-7d6c309d.entry.js.map +1 -0
- package/dist/webcomponents/p-8f421dc6.js +2 -0
- package/dist/webcomponents/p-8f421dc6.js.map +1 -0
- package/dist/webcomponents/p-9346ae33.js +2 -0
- package/dist/webcomponents/p-9346ae33.js.map +1 -0
- package/dist/webcomponents/p-a2aae7c9.entry.js +2 -0
- package/dist/webcomponents/p-a2aae7c9.entry.js.map +1 -0
- package/dist/webcomponents/{p-23e9c7d4.entry.js → p-a922b908.entry.js} +2 -2
- package/dist/webcomponents/p-ab0756ff.js +2 -0
- package/dist/webcomponents/p-ab0756ff.js.map +1 -0
- package/dist/webcomponents/{p-0fd4aae2.js → p-c46241ba.js} +2 -2
- package/dist/webcomponents/p-c46241ba.js.map +1 -0
- package/dist/webcomponents/p-ccb0e1c5.js +2 -0
- package/dist/webcomponents/p-ccb0e1c5.js.map +1 -0
- package/dist/webcomponents/{p-d5cadc78.entry.js → p-cd0eca25.entry.js} +2 -2
- package/dist/webcomponents/{p-d5cadc78.entry.js.map → p-cd0eca25.entry.js.map} +1 -1
- package/dist/webcomponents/{p-7041a637.entry.js → p-d92116e6.entry.js} +2 -2
- package/dist/webcomponents/{p-7041a637.entry.js.map → p-d92116e6.entry.js.map} +1 -1
- package/dist/webcomponents/p-da4e6389.entry.js +2 -0
- package/dist/webcomponents/p-da4e6389.entry.js.map +1 -0
- package/dist/webcomponents/p-db9945b1.entry.js +2 -0
- package/dist/webcomponents/p-db9945b1.entry.js.map +1 -0
- package/dist/webcomponents/p-e1f6c8ec.entry.js +2 -0
- package/dist/webcomponents/p-e1f6c8ec.entry.js.map +1 -0
- package/dist/webcomponents/p-e6695628.js +2 -0
- package/dist/webcomponents/p-e6695628.js.map +1 -0
- package/dist/webcomponents/p-e70b2a21.js +3 -0
- package/dist/webcomponents/p-e70b2a21.js.map +1 -0
- package/dist/webcomponents/p-ee32a236.entry.js +2 -0
- package/dist/webcomponents/p-ee32a236.entry.js.map +1 -0
- package/dist/webcomponents/p-f6cc37a6.entry.js +2 -0
- package/dist/webcomponents/{p-309a886f.entry.js.map → p-f6cc37a6.entry.js.map} +1 -1
- package/dist/webcomponents/p-f72c3084.entry.js +2 -0
- package/dist/webcomponents/p-f72c3084.entry.js.map +1 -0
- package/dist/webcomponents/p-f8067330.entry.js +2 -0
- package/dist/webcomponents/p-f8067330.entry.js.map +1 -0
- package/dist/webcomponents/p-f9e127a5.js +2 -0
- package/dist/webcomponents/p-f9e127a5.js.map +1 -0
- package/dist/webcomponents/p-fe2ec58b.entry.js +2 -0
- package/dist/webcomponents/p-fe2ec58b.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/package.json +8 -5
- package/dist/cjs/Api-7303478d.js.map +0 -1
- package/dist/cjs/business-form-schema-63b311b2.js.map +0 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js.map +0 -1
- package/dist/cjs/index-83b2ec02.js.map +0 -1
- package/dist/cjs/index.esm-7e12ce07.js.map +0 -1
- package/dist/cjs/justifi-business-address-form.cjs.entry.js +0 -37
- package/dist/cjs/justifi-business-address-form.cjs.entry.js.map +0 -1
- package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js +0 -148
- package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js.map +0 -1
- package/dist/cjs/utils-4ee7e080.js.map +0 -1
- package/dist/collection/components/business-form/businessForm.stories.js.map +0 -1
- package/dist/esm/Api-436dfa09.js.map +0 -1
- package/dist/esm/business-form-schema-30c48693.js.map +0 -1
- package/dist/esm/form-control-select_2.entry.js.map +0 -1
- package/dist/esm/index-c8f391de.js.map +0 -1
- package/dist/esm/index.esm-be2cd327.js.map +0 -1
- package/dist/esm/justifi-business-address-form.entry.js +0 -33
- package/dist/esm/justifi-business-address-form.entry.js.map +0 -1
- package/dist/esm/justifi-business-generic-info_3.entry.js +0 -142
- package/dist/esm/justifi-business-generic-info_3.entry.js.map +0 -1
- package/dist/esm/utils-e7782126.js.map +0 -1
- package/dist/webcomponents/p-0fd4aae2.js.map +0 -1
- package/dist/webcomponents/p-1a1f2196.js +0 -2
- package/dist/webcomponents/p-1a1f2196.js.map +0 -1
- package/dist/webcomponents/p-309a886f.entry.js +0 -2
- package/dist/webcomponents/p-33d69eb5.entry.js.map +0 -1
- package/dist/webcomponents/p-3a80a2ec.entry.js +0 -2
- package/dist/webcomponents/p-3a80a2ec.entry.js.map +0 -1
- package/dist/webcomponents/p-45fea6a8.entry.js +0 -2
- package/dist/webcomponents/p-45fea6a8.entry.js.map +0 -1
- package/dist/webcomponents/p-79456add.js +0 -2
- package/dist/webcomponents/p-79456add.js.map +0 -1
- package/dist/webcomponents/p-af080b21.js +0 -2
- package/dist/webcomponents/p-af080b21.js.map +0 -1
- package/dist/webcomponents/p-bc969904.js +0 -3
- package/dist/webcomponents/p-bc969904.js.map +0 -1
- package/dist/webcomponents/p-cd097ce9.entry.js +0 -2
- package/dist/webcomponents/p-cd097ce9.entry.js.map +0 -1
- package/dist/webcomponents/p-d5bc9f22.entry.js +0 -2
- package/dist/webcomponents/p-d5bc9f22.entry.js.map +0 -1
- package/dist/webcomponents/p-dd1ebc0b.entry.js +0 -2
- package/dist/webcomponents/p-dd1ebc0b.entry.js.map +0 -1
- package/dist/webcomponents/p-e05e0c6b.entry.js +0 -2
- package/dist/webcomponents/p-e05e0c6b.entry.js.map +0 -1
- /package/dist/types/components/business-form/{businessForm.stories.d.ts → business-form.stories.d.ts} +0 -0
- /package/dist/webcomponents/{p-1953797f.entry.js.map → p-1beaaba3.entry.js.map} +0 -0
- /package/dist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AAC,UAAU;IAAE,OAAO,EAAE,CAAC;EAC3B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;EAClC,OAAO,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,0BAA0B;;EACxC,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;EACvD,OAAO,CAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,gBAAgB,CAAC,wBAAwB,CAAC,0CAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAI,IAAI,CAAC;AAC1H,CAAC","sourcesContent":["import { format } from 'date-fns';\nimport Dinero from 'dinero.js';\n\nexport function formatCurrency(amount: number, withSymbol = true): string {\n if (!amount) amount = 0;\n\n function format(amount: number): string {\n const formattedString = withSymbol ? '$0,0.00' : '0,0.00';\n return Dinero({ amount: amount, currency: 'USD' }).toFormat(formattedString);\n }\n\n return amount < 0 ? `(${format(-amount)})` : format(amount);\n}\n\nexport function formatDate(dateString: string | Date): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'MMM d, yyyy');\n}\n\nexport function formatTime(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mmaaa');\n}\n\nexport function formatTimeSeconds(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mm:ssaaa');\n}\n\nexport function extractComputedFontsToLoad() {\n const computedStyles = getComputedStyle(document.body);\n return computedStyles?.getPropertyValue('--jfi-load-google-font')?.trim().replace(/'|\"/g, '').replace(' ', '+') || null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,MAAM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.js';\n\nexport function formatCurrency(amount: number, withSymbol = true): string {\n if (!amount) amount = 0;\n\n function format(amount: number): string {\n const formattedString = withSymbol ? '$0,0.00' : '0,0.00';\n return Dinero({ amount: amount, currency: 'USD' }).toFormat(formattedString);\n }\n\n return amount < 0 ? `(${format(-amount)})` : format(amount);\n}\n\nexport function formatDate(dateString: string | Date): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'MMM d, yyyy');\n}\n\nexport function formatTime(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mmaaa');\n}\n\nexport function formatTimeSeconds(dateString: string): string {\n if (!dateString) return '';\n const date = new Date(dateString);\n return format(date, 'h:mm:ssaaa');\n}\n\nexport function extractComputedFontsToLoad() {\n const computedStyles = getComputedStyle(document.body);\n return computedStyles?.getPropertyValue('--jfi-load-google-font')?.trim().replace(/'|\"/g, '').replace(' ', '+') || null;\n}\n\nexport const MapPaymentStatusToBadge = (status: string) => {\n switch (status) {\n case \"authorized\":\n return \"<span class='badge bg-primary' title='This card payment was authorized, but not captured. It could still succeed or fail.'>Authorized</span>\";\n case \"disputed\":\n return \"<span class='badge bg-primary' title='The account holder disputed this payment. The amount has been returned and a fee assessed.'>Disputed</span>\";\n case \"achFailed\":\n return \"<span class='badge bg-danger' title='The funds couldn't be collected for this ACH payment (in addition to the original payment, an ACH return and fee will appear in a payout)'>Failed</span>\";\n case \"failed\":\n return \"<span class='badge bg-danger' title='This card payment didn't go through (it won't appear in a payout)'>Failed</span>\";\n case \"fully_refunded\":\n return \"<span class='badge bg-primary' title='The full amount of this payment has been refunded'>Fully Refunded</span>\";\n case \"partially_refunded\":\n return \"<span class='badge bg-primary' title='A portion of this payment has been refunded'>Partially Refunded</span>\";\n case \"pending\":\n return \"<span class='badge bg-secondary' title='This ACH payment was processed, but the funds haven't settled. It could still succeed or fail.'>Pending</span>\";\n case \"succeeded\":\n return \"<span class='badge bg-success' title='This payment was successfully captured'>Successful</span>\";\n }\n};\n\nexport const MapPayoutStatusToBadge = (status: string) => {\n switch (status) {\n case \"canceled\":\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Canceled</span>\";\n case \"failed\":\n return \"<span class='badge bg-danger' title='Transfer to your bank account failed'>Failed</span>\";\n case \"forwarded\":\n return \"<span class='badge bg-secondary' title='This payout initially failed; the funds have been forwarded to your next successful payout'>Forwarded</span>\";\n case \"in_transit\":\n return \"<span class='badge bg-primary' title='Transfer to your bank account has been initiated'>In Transit</span>\";\n case \"paid\":\n return \"<span class='badge bg-success' title='Successfully deposited into your bank account'>Paid</span>\";\n case \"pending\":\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Pending</span>\";\n case \"scheduled\":\n return \"<span class='badge bg-primary' title='Batched and scheduled to be transferred'>Scheduled</span>\";\n case \"withdrawn\":\n return \"<span class='badge bg-success' title='Negative payout balance successfully withdrawn from your bank account'>Withdrawn</span>\";\n }\n};\n"]}
|
package/dist/components/Api.js
CHANGED
|
@@ -63,9 +63,9 @@ function v4(options, buf, offset) {
|
|
|
63
63
|
return unsafeStringify(rnds);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
const Api = (authToken) => {
|
|
66
|
+
const Api = (authToken, customApiOrigin) => {
|
|
67
67
|
const originFromEnv = process.env.API_ORIGIN;
|
|
68
|
-
const apiOrigin = originFromEnv || 'https://justifi.ai';
|
|
68
|
+
const apiOrigin = customApiOrigin || originFromEnv || 'https://justifi.ai';
|
|
69
69
|
async function getAuthorizationHeader() {
|
|
70
70
|
return {
|
|
71
71
|
'Authorization': `Bearer ${authToken}`,
|
|
@@ -75,7 +75,19 @@ const Api = (authToken) => {
|
|
|
75
75
|
}
|
|
76
76
|
async function makeRequest(endpoint, method, params, body, signal) {
|
|
77
77
|
const url = `${apiOrigin}/v1/${endpoint}`;
|
|
78
|
-
|
|
78
|
+
let cursor;
|
|
79
|
+
if (params === null || params === void 0 ? void 0 : params.paging) {
|
|
80
|
+
cursor = (params === null || params === void 0 ? void 0 : params.paging) && (params === null || params === void 0 ? void 0 : params.direction) ? `${params.direction === 'prev'
|
|
81
|
+
? '&before_cursor=' + params.paging.start_cursor
|
|
82
|
+
: params.direction === 'next'
|
|
83
|
+
? '&after_cursor=' + params.paging.end_cursor
|
|
84
|
+
: ''}` : null;
|
|
85
|
+
delete params.paging;
|
|
86
|
+
}
|
|
87
|
+
if (params === null || params === void 0 ? void 0 : params.direction) {
|
|
88
|
+
delete params.direction;
|
|
89
|
+
}
|
|
90
|
+
const requestUrl = params ? `${url}?${new URLSearchParams(params)}${cursor ? '&' + cursor : ''}` : url;
|
|
79
91
|
const response = await fetch(requestUrl, {
|
|
80
92
|
method: method,
|
|
81
93
|
headers: await getAuthorizationHeader(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"Api.js","mappings":"AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrH;AACA,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC,CAAC;AAClI,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC;;AChBA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB;AACA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAAE;AAC9B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAA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AE,MAAY,EAAE,MAAoB;IACzE,OAAO,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;GAC9D;EAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AACvC,EAAE;AAEF,SAAS,WAAW,CAAC,UAAkB;EACrC,OAAO,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;AACrD;;;;","names":["uuidv4"],"sources":["../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","src/api/Api.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\nimport { IPagination } from './Pagination';\n\nexport interface IApiResponse<T> {\n data: T;\n error?: IErrorObject | IServerError;\n page_info?: IPagination;\n errors?: string[];\n id: number;\n type: string;\n}\n\nexport type IServerError = string;\n\nexport interface IErrorObject {\n message: string;\n code: string;\n param?: string;\n}\n\nexport interface IApiResponseCollection<T> extends IApiResponse<T> {\n page_info: IPagination;\n}\n\nconst Api = (authToken: string) => {\n const originFromEnv = process.env.API_ORIGIN;\n const apiOrigin = originFromEnv || 'https://justifi.ai';\n\n async function getAuthorizationHeader() {\n return {\n 'Authorization': `Bearer ${authToken}`,\n 'Idempotency-Key': uuidv4(),\n 'Content-Type': 'application/json',\n };\n }\n\n async function makeRequest(endpoint: string, method: string, params?: any, body?: any, signal?: AbortSignal) {\n const url = `${apiOrigin}/v1/${endpoint}`;\n const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;\n const response = await fetch(requestUrl, {\n method: method,\n headers: await getAuthorizationHeader(),\n body: body,\n signal: signal,\n });\n\n if (response) {\n return response.status === 204 ? {} : response.json();\n }\n handleError(requestUrl);\n }\n\n async function get(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'GET', params, null, signal);\n }\n\n async function post(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'POST', params, body, signal);\n }\n\n async function patch(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'PATCH', params, body, signal);\n }\n\n async function destroy(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'DELETE', params, null, signal);\n }\n\n return { get, post, patch, destroy };\n};\n\nfunction handleError(requestUrl: string): void {\n console.error(`Error fetching from ${requestUrl}`);\n}\n\nexport default Api;\n"],"version":3}
|
|
1
|
+
{"file":"Api.js","mappings":"AAAA;AACA;AACA;AACA,IAAI,eAAe,CAAC;AACpB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AAClB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACrH;AACA,IAAI,IAAI,CAA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ACvC,EAAE;AAEF,SAAS,WAAW,CAAC,UAAkB;EACrC,OAAO,CAAC,KAAK,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;AACrD;;;;","names":["uuidv4"],"sources":["../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","src/api/Api.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\nimport { IPagination } from './Pagination';\n\nexport interface IApiResponse<T> {\n data: T;\n error?: IErrorObject | IServerError;\n page_info?: IPagination;\n errors?: string[];\n id: number;\n type: string;\n}\n\nexport type IServerError = string;\n\nexport interface IErrorObject {\n message: string;\n code: string;\n param?: string;\n}\n\nexport interface IApiResponseCollection<T> extends IApiResponse<T> {\n page_info: IPagination;\n}\n\nconst Api = (authToken: string, customApiOrigin?: string) => {\n const originFromEnv = process.env.API_ORIGIN;\n const apiOrigin = customApiOrigin || originFromEnv || 'https://justifi.ai';\n\n async function getAuthorizationHeader() {\n return {\n 'Authorization': `Bearer ${authToken}`,\n 'Idempotency-Key': uuidv4(),\n 'Content-Type': 'application/json',\n };\n }\n\n async function makeRequest(endpoint: string, method: string, params?: any, body?: any, signal?: AbortSignal) {\n const url = `${apiOrigin}/v1/${endpoint}`;\n let cursor;\n if (params?.paging) {\n cursor = params?.paging && params?.direction ? `${\n params.direction === 'prev'\n ? '&before_cursor='+params.paging.start_cursor\n : params.direction === 'next'\n ? '&after_cursor='+params.paging.end_cursor\n : ''\n }` : null;\n delete params.paging;\n }\n if (params?.direction) {\n delete params.direction;\n }\n const requestUrl = params ? `${url}?${new URLSearchParams(params)}${cursor ? '&'+cursor : ''}` : url;\n const response = await fetch(requestUrl, {\n method: method,\n headers: await getAuthorizationHeader(),\n body: body,\n signal: signal,\n });\n\n if (response) {\n return response.status === 204 ? {} : response.json();\n }\n handleError(requestUrl);\n }\n\n async function get(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'GET', params, null, signal);\n }\n\n async function post(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'POST', params, body, signal);\n }\n\n async function patch(endpoint: string, body?: any, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'PATCH', params, body, signal);\n }\n\n async function destroy(endpoint: string, params?: any, signal?: AbortSignal) {\n return makeRequest(endpoint, 'DELETE', params, null, signal);\n }\n\n return { get, post, patch, destroy };\n};\n\nfunction handleError(requestUrl: string): void {\n console.error(`Error fetching from ${requestUrl}`);\n}\n\nexport default Api;\n"],"version":3}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var CaptureStrategy;
|
|
2
|
+
(function (CaptureStrategy) {
|
|
3
|
+
CaptureStrategy["automatic"] = "automatic";
|
|
4
|
+
CaptureStrategy["manual"] = "manual";
|
|
5
|
+
})(CaptureStrategy || (CaptureStrategy = {}));
|
|
6
|
+
var PaymentMethodTypes;
|
|
7
|
+
(function (PaymentMethodTypes) {
|
|
8
|
+
PaymentMethodTypes["card"] = "card";
|
|
9
|
+
PaymentMethodTypes["bankAccount"] = "bankAccount";
|
|
10
|
+
})(PaymentMethodTypes || (PaymentMethodTypes = {}));
|
|
11
|
+
var PaymentStatuses;
|
|
12
|
+
(function (PaymentStatuses) {
|
|
13
|
+
PaymentStatuses["pending"] = "pending";
|
|
14
|
+
PaymentStatuses["authorized"] = "authorized";
|
|
15
|
+
PaymentStatuses["succeeded"] = "succeeded";
|
|
16
|
+
PaymentStatuses["failed"] = "failed";
|
|
17
|
+
PaymentStatuses["disputed"] = "disputed";
|
|
18
|
+
PaymentStatuses["fully_refunded"] = "fully_refunded";
|
|
19
|
+
PaymentStatuses["partially_refunded"] = "partially_refunded";
|
|
20
|
+
})(PaymentStatuses || (PaymentStatuses = {}));
|
|
21
|
+
var PaymentDisputedStatuses;
|
|
22
|
+
(function (PaymentDisputedStatuses) {
|
|
23
|
+
// if a dispute is 'won', we don't show a dispute status, just general status
|
|
24
|
+
PaymentDisputedStatuses["lost"] = "lost";
|
|
25
|
+
PaymentDisputedStatuses["open"] = "open";
|
|
26
|
+
})(PaymentDisputedStatuses || (PaymentDisputedStatuses = {}));
|
|
27
|
+
class Payment {
|
|
28
|
+
constructor(payment) {
|
|
29
|
+
this.id = payment.id;
|
|
30
|
+
this.account_id = payment.account_id;
|
|
31
|
+
this.amount = payment.amount;
|
|
32
|
+
this.amount_disputed = payment.amount_disputed;
|
|
33
|
+
this.amount_refundable = payment.amount_refundable;
|
|
34
|
+
this.amount_refunded = payment.amount_refunded;
|
|
35
|
+
this.balance = payment.balance;
|
|
36
|
+
this.captured = payment.captured;
|
|
37
|
+
this.capture_strategy = payment.capture_strategy;
|
|
38
|
+
this.currency = payment.currency;
|
|
39
|
+
this.description = payment.description;
|
|
40
|
+
this.disputed = payment.disputed;
|
|
41
|
+
this.disputes = payment.disputes;
|
|
42
|
+
this.error_code = payment.error_code;
|
|
43
|
+
this.error_description = payment.error_description;
|
|
44
|
+
this.fee_amount = payment.fee_amount;
|
|
45
|
+
this.is_test = payment.is_test;
|
|
46
|
+
this.metadata = payment.metadata;
|
|
47
|
+
this.payment_method = payment.payment_method;
|
|
48
|
+
this.payment_intent_id = payment.payment_intent_id;
|
|
49
|
+
this.refunded = payment.refunded;
|
|
50
|
+
this.status = payment.status;
|
|
51
|
+
this.created_at = payment.created_at;
|
|
52
|
+
this.updated_at = payment.updated_at;
|
|
53
|
+
}
|
|
54
|
+
get disputedStatus() {
|
|
55
|
+
const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);
|
|
56
|
+
// if a dispute is 'won', we don't show a dispute status, just general status
|
|
57
|
+
if (!this.disputed) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
else if (lost) {
|
|
61
|
+
return PaymentDisputedStatuses.lost;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return PaymentDisputedStatuses.open;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var PayoutStatuses;
|
|
70
|
+
(function (PayoutStatuses) {
|
|
71
|
+
PayoutStatuses["paid"] = "paid";
|
|
72
|
+
PayoutStatuses["failed"] = "failed";
|
|
73
|
+
PayoutStatuses["forwarded"] = "forwarded";
|
|
74
|
+
PayoutStatuses["scheduled"] = "scheduled";
|
|
75
|
+
PayoutStatuses["in_transit"] = "in_transit";
|
|
76
|
+
PayoutStatuses["canceled"] = "canceled";
|
|
77
|
+
})(PayoutStatuses || (PayoutStatuses = {}));
|
|
78
|
+
var PayoutStatusesSafeNames;
|
|
79
|
+
(function (PayoutStatusesSafeNames) {
|
|
80
|
+
PayoutStatusesSafeNames["paid"] = "Paid";
|
|
81
|
+
PayoutStatusesSafeNames["failed"] = "Failed";
|
|
82
|
+
PayoutStatusesSafeNames["forwarded"] = "Forwarded";
|
|
83
|
+
PayoutStatusesSafeNames["scheduled"] = "Scheduled";
|
|
84
|
+
PayoutStatusesSafeNames["in_transit"] = "In Transit";
|
|
85
|
+
PayoutStatusesSafeNames["canceled"] = "Canceled";
|
|
86
|
+
})(PayoutStatusesSafeNames || (PayoutStatusesSafeNames = {}));
|
|
87
|
+
class Payout {
|
|
88
|
+
constructor(payout) {
|
|
89
|
+
this.id = payout.id;
|
|
90
|
+
this.account_id = payout.account_id;
|
|
91
|
+
this.amount = payout.amount;
|
|
92
|
+
this.bank_account = payout.bank_account;
|
|
93
|
+
this.currency = payout.currency;
|
|
94
|
+
this.delivery_method = payout.delivery_method || 'standard';
|
|
95
|
+
this.description = payout.description;
|
|
96
|
+
this.deposits_at = payout.deposits_at;
|
|
97
|
+
this.fees_total = payout.fees_total;
|
|
98
|
+
this.refunds_count = payout.refunds_count;
|
|
99
|
+
this.refunds_total = payout.refunds_total;
|
|
100
|
+
this.payments_count = payout.payments_count;
|
|
101
|
+
this.payments_total = payout.payments_total;
|
|
102
|
+
this.payout_type = payout.payout_type;
|
|
103
|
+
this.other_total = payout.other_total;
|
|
104
|
+
this.status = payout.status;
|
|
105
|
+
this.metadata = payout.metadata;
|
|
106
|
+
this.created_at = payout.created_at;
|
|
107
|
+
this.updated_at = payout.updated_at;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { PaymentMethodTypes as P, Payment as a, PayoutStatuses as b, PayoutStatusesSafeNames as c, Payout as d };
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=Payout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"Payout.js","mappings":"AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;AACnB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;IAEW;AAAZ,WAAY,kBAAkB;EAC5B,mCAAa,CAAA;EACb,iDAA2B,CAAA;AAC7B,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,IAAY,eAQX;AARD,WAAY,eAAe;EACzB,sCAAmB,CAAA;EACnB,4CAAyB,CAAA;EACzB,0CAAuB,CAAA;EACvB,oCAAiB,CAAA;EACjB,wC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CAAC,UAAU,CAAC;IACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACxC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAChC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,UAAU,CAAC;IAC5D,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACpC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC1C,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;IAC1C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC5C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC5C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACpC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;GACrC;;;;;","names":[],"sources":["src/api/Payment.ts","src/api/Payout.ts"],"sourcesContent":["export enum CaptureStrategy {\n automatic = 'automatic',\n manual = 'manual',\n}\n\nexport enum PaymentMethodTypes {\n card = 'card',\n bankAccount = 'bankAccount',\n}\n\nexport enum PaymentStatuses {\n pending = 'pending',\n authorized = 'authorized',\n succeeded = 'succeeded',\n failed = 'failed',\n disputed = 'disputed',\n fully_refunded = 'fully_refunded',\n partially_refunded = 'partially_refunded',\n}\n\nexport enum PaymentDisputedStatuses {\n // if a dispute is 'won', we don't show a dispute status, just general status\n lost = 'lost',\n open = 'open',\n}\n\nexport interface IPaymentMethod {\n card?: ICard;\n}\n\nexport type CardBrand = 'american_express' | 'diners_club' | 'discover' | 'jcb' | 'mastercard' | 'china_unionpay' | 'visa' | 'unknown';\n\nexport interface ICard {\n id: string;\n acct_last_four: string;\n name: string;\n brand: CardBrand;\n token: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface IDispute {\n amount_cents: number;\n created_at: string;\n currency: string;\n gateway_ref_id: string;\n id: string;\n payment_id: string;\n reason: null;\n status: string;\n updated_at: string;\n}\n\nexport interface IPayment {\n id: string;\n account_id: string;\n amount: number;\n amount_disputed: number;\n amount_refundable: number;\n amount_refunded: number;\n balance: number;\n captured: boolean;\n capture_strategy: CaptureStrategy;\n currency: 'usd';\n description: string;\n disputed: boolean;\n disputes: IDispute[];\n error_code: string | null;\n error_description: string | null;\n fee_amount: number;\n is_test: boolean;\n metadata: Object | null;\n payment_method: IPaymentMethod;\n payment_intent_id: string | null;\n refunded: boolean;\n status: PaymentStatuses;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payment implements IPayment {\n public id: string;\n public account_id: string;\n public amount: number;\n public amount_disputed: number;\n public amount_refundable: number;\n public amount_refunded: number;\n public balance: number;\n public captured: boolean;\n public capture_strategy: CaptureStrategy;\n public currency: 'usd';\n public description: string;\n public disputed: boolean;\n public disputes: IDispute[];\n public error_code: string | null;\n public error_description: string | null;\n public fee_amount: number;\n public is_test: boolean;\n public metadata: Object | null;\n public payment_method: IPaymentMethod;\n public payment_intent_id: string | null;\n public refunded: boolean;\n public status: PaymentStatuses;\n public created_at: string;\n public updated_at: string;\n public statement_descriptor?: string;\n\n constructor(payment: IPayment) {\n this.id = payment.id;\n this.account_id = payment.account_id;\n this.amount = payment.amount;\n this.amount_disputed = payment.amount_disputed;\n this.amount_refundable = payment.amount_refundable;\n this.amount_refunded = payment.amount_refunded;\n this.balance = payment.balance;\n this.captured = payment.captured;\n this.capture_strategy = payment.capture_strategy;\n this.currency = payment.currency;\n this.description = payment.description;\n this.disputed = payment.disputed;\n this.disputes = payment.disputes;\n this.error_code = payment.error_code;\n this.error_description = payment.error_description;\n this.fee_amount = payment.fee_amount;\n this.is_test = payment.is_test;\n this.metadata = payment.metadata;\n this.payment_method = payment.payment_method;\n this.payment_intent_id = payment.payment_intent_id;\n this.refunded = payment.refunded;\n this.status = payment.status;\n this.created_at = payment.created_at;\n this.updated_at = payment.updated_at;\n }\n\n get disputedStatus(): PaymentDisputedStatuses | null {\n const lost = this.disputes.some(dispute => dispute.status === PaymentDisputedStatuses.lost);\n // if a dispute is 'won', we don't show a dispute status, just general status\n if (!this.disputed) {\n return null;\n } else if (lost) {\n return PaymentDisputedStatuses.lost;\n } else {\n return PaymentDisputedStatuses.open;\n }\n }\n}\n","import { BankAccount } from \"./shared\";\n\nexport enum PayoutStatuses {\n paid = 'paid',\n failed = 'failed',\n forwarded = 'forwarded',\n scheduled = 'scheduled',\n in_transit = 'in_transit',\n canceled = 'canceled',\n}\n\nexport enum PayoutStatusesSafeNames {\n paid = 'Paid',\n failed = 'Failed',\n forwarded = 'Forwarded',\n scheduled = 'Scheduled',\n in_transit = 'In Transit',\n canceled = 'Canceled',\n}\n\nexport interface IPayout {\n id: string;\n account_id: string;\n amount: number;\n bank_account: BankAccount;\n currency: 'usd';\n delivery_method: string;\n description: string;\n deposits_at: string;\n fees_total: number;\n refunds_count: number;\n refunds_total: number;\n payments_count: number;\n payments_total: number;\n payout_type: 'ach' | 'cc';\n other_total: number;\n status: PayoutStatuses;\n metadata: any;\n created_at: string;\n updated_at: string;\n}\n\nexport class Payout implements IPayout {\n public id: string;\n public account_id: string;\n public amount: number;\n public bank_account: BankAccount;\n public currency: 'usd';\n public delivery_method: string;\n public description: string;\n public deposits_at: string;\n public fees_total: number;\n public refunds_count: number;\n public refunds_total: number;\n public payments_count: number;\n public payments_total: number;\n public payout_type: 'ach' | 'cc';\n public other_total: number;\n public status: PayoutStatuses;\n public metadata: any;\n public created_at: string;\n public updated_at: string;\n\n constructor(payout: IPayout) {\n this.id = payout.id;\n this.account_id = payout.account_id;\n this.amount = payout.amount;\n this.bank_account = payout.bank_account;\n this.currency = payout.currency;\n this.delivery_method = payout.delivery_method || 'standard';\n this.description = payout.description;\n this.deposits_at = payout.deposits_at;\n this.fees_total = payout.fees_total;\n this.refunds_count = payout.refunds_count;\n this.refunds_total = payout.refunds_total;\n this.payments_count = payout.payments_count;\n this.payments_total = payout.payments_total;\n this.payout_type = payout.payout_type;\n this.other_total = payout.other_total;\n this.status = payout.status;\n this.metadata = payout.metadata;\n this.created_at = payout.created_at;\n this.updated_at = payout.updated_at;\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './form-control-monetary2.js';
|
|
3
|
+
|
|
4
|
+
const AdditionalQuestions = /*@__PURE__*/ proxyCustomElement(class AdditionalQuestions extends HTMLElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.__registerHost();
|
|
8
|
+
this.formController = undefined;
|
|
9
|
+
this.errors = {};
|
|
10
|
+
this.additional_questions = {};
|
|
11
|
+
this.inputHandler = this.inputHandler.bind(this);
|
|
12
|
+
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
|
|
15
|
+
this.formController.values.subscribe(values => (this.additional_questions = Object.assign({}, values.additional_questions)));
|
|
16
|
+
}
|
|
17
|
+
inputHandler(name, value) {
|
|
18
|
+
this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { additional_questions: Object.assign(Object.assign({}, this.formController.values.getValue().additional_questions), { [name]: value }) }));
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
22
|
+
const additionalQuestionsDefaultValue = this.formController.getInitialValues().additional_questions;
|
|
23
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-monetary", { name: "business_revenue", label: "Business Revenue", inputHandler: this.inputHandler, error: (_b = (_a = this.errors) === null || _a === void 0 ? void 0 : _a.additional_questions) === null || _b === void 0 ? void 0 : _b.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue })), h("div", { class: "col-12" }, h("form-control-monetary", { name: "business_payment_volume", label: "Business Payment Volume", inputHandler: this.inputHandler, error: (_d = (_c = this.errors) === null || _c === void 0 ? void 0 : _c.additional_questions) === null || _d === void 0 ? void 0 : _d.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume })), h("div", { class: "col-12" }, h("form-control-monetary", { name: "business_dispute_volume", label: "Business Dispute Volume", inputHandler: this.inputHandler, error: (_f = (_e = this.errors) === null || _e === void 0 ? void 0 : _e.additional_questions) === null || _f === void 0 ? void 0 : _f.business_dispute_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_dispute_volume })), h("div", { class: "col-12" }, h("form-control-monetary", { name: "business_receivable_volume", label: "Business Receivable Volume", inputHandler: this.inputHandler, error: (_h = (_g = this.errors) === null || _g === void 0 ? void 0 : _g.additional_questions) === null || _h === void 0 ? void 0 : _h.business_receivable_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_receivable_volume })))));
|
|
24
|
+
}
|
|
25
|
+
}, [0, "justifi-additional-questions", {
|
|
26
|
+
"formController": [16],
|
|
27
|
+
"errors": [32],
|
|
28
|
+
"additional_questions": [32]
|
|
29
|
+
}]);
|
|
30
|
+
function defineCustomElement() {
|
|
31
|
+
if (typeof customElements === "undefined") {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const components = ["justifi-additional-questions", "form-control-monetary"];
|
|
35
|
+
components.forEach(tagName => { switch (tagName) {
|
|
36
|
+
case "justifi-additional-questions":
|
|
37
|
+
if (!customElements.get(tagName)) {
|
|
38
|
+
customElements.define(tagName, AdditionalQuestions);
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
case "form-control-monetary":
|
|
42
|
+
if (!customElements.get(tagName)) {
|
|
43
|
+
defineCustomElement$1();
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
} });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { AdditionalQuestions as A, defineCustomElement as d };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=additional-questions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"additional-questions.js","mappings":";;;MAWa,mBAAmB;EAK9B;;;;kBAHuB,EAAE;gCACY,EAAE;IAGrC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAClD;EAED,gBAAgB;IACd,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAClC,MAAM,KAAK,IAAI,CAAC,MAAM,qBAAQ,MAAM,CAAE,CAAC,CACxC,CAAC;IACF,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAClC,MAAM,KACH,IAAI,CAAC,oBAAoB,qBAAQ,MAAM,CAAC,oBAAoB,CAAE,CAAC,CACnE,CAAC;GACH;EAED,YAAY,CAAC,IAAY,EAAE,KAAa;IACtC,IAAI,CAAC,cAAc,CAAC,SAAS,iCACxB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,KACxC,oBAAoB,kCACf,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC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AAY,EAAE,IAAI,CAAC,YAAY,EAC/B,KAAK,EACH,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,oBAAoB,0CAAE,0BAA0B,EAE/D,YAAY,EACV,+BAA+B,aAA/B,+BAA+B,uBAA/B,+BAA+B,CAAE,0BAA0B,GAE7D,CACE,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/business-form/additional-questions/additional-questions.tsx"],"sourcesContent":["import { Component, Host, h, Prop, State } from '@stencil/core';\nimport { FormController } from '../../form/form';\n\n/**\n * @exportedPart label: Label for inputs\n * @exportedPart input: The input fields\n * @exportedPart input-invalid: Invalid state for inputfs\n */\n@Component({\n tag: 'justifi-additional-questions',\n})\nexport class AdditionalQuestions {\n @Prop() formController: FormController;\n @State() errors: any = {};\n @State() additional_questions: any = {};\n\n constructor() {\n this.inputHandler = this.inputHandler.bind(this);\n }\n\n componentDidLoad() {\n this.formController.errors.subscribe(\n errors => (this.errors = { ...errors }),\n );\n this.formController.values.subscribe(\n values =>\n (this.additional_questions = { ...values.additional_questions }),\n );\n }\n\n inputHandler(name: string, value: string) {\n this.formController.setValues({\n ...this.formController.values.getValue(),\n additional_questions: {\n ...this.formController.values.getValue().additional_questions,\n [name]: value,\n },\n });\n }\n\n render() {\n const additionalQuestionsDefaultValue =\n this.formController.getInitialValues().additional_questions;\n\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <div class=\"row gy-3\">\n <div class=\"col-12\">\n <form-control-monetary\n name=\"business_revenue\"\n label=\"Business Revenue\"\n inputHandler={this.inputHandler}\n error={this.errors?.additional_questions?.business_revenue}\n defaultValue={additionalQuestionsDefaultValue?.business_revenue}\n />\n </div>\n <div class=\"col-12\">\n <form-control-monetary\n name=\"business_payment_volume\"\n label=\"Business Payment Volume\"\n inputHandler={this.inputHandler}\n error={this.errors?.additional_questions?.business_payment_volume}\n defaultValue={\n additionalQuestionsDefaultValue?.business_payment_volume\n }\n />\n </div>\n <div class=\"col-12\">\n <form-control-monetary\n name=\"business_dispute_volume\"\n label=\"Business Dispute Volume\"\n inputHandler={this.inputHandler}\n error={this.errors?.additional_questions?.business_dispute_volume}\n defaultValue={\n additionalQuestionsDefaultValue?.business_dispute_volume\n }\n />\n </div>\n <div class=\"col-12\">\n <form-control-monetary\n name=\"business_receivable_volume\"\n label=\"Business Receivable Volume\"\n inputHandler={this.inputHandler}\n error={\n this.errors?.additional_questions?.business_receivable_volume\n }\n defaultValue={\n additionalQuestionsDefaultValue?.business_receivable_volume\n }\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { S as StateOptions } from './state-options.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './form-control-number2.js';
|
|
3
4
|
import { d as defineCustomElement$2 } from './form-control-select2.js';
|
|
4
5
|
import { d as defineCustomElement$1 } from './form-control-text2.js';
|
|
5
6
|
|
|
@@ -24,7 +25,7 @@ const BusinessAddressForm = /*@__PURE__*/ proxyCustomElement(class BusinessAddre
|
|
|
24
25
|
}
|
|
25
26
|
render() {
|
|
26
27
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
27
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("div", { class: "row
|
|
28
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-8" }, h("form-control-text", { name: "line1", label: "Street Address", defaultValue: (_a = this.defaultValues) === null || _a === void 0 ? void 0 : _a.line1, error: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line1, inputHandler: (name, value) => this.inputHandler(name, value) })), h("div", { class: "col-12 col-md-4" }, h("form-control-text", { name: "line2", label: "Apartment, Suite, etc. (optional)", defaultValue: (_c = this.defaultValues) === null || _c === void 0 ? void 0 : _c.line2, error: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.line2, inputHandler: (name, value) => this.inputHandler(name, value) })), h("div", { class: "col-12" }, h("form-control-text", { name: "city", label: "City", defaultValue: (_e = this.defaultValues) === null || _e === void 0 ? void 0 : _e.city, error: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.city, inputHandler: (name, value) => this.inputHandler(name, value) })), h("div", { class: "col-12 col-md-6" }, h("form-control-select", { name: "state", label: "State", defaultValue: (_g = this.defaultValues) === null || _g === void 0 ? void 0 : _g.state, options: StateOptions, error: (_h = this.errors) === null || _h === void 0 ? void 0 : _h.state, inputHandler: (name, value) => this.inputHandler(name, value) })), h("div", { class: "col-12 col-md-6" }, h("form-control-number", { name: "postal_code", label: "Postal Code", defaultValue: (_j = this.defaultValues) === null || _j === void 0 ? void 0 : _j.postal_code, error: (_k = this.errors) === null || _k === void 0 ? void 0 : _k.postal_code, inputHandler: (name, value) => this.inputHandler(name, value) })))));
|
|
28
29
|
}
|
|
29
30
|
static get watchers() { return {
|
|
30
31
|
"address": ["handleAddressChange"]
|
|
@@ -40,13 +41,18 @@ function defineCustomElement() {
|
|
|
40
41
|
if (typeof customElements === "undefined") {
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
const components = ["justifi-business-address-form", "form-control-select", "form-control-text"];
|
|
44
|
+
const components = ["justifi-business-address-form", "form-control-number", "form-control-select", "form-control-text"];
|
|
44
45
|
components.forEach(tagName => { switch (tagName) {
|
|
45
46
|
case "justifi-business-address-form":
|
|
46
47
|
if (!customElements.get(tagName)) {
|
|
47
48
|
customElements.define(tagName, BusinessAddressForm);
|
|
48
49
|
}
|
|
49
50
|
break;
|
|
51
|
+
case "form-control-number":
|
|
52
|
+
if (!customElements.get(tagName)) {
|
|
53
|
+
defineCustomElement$3();
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
50
56
|
case "form-control-select":
|
|
51
57
|
if (!customElements.get(tagName)) {
|
|
52
58
|
defineCustomElement$2();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"business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I,EACtC,KAAK,EAAE,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,EACxB,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,GAC7D,CACE,EAEN,WAAK,KAAK,EAAC,iBAAiB,IAC1B,2BACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,OAAO,EACb,YAAY,EAAE,MAAA,IAAI,CAAC,aAAa,0CAAE,KAAK,EACvC,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,EACzB,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,GAC7D,CACE,EAEN,WAAK,KAAK,EAAC,iBAAiB,IAC1B,2BACE,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,aAAa,EACnB,YAAY,EAAE,MAAA,IAAI,CAAC,aAAa,0CAAE,WAAW,EAC7C,KAAK,EAAE,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,EAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,GAC7D,CACE,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/business-form/business-address/business-address-form.scss?tag=justifi-business-address-form&encapsulation=shadow","src/components/business-form/business-address/business-address-form.tsx"],"sourcesContent":["@import 'reboot';\n@import 'grid';\n@import 'buttons';\n\n:host {\n @include host-base-styles;\n display: block;\n}\n\n*::part(label) {\n color: var(--jfi-form-label-color);\n font-family: var(--jfi-form-label-font-family);\n font-weight: var(--jfi-form-label-font-weight);\n font-size: var(--jfi-form-label-font-size);\n margin: var(--jfi-form-label-margin);\n}\n\n*::part(input) {\n font-family: var(--jfi-layout-font-family);\n background-color: var(--jfi-form-control-background-color);\n border-color: var(--jfi-form-control-border-color);\n border-width: var(--jfi-form-control-border-width);\n border-bottom-width: var(--jfi-form-control-border-bottom-width);\n border-left-width: var(--jfi-form-control-border-left-width);\n border-right-width: var(--jfi-form-control-border-right-width);\n border-top-width: var(--jfi-form-control-border-top-width);\n border-radius: var(--jfi-form-control-border-radius);\n border-style: var(--jfi-form-control-border-style);\n box-shadow: var(--jfi-form-control-box-shadow);\n color: var(--jfi-form-control-color);\n font-size: var(--jfi-form-control-font-size);\n font-weight: var(--jfi-form-control-font-weight);\n line-height: var(--jfi-form-control-line-height);\n margin: var(--jfi-form-control-margin);\n padding: var(--jfi-form-control-padding);\n\n &:focus {\n color: var(--jfi-form-control-color-focus);\n border-color: var(--jfi-form-control-border-color-focus);\n box-shadow: var(--jfi-form-control-box-shadow-focus);\n }\n}\n\n*::part(input-invalid) {\n border-color: var(--jfi-form-control-border-color-error);\n box-shadow: var(--jfi-form-control-box-shadow-error);\n\n &:focus {\n border-color: var(--jfi-form-control-border-color-error);\n box-shadow: var(--jfi-form-control-box-shadow-error-focus);\n }\n}\n\n.jfi-submit-button {\n font-family: var(--jfi-layout-font-family);\n color: var(--jfi-submit-button-color);\n background-color: var(--jfi-submit-button-background-color);\n border-color: var(--jfi-submit-button-border-color);\n padding: var(--jfi-submit-button-padding);\n font-size: var(--jfi-submit-button-font-size);\n border-radius: var(--jfi-submit-button-border-radius);\n width: var(--jfi-submit-button-width);\n box-shadow: var(--jfi-submit-button-box-shadow);\n}\n\n.jfi-submit-button:hover {\n color: var(--jfi-submit-button-color-hover);\n background-color: var(--jfi-submit-button-background-color-hover);\n border-color: var(--jfi-submit-button-border-color-hover);\n}\n\n.jfi-submit-button:focus {\n color: var(--jfi-submit-button-color-focus);\n background-color: var(--jfi-submit-button-background-color-focus);\n border-color: var(--jfi-submit-button-border-color-focus);\n}\n\n// Extra selector for specificity\n.btn.jfi-submit-button:active {\n color: var(--jfi-submit-button-color-active);\n background-color: var(--jfi-submit-button-background-color-active);\n border-color: var(--jfi-submit-button-border-color-active);\n}\n.btn.jfi-submit-button-loading {\n min-width: 75px;\n color: var(--jfi-submit-button-color-loading);\n background-color: var(--jfi-submit-button-background-color-loading);\n border-color: var(--jfi-submit-button-border-color-loading);\n}\n.btn.jfi-submit-button-loading .spinner-border {\n border-top-color: var(--jfi-submit-button-color-loading);\n border-bottom-color: var(--jfi-submit-button-color-loading);\n border-left-color: var(--jfi-submit-button-color-loading);\n}\n","import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\nimport StateOptions from '../../billing-form/state-options';\n\n@Component({\n tag: 'justifi-business-address-form',\n styleUrl: 'business-address-form.scss',\n shadow: true,\n})\nexport class BusinessAddressForm {\n @Prop() onFormUpdate: (values: any) => void;\n @Prop() errors: any;\n @Prop() defaultValues: any;\n @State() address: any = {};\n\n @Watch('address')\n handleAddressChange(newValues: any) {\n this.onFormUpdate(newValues);\n }\n\n inputHandler(name: string, value: string) {\n this.address[name] = value;\n this.address = { ...this.address };\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <div class=\"row gy-3\">\n <div class=\"col-12 col-md-8\">\n <form-control-text\n name=\"line1\"\n label=\"Street Address\"\n defaultValue={this.defaultValues?.line1}\n error={this.errors?.line1}\n inputHandler={(name, value) => this.inputHandler(name, value)}\n />\n </div>\n\n <div class=\"col-12 col-md-4\">\n <form-control-text\n name=\"line2\"\n label=\"Apartment, Suite, etc. (optional)\"\n defaultValue={this.defaultValues?.line2}\n error={this.errors?.line2}\n inputHandler={(name, value) => this.inputHandler(name, value)}\n />\n </div>\n\n <div class=\"col-12\">\n <form-control-text\n name=\"city\"\n label=\"City\"\n defaultValue={this.defaultValues?.city}\n error={this.errors?.city}\n inputHandler={(name, value) => this.inputHandler(name, value)}\n />\n </div>\n\n <div class=\"col-12 col-md-6\">\n <form-control-select\n name=\"state\"\n label=\"State\"\n defaultValue={this.defaultValues?.state}\n options={StateOptions}\n error={this.errors?.state}\n inputHandler={(name, value) => this.inputHandler(name, value)}\n />\n </div>\n\n <div class=\"col-12 col-md-6\">\n <form-control-number\n name=\"postal_code\"\n label=\"Postal Code\"\n defaultValue={this.defaultValues?.postal_code}\n error={this.errors?.postal_code}\n inputHandler={(name, value) => this.inputHandler(name, value)}\n />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|