@justifi/webcomponents 4.6.4 → 4.7.0-rc.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-f76b337f.js → Api-548eaa62.js} +3 -17
- package/dist/cjs/Api-548eaa62.js.map +1 -0
- package/dist/cjs/Pagination-cae1dcbd.js +15 -0
- package/dist/cjs/Pagination-cae1dcbd.js.map +1 -0
- package/dist/cjs/{Payout-4906a445.js → Payout-68a99ee3.js} +22 -1
- package/dist/cjs/Payout-68a99ee3.js.map +1 -0
- package/dist/cjs/SubAccount-f47c8522.js +109 -0
- package/dist/cjs/SubAccount-f47c8522.js.map +1 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +84 -0
- package/dist/cjs/additional-questions-details_5.cjs.entry.js.map +1 -0
- package/dist/cjs/{business-form-schema-725ec6f5.js → business-form-schema-fe831c30.js} +2 -2
- package/dist/cjs/business-form-schema-fe831c30.js.map +1 -0
- package/dist/cjs/config-70f62990.js +19 -0
- package/dist/cjs/config-70f62990.js.map +1 -0
- package/dist/cjs/form-1e732a9d.js +731 -0
- package/dist/cjs/form-1e732a9d.js.map +1 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +44 -20
- package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_3.cjs.entry.js +17 -32
- package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -1
- package/dist/cjs/helpers-c505d861.js +28 -0
- package/dist/cjs/helpers-c505d861.js.map +1 -0
- package/dist/cjs/{index-3533152c.js → index-c5ace247.js} +8 -1
- package/dist/cjs/index-c5ace247.js.map +1 -0
- package/dist/cjs/{index.esm-84a0a7a8.js → index.esm-91ec051e.js} +123 -1
- package/dist/cjs/index.esm-91ec051e.js.map +1 -0
- package/dist/cjs/{justifi-additional-questions_5.cjs.entry.js → justifi-additional-questions_6.cjs.entry.js} +41 -16
- package/dist/cjs/justifi-additional-questions_6.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +77 -0
- package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +131 -0
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-form.cjs.entry.js +13 -756
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-list.cjs.entry.js +38 -67
- package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-details.cjs.entry.js +4 -8
- package/dist/cjs/justifi-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11029 -0
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +88 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
- package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +12 -10
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +23 -17
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -7
- package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +24 -18
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +24 -18
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-refund-form.cjs.entry.js +105 -0
- package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +82 -0
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +105 -0
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-table_2.cjs.entry.js +80 -0
- package/dist/cjs/justifi-table_2.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +1 -1
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +72 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js.map +1 -0
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +24 -0
- package/dist/cjs/subaccount-bank-details.cjs.entry.js.map +1 -0
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +24 -0
- package/dist/cjs/subaccount-terms-details.cjs.entry.js.map +1 -0
- package/dist/cjs/{utils-0fd61dbd.js → utils-13d069be.js} +96 -18
- package/dist/cjs/utils-13d069be.js.map +1 -0
- package/dist/cjs/utils-4622829d.js +37 -0
- package/dist/cjs/utils-4622829d.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/Api.js +2 -16
- package/dist/collection/api/Api.js.map +1 -1
- package/dist/collection/api/Business.js +0 -2
- package/dist/collection/api/Business.js.map +1 -1
- package/dist/collection/api/GrossVolume.js +2 -0
- package/dist/collection/api/GrossVolume.js.map +1 -0
- package/dist/collection/api/Pagination.js +8 -8
- package/dist/collection/api/Pagination.js.map +1 -1
- package/dist/collection/api/Payment.js +20 -0
- package/dist/collection/api/Payment.js.map +1 -1
- package/dist/collection/api/SubAccount.js +104 -0
- package/dist/collection/api/SubAccount.js.map +1 -0
- package/dist/collection/api/mockData/MockOnboardingData.js +118 -0
- package/dist/collection/api/mockData/MockOnboardingData.js.map +1 -0
- package/dist/collection/api/mockData/MockSubAccount.js +103 -0
- package/dist/collection/api/mockData/MockSubAccount.js.map +1 -0
- package/dist/collection/api/mockData/mockGrossVolumeReport.js +126 -0
- package/dist/collection/api/mockData/mockGrossVolumeReport.js.map +1 -0
- package/dist/collection/assets/info-icon.svg +5 -0
- package/dist/collection/collection-manifest.json +20 -1
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -9
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
- package/dist/collection/components/billing-form/billing-form.stories.js +1 -1
- package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -1
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +7341 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +57 -0
- package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js.map +1 -0
- package/dist/collection/components/business-details/business-details.css +6439 -0
- package/dist/collection/components/business-details/business-details.js +128 -0
- package/dist/collection/components/business-details/business-details.js.map +1 -0
- package/dist/collection/components/business-details/business-details.stories.js +24 -0
- package/dist/collection/components/business-details/business-details.stories.js.map +1 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +7341 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +50 -0
- package/dist/collection/components/business-details/generic-info-details/generic-info-details.js.map +1 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +7341 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +49 -0
- package/dist/collection/components/business-details/legal-address-details/legal-address-details.js.map +1 -0
- package/dist/collection/components/business-details/owner-details/owner-details.css +7341 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js +57 -0
- package/dist/collection/components/business-details/owner-details/owner-details.js.map +1 -0
- package/dist/collection/components/business-details/representative-details/representative-details.css +7341 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js +58 -0
- package/dist/collection/components/business-details/representative-details/representative-details.js.map +1 -0
- package/dist/collection/components/business-form/additional-questions/additional-questions.js +1 -1
- package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -1
- package/dist/collection/components/business-form/business-form-schema.js +1 -1
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-form-stepped.css +7929 -0
- package/dist/collection/components/business-form/business-form-stepped.js +195 -0
- package/dist/collection/components/business-form/business-form-stepped.js.map +1 -0
- package/dist/collection/components/business-form/business-form-stepped.stories.js +132 -0
- package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -0
- package/dist/collection/components/business-form/business-form.js +5 -24
- package/dist/collection/components/business-form/business-form.js.map +1 -1
- package/dist/collection/components/business-form/business-form.stories.js +21 -8
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -5
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
- package/dist/collection/components/business-form/business-owners/business-owners.js +4 -5
- package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
- package/dist/collection/components/business-form/helpers.js +23 -0
- package/dist/collection/components/business-form/helpers.js.map +1 -0
- package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js.map +1 -0
- package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.js +3 -21
- package/dist/collection/components/business-form/legal-address-form/legal-address-form.js.map +1 -0
- package/dist/collection/components/business-list/business-list.js +72 -84
- package/dist/collection/components/business-list/business-list.js.map +1 -1
- package/dist/collection/components/business-list/business-list.stories.js +3 -2
- package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
- package/dist/collection/components/card-form/card-form.stories.js +2 -9
- package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
- package/dist/collection/components/details/details.js +2 -21
- package/dist/collection/components/details/details.js.map +1 -1
- package/dist/collection/components/details/utils.js +7 -8
- package/dist/collection/components/details/utils.js.map +1 -1
- package/dist/collection/components/form/form-control-number-masked.js +1 -1
- package/dist/collection/components/form/form-control-number-masked.js.map +1 -1
- package/dist/collection/components/form/form.js +4 -4
- package/dist/collection/components/form/form.js.map +1 -1
- package/dist/collection/components/gross-payment-chart/chart-utils.js +59 -0
- package/dist/collection/components/gross-payment-chart/chart-utils.js.map +1 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +572 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +127 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +22 -0
- package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js.map +1 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +15 -0
- package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js.map +1 -0
- package/dist/collection/components/pagination-menu/pagination-menu.js +78 -0
- package/dist/collection/components/pagination-menu/pagination-menu.js.map +1 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +153 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js.map +1 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +32 -0
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js.map +1 -0
- package/dist/collection/components/payment-details/payment-details.js +12 -6
- package/dist/collection/components/payment-details/payment-details.js.map +1 -1
- package/dist/collection/components/payment-details/payment-details.stories.js +4 -4
- package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
- package/dist/collection/components/payment-form/payment-form.stories.js +3 -11
- package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +7 -6
- package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +15 -14
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.js +21 -13
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +4 -4
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.js +12 -3
- package/dist/collection/components/payout-details/payout-details.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.stories.js +4 -4
- package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.js +22 -14
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.stories.js +4 -4
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.js +22 -14
- package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +3 -2
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
- package/dist/collection/components/refund-form/refund-form-schema.js +14 -0
- package/dist/collection/components/refund-form/refund-form-schema.js.map +1 -0
- package/dist/collection/components/refund-form/refund-form.css +7785 -0
- package/dist/collection/components/refund-form/refund-form.js +229 -0
- package/dist/collection/components/refund-form/refund-form.js.map +1 -0
- package/dist/collection/components/refund-form/refund-form.stories.js +169 -0
- package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +71 -0
- package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-details.css +7983 -0
- package/dist/collection/components/subaccount-details/subaccount-details.js +148 -0
- package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js +26 -0
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +51 -0
- package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +50 -0
- package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +7345 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +49 -0
- package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js.map +1 -0
- package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +22 -0
- package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js.map +1 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.css +3 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +180 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +70 -0
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +10 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js.map +1 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +34 -0
- package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js.map +1 -0
- package/dist/collection/components/table/table.js +27 -12
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/table/test/table.spec.js +2 -2
- package/dist/collection/components/table/test/table.spec.js.map +1 -1
- package/dist/collection/utils/utils.js +95 -17
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +2 -16
- package/dist/components/Api.js.map +1 -1
- package/dist/components/Pagination.js +12 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Payout.js +21 -1
- package/dist/components/Payout.js.map +1 -1
- package/dist/components/SubAccount.js +107 -0
- package/dist/components/SubAccount.js.map +1 -0
- package/dist/components/additional-questions-details.d.ts +11 -0
- package/dist/components/additional-questions-details.js +8 -0
- package/dist/components/additional-questions-details.js.map +1 -0
- package/dist/{cjs/justifi-table.cjs.entry.js → components/additional-questions-details2.js} +30 -61
- package/dist/components/additional-questions-details2.js.map +1 -0
- package/dist/components/additional-questions.js +1 -1
- package/dist/components/additional-questions.js.map +1 -1
- package/dist/components/business-generic-info.js +2 -5
- package/dist/components/business-generic-info.js.map +1 -1
- package/dist/components/business-owners.js +4 -5
- package/dist/components/business-owners.js.map +1 -1
- package/dist/components/business-representative.js +1 -1
- package/dist/components/business-representative.js.map +1 -1
- package/dist/components/config.js +17 -0
- package/dist/components/config.js.map +1 -0
- package/dist/components/details.js +6 -33
- package/dist/components/details.js.map +1 -1
- package/dist/components/form-control-number-masked2.js +1 -1
- package/dist/components/form-control-number-masked2.js.map +1 -1
- package/dist/components/form.js +729 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/generic-info-details.d.ts +11 -0
- package/dist/components/generic-info-details.js +8 -0
- package/dist/components/generic-info-details.js.map +1 -0
- package/dist/components/generic-info-details2.js +38 -0
- package/dist/components/generic-info-details2.js.map +1 -0
- package/dist/components/helpers.js +26 -0
- package/dist/components/helpers.js.map +1 -0
- package/dist/components/index.esm.js +122 -1
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/justifi-business-details.d.ts +11 -0
- package/dist/components/justifi-business-details.js +127 -0
- package/dist/components/justifi-business-details.js.map +1 -0
- package/dist/components/justifi-business-form-stepped.d.ts +11 -0
- package/dist/components/justifi-business-form-stepped.js +222 -0
- package/dist/components/justifi-business-form-stepped.js.map +1 -0
- package/dist/components/justifi-business-form.js +7 -750
- package/dist/components/justifi-business-form.js.map +1 -1
- package/dist/components/justifi-business-list.js +44 -65
- package/dist/components/justifi-business-list.js.map +1 -1
- package/dist/components/justifi-gross-payment-chart.d.ts +11 -0
- package/dist/components/justifi-gross-payment-chart.js +11052 -0
- package/dist/components/justifi-gross-payment-chart.js.map +1 -0
- package/dist/components/justifi-payment-balance-transactions.d.ts +11 -0
- package/dist/components/justifi-payment-balance-transactions.js +123 -0
- package/dist/components/justifi-payment-balance-transactions.js.map +1 -0
- package/dist/components/justifi-payment-details.js +7 -6
- package/dist/components/justifi-payment-details.js.map +1 -1
- package/dist/components/justifi-payment-form.js +3 -2
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +30 -16
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payout-details.js +7 -4
- package/dist/components/justifi-payout-details.js.map +1 -1
- package/dist/components/justifi-payouts-list.js +31 -17
- package/dist/components/justifi-payouts-list.js.map +1 -1
- package/dist/components/justifi-proceeds-list.js +30 -16
- package/dist/components/justifi-proceeds-list.js.map +1 -1
- package/dist/components/justifi-refund-form.d.ts +11 -0
- package/dist/components/justifi-refund-form.js +140 -0
- package/dist/components/justifi-refund-form.js.map +1 -0
- package/dist/components/justifi-subaccount-details.d.ts +11 -0
- package/dist/components/justifi-subaccount-details.js +134 -0
- package/dist/components/justifi-subaccount-details.js.map +1 -0
- package/dist/components/justifi-subaccounts-list.d.ts +11 -0
- package/dist/components/justifi-subaccounts-list.js +139 -0
- package/dist/components/justifi-subaccounts-list.js.map +1 -0
- package/dist/components/legal-address-details.d.ts +11 -0
- package/dist/components/legal-address-details.js +8 -0
- package/dist/components/legal-address-details.js.map +1 -0
- package/dist/components/legal-address-details2.js +37 -0
- package/dist/components/legal-address-details2.js.map +1 -0
- package/dist/components/legal-address-form.js +1 -3
- package/dist/components/legal-address-form.js.map +1 -1
- package/dist/components/owner-details.d.ts +11 -0
- package/dist/components/owner-details.js +8 -0
- package/dist/components/owner-details.js.map +1 -0
- package/dist/components/owner-details2.js +37 -0
- package/dist/components/owner-details2.js.map +1 -0
- package/dist/components/pagination-menu.d.ts +11 -0
- package/dist/components/pagination-menu.js +8 -0
- package/dist/components/pagination-menu.js.map +1 -0
- package/dist/{esm/justifi-table.entry.js → components/pagination-menu2.js} +35 -55
- package/dist/components/pagination-menu2.js.map +1 -0
- package/dist/components/payment-method-form.js +11 -9
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/representative-details.d.ts +11 -0
- package/dist/components/representative-details.js +8 -0
- package/dist/components/representative-details.js.map +1 -0
- package/dist/components/representative-details2.js +38 -0
- package/dist/components/representative-details2.js.map +1 -0
- package/dist/components/subaccount-account-details.d.ts +11 -0
- package/dist/components/subaccount-account-details.js +8 -0
- package/dist/components/subaccount-account-details.js.map +1 -0
- package/dist/components/subaccount-account-details2.js +39 -0
- package/dist/components/subaccount-account-details2.js.map +1 -0
- package/dist/components/subaccount-bank-details.d.ts +11 -0
- package/dist/components/subaccount-bank-details.js +40 -0
- package/dist/components/subaccount-bank-details.js.map +1 -0
- package/dist/components/subaccount-merchant-details.d.ts +11 -0
- package/dist/components/subaccount-merchant-details.js +8 -0
- package/dist/components/subaccount-merchant-details.js.map +1 -0
- package/dist/components/subaccount-merchant-details2.js +38 -0
- package/dist/components/subaccount-merchant-details2.js.map +1 -0
- package/dist/components/subaccount-owners-details.d.ts +11 -0
- package/dist/components/subaccount-owners-details.js +8 -0
- package/dist/components/subaccount-owners-details.js.map +1 -0
- package/dist/components/subaccount-owners-details2.js +38 -0
- package/dist/components/subaccount-owners-details2.js.map +1 -0
- package/dist/components/subaccount-representative-details.d.ts +11 -0
- package/dist/components/subaccount-representative-details.js +8 -0
- package/dist/components/subaccount-representative-details.js.map +1 -0
- package/dist/components/subaccount-representative-details2.js +38 -0
- package/dist/components/subaccount-representative-details2.js.map +1 -0
- package/dist/components/subaccount-terms-details.d.ts +11 -0
- package/dist/components/subaccount-terms-details.js +40 -0
- package/dist/components/subaccount-terms-details.js.map +1 -0
- package/dist/components/table.js +12 -21
- package/dist/components/table.js.map +1 -1
- package/dist/components/utils.js +27 -3909
- package/dist/components/utils.js.map +1 -1
- package/dist/components/utils2.js +3983 -0
- package/dist/components/utils2.js.map +1 -0
- package/dist/config.js +12 -4
- package/dist/config.js.map +1 -1
- package/dist/esm/{Api-cca120a8.js → Api-c65d3ed8.js} +3 -17
- package/dist/esm/Api-c65d3ed8.js.map +1 -0
- package/dist/esm/Pagination-31f770d6.js +12 -0
- package/dist/esm/Pagination-31f770d6.js.map +1 -0
- package/dist/esm/{Payout-9a1f2859.js → Payout-fcf16887.js} +22 -2
- package/dist/esm/Payout-fcf16887.js.map +1 -0
- package/dist/esm/SubAccount-128190e9.js +107 -0
- package/dist/esm/SubAccount-128190e9.js.map +1 -0
- package/dist/esm/additional-questions-details_5.entry.js +76 -0
- package/dist/esm/additional-questions-details_5.entry.js.map +1 -0
- package/dist/esm/{business-form-schema-5885d3d6.js → business-form-schema-30a3eadd.js} +2 -2
- package/dist/esm/business-form-schema-30a3eadd.js.map +1 -0
- package/dist/esm/config-b1976dbd.js +17 -0
- package/dist/esm/config-b1976dbd.js.map +1 -0
- package/dist/esm/form-32cf3d1e.js +729 -0
- package/dist/esm/form-32cf3d1e.js.map +1 -0
- package/dist/esm/form-control-datepart_2.entry.js +44 -20
- package/dist/esm/form-control-datepart_2.entry.js.map +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-number_3.entry.js +17 -32
- package/dist/esm/form-control-number_3.entry.js.map +1 -1
- package/dist/esm/helpers-1d5ecdc8.js +26 -0
- package/dist/esm/helpers-1d5ecdc8.js.map +1 -0
- package/dist/esm/{index-fe877d03.js → index-7471ed60.js} +8 -1
- package/dist/esm/index-7471ed60.js.map +1 -0
- package/dist/esm/{index.esm-89fe6af9.js → index.esm-9397ffa0.js} +123 -2
- package/dist/esm/index.esm-9397ffa0.js.map +1 -0
- package/dist/esm/{justifi-additional-questions_5.entry.js → justifi-additional-questions_6.entry.js} +41 -17
- package/dist/esm/justifi-additional-questions_6.entry.js.map +1 -0
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +73 -0
- package/dist/esm/justifi-business-details.entry.js.map +1 -0
- package/dist/esm/justifi-business-form-stepped.entry.js +127 -0
- package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -0
- package/dist/esm/justifi-business-form.entry.js +12 -755
- package/dist/esm/justifi-business-form.entry.js.map +1 -1
- package/dist/esm/justifi-business-list.entry.js +37 -66
- package/dist/esm/justifi-business-list.entry.js.map +1 -1
- package/dist/esm/justifi-card-form.entry.js +1 -1
- package/dist/esm/justifi-details.entry.js +4 -8
- package/dist/esm/justifi-details.entry.js.map +1 -1
- package/dist/esm/justifi-gross-payment-chart.entry.js +11025 -0
- package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js +84 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js.map +1 -0
- package/dist/esm/justifi-payment-details.entry.js +9 -9
- package/dist/esm/justifi-payment-details.entry.js.map +1 -1
- package/dist/esm/justifi-payment-form.entry.js +4 -3
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +12 -10
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +22 -16
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payout-details.entry.js +9 -7
- package/dist/esm/justifi-payout-details.entry.js.map +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +23 -17
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
- package/dist/esm/justifi-proceeds-list.entry.js +23 -17
- package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
- package/dist/esm/justifi-refund-form.entry.js +101 -0
- package/dist/esm/justifi-refund-form.entry.js.map +1 -0
- package/dist/esm/justifi-subaccount-details.entry.js +78 -0
- package/dist/esm/justifi-subaccount-details.entry.js.map +1 -0
- package/dist/esm/justifi-subaccounts-list.entry.js +101 -0
- package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -0
- package/dist/esm/justifi-table_2.entry.js +75 -0
- package/dist/esm/justifi-table_2.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/select-input_2.entry.js +1 -1
- package/dist/esm/subaccount-account-details_4.entry.js +65 -0
- package/dist/esm/subaccount-account-details_4.entry.js.map +1 -0
- package/dist/esm/subaccount-bank-details.entry.js +20 -0
- package/dist/esm/subaccount-bank-details.entry.js.map +1 -0
- package/dist/esm/subaccount-terms-details.entry.js +20 -0
- package/dist/esm/subaccount-terms-details.entry.js.map +1 -0
- package/dist/esm/{utils-ad0bbe03.js → utils-40b7002c.js} +91 -19
- package/dist/esm/utils-40b7002c.js.map +1 -0
- package/dist/esm/utils-6352c002.js +29 -0
- package/dist/esm/utils-6352c002.js.map +1 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/api/Api.d.ts +4 -4
- package/dist/types/api/Business.d.ts +12 -4
- package/dist/types/api/GrossVolume.d.ts +8 -0
- package/dist/types/api/Pagination.d.ts +12 -6
- package/dist/types/api/Payment.d.ts +28 -0
- package/dist/types/api/SubAccount.d.ts +165 -0
- package/dist/types/api/mockData/MockOnboardingData.d.ts +8 -0
- package/dist/types/api/mockData/MockSubAccount.d.ts +3 -0
- package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
- package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -7
- package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +13 -0
- package/dist/types/components/business-details/business-details.d.ts +28 -0
- package/dist/types/components/business-details/business-details.stories.d.ts +7 -0
- package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +5 -0
- package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +5 -0
- package/dist/types/components/business-details/owner-details/owner-details.d.ts +13 -0
- package/dist/types/components/business-details/representative-details/representative-details.d.ts +13 -0
- package/dist/types/components/business-form/business-form-stepped.d.ts +29 -0
- package/dist/types/components/business-form/business-form-stepped.stories.d.ts +27 -0
- package/dist/types/components/business-form/business-form.d.ts +0 -1
- package/dist/types/components/business-form/business-form.stories.d.ts +6 -0
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +5 -1
- package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +2 -0
- package/dist/types/components/business-form/helpers.d.ts +1 -0
- package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.d.ts +1 -2
- package/dist/types/components/business-list/business-list.d.ts +34 -21
- package/dist/types/components/card-form/card-form.stories.d.ts +0 -7
- package/dist/types/components/details/details.d.ts +0 -3
- package/dist/types/components/details/utils.d.ts +5 -2
- package/dist/types/components/form/form.d.ts +1 -1
- package/dist/types/components/gross-payment-chart/chart-utils.d.ts +45 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +20 -0
- package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +7 -0
- package/dist/types/components/pagination-menu/pagination-menu.d.ts +10 -0
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +17 -0
- package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +8 -0
- package/dist/types/components/payment-details/payment-details.d.ts +8 -0
- package/dist/types/components/payment-form/payment-form.stories.d.ts +1 -9
- package/dist/types/components/payments-list/payments-list.d.ts +5 -4
- package/dist/types/components/payout-details/payout-details.d.ts +8 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +5 -4
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +5 -3
- package/dist/types/components/refund-form/refund-form-schema.d.ts +11 -0
- package/dist/types/components/refund-form/refund-form.d.ts +58 -0
- package/dist/types/components/refund-form/refund-form.stories.d.ts +27 -0
- package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +6 -0
- package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-details.d.ts +16 -0
- package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +7 -0
- package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +5 -0
- package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +5 -0
- package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +19 -0
- package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +9 -0
- package/dist/types/components/table/table.d.ts +3 -7
- package/dist/types/components.d.ts +619 -7
- package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +12 -4
- package/dist/types/utils/utils.d.ts +19 -0
- package/dist/webcomponents/p-0d5d02d7.js +2 -0
- package/dist/webcomponents/p-0d5d02d7.js.map +1 -0
- package/dist/webcomponents/p-0e9a7fa7.entry.js +2 -0
- package/dist/webcomponents/p-0e9a7fa7.entry.js.map +1 -0
- package/dist/webcomponents/p-1920e118.entry.js +2 -0
- package/dist/webcomponents/p-1920e118.entry.js.map +1 -0
- package/dist/webcomponents/p-215b4c87.entry.js +2 -0
- package/dist/webcomponents/{p-f6cc37a6.entry.js.map → p-215b4c87.entry.js.map} +1 -1
- package/dist/webcomponents/p-222d357c.entry.js +20 -0
- package/dist/webcomponents/p-222d357c.entry.js.map +1 -0
- package/dist/webcomponents/{p-d92116e6.entry.js → p-2cd29187.entry.js} +2 -2
- package/dist/webcomponents/p-301a23aa.js +2 -0
- package/dist/webcomponents/p-301a23aa.js.map +1 -0
- package/dist/webcomponents/p-355eabff.entry.js +2 -0
- package/dist/webcomponents/p-355eabff.entry.js.map +1 -0
- package/dist/webcomponents/{p-640bfa9f.entry.js → p-356cf20d.entry.js} +2 -2
- package/dist/webcomponents/p-397e0d5a.entry.js +2 -0
- package/dist/webcomponents/p-397e0d5a.entry.js.map +1 -0
- package/dist/webcomponents/p-491d5c69.entry.js +2 -0
- package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
- package/dist/webcomponents/p-526cb161.js +2 -0
- package/dist/webcomponents/p-526cb161.js.map +1 -0
- package/dist/webcomponents/{p-f9e127a5.js → p-59860ac8.js} +2 -2
- package/dist/webcomponents/p-59860ac8.js.map +1 -0
- package/dist/webcomponents/p-62872b87.entry.js +2 -0
- package/dist/webcomponents/p-62872b87.entry.js.map +1 -0
- package/dist/webcomponents/p-635a3b3e.entry.js +2 -0
- package/dist/webcomponents/p-635a3b3e.entry.js.map +1 -0
- package/dist/webcomponents/p-64184a0c.entry.js +2 -0
- package/dist/webcomponents/p-64184a0c.entry.js.map +1 -0
- package/dist/webcomponents/p-6c3236e8.entry.js +2 -0
- package/dist/webcomponents/p-6c3236e8.entry.js.map +1 -0
- package/dist/webcomponents/p-76983a7e.js +2 -0
- package/dist/webcomponents/p-76983a7e.js.map +1 -0
- package/dist/webcomponents/p-76dffeec.js +2 -0
- package/dist/webcomponents/p-76dffeec.js.map +1 -0
- package/dist/webcomponents/{p-2b6f5e35.entry.js → p-77e732b2.entry.js} +2 -2
- package/dist/webcomponents/p-77e732b2.entry.js.map +1 -0
- package/dist/webcomponents/p-798483dd.entry.js +2 -0
- package/dist/webcomponents/p-798483dd.entry.js.map +1 -0
- package/dist/webcomponents/p-7a24ab66.entry.js +2 -0
- package/dist/webcomponents/p-7a24ab66.entry.js.map +1 -0
- package/dist/webcomponents/p-7cde64a2.entry.js +2 -0
- package/dist/webcomponents/{p-9d1c7e6a.entry.js.map → p-7cde64a2.entry.js.map} +1 -1
- package/dist/webcomponents/p-7d58db66.js +2 -0
- package/dist/webcomponents/p-7d58db66.js.map +1 -0
- package/dist/webcomponents/p-8367b46c.entry.js +2 -0
- package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
- package/dist/webcomponents/{p-1beaaba3.entry.js → p-88fa33c1.entry.js} +2 -2
- package/dist/webcomponents/{p-c46241ba.js → p-8f37e3ee.js} +2 -2
- package/dist/webcomponents/p-8f37e3ee.js.map +1 -0
- package/dist/webcomponents/p-931989e6.entry.js +2 -0
- package/dist/webcomponents/p-931989e6.entry.js.map +1 -0
- package/dist/webcomponents/{p-cd0eca25.entry.js → p-96eecdff.entry.js} +2 -2
- package/dist/webcomponents/p-988191bf.js +2 -0
- package/dist/webcomponents/p-988191bf.js.map +1 -0
- package/dist/webcomponents/p-a4c78757.entry.js +2 -0
- package/dist/webcomponents/p-a4c78757.entry.js.map +1 -0
- package/dist/webcomponents/p-b08a9520.entry.js +2 -0
- package/dist/webcomponents/p-b08a9520.entry.js.map +1 -0
- package/dist/webcomponents/p-b157f6ae.js +2 -0
- package/dist/webcomponents/p-b157f6ae.js.map +1 -0
- package/dist/webcomponents/p-b45453ea.entry.js +2 -0
- package/dist/webcomponents/p-b45453ea.entry.js.map +1 -0
- package/dist/webcomponents/p-c2845c5d.entry.js +2 -0
- package/dist/webcomponents/p-c2845c5d.entry.js.map +1 -0
- package/dist/webcomponents/p-c4289027.entry.js +2 -0
- package/dist/webcomponents/p-c4289027.entry.js.map +1 -0
- package/dist/webcomponents/p-c43e9572.entry.js +2 -0
- package/dist/webcomponents/p-c43e9572.entry.js.map +1 -0
- package/dist/webcomponents/p-cbb60191.js +3 -0
- package/dist/webcomponents/p-cbb60191.js.map +1 -0
- package/dist/webcomponents/{p-26392ae3.entry.js → p-d40718da.entry.js} +2 -2
- package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
- package/dist/webcomponents/{p-9346ae33.js → p-d6b5793d.js} +2 -2
- package/dist/webcomponents/p-d6b5793d.js.map +1 -0
- package/dist/webcomponents/{p-a922b908.entry.js → p-ec1890fc.entry.js} +2 -2
- package/dist/webcomponents/p-ffcbf779.entry.js +2 -0
- package/dist/webcomponents/p-ffcbf779.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 -7
- package/dist/cjs/Api-f76b337f.js.map +0 -1
- package/dist/cjs/Payout-4906a445.js.map +0 -1
- package/dist/cjs/business-form-schema-725ec6f5.js.map +0 -1
- package/dist/cjs/form-control-select.cjs.entry.js +0 -47
- package/dist/cjs/form-control-select.cjs.entry.js.map +0 -1
- package/dist/cjs/index-3533152c.js.map +0 -1
- package/dist/cjs/index.esm-84a0a7a8.js.map +0 -1
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +0 -1
- package/dist/cjs/justifi-table.cjs.entry.js.map +0 -1
- package/dist/cjs/table-utils-617126e5.js +0 -13
- package/dist/cjs/table-utils-617126e5.js.map +0 -1
- package/dist/cjs/utils-0fd61dbd.js.map +0 -1
- package/dist/cjs/utils-d95b09c2.js +0 -35
- package/dist/cjs/utils-d95b09c2.js.map +0 -1
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +0 -1
- package/dist/collection/components/legal-address-form/legal-address-form.js.map +0 -1
- package/dist/collection/components/table/table-utils.js +0 -8
- package/dist/collection/components/table/table-utils.js.map +0 -1
- package/dist/esm/Api-cca120a8.js.map +0 -1
- package/dist/esm/Payout-9a1f2859.js.map +0 -1
- package/dist/esm/business-form-schema-5885d3d6.js.map +0 -1
- package/dist/esm/form-control-select.entry.js +0 -43
- package/dist/esm/form-control-select.entry.js.map +0 -1
- package/dist/esm/index-fe877d03.js.map +0 -1
- package/dist/esm/index.esm-89fe6af9.js.map +0 -1
- package/dist/esm/justifi-additional-questions_5.entry.js.map +0 -1
- package/dist/esm/justifi-table.entry.js.map +0 -1
- package/dist/esm/table-utils-6cdcaa8c.js +0 -11
- package/dist/esm/table-utils-6cdcaa8c.js.map +0 -1
- package/dist/esm/utils-1e7d6279.js +0 -28
- package/dist/esm/utils-1e7d6279.js.map +0 -1
- package/dist/esm/utils-ad0bbe03.js.map +0 -1
- package/dist/types/components/table/table-utils.d.ts +0 -14
- package/dist/webcomponents/p-26392ae3.entry.js.map +0 -1
- package/dist/webcomponents/p-2b6f5e35.entry.js.map +0 -1
- package/dist/webcomponents/p-2e66512d.entry.js +0 -2
- package/dist/webcomponents/p-2e66512d.entry.js.map +0 -1
- package/dist/webcomponents/p-523cbe04.js +0 -2
- package/dist/webcomponents/p-523cbe04.js.map +0 -1
- package/dist/webcomponents/p-641883b2.entry.js +0 -2
- package/dist/webcomponents/p-641883b2.entry.js.map +0 -1
- package/dist/webcomponents/p-69a1bec2.entry.js +0 -2
- package/dist/webcomponents/p-69a1bec2.entry.js.map +0 -1
- package/dist/webcomponents/p-6a0c8dec.entry.js +0 -2
- package/dist/webcomponents/p-6a0c8dec.entry.js.map +0 -1
- package/dist/webcomponents/p-87410719.entry.js +0 -2
- package/dist/webcomponents/p-87410719.entry.js.map +0 -1
- package/dist/webcomponents/p-881edb4d.entry.js +0 -2
- package/dist/webcomponents/p-881edb4d.entry.js.map +0 -1
- package/dist/webcomponents/p-9346ae33.js.map +0 -1
- package/dist/webcomponents/p-9d1c7e6a.entry.js +0 -2
- package/dist/webcomponents/p-ab0756ff.js +0 -2
- package/dist/webcomponents/p-ab0756ff.js.map +0 -1
- package/dist/webcomponents/p-c46241ba.js.map +0 -1
- package/dist/webcomponents/p-ccb0e1c5.js +0 -2
- package/dist/webcomponents/p-ccb0e1c5.js.map +0 -1
- package/dist/webcomponents/p-dabeb3df.entry.js +0 -2
- package/dist/webcomponents/p-dabeb3df.entry.js.map +0 -1
- package/dist/webcomponents/p-db9945b1.entry.js +0 -2
- package/dist/webcomponents/p-db9945b1.entry.js.map +0 -1
- package/dist/webcomponents/p-e1f6c8ec.entry.js +0 -2
- package/dist/webcomponents/p-e1f6c8ec.entry.js.map +0 -1
- package/dist/webcomponents/p-e41fb562.entry.js +0 -2
- package/dist/webcomponents/p-e41fb562.entry.js.map +0 -1
- package/dist/webcomponents/p-e6695628.js +0 -2
- package/dist/webcomponents/p-e6695628.js.map +0 -1
- package/dist/webcomponents/p-e70b2a21.js +0 -3
- package/dist/webcomponents/p-e70b2a21.js.map +0 -1
- package/dist/webcomponents/p-f6cc37a6.entry.js +0 -2
- package/dist/webcomponents/p-f8067330.entry.js +0 -2
- package/dist/webcomponents/p-f8067330.entry.js.map +0 -1
- package/dist/webcomponents/p-f9e127a5.js.map +0 -1
- /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.js +0 -0
- /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.css +0 -0
- /package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.d.ts +0 -0
- /package/dist/webcomponents/{p-d92116e6.entry.js.map → p-2cd29187.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-640bfa9f.entry.js.map → p-356cf20d.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-1beaaba3.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-cd0eca25.entry.js.map → p-96eecdff.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-a922b908.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
|
@@ -1,76 +1,39 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { Api } from "../../api";
|
|
3
|
-
import { pagingDefaults } from "../table/table-utils";
|
|
2
|
+
import { Api, pagingDefaults } from "../../api";
|
|
4
3
|
import { Business } from "../../api/Business";
|
|
5
|
-
import { formatDate } from "../../utils/utils";
|
|
4
|
+
import { formatDate, snakeCaseToHumanReadable } from "../../utils/utils";
|
|
5
|
+
import { config } from "../../../config";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
7
|
+
* @exportedPart table-head: Table head
|
|
8
|
+
* @exportedPart table-head-row: Head row
|
|
9
|
+
* @exportedPart table-head-cell: Individual head cell
|
|
10
|
+
* @exportedPart table-body: Body of the table
|
|
11
|
+
* @exportedPart table-row: Row of the table
|
|
12
|
+
* @exportedPart table-cell: Individual cell of the table
|
|
13
|
+
* @exportedPart loading-state-cell: Row for loading state
|
|
14
|
+
* @exportedPart loading-state-spinner: Spinner element for loading state
|
|
15
|
+
* @exportedPart error-state: Row for Error state
|
|
16
|
+
* @exportedPart empty-state: Row for Emtpy state
|
|
17
|
+
* @exportedPart pagination-bar: Pagination bar
|
|
18
|
+
* @exportedPart arrow: Both paging buttons
|
|
19
|
+
* @exportedPart arrow-left: Previous page button
|
|
20
|
+
* @exportedPart arrow-right: Next page button
|
|
21
|
+
* @exportedPart arrow-disabled: Disabled state for paging buttons
|
|
22
|
+
*/
|
|
23
23
|
export class BusinessList {
|
|
24
24
|
constructor() {
|
|
25
|
-
this.onPageChange = (direction) => {
|
|
26
|
-
return () => {
|
|
27
|
-
this.fetchData(direction);
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
25
|
this.mapProductStatusToBadge = (status) => {
|
|
31
|
-
return status && 'bg-success' || 'bg-secondary';
|
|
26
|
+
return (status && 'bg-success') || 'bg-secondary';
|
|
32
27
|
};
|
|
33
|
-
this.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
case 'non_profit':
|
|
38
|
-
return 'Non Profit';
|
|
39
|
-
case 'for_profit':
|
|
40
|
-
return 'For Profit';
|
|
41
|
-
case 'government_entity':
|
|
42
|
-
return 'Government Entity';
|
|
43
|
-
}
|
|
28
|
+
this.handleClickPrevious = (beforeCursor) => {
|
|
29
|
+
const newParams = Object.assign({}, this.params);
|
|
30
|
+
delete newParams.after_cursor;
|
|
31
|
+
this.params = (Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor }));
|
|
44
32
|
};
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
case 'single_llc':
|
|
50
|
-
return 'Single LLC';
|
|
51
|
-
case 'multi_llc':
|
|
52
|
-
return 'Multi LLC';
|
|
53
|
-
case 'private_partnership':
|
|
54
|
-
return 'Private Partnership';
|
|
55
|
-
case 'private_corporation':
|
|
56
|
-
return 'Private Corporation';
|
|
57
|
-
case 'unincorporated_association':
|
|
58
|
-
return 'Unincorporated Association';
|
|
59
|
-
case 'public_partnership':
|
|
60
|
-
return 'Public Partnership';
|
|
61
|
-
case 'public_corporation':
|
|
62
|
-
return 'Public Corporation';
|
|
63
|
-
case 'incorporated':
|
|
64
|
-
return 'Incorporated';
|
|
65
|
-
case 'unincorporated':
|
|
66
|
-
return 'Unincorporated';
|
|
67
|
-
case 'government_unit':
|
|
68
|
-
return 'Government Unit';
|
|
69
|
-
case 'government_instrumentality':
|
|
70
|
-
return 'Government Instrumentality';
|
|
71
|
-
case 'tax_exempt_government_instrumentality':
|
|
72
|
-
return 'Tax Exempt Government Instrumentality';
|
|
73
|
-
}
|
|
33
|
+
this.handleClickNext = (afterCursor) => {
|
|
34
|
+
const newParams = Object.assign({}, this.params);
|
|
35
|
+
delete newParams.before_cursor;
|
|
36
|
+
this.params = (Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor }));
|
|
74
37
|
};
|
|
75
38
|
this.accountId = undefined;
|
|
76
39
|
this.authToken = undefined;
|
|
@@ -78,6 +41,7 @@ export class BusinessList {
|
|
|
78
41
|
this.loading = true;
|
|
79
42
|
this.errorMessage = undefined;
|
|
80
43
|
this.paging = pagingDefaults;
|
|
44
|
+
this.params = undefined;
|
|
81
45
|
}
|
|
82
46
|
updateOnPropChange() {
|
|
83
47
|
this.fetchData();
|
|
@@ -85,27 +49,29 @@ export class BusinessList {
|
|
|
85
49
|
connectedCallback() {
|
|
86
50
|
this.fetchData();
|
|
87
51
|
}
|
|
88
|
-
async fetchData(
|
|
52
|
+
async fetchData() {
|
|
89
53
|
var _a;
|
|
90
54
|
if (!this.accountId || !this.authToken) {
|
|
91
|
-
this.errorMessage =
|
|
55
|
+
this.errorMessage =
|
|
56
|
+
'Can not fetch any data without an AccountID and an AuthToken';
|
|
92
57
|
this.loading = false;
|
|
93
58
|
return;
|
|
94
59
|
}
|
|
95
60
|
this.loading = true;
|
|
96
61
|
const endpoint = `entities/business`;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
direction: direction
|
|
101
|
-
});
|
|
62
|
+
let accountIDParam = { account_id: this.accountId };
|
|
63
|
+
const response = await Api(this.authToken, config.proxyApiOrigin)
|
|
64
|
+
.get(endpoint, Object.assign(Object.assign({}, accountIDParam), this.params));
|
|
102
65
|
if (!response.error) {
|
|
103
66
|
this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
|
|
104
67
|
const data = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.map(dataItem => new Business(dataItem));
|
|
105
68
|
this.businesses = data;
|
|
106
69
|
}
|
|
107
70
|
else {
|
|
108
|
-
this.errorMessage =
|
|
71
|
+
this.errorMessage =
|
|
72
|
+
typeof response.error === 'string'
|
|
73
|
+
? response.error
|
|
74
|
+
: response.error.message;
|
|
109
75
|
}
|
|
110
76
|
this.loading = false;
|
|
111
77
|
}
|
|
@@ -116,12 +82,15 @@ export class BusinessList {
|
|
|
116
82
|
['Business Structure', 'The business structure'],
|
|
117
83
|
['Tax ID', 'The tax ID associated with this business'],
|
|
118
84
|
['Industry', 'The industry this business participates in'],
|
|
119
|
-
[
|
|
85
|
+
[
|
|
86
|
+
'Product Ready',
|
|
87
|
+
'List of our products that are used by this business',
|
|
88
|
+
],
|
|
120
89
|
['Created at', 'Date this business was created'],
|
|
121
|
-
], rowData: this.businesses.map((business) =>
|
|
90
|
+
], rowData: this.businesses.map((business) => [
|
|
122
91
|
business.legal_name,
|
|
123
|
-
|
|
124
|
-
|
|
92
|
+
snakeCaseToHumanReadable(business.business_type),
|
|
93
|
+
snakeCaseToHumanReadable(business.business_structure),
|
|
125
94
|
business.tax_id,
|
|
126
95
|
business.industry,
|
|
127
96
|
{
|
|
@@ -133,10 +102,10 @@ export class BusinessList {
|
|
|
133
102
|
<span class="badge ${this.mapProductStatusToBadge(business.product_categories.lending)}">Lending</span>
|
|
134
103
|
<span class="badge ${this.mapProductStatusToBadge(business.product_categories.payment)}">Payment</span>
|
|
135
104
|
</div>
|
|
136
|
-
|
|
105
|
+
`,
|
|
137
106
|
},
|
|
138
107
|
formatDate(business.created_at),
|
|
139
|
-
])
|
|
108
|
+
]), loading: this.loading, "error-message": this.errorMessage, params: this.params, paging: Object.assign(Object.assign({}, this.paging), { handleClickNext: this.handleClickNext, handleClickPrevious: this.handleClickPrevious }) })));
|
|
140
109
|
}
|
|
141
110
|
static get is() { return "justifi-business-list"; }
|
|
142
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -163,8 +132,17 @@ export class BusinessList {
|
|
|
163
132
|
"required": false,
|
|
164
133
|
"optional": false,
|
|
165
134
|
"docs": {
|
|
166
|
-
"tags": [
|
|
167
|
-
|
|
135
|
+
"tags": [{
|
|
136
|
+
"name": "required",
|
|
137
|
+
"text": undefined
|
|
138
|
+
}, {
|
|
139
|
+
"name": "type",
|
|
140
|
+
"text": "{string}"
|
|
141
|
+
}, {
|
|
142
|
+
"name": "memberof",
|
|
143
|
+
"text": "PaymentsList"
|
|
144
|
+
}],
|
|
145
|
+
"text": "The Account ID to fetch payments.\nThis is required to fetch any data."
|
|
168
146
|
},
|
|
169
147
|
"attribute": "account-id",
|
|
170
148
|
"reflect": false
|
|
@@ -180,8 +158,14 @@ export class BusinessList {
|
|
|
180
158
|
"required": false,
|
|
181
159
|
"optional": false,
|
|
182
160
|
"docs": {
|
|
183
|
-
"tags": [
|
|
184
|
-
|
|
161
|
+
"tags": [{
|
|
162
|
+
"name": "required",
|
|
163
|
+
"text": undefined
|
|
164
|
+
}, {
|
|
165
|
+
"name": "type",
|
|
166
|
+
"text": "{string}"
|
|
167
|
+
}],
|
|
168
|
+
"text": "The Auth Token to fetch payments.\nThis is required to fetch any data."
|
|
185
169
|
},
|
|
186
170
|
"attribute": "auth-token",
|
|
187
171
|
"reflect": false
|
|
@@ -193,7 +177,8 @@ export class BusinessList {
|
|
|
193
177
|
"businesses": {},
|
|
194
178
|
"loading": {},
|
|
195
179
|
"errorMessage": {},
|
|
196
|
-
"paging": {}
|
|
180
|
+
"paging": {},
|
|
181
|
+
"params": {}
|
|
197
182
|
};
|
|
198
183
|
}
|
|
199
184
|
static get watchers() {
|
|
@@ -203,6 +188,9 @@ export class BusinessList {
|
|
|
203
188
|
}, {
|
|
204
189
|
"propName": "authToken",
|
|
205
190
|
"methodName": "updateOnPropChange"
|
|
191
|
+
}, {
|
|
192
|
+
"propName": "params",
|
|
193
|
+
"methodName": "updateOnPropChange"
|
|
206
194
|
}];
|
|
207
195
|
}
|
|
208
196
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-list.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport { Api, IApiResponseCollection, PagingInfo, pagingDefaults } from '../../api';\nimport { Business, IBusiness } from '../../api/Business';\nimport { formatDate, snakeCaseToHumanReadable } from '../../utils/utils';\nimport { config } from '../../../config';\n\n\n/**\n * @exportedPart table-head: Table head\n * @exportedPart table-head-row: Head row\n * @exportedPart table-head-cell: Individual head cell\n * @exportedPart table-body: Body of the table\n * @exportedPart table-row: Row of the table\n * @exportedPart table-cell: Individual cell of the table\n * @exportedPart loading-state-cell: Row for loading state\n * @exportedPart loading-state-spinner: Spinner element for loading state\n * @exportedPart error-state: Row for Error state\n * @exportedPart empty-state: Row for Emtpy state\n * @exportedPart pagination-bar: Pagination bar\n * @exportedPart arrow: Both paging buttons\n * @exportedPart arrow-left: Previous page button\n * @exportedPart arrow-right: Next page button\n * @exportedPart arrow-disabled: Disabled state for paging buttons\n */\n@Component({\n tag: 'justifi-business-list',\n styleUrl: 'business-list.scss',\n shadow: true,\n})\nexport class BusinessList {\n /**\n * The Account ID to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n * @memberof PaymentsList\n */\n @Prop() accountId: string;\n /**\n * The Auth Token to fetch payments.\n * This is required to fetch any data.\n * @required\n * @type {string}\n */\n @Prop() authToken: string;\n @State() businesses: Business[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n\n @Watch('accountId')\n @Watch('authToken')\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n mapProductStatusToBadge = (status: boolean) => {\n return (status && 'bg-success') || 'bg-secondary';\n };\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n };\n\n async fetchData(): Promise<void> {\n if (!this.accountId || !this.authToken) {\n this.errorMessage =\n 'Can not fetch any data without an AccountID and an AuthToken';\n this.loading = false;\n return;\n }\n this.loading = true;\n const endpoint = `entities/business`;\n let accountIDParam = { account_id: this.accountId };\n\n const response: IApiResponseCollection<Business[]> = await Api(this.authToken, config.proxyApiOrigin,)\n .get(endpoint, { ...accountIDParam, ...this.params });\n\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info,\n };\n\n const data = response?.data?.map(dataItem => new Business(dataItem));\n this.businesses = data;\n } else {\n this.errorMessage =\n typeof response.error === 'string'\n ? response.error\n : response.error.message;\n }\n\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n columnData={[\n ['Legal Name', 'The name associated with this Business'],\n ['Business Type', 'The business type'],\n ['Business Structure', 'The business structure'],\n ['Tax ID', 'The tax ID associated with this business'],\n ['Industry', 'The industry this business participates in'],\n [\n 'Product Ready',\n 'List of our products that are used by this business',\n ],\n ['Created at', 'Date this business was created'],\n ]}\n rowData={this.businesses.map((business: IBusiness) => [\n business.legal_name,\n snakeCaseToHumanReadable(business.business_type),\n snakeCaseToHumanReadable(business.business_structure),\n business.tax_id,\n business.industry,\n {\n type: 'inner',\n value: `\n <div class=\"d-flex flex-nowrap gap-1\">\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.credit,\n )}\">Credit</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.insurance,\n )}\">Insurance</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.lending,\n )}\">Lending</span>\n <span class=\"badge ${this.mapProductStatusToBadge(\n business.product_categories.payment,\n )}\">Payment</span>\n </div>\n `,\n },\n formatDate(business.created_at),\n ])}\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
export default {
|
|
2
3
|
title: 'dev/Components/BusinessList',
|
|
3
4
|
component: 'justifi-business-list',
|
|
@@ -5,8 +6,8 @@ export default {
|
|
|
5
6
|
};
|
|
6
7
|
class BusinessListArgs {
|
|
7
8
|
constructor(args) {
|
|
8
|
-
this['auth-token'] = args['auth-token'] ||
|
|
9
|
-
this['account-id'] = args['account-id'] ||
|
|
9
|
+
this['auth-token'] = args['auth-token'] || config.proxyAuthToken;
|
|
10
|
+
this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
const Template = (args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-list.stories.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"business-list.stories.js","sourceRoot":"","sources":["../../../../src/components/business-list/business-list.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,6BAA6B;EACpC,SAAS,EAAE,uBAAuB;EAClC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,gBAAgB;EAIpB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;IACjE,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;EAC7E,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,CAAC,IAAsB,EAAE,EAAE;EAC1C,OAAO,CAAC;;;oBAGU,IAAI,CAAC,YAAY,CAAC;oBAClB,IAAI,CAAC,YAAY,CAAC;;GAEnC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,UAAU,GAAG;EAClB,CAAC,KAAK,EAAE,EAAE,CAAC;MACP,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,UAAU,GAAG;EACrB,CAAC,KAAK,EAAE,EAAE,CAAC;;QAEL,KAAK,EAAE;;GAEZ;CACF,CAAA;AACD,SAAS,CAAC,IAAI,GAAG,IAAI,gBAAgB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'dev/Components/BusinessList',\n component: 'justifi-business-list',\n parameters: {}\n};\n\nclass BusinessListArgs {\n 'auth-token': string;\n 'account-id': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || config.proxyAuthToken;\n this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;\n }\n}\n\nconst Template = (args: BusinessListArgs) => {\n return (`\n <justifi-business-list\n data-testid=\"justifi-business-list\"\n auth-token=\"${args['auth-token']}\"\n account-id=\"${args['account-id']}\"\n />\n `);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessListArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessListArgs({});\nStyled.decorators = [\n (Story) => `\n ${Story()}\n <style>\n justifi-business-list::part(table-head-cell) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(pagination-bar) {\n background-color: #F4F4F6;\n }\n justifi-business-list::part(arrow) {\n --bs-btn-disabled-bg: #212529;\n --bs-btn-disabled-border-color: #212529;\n --bs-btn-bg: #212529;\n --bs-btn-border-color: #212529;\n --bs-btn-hover-bg: #fccc32;\n --bs-btn-hover-border-color: #fccc32;\n }\n justifi-business-list::part(error-state) {\n color: red;\n background-color: #EEEEF5;\n }\n justifi-business-list::part(loading-state-cell) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row) {\n background-color: #EEEEF5;\n }\n justifi-business-list::part(table-row-even) {\n background-color: #F4F4F6;\n }\n </style>\n `\n]\n\nexport const Contained = Template.bind({});\nContained.decorators = [\n (Story) => `\n <div style=\"position: relative; width: 900px; height: 300px; overflow-x: hidden;\">\n ${Story()}\n </div>\n `\n]\nContained.args = new BusinessListArgs({});\n"]}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { config } from "../../../config";
|
|
2
2
|
export default {
|
|
3
3
|
title: 'Components/CardForm',
|
|
4
4
|
component: 'justifi-card-form',
|
|
5
5
|
argTypes: {
|
|
6
|
-
'iframe-origin': {
|
|
7
|
-
control: 'text',
|
|
8
|
-
table: {
|
|
9
|
-
disable: isDev ? false : true,
|
|
10
|
-
category: 'props',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
6
|
'resize': {
|
|
14
7
|
description: 'Deprecated: This method will be removed in future releases.',
|
|
15
8
|
table: {
|
|
@@ -86,7 +79,7 @@ const Template = (args) => {
|
|
|
86
79
|
<justifi-card-form
|
|
87
80
|
data-testid="card-form-iframe"
|
|
88
81
|
validation-mode='${args['validation-mode'] || 'onSubmit'}'
|
|
89
|
-
iframe-origin='${
|
|
82
|
+
iframe-origin='${config.iframeOrigin}'
|
|
90
83
|
single-line='${args['single-line']}'
|
|
91
84
|
/>
|
|
92
85
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-form.stories.js","sourceRoot":"","sources":["../../../../src/components/card-form/card-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,eAAe;EACb,KAAK,EAAE,qBAAqB;EAC5B,SAAS,EAAE,mBAAmB;EAC9B,QAAQ,EAAE;IACR,QAAQ,EAAE;MACR,WAAW,EAAE,6DAA6D;MAC1E,KAAK,EAAE;QACL,QAAQ,EAAE,SAAS;OACpB;KACF;GACF;EACD,UAAU,EAAE;IACV,KAAK,CAAC,EAAE,CAAC;;;QAGL,KAAK,EAAE;gBACC,SAAS,EAAE;KACtB;GACF;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACzE,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;EACxC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,KAAK,EAAE,QAAoC,EAAE,iBAAiB,EAAE,EAAE;EAC5F,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;EACjF,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAChC,CAAC,CAAC;AACF,MAAM,iBAAiB,GAAG,KAAK,EAAE,QAAoC,EAAE,EAAE;EACvE,MAAM,QAAQ,CAAC,MAAM,EAA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AC,YAAY;uBACrB,IAAI,CAAC,aAAa,CAAC;;;MAGpC,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;GACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,iBAAiB,EAAE,UAAU;EAC7B,aAAa,EAAE,KAAK;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;EAChB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,aAAa,EAAE,KAAK;EACpB,eAAe,EAAE,eAAe;CACjC,CAAC","sourcesContent":["import { config } from '../../../config';\n\ninterface CardFormStoryArgs {\n 'iframe-origin': string;\n 'single-line': boolean;\n 'validation-mode': string;\n 'css-variables': string;\n}\n\nexport default {\n title: 'Components/CardForm',\n component: 'justifi-card-form',\n argTypes: {\n 'resize': {\n description: 'Deprecated: This method will be removed in future releases.',\n table: {\n category: 'methods',\n },\n },\n },\n decorators: [\n story => `\n <!-- Deprecated Notice -->\n <p style=\"color: red; font-family: 'Roboto Mono', monospace;\">Note: The 'resize' method is deprecated and will be removed in future releases.</p>\n ${story()}\n <script>${addEvents()}</script>\n `,\n ],\n};\n\nconst handleValidateClick = async (cardForm: HTMLJustifiCardFormElement) => {\n const valid = await cardForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (cardForm: HTMLJustifiCardFormElement, paymentMethodData) => {\n const tokenizeResponse = await cardForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (cardForm: HTMLJustifiCardFormElement) => {\n await cardForm.resize();\n};\nconst handleReady = () => {\n console.log('card form is ready');\n const cardForm = document.querySelector('justifi-card-form') as HTMLJustifiCardFormElement;\n const validateBtn = document.querySelector('#validate-btn');\n const tokenizeBtn = document.querySelector('#tokenize-btn');\n const resizeBtn = document.querySelector('#resize-btn');\n validateBtn?.addEventListener('click', () => {\n handleValidateClick(cardForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(cardForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(cardForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('cardFormReady', handleReady);\n};\n\nconst FormButtons = `\n <style>\n .button-bar {\n display: flex;\n aligin-items: center;\n padding: 10px;\n }\n .button-bar button {\n margin-right: 10px;\n border-radius: 3px;\n border: 1px solid black;\n }\n </style>\n <div class=\"button-bar\">\n <button id=\"validate-btn\">Validate</button>\n <button id=\"tokenize-btn\">Tokenize</button>\n <button id=\"resize-btn\">Resize</button>\n </div>`;\n\nconst Template = (args: CardFormStoryArgs) => {\n const includeButtons = true;\n\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-card-form\n data-testid=\"card-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n single-line='${args['single-line']}'\n />\n </div>\n ${includeButtons ? FormButtons : ''}\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n 'validation-mode': 'onSubmit',\n 'single-line': false,\n};\n\nexport const SingleLine = Template.bind({});\nSingleLine.args = {\n 'single-line': true,\n};\n\nconst styledVariables = `\n --jfi-load-google-font: 'Inter:wght@200;400;700;900&family=Agdasima';\n --jfi-layout-font-family: Agdasima;\n --jfi-layout-padding: 4px;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 100;\n --jfi-form-label-font-family: Inter;\n --jfi-form-label-margin: 0 0 .5rem 0;\n --jfi-form-control-background-color: #F4F4F6;\n --jfi-form-control-background-color-hover: #EEEEF5;\n --jfi-form-control-border-color: rgba(0, 0, 0, 0.42);\n --jfi-form-control-border-color-hover: rgba(0, 0, 0, 0.62);\n --jfi-form-control-border-color-focus: #fccc32;\n --jfi-form-control-border-color-error: #C12727;\n --jfi-form-control-border-top-width: 0;\n --jfi-form-control-border-left-width: 0;\n --jfi-form-control-border-bottom-width: 1px;\n --jfi-form-control-border-right-width: 0;\n --jfi-form-control-border-radius: 4px 4px 0 0;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n --jfi-form-control-box-shadow-focus: none;\n --jfi-form-control-box-shadow-error-focus: none;\n --jfi-form-control-border-style: solid;\n --jfi-form-control-color: #212529;\n --jfi-form-control-font-size: 1rem;\n --jfi-form-control-font-weight: 400;\n --jfi-form-control-line-height: 2;\n --jfi-form-control-margin: 0;\n --jfi-form-control-padding: .5rem .875rem;\n --jfi-error-message-color: #C12727;\n --jfi-error-message-margin: .25rem 0 0 0;\n --jfi-error-message-font-size: .875rem;\n`;\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'single-line': false,\n 'css-variables': styledVariables,\n};\n"]}
|
|
@@ -3,16 +3,12 @@ import { ErrorState } from "./utils";
|
|
|
3
3
|
export class Details {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.errorMessage = undefined;
|
|
6
|
-
this.entity = undefined;
|
|
7
6
|
}
|
|
8
7
|
render() {
|
|
9
|
-
|
|
10
|
-
return (h(Host, { exportParts: 'detail-loading-spinner,detail-loading-state,detail-empty-state,\n detail-head,detail-title,detail-head-info,detail-head-info-item,\n detail-head-info-item-title,detail-head-info-item-data,detail-metadata,detail-metadata-title,\n detail-section,detail-section-title,detail-section-item-title,detail-section-item-data' }, this.errorMessage ?
|
|
8
|
+
return (h(Host, { exportParts: 'detail-empty-state, detail-metadata-title, detail-metadata, detail-section, detail-section-title, \n detail-section-item-title, detail-section-item-data, detail-head, detail-title, detail-head-info' }, this.errorMessage ?
|
|
11
9
|
ErrorState(this.errorMessage)
|
|
12
10
|
:
|
|
13
|
-
h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' })
|
|
14
|
-
h("div", { class: "mt-4" }, h("h2", { part: "detail-metadata-title", class: "fs-3" }, "Metadata"), h("hr", null), h("pre", { part: "detail-metadata", class: "p-2", "aria-label": "metadata content" }, h("code", null, JSON.stringify(this.entity.metadata, null, 2))))
|
|
15
|
-
: null)));
|
|
11
|
+
h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' }))));
|
|
16
12
|
}
|
|
17
13
|
static get is() { return "justifi-details"; }
|
|
18
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,21 +40,6 @@ export class Details {
|
|
|
44
40
|
},
|
|
45
41
|
"attribute": "error-message",
|
|
46
42
|
"reflect": false
|
|
47
|
-
},
|
|
48
|
-
"entity": {
|
|
49
|
-
"type": "unknown",
|
|
50
|
-
"mutable": false,
|
|
51
|
-
"complexType": {
|
|
52
|
-
"original": "{ metadata: any }",
|
|
53
|
-
"resolved": "{ metadata: any; }",
|
|
54
|
-
"references": {}
|
|
55
|
-
},
|
|
56
|
-
"required": false,
|
|
57
|
-
"optional": false,
|
|
58
|
-
"docs": {
|
|
59
|
-
"tags": [],
|
|
60
|
-
"text": ""
|
|
61
|
-
}
|
|
62
43
|
}
|
|
63
44
|
};
|
|
64
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../../src/components/details/details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQrC,MAAM,OAAO,OAAO
|
|
1
|
+
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../../src/components/details/details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQrC,MAAM,OAAO,OAAO;;;;EAGlB,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IACH,WAAW,EAAC,8MACqF,IAG/F,IAAI,CAAC,YAAY,CAAC,CAAC;MACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;MAC7B,CAAC;QACD,YAAM,KAAK,EAAC,KAAK;UACf,YAAM,IAAI,EAAC,WAAW,GAAG;UACzB,YAAM,IAAI,EAAC,iBAAiB,GAAG,CAC1B,CAEN,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { ErrorState } from './utils';\n\n@Component({\n tag: 'justifi-details',\n styleUrl: './details.scss',\n shadow: true,\n})\n\nexport class Details {\n @Prop() errorMessage: string;\n\n render() {\n return (\n <Host\n exportParts='detail-empty-state, detail-metadata-title, detail-metadata, detail-section, detail-section-title, \n detail-section-item-title, detail-section-item-data, detail-head, detail-title, detail-head-info'\n >\n {\n this.errorMessage ?\n ErrorState(this.errorMessage)\n :\n <main class=\"p-2\">\n <slot name=\"head-info\" />\n <slot name='detail-sections' />\n </main>\n }\n </Host>\n )\n }\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const LoadingState = h("main", { part:
|
|
3
|
-
export const ErrorState = (errorMessage) => h("main", { part:
|
|
4
|
-
export const DetailSection = ({ sectionTitle }, children) => h("div", { part: "detail-section", class: "
|
|
5
|
-
export const DetailItem = ({ title, value }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const
|
|
9
|
-
export const EntityHeadInfo = ({ title, slot, badge }, children) => h("div", { slot: slot, part: 'detail-head', class: "p-2" }, h("div", { class: "d-flex flex-row align-items-center gap-2 mb-2" }, h("h1", { class: "m-0", part: 'detail-title' }, title), badge), h("div", { part: "detail-head-info", class: "d-flex flex-row align-items-top" }, children));
|
|
2
|
+
export const LoadingState = (h("main", { part: "detail-loading-state", class: "p-4 d-flex justify-content-center text-center", style: { fontSize: '1.2rem' } }, h("div", { part: "detail-loading-spinner", class: "spinner-border spinner-border-sm", role: "status" }, h("span", { class: "visually-hidden" }, "Loading..."))));
|
|
3
|
+
export const ErrorState = (errorMessage) => (h("main", { part: "detail-empty-state", class: "p-4 d-flex justify-content-center text-center", style: { fontSize: '1.2rem' } }, h("div", null, errorMessage)));
|
|
4
|
+
export const DetailSection = ({ sectionTitle }, children) => (h("div", { part: "detail-section", class: "mt-4" }, h("h5", { part: "detail-section-title" }, sectionTitle), h("hr", null), h("div", { class: "d-flex flex-column justify-content-center gap-2 text-nowrap" }, children)));
|
|
5
|
+
export const DetailItem = ({ title, value, }) => title && value ? (h("div", { class: "d-flex gap-2" }, h("span", { part: "detail-section-item-title", class: "fw-bold flex-1" }, title), h("span", { part: "detail-section-item-data", class: "flex-1", innerHTML: value }))) : null;
|
|
6
|
+
export const EntityHeadInfoItem = ({ title, value, classes, }) => (h("div", { part: "detail-head-info-item", class: `d-flex flex-column ${classes}` }, h("span", { part: "detail-head-info-item-title", class: "fw-bold border-1 border-bottom ps-2 pe-2" }, title), h("span", { part: "detail-head-info-item-data", class: "pt-2 ps-2 pe-2" }, value)));
|
|
7
|
+
export const EntityHeadInfo = ({ title, slot, badge }, children) => (h("div", { slot: slot, part: "detail-head", class: "p-2" }, h("div", { class: "d-flex flex-row align-items-center gap-2 mb-2" }, h("h1", { class: "m-0", part: "detail-title" }, title), badge), h("div", { part: "detail-head-info", class: "d-flex flex-row align-items-top" }, children)));
|
|
8
|
+
export const CodeBlock = ({ metadata }) => metadata && Object.keys(metadata).length ? (h("div", { class: 'mt-4' }, h("pre", { part: "detail-metadata", class: "p-2", "aria-label": "metadata content" }, h("code", null, JSON.stringify(metadata, null, 2))))) : null;
|
|
10
9
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/details/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/details/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,YACE,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAC,+CAA+C,EACrD,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;EAE7B,WACE,IAAI,EAAC,wBAAwB,EAC7B,KAAK,EAAC,kCAAkC,EACxC,IAAI,EAAC,QAAQ;IAEb,YAAM,KAAK,EAAC,iBAAiB,iBAAkB,CAC3C,CACD,CACR,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAE,EAAE,CAAC,CAClD,YACE,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAC,+CAA+C,EACrD,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;EAE7B,eAAM,YAAY,CAAO,CACpB,CACR,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,EAAE,YAAY,EAA4B,EAC1C,QAAQ,EACR,EAAE,CAAC,CACH,WAAK,IAAI,EAAC,gBAAgB,EAAC,KAAK,EAAC,MAAM;EACrC,UAAI,IAAI,EAAC,sBAAsB,IAAE,YAAY,CAAM;EACnD,aAAM;EACN,WAAK,KAAK,EAAC,6DA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I,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CACzC,WAAK,KAAK,EAAC,MAAM;EACf,WAAK,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,KAAK,gBAAY,kBAAkB;IACnE,gBACG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAC7B,CACH,CACF,CACP,CAAC,CAAC,CAAC,IAAI,CAAC","sourcesContent":["import { h } from '@stencil/core';\n\nexport const LoadingState = (\n <main\n part=\"detail-loading-state\"\n class=\"p-4 d-flex justify-content-center text-center\"\n style={{ fontSize: '1.2rem' }}\n >\n <div\n part=\"detail-loading-spinner\"\n class=\"spinner-border spinner-border-sm\"\n role=\"status\"\n >\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </main>\n);\n\nexport const ErrorState = (errorMessage: string) => (\n <main\n part=\"detail-empty-state\"\n class=\"p-4 d-flex justify-content-center text-center\"\n style={{ fontSize: '1.2rem' }}\n >\n <div>{errorMessage}</div>\n </main>\n);\n\nexport const DetailSection = (\n { sectionTitle }: { sectionTitle: string },\n children,\n) => (\n <div part=\"detail-section\" class=\"mt-4\">\n <h5 part=\"detail-section-title\">{sectionTitle}</h5>\n <hr />\n <div class=\"d-flex flex-column justify-content-center gap-2 text-nowrap\">\n {children}\n </div>\n </div>\n);\n\nexport const DetailItem = ({\n title,\n value,\n}: {\n title: string;\n value: string;\n}) =>\n title && value ? (\n <div class=\"d-flex gap-2\">\n <span part=\"detail-section-item-title\" class=\"fw-bold flex-1\">\n {title}\n </span>\n <span\n part=\"detail-section-item-data\"\n class=\"flex-1\"\n innerHTML={value}\n ></span>\n </div>\n ) : null;\n\nexport const EntityHeadInfoItem = ({\n title,\n value,\n classes,\n}: {\n title: string;\n value: any;\n classes?: string;\n}) => (\n <div part=\"detail-head-info-item\" class={`d-flex flex-column ${classes}`}>\n <span\n part=\"detail-head-info-item-title\"\n class=\"fw-bold border-1 border-bottom ps-2 pe-2\"\n >\n {title}\n </span>\n <span part=\"detail-head-info-item-data\" class=\"pt-2 ps-2 pe-2\">\n {value}\n </span>\n </div>\n);\n\nexport const EntityHeadInfo = ({ title, slot, badge }, children) => (\n <div slot={slot} part=\"detail-head\" class=\"p-2\">\n <div class=\"d-flex flex-row align-items-center gap-2 mb-2\">\n <h1 class=\"m-0\" part=\"detail-title\">\n {title}\n </h1>\n {badge}\n </div>\n <div part=\"detail-head-info\" class=\"d-flex flex-row align-items-top\">\n {children}\n </div>\n </div>\n);\n\nexport const CodeBlock = ({ metadata }: {metadata: {}}) => \n metadata && Object.keys(metadata).length ? (\n <div class='mt-4'>\n <pre part=\"detail-metadata\" class=\"p-2\" aria-label=\"metadata content\">\n <code>\n {JSON.stringify(metadata, null, 2)}\n </code>\n </pre>\n </div>\n ) : null;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-number-masked.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-number-masked.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,iBAAiB;;IASpB,UAAK,GAA0B,IAAI,CAAC;;;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE;MAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;QACjC,IAAI,EAAE,IAAI,CAAC,IAAI;OAChB,CAAC,CAAC;MAEH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MACzC,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;MAC9B,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACrC;EACH,CAAC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,EAAE,CAAC;EACxB,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,IAAI,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"form-control-number-masked.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-number-masked.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,iBAAiB;;IASpB,UAAK,GAA0B,IAAI,CAAC;;;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE;MAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;QACjC,IAAI,EAAE,IAAI,CAAC,IAAI;OAChB,CAAC,CAAC;MAEH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAA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C,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\nimport IMask, { InputMask } from 'imask';\n\n@Component({\n tag: 'form-control-number-masked',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class NumberInputMasked {\n @Prop() label: string;\n @Prop() name: any;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() inputHandler: (name: string, value: string) => void;\n @Prop() mask: string;\n @Prop() disabled: boolean;\n\n private imask: InputMask<any> | null = null;\n\n textInput!: HTMLInputElement;\n\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n componentDidLoad() {\n if (this.textInput && this.mask) {\n this.imask = IMask(this.textInput, {\n mask: this.mask,\n });\n\n this.imask.on('accept', () => {\n const rawValue = this.imask.unmaskedValue;\n this.inputHandler(this.name, rawValue);\n });\n\n this.textInput.addEventListener('blur', () => {\n this.formControlBlur.emit();\n });\n\n this.updateInput(this.defaultValue);\n }\n }\n\n disconnectedCallback() {\n this.imask?.destroy();\n }\n\n updateInput(newValue: any) {\n if (this.imask && newValue) {\n this.imask.value = String(newValue);\n }\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n ref={el => (this.textInput = el as HTMLInputElement)}\n id={this.name}\n name={this.name}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n disabled={this.disabled}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -52,11 +52,11 @@ export class FormController {
|
|
|
52
52
|
const properties = Array.isArray(path) ? path : path.split('.');
|
|
53
53
|
this.setNestedError(obj, properties, message);
|
|
54
54
|
}
|
|
55
|
-
async validate() {
|
|
55
|
+
async validate(context) {
|
|
56
56
|
this._isValid = true;
|
|
57
57
|
this._errors = {};
|
|
58
58
|
try {
|
|
59
|
-
await this._schema.validate(this._values, { abortEarly: false });
|
|
59
|
+
await this._schema.validate(this._values, { context, abortEarly: false });
|
|
60
60
|
}
|
|
61
61
|
catch (err) {
|
|
62
62
|
this._isValid = false;
|
|
@@ -67,8 +67,8 @@ export class FormController {
|
|
|
67
67
|
this.errors.next(this._errors);
|
|
68
68
|
return this._isValid;
|
|
69
69
|
}
|
|
70
|
-
async validateAndSubmit(submitHandler) {
|
|
71
|
-
const isValid = await this.validate();
|
|
70
|
+
async validateAndSubmit(submitHandler, context) {
|
|
71
|
+
const isValid = await this.validate(context || {});
|
|
72
72
|
if (isValid) {
|
|
73
73
|
submitHandler();
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,OAAO,cAAc;EAUzB,YAAY,MAAyB;IAT9B,WAAM,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;IACtC,WAAM,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;IAGrC,mBAAc,GAAQ,EAAE,CAAC;IACzB,YAAO,GAAQ,EAAE,CAAC;IAClB,YAAO,GAAQ,EAAE,CAAC;IAClB,aAAQ,GAAG,IAAI,CAAC;IAGtB,I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b,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IACnD,IAAI,OAAO,EAAE;MACX,aAAa,EAAE,CAAC;KACjB;EACH,CAAC;EAEM,gBAAgB,CAAC,MAAW;IACjC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,SAAS,CAAC,MAAW;IAC1B,IAAI,CAAC,OAAO,mCAAQ,IAAI,CAAC,OAAO,GAAK,MAAM,CAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,WAAW;IAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,gBAAgB;IACrB,OAAO,IAAI,CAAC,cAAc,CAAC;EAC7B,CAAC;CACF","sourcesContent":["import { BehaviorSubject } from 'rxjs';\nimport { ObjectSchema, ValidationError } from 'yup';\n\nexport class FormController {\n public values = new BehaviorSubject<any>({});\n public errors = new BehaviorSubject<any>({});\n\n private _schema: ObjectSchema<any>;\n private _initialValues: any = {};\n private _values: any = {};\n private _errors: any = {};\n private _isValid = true;\n\n constructor(schema: ObjectSchema<any>) {\n this._schema = schema;\n }\n\n private processArrayError(\n obj: any,\n property: string,\n remainingProperties: string[],\n message: string,\n ): void {\n // Extract array name and index from the property string\n const [arrayName, indexStr] = property\n .match(/^([a-zA-Z0-9]+)\\[(\\d+)\\]/)\n .slice(1);\n const index = parseInt(indexStr, 10);\n\n // Ensure the array exists and has an entry at the given index\n obj[arrayName] = obj[arrayName] || [];\n obj[arrayName][index] = obj[arrayName][index] || {};\n\n // Recursively set the error if there are remaining properties, else set the error message\n if (remainingProperties.length) {\n this.setNestedError(obj[arrayName][index], remainingProperties, message);\n } else {\n obj[arrayName][index] = message;\n }\n }\n\n private processRegularError(\n obj: any,\n property: string,\n remainingProperties: string[],\n message: string,\n ): void {\n // Ensure the property exists\n obj[property] = obj[property] || {};\n\n // Recursively set the error if there are remaining properties, else set the error message\n if (remainingProperties.length) {\n this.setNestedError(obj[property], remainingProperties, message);\n } else {\n obj[property] = message;\n }\n }\n\n private setNestedError(\n obj: any,\n properties: string[],\n message: string,\n ): void {\n const property = properties.shift();\n const isArrayError = property.includes('[');\n\n if (isArrayError) {\n this.processArrayError(obj, property, properties, message);\n } else {\n this.processRegularError(obj, property, properties, message);\n }\n }\n\n private setError(obj: any, path: string, message: string): void {\n // Convert path to properties array\n const properties = Array.isArray(path) ? path : path.split('.');\n this.setNestedError(obj, properties, message);\n }\n\n private async validate(context?: any): Promise<boolean> {\n this._isValid = true;\n this._errors = {};\n\n try {\n await this._schema.validate(this._values, { context, abortEarly: false });\n } catch (err) {\n this._isValid = false;\n err.inner.forEach((item: ValidationError) => {\n this.setError(this._errors, item.path, item.message);\n });\n }\n\n this.errors.next(this._errors);\n return this._isValid;\n }\n\n public async validateAndSubmit(\n submitHandler: () => void,\n context?: any,\n ): Promise<void> {\n const isValid = await this.validate(context || {});\n if (isValid) {\n submitHandler();\n }\n }\n\n public setInitialValues(values: any): void {\n this._initialValues = values;\n this._values = values;\n this.values.next(this._values);\n }\n\n public setValues(values: any): void {\n this._values = { ...this._values, ...values };\n this.values.next(this._values);\n }\n\n public resetValues(): void {\n this._values = this._initialValues;\n this.values.next(this._values);\n }\n\n public getInitialValues(): any {\n return this._initialValues;\n }\n}\n"]}
|