@justifi/webcomponents 4.7.0-rc.0 → 4.7.0-rc.2
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/{SubAccount-5d77adbf.js → SubAccount-f47c8522.js} +2 -2
- package/dist/cjs/{SubAccount-5d77adbf.js.map → SubAccount-f47c8522.js.map} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
- package/dist/cjs/config-70f62990.js +19 -0
- package/dist/cjs/config-70f62990.js.map +1 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +1 -1
- package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
- package/dist/cjs/form-control-number_3.cjs.entry.js +1 -1
- package/dist/cjs/{index-ce7d512e.js → index-c5ace247.js} +4 -1
- package/dist/cjs/index-c5ace247.js.map +1 -0
- package/dist/cjs/justifi-additional-questions_6.cjs.entry.js +1 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +3 -2
- package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-list.cjs.entry.js +5 -3
- 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 +2 -2
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11030 -0
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +11 -9
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +7 -6
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/subaccount-bank-details.cjs.entry.js +2 -2
- package/dist/cjs/subaccount-terms-details.cjs.entry.js +2 -2
- package/dist/cjs/{utils-d9cbe26f.js → utils-13d069be.js} +6 -1
- package/dist/cjs/utils-13d069be.js.map +1 -0
- package/dist/cjs/{utils-aaa6ab8b.js → utils-4622829d.js} +2 -2
- package/dist/cjs/{utils-aaa6ab8b.js.map → utils-4622829d.js.map} +1 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/api/GrossVolume.js +2 -0
- package/dist/collection/api/GrossVolume.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/collection-manifest.json +1 -0
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -1
- 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/business-details.js +2 -1
- package/dist/collection/components/business-details/business-details.js.map +1 -1
- package/dist/collection/components/business-details/business-details.stories.js +3 -2
- package/dist/collection/components/business-details/business-details.stories.js.map +1 -1
- package/dist/collection/components/business-form/business-form-stepped.js +2 -1
- package/dist/collection/components/business-form/business-form-stepped.js.map +1 -1
- package/dist/collection/components/business-form/business-form-stepped.stories.js +3 -2
- package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -1
- package/dist/collection/components/business-form/business-form.js +2 -1
- package/dist/collection/components/business-form/business-form.js.map +1 -1
- package/dist/collection/components/business-form/business-form.stories.js +2 -1
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
- package/dist/collection/components/business-list/business-list.js +3 -1
- 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 -1
- package/dist/collection/components/card-form/card-form.stories.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 +128 -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/payment-details/payment-details.js +2 -1
- package/dist/collection/components/payment-details/payment-details.js.map +1 -1
- package/dist/collection/components/payment-details/payment-details.stories.js +3 -2
- package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
- package/dist/collection/components/payment-form/payment-form.stories.js +2 -1
- package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +3 -2
- 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 +9 -8
- 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 +2 -1
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +3 -2
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.js +2 -1
- package/dist/collection/components/payout-details/payout-details.js.map +1 -1
- package/dist/collection/components/payout-details/payout-details.stories.js +3 -2
- package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.js +2 -1
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.stories.js +3 -2
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.js +2 -1
- 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.js +2 -1
- package/dist/collection/components/refund-form/refund-form.js.map +1 -1
- package/dist/collection/components/refund-form/refund-form.stories.js +1 -1
- package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -1
- package/dist/collection/components/subaccount-details/subaccount-details.js +3 -2
- package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -1
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js +4 -3
- package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -1
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +2 -1
- package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -1
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +3 -2
- package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -1
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/SubAccount.js +1 -1
- package/dist/components/config.js +17 -0
- package/dist/components/config.js.map +1 -0
- package/dist/components/justifi-business-details.js +2 -1
- package/dist/components/justifi-business-details.js.map +1 -1
- package/dist/components/justifi-business-form-stepped.js +2 -1
- package/dist/components/justifi-business-form-stepped.js.map +1 -1
- package/dist/components/justifi-business-form.js +2 -1
- package/dist/components/justifi-business-form.js.map +1 -1
- package/dist/components/justifi-business-list.js +3 -1
- 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 +11053 -0
- package/dist/components/justifi-gross-payment-chart.js.map +1 -0
- package/dist/components/justifi-payment-balance-transactions.js +1 -1
- package/dist/components/justifi-payment-details.js +3 -2
- package/dist/components/justifi-payment-details.js.map +1 -1
- package/dist/components/justifi-payments-list.js +3 -2
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payout-details.js +3 -2
- package/dist/components/justifi-payout-details.js.map +1 -1
- package/dist/components/justifi-payouts-list.js +3 -2
- package/dist/components/justifi-payouts-list.js.map +1 -1
- package/dist/components/justifi-proceeds-list.js +3 -2
- package/dist/components/justifi-proceeds-list.js.map +1 -1
- package/dist/components/justifi-refund-form.js +2 -1
- package/dist/components/justifi-refund-form.js.map +1 -1
- package/dist/components/justifi-subaccount-details.js +4 -3
- package/dist/components/justifi-subaccount-details.js.map +1 -1
- package/dist/components/justifi-subaccounts-list.js +3 -2
- package/dist/components/justifi-subaccounts-list.js.map +1 -1
- package/dist/components/payment-method-form.js +10 -8
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/subaccount-merchant-details2.js +1 -1
- package/dist/components/utils2.js +5 -1
- package/dist/components/utils2.js.map +1 -1
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -0
- package/dist/esm/{SubAccount-cf29d050.js → SubAccount-128190e9.js} +2 -2
- package/dist/esm/{SubAccount-cf29d050.js.map → SubAccount-128190e9.js.map} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +3 -3
- package/dist/esm/config-b1976dbd.js +17 -0
- package/dist/esm/config-b1976dbd.js.map +1 -0
- package/dist/esm/form-control-datepart_2.entry.js +1 -1
- package/dist/esm/form-control-monetary.entry.js +1 -1
- package/dist/esm/form-control-number_3.entry.js +1 -1
- package/dist/esm/{index-b02f9a6e.js → index-7471ed60.js} +4 -1
- package/dist/esm/index-7471ed60.js.map +1 -0
- package/dist/esm/justifi-additional-questions_6.entry.js +1 -1
- package/dist/esm/justifi-bank-account-form.entry.js +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +4 -3
- package/dist/esm/justifi-business-details.entry.js.map +1 -1
- package/dist/esm/justifi-business-form-stepped.entry.js +3 -2
- package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -1
- package/dist/esm/justifi-business-form.entry.js +3 -2
- package/dist/esm/justifi-business-form.entry.js.map +1 -1
- package/dist/esm/justifi-business-list.entry.js +5 -3
- 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 +2 -2
- package/dist/esm/justifi-gross-payment-chart.entry.js +11026 -0
- package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
- package/dist/esm/justifi-payment-balance-transactions.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +5 -4
- package/dist/esm/justifi-payment-details.entry.js.map +1 -1
- package/dist/esm/justifi-payment-form.entry.js +2 -2
- package/dist/esm/justifi-payment-method-form.entry.js +11 -9
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +4 -3
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payout-details.entry.js +5 -4
- package/dist/esm/justifi-payout-details.entry.js.map +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +4 -3
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
- package/dist/esm/justifi-proceeds-list.entry.js +4 -3
- package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-refund-form.entry.js.map +1 -1
- package/dist/esm/justifi-subaccount-details.entry.js +7 -6
- package/dist/esm/justifi-subaccount-details.entry.js.map +1 -1
- package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
- package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -1
- package/dist/esm/justifi-table_2.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/subaccount-bank-details.entry.js +2 -2
- package/dist/esm/subaccount-terms-details.entry.js +2 -2
- package/dist/esm/{utils-fcf19fd5.js → utils-40b7002c.js} +6 -2
- package/dist/esm/utils-40b7002c.js.map +1 -0
- package/dist/esm/{utils-d647dd96.js → utils-6352c002.js} +2 -2
- package/dist/esm/{utils-d647dd96.js.map → utils-6352c002.js.map} +1 -1
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/api/GrossVolume.d.ts +8 -0
- package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
- 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.d.ts +17 -0
- package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +13 -0
- package/dist/types/utils/utils.d.ts +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-99b3925f.entry.js → p-215b4c87.entry.js} +2 -2
- package/dist/webcomponents/{p-08311783.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-14391341.entry.js → p-355eabff.entry.js} +2 -2
- package/dist/webcomponents/{p-2ac4e73d.entry.js → p-356cf20d.entry.js} +2 -2
- package/dist/webcomponents/{p-a1a94012.entry.js → p-397e0d5a.entry.js} +2 -2
- package/dist/webcomponents/p-491d5c69.entry.js +2 -0
- package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
- package/dist/webcomponents/{p-8471740f.entry.js → p-62872b87.entry.js} +2 -2
- package/dist/webcomponents/{p-e83f93cd.entry.js → p-635a3b3e.entry.js} +2 -2
- 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-2806a2d6.js → p-76dffeec.js} +2 -2
- package/dist/webcomponents/{p-5dd71882.entry.js → p-77e732b2.entry.js} +2 -2
- package/dist/webcomponents/{p-756629e9.entry.js → p-798483dd.entry.js} +2 -2
- package/dist/webcomponents/{p-05cc444a.entry.js → p-7a24ab66.entry.js} +2 -2
- package/dist/webcomponents/p-8367b46c.entry.js +2 -0
- package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
- package/dist/webcomponents/{p-6642d95b.entry.js → p-88fa33c1.entry.js} +2 -2
- package/dist/webcomponents/p-8c4c3d60.entry.js +20 -0
- package/dist/webcomponents/p-8c4c3d60.entry.js.map +1 -0
- package/dist/webcomponents/{p-37b8106d.entry.js → p-931989e6.entry.js} +2 -2
- package/dist/webcomponents/{p-1d42e416.entry.js → p-96eecdff.entry.js} +2 -2
- package/dist/webcomponents/{p-a3211bb2.js → p-988191bf.js} +2 -2
- 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-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-92872bbe.entry.js → p-c4289027.entry.js} +2 -2
- package/dist/webcomponents/{p-d18c0273.entry.js → p-c43e9572.entry.js} +2 -2
- package/dist/webcomponents/{p-0c5afcbc.js → p-cbb60191.js} +3 -3
- package/dist/webcomponents/p-cbb60191.js.map +1 -0
- package/dist/webcomponents/p-d40718da.entry.js +2 -0
- package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
- package/dist/webcomponents/{p-4d37473a.js → p-d6b5793d.js} +2 -2
- package/dist/webcomponents/p-d6b5793d.js.map +1 -0
- package/dist/webcomponents/p-d7630f46.entry.js +2 -0
- package/dist/webcomponents/{p-5f434e8b.entry.js.map → p-d7630f46.entry.js.map} +1 -1
- package/dist/webcomponents/{p-b4f185c5.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/index-ce7d512e.js.map +0 -1
- package/dist/cjs/utils-d9cbe26f.js.map +0 -1
- package/dist/esm/index-b02f9a6e.js.map +0 -1
- package/dist/esm/utils-fcf19fd5.js.map +0 -1
- package/dist/webcomponents/p-014b2f3a.entry.js +0 -2
- package/dist/webcomponents/p-014b2f3a.entry.js.map +0 -1
- package/dist/webcomponents/p-07059336.entry.js +0 -2
- package/dist/webcomponents/p-07059336.entry.js.map +0 -1
- package/dist/webcomponents/p-0c5afcbc.js.map +0 -1
- package/dist/webcomponents/p-1b5bd8f8.entry.js +0 -2
- package/dist/webcomponents/p-1b5bd8f8.entry.js.map +0 -1
- package/dist/webcomponents/p-23f600d3.entry.js +0 -2
- package/dist/webcomponents/p-23f600d3.entry.js.map +0 -1
- package/dist/webcomponents/p-26b1a61d.entry.js +0 -2
- package/dist/webcomponents/p-26b1a61d.entry.js.map +0 -1
- package/dist/webcomponents/p-2f741cd2.entry.js +0 -2
- package/dist/webcomponents/p-2f741cd2.entry.js.map +0 -1
- package/dist/webcomponents/p-3e0f6758.entry.js +0 -2
- package/dist/webcomponents/p-3e0f6758.entry.js.map +0 -1
- package/dist/webcomponents/p-43c04b00.entry.js +0 -2
- package/dist/webcomponents/p-43c04b00.entry.js.map +0 -1
- package/dist/webcomponents/p-4d37473a.js.map +0 -1
- package/dist/webcomponents/p-5b378f8d.entry.js +0 -2
- package/dist/webcomponents/p-5b378f8d.entry.js.map +0 -1
- package/dist/webcomponents/p-5f434e8b.entry.js +0 -2
- package/dist/webcomponents/p-6b5fcbff.entry.js +0 -2
- package/dist/webcomponents/p-6b5fcbff.entry.js.map +0 -1
- package/dist/webcomponents/p-c52d63b1.entry.js +0 -2
- package/dist/webcomponents/p-c52d63b1.entry.js.map +0 -1
- package/dist/webcomponents/p-c9373e73.entry.js +0 -2
- package/dist/webcomponents/p-c9373e73.entry.js.map +0 -1
- /package/dist/webcomponents/{p-99b3925f.entry.js.map → p-215b4c87.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-08311783.entry.js.map → p-2cd29187.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-14391341.entry.js.map → p-355eabff.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-2ac4e73d.entry.js.map → p-356cf20d.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-a1a94012.entry.js.map → p-397e0d5a.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-8471740f.entry.js.map → p-62872b87.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-e83f93cd.entry.js.map → p-635a3b3e.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-2806a2d6.js.map → p-76dffeec.js.map} +0 -0
- /package/dist/webcomponents/{p-5dd71882.entry.js.map → p-77e732b2.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-756629e9.entry.js.map → p-798483dd.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-05cc444a.entry.js.map → p-7a24ab66.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-6642d95b.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-37b8106d.entry.js.map → p-931989e6.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-1d42e416.entry.js.map → p-96eecdff.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-a3211bb2.js.map → p-988191bf.js.map} +0 -0
- /package/dist/webcomponents/{p-92872bbe.entry.js.map → p-c4289027.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-d18c0273.entry.js.map → p-c43e9572.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-b4f185c5.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-c5ace247.js');
|
|
4
4
|
|
|
5
5
|
const LoadingState = (index.h("main", { part: "detail-loading-state", class: "p-4 d-flex justify-content-center text-center", style: { fontSize: '1.2rem' } },
|
|
6
6
|
index.h("div", { part: "detail-loading-spinner", class: "spinner-border spinner-border-sm", role: "status" },
|
|
@@ -34,4 +34,4 @@ exports.EntityHeadInfoItem = EntityHeadInfoItem;
|
|
|
34
34
|
exports.ErrorState = ErrorState;
|
|
35
35
|
exports.LoadingState = LoadingState;
|
|
36
36
|
|
|
37
|
-
//# sourceMappingURL=utils-
|
|
37
|
+
//# sourceMappingURL=utils-4622829d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"utils-
|
|
1
|
+
{"file":"utils-4622829d.js","mappings":";;;;MAEa,YAAY,IACvBA,kBACE,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAC,+CAA+C,EACrD,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;EAE7BA,iBACE,IAAI,EAAC,wBAAwB,EAC7B,KAAK,EAAC,kCAAkC,EACxC,IAAI,EAAC,QAAQ;IAEbA,kBAAM,KAAK,EAAC,iBAAiB,iBAAkB,CAC3C,CACD,EACP;MAEW,UAAU,GAAG,CAAC,YAAoB,MAC7CA,kBACE,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAC,+CAA+C,EACrD,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;EAE7BA,qBAAM,YAAY,CAAO,CACpB,EACP;MAEW,aAAa,GAAG,CAC3B,EAAE,YAAY,EAA4B,EAC1C,QAAQ,MAERA,iBAAK,IAAI,EAAC,gBAAgB,EAAC,KAAK,EAAC,MAAM;EACrCA,gBAAI,IAAI,EAAC,sBAAsB,IAAE,YAAY,CAAM;EACnDA,mBAAM;EACNA,iBAAK,KAAK,EAAC,6DAA6D,IACrE,QAAQ,CACL,CACF,EACN;MAEW,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,KAAK,G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,IACJ;;;;;;;;;;","names":["h"],"sources":["src/components/details/utils.tsx"],"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"],"version":3}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-c5ace247.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Browser v4.1.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["justifi-business-form.cjs",[[0,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"isLoading":[32]}]]],["justifi-business-form-stepped.cjs",[[0,"justifi-business-form-stepped",{"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"businessId":[1,"business-id"],"isLoading":[32],"currentStep":[32],"totalSteps":[32],"serverError":[32]}]]],["justifi-business-details.cjs",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"iframeOrigin":[1,"iframe-origin"],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"hasLoadedFonts":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"loadFontsOnParent":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-subaccount-details.cjs",[[1,"justifi-subaccount-details",{"accountId":[1,"account-id"],"subaccountId":[1,"subaccount-id"],"authToken":[1,"auth-token"],"onboardingData":[32],"subaccount":[32],"loading":[32],"errorMessage":[32]}]]],["justifi-business-list.cjs",[[1,"justifi-business-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"businesses":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payment-balance-transactions.cjs",[[1,"justifi-payment-balance-transactions",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"balanceTransactions":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payouts-list.cjs",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-proceeds-list.cjs",[[1,"justifi-proceeds-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"proceeds":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-refund-form.cjs",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["justifi-subaccounts-list.cjs",[[1,"justifi-subaccounts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"subaccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payment-details.cjs",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"payment":[32],"loading":[32],"errorMessage":[32]}]]],["justifi-payout-details.cjs",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"payout":[32],"loading":[32],"errorMessage":[32]}]]],["subaccount-bank-details.cjs",[[1,"subaccount-bank-details",{"data":[16]}]]],["subaccount-terms-details.cjs",[[1,"subaccount-terms-details",{"data":[16]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1025],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[1,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-details.cjs",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["subaccount-account-details_4.cjs",[[1,"subaccount-account-details",{"subaccount":[16],"onboardingData":[16]}],[1,"subaccount-merchant-details",{"onboardingData":[8,"onboarding-data"]}],[1,"subaccount-owners-details",{"data":[16]}],[1,"subaccount-representative-details",{"data":[16]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["form-control-monetary.cjs",[[1,"form-control-monetary",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16]}]]],["additional-questions-details_5.cjs",[[1,"additional-questions-details",{"business":[16]}],[1,"generic-info-details",{"business":[16]}],[1,"legal-address-details",{"legalAddress":[16]}],[1,"owner-details",{"owners":[16]}],[1,"representative-details",{"representative":[16]}]]],["form-control-datepart_2.cjs",[[1,"form-control-datepart",{"label":[1],"name":[1],"error":[1],"defaultValue":[1,"default-value"],"type":[1],"inputHandler":[16],"disabled":[4]}],[1,"form-control-number-masked",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]}]]],["form-control-number_3.cjs",[[1,"form-control-select",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"options":[16],"disabled":[4]}],[1,"form-control-number",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4],"input":[32]}],[1,"form-control-text",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"disabled":[4],"inputHandler":[16],"input":[32]}]]],["justifi-additional-questions_6.cjs",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-business-generic-info",{"formController":[16],"errors":[32]}],[0,"justifi-business-owners",{"formController":[16],"isEditing":[4,"is-editing"],"errors":[32],"owners":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[1,"justifi-business-address-form",{"onFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]}]]],["justifi-table_2.cjs",[[1,"justifi-table",{"loading":[4],"errorMessage":[1,"error-message"],"rowData":[16],"columnData":[16],"paging":[16],"params":[8],"entityId":[16],"rowClickHandler":[16]}],[1,"pagination-menu",{"paging":[16],"params":[16]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["justifi-business-form.cjs",[[0,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"isLoading":[32]}]]],["justifi-business-form-stepped.cjs",[[0,"justifi-business-form-stepped",{"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"businessId":[1,"business-id"],"isLoading":[32],"currentStep":[32],"totalSteps":[32],"serverError":[32]}]]],["justifi-business-details.cjs",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"iframeOrigin":[1,"iframe-origin"],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"hasLoadedFonts":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"loadFontsOnParent":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-subaccount-details.cjs",[[1,"justifi-subaccount-details",{"accountId":[1,"account-id"],"subaccountId":[1,"subaccount-id"],"authToken":[1,"auth-token"],"onboardingData":[32],"subaccount":[32],"loading":[32],"errorMessage":[32]}]]],["justifi-business-list.cjs",[[1,"justifi-business-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"businesses":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payment-balance-transactions.cjs",[[1,"justifi-payment-balance-transactions",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"balanceTransactions":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payouts-list.cjs",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-proceeds-list.cjs",[[1,"justifi-proceeds-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"proceeds":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-refund-form.cjs",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["justifi-subaccounts-list.cjs",[[1,"justifi-subaccounts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"subaccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payment-details.cjs",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"payment":[32],"loading":[32],"errorMessage":[32]}]]],["justifi-payout-details.cjs",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"payout":[32],"loading":[32],"errorMessage":[32]}]]],["justifi-gross-payment-chart.cjs",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"data":[32],"total":[32],"dates":[32],"endDate":[32],"loading":[32],"errorMessage":[32]}]]],["subaccount-bank-details.cjs",[[1,"subaccount-bank-details",{"data":[16]}]]],["subaccount-terms-details.cjs",[[1,"subaccount-terms-details",{"data":[16]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1025],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[1,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-details.cjs",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["subaccount-account-details_4.cjs",[[1,"subaccount-account-details",{"subaccount":[16],"onboardingData":[16]}],[1,"subaccount-merchant-details",{"onboardingData":[8,"onboarding-data"]}],[1,"subaccount-owners-details",{"data":[16]}],[1,"subaccount-representative-details",{"data":[16]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["form-control-monetary.cjs",[[1,"form-control-monetary",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16]}]]],["additional-questions-details_5.cjs",[[1,"additional-questions-details",{"business":[16]}],[1,"generic-info-details",{"business":[16]}],[1,"legal-address-details",{"legalAddress":[16]}],[1,"owner-details",{"owners":[16]}],[1,"representative-details",{"representative":[16]}]]],["form-control-datepart_2.cjs",[[1,"form-control-datepart",{"label":[1],"name":[1],"error":[1],"defaultValue":[1,"default-value"],"type":[1],"inputHandler":[16],"disabled":[4]}],[1,"form-control-number-masked",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]}]]],["form-control-number_3.cjs",[[1,"form-control-select",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"options":[16],"disabled":[4]}],[1,"form-control-number",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4],"input":[32]}],[1,"form-control-text",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"disabled":[4],"inputHandler":[16],"input":[32]}]]],["justifi-additional-questions_6.cjs",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-business-generic-info",{"formController":[16],"errors":[32]}],[0,"justifi-business-owners",{"formController":[16],"isEditing":[4,"is-editing"],"errors":[32],"owners":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[1,"justifi-business-address-form",{"onFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]}]]],["justifi-table_2.cjs",[[1,"justifi-table",{"loading":[4],"errorMessage":[1,"error-message"],"rowData":[16],"columnData":[16],"paging":[16],"params":[8],"entityId":[16],"rowClickHandler":[16]}],[1,"pagination-menu",{"paging":[16],"params":[16]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GrossVolume.js","sourceRoot":"","sources":["../../../src/api/GrossVolume.ts"],"names":[],"mappings":"","sourcesContent":["export interface GrossVolumeReportDate {\n date: string, value: number\n}\n\nexport interface GrossVolumeReport {\n total: number,\n dates: GrossVolumeReportDate[]\n}\n"]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export const mockGrossVolumeReport = {
|
|
2
|
+
total: 238534158,
|
|
3
|
+
dates: [
|
|
4
|
+
{
|
|
5
|
+
date: "2023-12-13",
|
|
6
|
+
value: 14716057
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
date: "2023-12-12",
|
|
10
|
+
value: 5115042
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
date: "2023-12-11",
|
|
14
|
+
value: 5230555
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
date: "2023-12-10",
|
|
18
|
+
value: 3037618
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
date: "2023-12-09",
|
|
22
|
+
value: 3788553
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
date: "2023-12-08",
|
|
26
|
+
value: 8315442
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
date: "2023-12-07",
|
|
30
|
+
value: 13121572
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
date: "2023-12-06",
|
|
34
|
+
value: 13627049
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
date: "2023-12-05",
|
|
38
|
+
value: 8943872
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
date: "2023-12-04",
|
|
42
|
+
value: 16492904
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
date: "2023-12-03",
|
|
46
|
+
value: 3383167
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
date: "2023-12-02",
|
|
50
|
+
value: 3552343
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
date: "2023-12-01",
|
|
54
|
+
value: 5013040
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
date: "2023-11-30",
|
|
58
|
+
value: 15019397
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
date: "2023-11-29",
|
|
62
|
+
value: 11843948
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
date: "2023-11-28",
|
|
66
|
+
value: 5197866
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
date: "2023-11-27",
|
|
70
|
+
value: 8391006
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
date: "2023-11-26",
|
|
74
|
+
value: 3681388
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
date: "2023-11-25",
|
|
78
|
+
value: 3307336
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
date: "2023-11-24",
|
|
82
|
+
value: 11746683
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
date: "2023-11-23",
|
|
86
|
+
value: 6762045
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
date: "2023-11-22",
|
|
90
|
+
value: 4848777
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
date: "2023-11-21",
|
|
94
|
+
value: 6594568
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
date: "2023-11-20",
|
|
98
|
+
value: 16594458
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
date: "2023-11-19",
|
|
102
|
+
value: 3444383
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
date: "2023-11-18",
|
|
106
|
+
value: 3606620
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
date: "2023-11-17",
|
|
110
|
+
value: 4817040
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
date: "2023-11-16",
|
|
114
|
+
value: 14775453
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
date: "2023-11-15",
|
|
118
|
+
value: 6694476
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
date: "2023-11-14",
|
|
122
|
+
value: 6871500
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=mockGrossVolumeReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockGrossVolumeReport.js","sourceRoot":"","sources":["../../../../src/api/mockData/mockGrossVolumeReport.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;EACnC,KAAK,EAAE,SAAS;EAChB,KAAK,EAAE;IACL;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,QAAQ;KAChB;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;IACD;MACE,IAAI,EAAE,YAAY;MAClB,KAAK,EAAE,OAAO;KACf;GACF;CACF,CAAA","sourcesContent":["export const mockGrossVolumeReport = {\n total: 238534158,\n dates: [\n {\n date: \"2023-12-13\",\n value: 14716057\n },\n {\n date: \"2023-12-12\",\n value: 5115042\n },\n {\n date: \"2023-12-11\",\n value: 5230555\n },\n {\n date: \"2023-12-10\",\n value: 3037618\n },\n {\n date: \"2023-12-09\",\n value: 3788553\n },\n {\n date: \"2023-12-08\",\n value: 8315442\n },\n {\n date: \"2023-12-07\",\n value: 13121572\n },\n {\n date: \"2023-12-06\",\n value: 13627049\n },\n {\n date: \"2023-12-05\",\n value: 8943872\n },\n {\n date: \"2023-12-04\",\n value: 16492904\n },\n {\n date: \"2023-12-03\",\n value: 3383167\n },\n {\n date: \"2023-12-02\",\n value: 3552343\n },\n {\n date: \"2023-12-01\",\n value: 5013040\n },\n {\n date: \"2023-11-30\",\n value: 15019397\n },\n {\n date: \"2023-11-29\",\n value: 11843948\n },\n {\n date: \"2023-11-28\",\n value: 5197866\n },\n {\n date: \"2023-11-27\",\n value: 8391006\n },\n {\n date: \"2023-11-26\",\n value: 3681388\n },\n {\n date: \"2023-11-25\",\n value: 3307336\n },\n {\n date: \"2023-11-24\",\n value: 11746683\n },\n {\n date: \"2023-11-23\",\n value: 6762045\n },\n {\n date: \"2023-11-22\",\n value: 4848777\n },\n {\n date: \"2023-11-21\",\n value: 6594568\n },\n {\n date: \"2023-11-20\",\n value: 16594458\n },\n {\n date: \"2023-11-19\",\n value: 3444383\n },\n {\n date: \"2023-11-18\",\n value: 3606620\n },\n {\n date: \"2023-11-17\",\n value: 4817040\n },\n {\n date: \"2023-11-16\",\n value: 14775453\n },\n {\n date: \"2023-11-15\",\n value: 6694476\n },\n {\n date: \"2023-11-14\",\n value: 6871500\n }\n ]\n}"]}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"components/form/form-control-number.js",
|
|
27
27
|
"components/form/form-control-select.js",
|
|
28
28
|
"components/form/form-control-text.js",
|
|
29
|
+
"components/gross-payment-chart/gross-payment-chart.js",
|
|
29
30
|
"components/pagination-menu/pagination-menu.js",
|
|
30
31
|
"components/payment-balance-transactions/payment-balance-transactions.js",
|
|
31
32
|
"components/payment-details/payment-details.js",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
const CSSVars = `
|
|
2
3
|
--jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900&family=Agdasima';
|
|
3
4
|
--jfi-layout-font-family: Roboto Mono;
|
|
@@ -118,7 +119,7 @@ const Template = (args) => {
|
|
|
118
119
|
<justifi-bank-account-form
|
|
119
120
|
data-testid="bank-account-form-iframe"
|
|
120
121
|
validation-mode='${args['validation-mode'] || 'onSubmit'}'
|
|
121
|
-
iframe-origin='${
|
|
122
|
+
iframe-origin='${config.iframeOrigin}'
|
|
122
123
|
/>
|
|
123
124
|
</div>
|
|
124
125
|
${FormButtons}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bank-account-form.stories.js","sourceRoot":"","sources":["../../../../src/components/bank-account-form/bank-account-form.stories.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCf,CAAC;AAEF,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,2BAA2B;EACtC,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,OAAO;OACtB;KACF;IACD,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,QAA2C,EAAE,EAAE;EAChF,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,QAA2C,EAAE,iBAAsB,EAAE,EAAE;EACxG,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,QAA2C,EAAE,E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
|
1
|
+
{"version":3,"file":"bank-account-form.stories.js","sourceRoot":"","sources":["../../../../src/components/bank-account-form/bank-account-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCf,CAAC;AAEF,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,2BAA2B;EACtC,QAAQ,EAAE;IACR,eAAe,EAAE;MACf,OAAO,EAAE,MAAM;MACf,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,OAAO;OACtB;KACF;IACD,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,QAA2C,EAAE,EAAE;EAChF,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,QAA2C,EAAE,iBAAsB,EAAE,EAAE;EACxG,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,QAA2C,EAAE,EAAE;EAC9E,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;AAC1B,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,GAAG,EAAE;EACvB,OAAO,CAAC,GAAG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,CAAC,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,eAAe,EAAE,OAAO;CACzB,CAAC","sourcesContent":["import { config } from '../../../config';\n\nconst CSSVars = `\n--jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900&family=Agdasima';\n--jfi-layout-font-family: Roboto Mono;\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: 700;\n--jfi-form-label-font-family: sans-serif;\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 default {\n title: 'Components/BankAccountForm',\n component: 'justifi-bank-account-form',\n argTypes: {\n 'css-variables': {\n control: 'text',\n table: {\n category: 'props',\n defaultValue: CSSVars,\n },\n },\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 (bankForm: HTMLJustifiBankAccountFormElement) => {\n const valid = await bankForm.validate();\n console.log(valid);\n};\nconst handleTokenizeClick = async (bankForm: HTMLJustifiBankAccountFormElement, paymentMethodData: any) => {\n const tokenizeResponse = await bankForm.tokenize('CLIENT_ID', paymentMethodData);\n console.log(tokenizeResponse);\n};\nconst handleResizeClick = async (bankForm: HTMLJustifiBankAccountFormElement) => {\n await bankForm.resize();\n};\nconst handleReady = () => {\n console.log('bank account form is ready');\n const bankForm = document.querySelector('justifi-bank-account-form') as HTMLJustifiBankAccountFormElement;\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(bankForm);\n });\n tokenizeBtn?.addEventListener('click', () => {\n handleTokenizeClick(bankForm, {});\n });\n resizeBtn?.addEventListener('click', () => {\n handleResizeClick(bankForm);\n });\n};\n\nconst addEvents = () => {\n addEventListener('bankAccountFormReady', 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 }\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`;\n\nconst Template = (args: any) => {\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-bank-account-form\n data-testid=\"bank-account-form-iframe\"\n validation-mode='${args['validation-mode'] || 'onSubmit'}'\n iframe-origin='${config.iframeOrigin}'\n />\n </div>\n ${FormButtons}\n `;\n};\n\nexport const Basic = Template.bind({});\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'css-variables': CSSVars,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-form.stories.js","sourceRoot":"","sources":["../../../../src/components/billing-form/billing-form.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"billing-form.stories.js","sourceRoot":"","sources":["../../../../src/components/billing-form/billing-form.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,sBAAsB;EACjC,UAAU,EAAE,EAAE;CACf,CAAC;AAOF,MAAM,QAAQ,GAAG,CAAC,IAAU,EAAE,EAAE;EAC9B,OAAO;;;;YAIG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;;;;;kBAKrB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;;;;GAInC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;EACZ,QAAQ,EAAE,qBAAqB;EAC/B,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BhB;CACF,CAAC","sourcesContent":["export default {\n title: 'dev/Components/BillingForm',\n component: 'justifi-billing-form',\n parameters: {},\n};\n\ntype Args = {\n 'legend': string;\n 'css-variables'?: string;\n};\n\nconst Template = (args: Args) => {\n return `\n <div>\n <style>\n :root {\n ${args['css-variables'] || ''}\n }\n </style>\n <justifi-billing-form\n data-testid=\"billing-form-iframe\"\n legend=\"${args['legend'] || ''}\"\n\n />\n </div>\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n legend: 'Billing Form',\n};\n\nexport const Styled = Template.bind({});\nStyled.args = {\n 'legend': 'Styled Billing Form',\n 'css-variables': `\n --jfi-layout-padding: 0;\n --jfi-layout-form-control-spacing-x: .5rem;\n --jfi-layout-form-control-spacing-y: 1rem;\n --jfi-form-label-font-weight: 700;\n --jfi-form-label-font-family: sans-serif;\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-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};\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { Api } from "../../api";
|
|
3
3
|
import { ErrorState, LoadingState } from "../details/utils"; // Make sure to adjust the path if necessary
|
|
4
|
+
import { config } from "../../../config";
|
|
4
5
|
var RENDER_STATES;
|
|
5
6
|
(function (RENDER_STATES) {
|
|
6
7
|
RENDER_STATES["LOADING"] = "loading";
|
|
@@ -34,7 +35,7 @@ export class BusinessDetails {
|
|
|
34
35
|
this.setError('Missing business-id. The form will not be functional without it.');
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
|
-
this.api = Api(this.authToken,
|
|
38
|
+
this.api = Api(this.authToken, config.proxyApiOrigin);
|
|
38
39
|
await this.fetchBusiness(this.businessId);
|
|
39
40
|
}
|
|
40
41
|
async fetchBusiness(businessId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-details.js","sourceRoot":"","sources":["../../../../src/components/business-details/business-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC,CAAC,4CAA4C;
|
|
1
|
+
{"version":3,"file":"business-details.js","sourceRoot":"","sources":["../../../../src/components/business-details/business-details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC,CAAC,4CAA4C;AACzG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,IAAK,aAIJ;AAJD,WAAK,aAAa;EAChB,oCAAmB,CAAA;EACnB,gCAAe,CAAA;EACf,gCAAe,CAAA;AACjB,CAAC,EAJI,aAAa,KAAb,aAAa,QAIjB;AAED;;;;;;;GAOG;AAMH,MAAM,OAAO,eAAe;EAS1B;;;;uBALsC,aAAa,CAAC,OAAO;wBAC3B,mBAAmB;IAKjD,IAAI,CAAC,aAAa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,CAAC,KAAK,CAAC;EACzC,CAAC;EAED,MAAM;;IACJ,IAAI,IAAI,CAAC,WAAW,KAAK,aAAa,CAAC,OAAO,EAAE;MAC9C,OAAO,YAAY,CAAC;KACrB;IAED,IAAI,IAAI,CAAC,WAAW,KAAK,aAAa,CAAC,KAAK,EAAE;MAC5C,OAAO,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACtC;IAED,OAAO,CACL,EAAC,IAAI;MACH,4BAAsB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI;MACjD,6BAAuB,YAAY,EAAE,MAAA,IAAI,CAAC,QAAQ,0CAAE,aAAa,GAAI;MACrE,8BACE,cAAc,EAAE,MAAA,IAAI,CAAC,QAAQ,0CAAE,cAAc,GAC7C;MACF,qBAAe,MAAM,EAAE,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,GAAI;MAChD,oCAA8B,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,CACpD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, State, h } from '@stencil/core';\nimport { IBusiness } from '../../api/Business';\nimport { Api } from '../../api';\nimport { ErrorState, LoadingState } from '../details/utils'; // Make sure to adjust the path if necessary\nimport { config } from '../../../config';\n\n\nenum RENDER_STATES {\n LOADING = 'loading',\n READY = 'ready',\n ERROR = 'error',\n}\n\n/**\n *\n * @exportedPart detail-section\n * @exportedPart detail-section-title\n * @exportedPart detail-section-item-title\n * @exportedPart detail-section-item-data\n * @exportedPart detail-empty-state\n */\n@Component({\n tag: 'justifi-business-details',\n styleUrl: 'business-details.scss',\n shadow: true,\n})\nexport class BusinessDetails {\n @Prop() businessId: string;\n @Prop() authToken: string;\n @State() business: IBusiness;\n @State() renderState: RENDER_STATES = RENDER_STATES.LOADING;\n @State() errorMessage: string = 'An error ocurred.';\n\n private api: any;\n\n constructor() {\n this.fetchBusiness = this.fetchBusiness.bind(this);\n this.setError = this.setError.bind(this);\n }\n\n async componentWillLoad() {\n if (!this.authToken) {\n this.setError(\n 'Missing auth-token. The form will not be functional without it.',\n );\n return;\n }\n\n if (!this.businessId) {\n this.setError(\n 'Missing business-id. The form will not be functional without it.',\n );\n return;\n }\n\n this.api = Api(this.authToken, config.proxyApiOrigin);\n await this.fetchBusiness(this.businessId);\n }\n\n async fetchBusiness(businessId) {\n this.renderState = RENDER_STATES.LOADING;\n try {\n const response = await this.api.get(`entities/business/${businessId}`);\n if (response.error) {\n this.setError(response.error.message);\n return;\n }\n this.business = response.data;\n this.renderState = RENDER_STATES.READY;\n } catch (error) {\n this.setError(error);\n }\n }\n\n setError(error: string) {\n this.errorMessage = error || this.errorMessage;\n this.renderState = RENDER_STATES.ERROR;\n }\n\n render() {\n if (this.renderState === RENDER_STATES.LOADING) {\n return LoadingState;\n }\n\n if (this.renderState === RENDER_STATES.ERROR) {\n return ErrorState(this.errorMessage);\n }\n\n return (\n <Host>\n <generic-info-details business={this.business} />\n <legal-address-details legalAddress={this.business?.legal_address} />\n <representative-details\n representative={this.business?.representative}\n />\n <owner-details owners={this.business?.owners} />\n <additional-questions-details business={this.business} />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
export default {
|
|
2
3
|
title: 'Components/BusinessDetails',
|
|
3
4
|
component: 'justifi-business-details',
|
|
@@ -5,8 +6,8 @@ export default {
|
|
|
5
6
|
};
|
|
6
7
|
class BusinessDetailsArgs {
|
|
7
8
|
constructor(args) {
|
|
8
|
-
this['businessId'] = args['businessId'] ||
|
|
9
|
-
this['authToken'] = args['authToken'] ||
|
|
9
|
+
this['businessId'] = args['businessId'] || config.exampleBusinessId;
|
|
10
|
+
this['authToken'] = args['authToken'] || config.proxyAuthToken;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-details.stories.js","sourceRoot":"","sources":["../../../../src/components/business-details/business-details.stories.ts"],"names":[],"mappings":"AAAA,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,0BAA0B;EACrC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,mBAAmB;EAIvB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"business-details.stories.js","sourceRoot":"","sources":["../../../../src/components/business-details/business-details.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,SAAS,EAAE,0BAA0B;EACrC,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,mBAAmB;EAIvB,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,iBAAiB,CAAC;IACpE,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC;EACjE,CAAC;CACF;AAAA,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAyB,EAAE,EAAE;EAC7C,OAAO;;qBAEY,IAAI,CAAC,YAAY,CAAC;oBACnB,IAAI,CAAC,WAAW,CAAC;;GAElC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,IAAI,mBAAmB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nexport default {\n title: 'Components/BusinessDetails',\n component: 'justifi-business-details',\n parameters: {},\n};\n\nclass BusinessDetailsArgs {\n 'businessId': string;\n 'authToken': string;\n\n constructor(args) {\n this['businessId'] = args['businessId'] || config.exampleBusinessId;\n this['authToken'] = args['authToken'] || config.proxyAuthToken;\n }\n};\n\nconst Template = (args: BusinessDetailsArgs) => {\n return `\n <justifi-business-details\n business-id=\"${args['businessId']}\"\n auth-token=\"${args['authToken']}\"\n />\n `;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = new BusinessDetailsArgs({});\n"]}
|
|
@@ -3,6 +3,7 @@ import { FormController } from "../form/form";
|
|
|
3
3
|
import businessFormSchema from "./business-form-schema";
|
|
4
4
|
import { Api } from "../../api";
|
|
5
5
|
import { parseForPatching } from "./helpers";
|
|
6
|
+
import { config } from "../../../config";
|
|
6
7
|
const componentStepMapping = {
|
|
7
8
|
0: (formController) => h("justifi-business-generic-info", { formController: formController }),
|
|
8
9
|
1: (formController) => h("justifi-legal-address-form", { formController: formController }),
|
|
@@ -32,7 +33,7 @@ export class BusinessFormStepped {
|
|
|
32
33
|
console.warn('Warning: Missing auth-token. The form will not be functional without it.');
|
|
33
34
|
}
|
|
34
35
|
this.formController = new FormController(businessFormSchema);
|
|
35
|
-
this.api = Api(this.authToken,
|
|
36
|
+
this.api = Api(this.authToken, config.proxyApiOrigin);
|
|
36
37
|
this.totalSteps = Object.keys(componentStepMapping).length - 1;
|
|
37
38
|
if (this.businessId) {
|
|
38
39
|
this.fetchData(this.businessId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-form-stepped.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,MAA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,aAEjB,CACV,CACG,CACF,CACD,CACF,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State } from '@stencil/core';\nimport { FormController } from '../form/form';\nimport businessFormSchema from './business-form-schema';\nimport { Api } from '../../api';\nimport { parseForPatching } from './helpers';\n\n\nconst componentStepMapping = {\n 0: (formController) => <justifi-business-generic-info formController={formController} />,\n 1: (formController) => <justifi-legal-address-form formController={formController} />,\n 2: (formController) => <justifi-additional-questions formController={formController} />,\n 3: (formController) => <justifi-business-representative formController={formController} />,\n 4: (formController) => <justifi-business-owners formController={formController} />\n};\n\n\n/**\n * @exportedPart label: Label for inputs\n * @exportedPart input: The input fields\n * @exportedPart input-invalid: Invalid state for inputfs\n */\n@Component({\n tag: 'justifi-business-form-stepped',\n styleUrl: 'business-form-stepped.scss',\n})\nexport class BusinessFormStepped {\n @Prop() authToken: string;\n @Prop() accountId: string;\n @Prop() businessId?: string;\n @State() isLoading: boolean = false;\n @State() currentStep: number = 0;\n @State() totalSteps: number = 4;\n @State() serverError: string;\n\n private formController: FormController;\n private api: any;\n\n constructor() {\n this.sendData = this.sendData.bind(this);\n this.fetchData = this.fetchData.bind(this);\n }\n\n componentWillLoad() {\n if (!this.authToken) {\n console.warn(\n 'Warning: Missing auth-token. The form will not be functional without it.',\n );\n }\n\n this.formController = new FormController(businessFormSchema);\n this.api = Api(this.authToken, process.env.ENTITIES_API_ORIGIN);\n this.totalSteps = Object.keys(componentStepMapping).length - 1;\n\n if (this.businessId) {\n this.fetchData(this.businessId);\n } else {\n this.formController.setInitialValues({\n legal_address: {\n country: 'US',\n },\n });\n }\n }\n\n handleResponse(response, onSuccess) {\n if (response.error) {\n this.serverError = response.error.message;\n } else {\n this.serverError = '';\n this.businessId = response.data.id;\n this.formController.setInitialValues(response.data);\n onSuccess();\n }\n }\n\n private async sendData(onSuccess?: () => void) {\n this.isLoading = true;\n\n try {\n const data = this.formController.values.getValue();\n // Conditionally making either POST or PATCH request\n if (this.businessId) {\n const payload = parseForPatching(data);\n const response = await this.api.patch(\n `entities/business/${this.businessId}`,\n JSON.stringify(payload),\n { account_id: this.accountId }\n );\n this.handleResponse(response, onSuccess);\n } else {\n const response = await this.api.post(\n 'entities/business',\n JSON.stringify(data),\n { account_id: this.accountId }\n );\n this.handleResponse(response, onSuccess);\n }\n } catch (error) {\n console.error('Error sending data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private async fetchData(businessId) {\n this.isLoading = true;\n try {\n const response = await this.api.get(`entities/business/${businessId}`);\n this.formController.setInitialValues(response.data);\n } catch (error) {\n console.error('Error fetching data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private validateAndSubmit(event: any) {\n event.preventDefault();\n this.formController.validateAndSubmit(this.sendData);\n }\n\n showPreviousStepButton() {\n return this.currentStep > 0;\n }\n\n previousStepButtonOnClick() {\n this.sendData(() => this.currentStep--);\n }\n\n showNextStepButton() {\n return this.currentStep < this.totalSteps;\n }\n\n nextStepButtonOnClick() {\n this.sendData(() => this.currentStep++);\n }\n\n showSubmitButton() {\n return this.currentStep === this.totalSteps;\n }\n\n currentStepComponent() {\n return componentStepMapping[this.currentStep](this.formController);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <h1>Business Information</h1>\n\n {this.serverError && (\n <div class=\"alert alert-danger\" role=\"alert\">\n {this.serverError}\n </div>\n )}\n\n <form onSubmit={this.validateAndSubmit}>\n <div class=\"my-4\">\n {this.currentStepComponent()}\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div class=\"d-flex align-items-center\">\n Step {this.currentStep + 1} of {this.totalSteps + 1}\n </div>\n <div class=\"d-flex gap-2\">\n {this.showPreviousStepButton() && (\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n onClick={() => this.previousStepButtonOnClick()}\n disabled={this.isLoading}>\n Previous\n </button>\n )}\n {this.showNextStepButton() && (\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n onClick={() => this.nextStepButtonOnClick()}\n disabled={this.isLoading}>\n Next\n </button>\n )}\n {this.showSubmitButton() && (\n <button\n type=\"submit\"\n class=\"btn btn-primary\"\n onClick={() => this.nextStepButtonOnClick()}\n disabled={this.isLoading}>\n Submit\n </button>\n )}\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"business-form-stepped.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,oBAAoB,GAAG;EAC3B,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,qCAA+B,cAAc,EAAE,cAAc,GAAI;EACxF,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,kCAA4B,cAAc,EAAE,cAAc,GAAI;EACrF,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,oCAA8B,cAAc,EAAE,cAAc,GAAI;EACvF,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,uCAAiC,cAAc,EAAE,cAAc,GAAI;EAC1F,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC,+BAAyB,cAAc,EAAE,cAAc,GAAI;CACnF,CAAC;AAGF;;;;GAIG;AAKH,MAAM,OAAO,mBAAmB;EAY9B;;;;qBAR8B,KAAK;uBACJ,CAAC;sBACF,CA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,GAAG,CAAC;;YAAM,IAAI,CAAC,UAAU,GAAG,CAAC,CAC/C;UACN,WAAK,KAAK,EAAC,cAAc;YACtB,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAChC,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAC/C,QAAQ,EAAE,IAAI,CAAC,SAAS,eAEjB,CACV;YACA,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAC5B,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAC3C,QAAQ,EAAE,IAAI,CAAC,SAAS,WAEjB,CACV;YACA,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAC1B,cACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAC3C,QAAQ,EAAE,IAAI,CAAC,SAAS,aAEjB,CACV,CACG,CACF,CACD,CACF,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State } from '@stencil/core';\nimport { FormController } from '../form/form';\nimport businessFormSchema from './business-form-schema';\nimport { Api } from '../../api';\nimport { parseForPatching } from './helpers';\nimport { config } from '../../../config';\n\nconst componentStepMapping = {\n 0: (formController) => <justifi-business-generic-info formController={formController} />,\n 1: (formController) => <justifi-legal-address-form formController={formController} />,\n 2: (formController) => <justifi-additional-questions formController={formController} />,\n 3: (formController) => <justifi-business-representative formController={formController} />,\n 4: (formController) => <justifi-business-owners formController={formController} />\n};\n\n\n/**\n * @exportedPart label: Label for inputs\n * @exportedPart input: The input fields\n * @exportedPart input-invalid: Invalid state for inputfs\n */\n@Component({\n tag: 'justifi-business-form-stepped',\n styleUrl: 'business-form-stepped.scss',\n})\nexport class BusinessFormStepped {\n @Prop() authToken: string;\n @Prop() accountId: string;\n @Prop() businessId?: string;\n @State() isLoading: boolean = false;\n @State() currentStep: number = 0;\n @State() totalSteps: number = 4;\n @State() serverError: string;\n\n private formController: FormController;\n private api: any;\n\n constructor() {\n this.sendData = this.sendData.bind(this);\n this.fetchData = this.fetchData.bind(this);\n }\n\n componentWillLoad() {\n if (!this.authToken) {\n console.warn(\n 'Warning: Missing auth-token. The form will not be functional without it.',\n );\n }\n\n this.formController = new FormController(businessFormSchema);\n this.api = Api(this.authToken, config.proxyApiOrigin);\n this.totalSteps = Object.keys(componentStepMapping).length - 1;\n\n if (this.businessId) {\n this.fetchData(this.businessId);\n } else {\n this.formController.setInitialValues({\n legal_address: {\n country: 'US',\n },\n });\n }\n }\n\n handleResponse(response, onSuccess) {\n if (response.error) {\n this.serverError = response.error.message;\n } else {\n this.serverError = '';\n this.businessId = response.data.id;\n this.formController.setInitialValues(response.data);\n onSuccess();\n }\n }\n\n private async sendData(onSuccess?: () => void) {\n this.isLoading = true;\n\n try {\n const data = this.formController.values.getValue();\n // Conditionally making either POST or PATCH request\n if (this.businessId) {\n const payload = parseForPatching(data);\n const response = await this.api.patch(\n `entities/business/${this.businessId}`,\n JSON.stringify(payload),\n { account_id: this.accountId }\n );\n this.handleResponse(response, onSuccess);\n } else {\n const response = await this.api.post(\n 'entities/business',\n JSON.stringify(data),\n { account_id: this.accountId }\n );\n this.handleResponse(response, onSuccess);\n }\n } catch (error) {\n console.error('Error sending data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private async fetchData(businessId) {\n this.isLoading = true;\n try {\n const response = await this.api.get(`entities/business/${businessId}`);\n this.formController.setInitialValues(response.data);\n } catch (error) {\n console.error('Error fetching data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private validateAndSubmit(event: any) {\n event.preventDefault();\n this.formController.validateAndSubmit(this.sendData);\n }\n\n showPreviousStepButton() {\n return this.currentStep > 0;\n }\n\n previousStepButtonOnClick() {\n this.sendData(() => this.currentStep--);\n }\n\n showNextStepButton() {\n return this.currentStep < this.totalSteps;\n }\n\n nextStepButtonOnClick() {\n this.sendData(() => this.currentStep++);\n }\n\n showSubmitButton() {\n return this.currentStep === this.totalSteps;\n }\n\n currentStepComponent() {\n return componentStepMapping[this.currentStep](this.formController);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <h1>Business Information</h1>\n\n {this.serverError && (\n <div class=\"alert alert-danger\" role=\"alert\">\n {this.serverError}\n </div>\n )}\n\n <form onSubmit={this.validateAndSubmit}>\n <div class=\"my-4\">\n {this.currentStepComponent()}\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div class=\"d-flex align-items-center\">\n Step {this.currentStep + 1} of {this.totalSteps + 1}\n </div>\n <div class=\"d-flex gap-2\">\n {this.showPreviousStepButton() && (\n <button\n type=\"button\"\n class=\"btn btn-secondary\"\n onClick={() => this.previousStepButtonOnClick()}\n disabled={this.isLoading}>\n Previous\n </button>\n )}\n {this.showNextStepButton() && (\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n onClick={() => this.nextStepButtonOnClick()}\n disabled={this.isLoading}>\n Next\n </button>\n )}\n {this.showSubmitButton() && (\n <button\n type=\"submit\"\n class=\"btn btn-primary\"\n onClick={() => this.nextStepButtonOnClick()}\n disabled={this.isLoading}>\n Submit\n </button>\n )}\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { config } from "../../../config";
|
|
1
2
|
class BusinessFormSteppedStoryArgs {
|
|
2
3
|
constructor(args) {
|
|
3
4
|
this['auth-token'] = args['auth-token'] || '';
|
|
4
5
|
this['business-id'] = args['business-id'] || '';
|
|
5
|
-
this['account-id'] = args['account-id'] ||
|
|
6
|
+
this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;
|
|
6
7
|
this['css-variables'] = args['css-variables'] || '';
|
|
7
8
|
}
|
|
8
9
|
}
|
|
@@ -33,7 +34,7 @@ export default {
|
|
|
33
34
|
const Template = (args) => {
|
|
34
35
|
const authToken = args['auth-token'];
|
|
35
36
|
const businessId = args['business-id'];
|
|
36
|
-
const accountId = args['account-id'] ||
|
|
37
|
+
const accountId = args['account-id'] || config.exampleBusinessAccountId;
|
|
37
38
|
// The <div> here should be replaced by a `display` property in the cardForm potentially
|
|
38
39
|
return `
|
|
39
40
|
<div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-form-stepped.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.stories.tsx"],"names":[],"mappings":"AAAA,MAAM,4BAA4B;EAMhC,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"business-form-stepped.stories.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form-stepped.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,4BAA4B;EAMhC,YAAY,IAAI;IACd,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;IAChD,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,wBAAwB,CAAC;IAC3E,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,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;CACF,CAAC,CAAC","sourcesContent":["import { config } from '../../../config';\n\nclass BusinessFormSteppedStoryArgs {\n 'auth-token': string;\n 'account-id': string;\n 'bussiness-id': string;\n 'css-variables': string;\n\n constructor(args) {\n this['auth-token'] = args['auth-token'] || '';\n this['business-id'] = args['business-id'] || '';\n this['account-id'] = args['account-id'] || config.exampleBusinessAccountId;\n this['css-variables'] = args['css-variables'] || '';\n }\n}\n\nexport default {\n title: 'dev/Components/BusinessFormStepped',\n component: 'justifi-business-form',\n argTypes: {\n 'auth-token': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'account-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n },\n 'business-id': {\n control: 'text',\n table: {\n category: 'props',\n },\n }\n },\n};\n\nconst Template = (args: BusinessFormSteppedStoryArgs) => {\n const authToken = args['auth-token'];\n const businessId = args['business-id'];\n const accountId = args['account-id'] || config.exampleBusinessAccountId;\n // The <div> here should be replaced by a `display` property in the cardForm potentially\n return `\n <div>\n <justifi-business-form-stepped\n auth-token=\"${authToken}\"\n business-id=\"${businessId}\"\n account-id=\"${accountId}\"\n />\n </div>\n <style>\n :root {\n ${args['css-variables']}\n }\n </style>\n `;\n};\n\nexport const Basic = Template.bind({});\n\nBasic.args = new BusinessFormSteppedStoryArgs({});\n\nexport const Styled = Template.bind({});\nStyled.args = new BusinessFormSteppedStoryArgs({\n 'auth-token': '',\n 'business-id': '',\n 'account-id': '',\n 'cssVariables': `\n --jfi-primary-color: #212529;\n --jfi-load-google-font: 'Roboto Mono:wght@200;400;700;900';\n --jfi-layout-font-family: Roboto Mono, Calibri, sans-serif;\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: 700;\n --jfi-form-label-font-family: Calibri, sans-serif;\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 --jfi-submit-button-color: white;\n --jfi-submit-button-background-color: #3F3F47;\n --jfi-submit-button-border-color: var(--jfi-primary-color);\n --jfi-submit-button-padding: 0.375rem 0.75rem;\n --jfi-submit-button-font-size: 1rem;\n --jfi-submit-button-border-radius: 1px;\n --jfi-submit-button-color-hover: white;\n --jfi-submit-button-background-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-border-color-hover: var(--jfi-primary-color);\n --jfi-submit-button-color-focus: white;\n --jfi-submit-button-background-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-border-color-focus: var(--jfi-primary-color);\n --jfi-submit-button-color-active: white;\n --jfi-submit-button-background-color-active: var(--jfi-primary-color);\n --jfi-submit-button-border-color-active: var(--jfi-primary-color);\n --jfi-submit-button-width: 100%;\n --jfi-submit-button-box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 1px -2px, rgba(0, 0, 0, 0.14) 0px 2px 2px 0px, rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;\n\n --jfi-radio-button-color: var(--jfi-primary-color);\n --jfi-radio-button-background-color: transparent;\n --jfi-radio-button-color-selected: white;\n --jfi-radio-button-background-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-border-color: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected: var(--jfi-primary-color);\n --jfi-radio-button-padding: 0.375rem 0.75rem;\n --jfi-radio-button-font-size: 1rem;\n --jfi-radio-button-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-color-selected-hover: white;\n --jfi-radio-button-background-color-hover: transparent;\n --jfi-radio-button-background-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-selected-hover: var(--jfi-primary-color);\n --jfi-radio-button-border-color-hover: var(--jfi-primary-color);\n --jfi-radio-button-group-width: 100%;\n `,\n});\n"]}
|
|
@@ -3,6 +3,7 @@ import { FormController } from "../form/form";
|
|
|
3
3
|
import businessFormSchema from "./business-form-schema";
|
|
4
4
|
import { Api } from "../../api";
|
|
5
5
|
import { parseForPatching } from "./helpers";
|
|
6
|
+
import { config } from "../../../config";
|
|
6
7
|
/**
|
|
7
8
|
* @exportedPart label: Label for inputs
|
|
8
9
|
* @exportedPart input: The input fields
|
|
@@ -21,7 +22,7 @@ export class BusinessForm {
|
|
|
21
22
|
console.warn('Warning: Missing auth-token. The form will not be functional without it.');
|
|
22
23
|
}
|
|
23
24
|
this.formController = new FormController(businessFormSchema);
|
|
24
|
-
this.api = Api(this.authToken,
|
|
25
|
+
this.api = Api(this.authToken, config.proxyApiOrigin);
|
|
25
26
|
if (this.businessId) {
|
|
26
27
|
this.fetchData(this.businessId);
|
|
27
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-form.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"business-form.js","sourceRoot":"","sources":["../../../../src/components/business-form/business-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,kBAAkB,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC;;;;GAIG;AAKH,MAAM,OAAO,YAAY;EAQvB;;;qBAL8B,KAAK;IAMjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GAC5C;EAED,iBAAiB;IACf,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;MACnB,OAAO,CAAC,IAAI,CACV,0EAA0E,CAC3E,CAAC;KACH;IAED,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAE7D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IAEtD,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACjC;SAAM;MACL,IAAI,CAA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AC,CAAC,QAAQ,CAClC,CACL,CACF,CACD,CACF,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State } from '@stencil/core';\nimport { FormController } from '../form/form';\nimport businessFormSchema from './business-form-schema';\nimport { Api } from '../../api';\nimport { parseForPatching } from './helpers';\nimport { config } from '../../../config';\n\n\n/**\n * @exportedPart label: Label for inputs\n * @exportedPart input: The input fields\n * @exportedPart input-invalid: Invalid state for inputfs\n */\n@Component({\n tag: 'justifi-business-form',\n styleUrl: 'business-form.scss',\n})\nexport class BusinessForm {\n @Prop() authToken: string;\n @Prop() businessId?: string;\n @State() isLoading: boolean = false;\n\n private formController: FormController;\n private api: any;\n\n constructor() {\n this.sendData = this.sendData.bind(this);\n this.fetchData = this.fetchData.bind(this);\n }\n\n componentWillLoad() {\n if (!this.authToken) {\n console.warn(\n 'Warning: Missing auth-token. The form will not be functional without it.',\n );\n }\n\n this.formController = new FormController(businessFormSchema);\n\n this.api = Api(this.authToken, config.proxyApiOrigin);\n\n if (this.businessId) {\n this.fetchData(this.businessId);\n } else {\n this.formController.setInitialValues({\n legal_address: {\n country: 'US',\n },\n });\n }\n }\n\n private async sendData() {\n this.isLoading = true;\n try {\n const data = this.formController.values.getValue();\n\n // Conditionally making either POST or PATCH request\n if (this.businessId) {\n const payload = parseForPatching(data);\n const response = await this.api.patch(\n `entities/business/${this.businessId}`,\n JSON.stringify(payload),\n );\n console.log('Server response from PATCH:', response);\n } else {\n const response = await this.api.post(\n 'entities/business',\n JSON.stringify(data),\n );\n console.log('Server response from POST:', response);\n }\n } catch (error) {\n console.error('Error sending data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private async fetchData(businessId) {\n this.isLoading = true;\n try {\n const response = await this.api.get(`entities/business/${businessId}`);\n this.formController.setInitialValues(response.data);\n } catch (error) {\n console.error('Error fetching data:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n private validateAndSubmit(event: any) {\n event.preventDefault();\n this.formController.validateAndSubmit(this.sendData);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <form onSubmit={event => this.validateAndSubmit(event)}>\n <div class=\"row gap-3\">\n <div class=\"col-12 mb-4\">\n <h1>Business Information</h1>\n </div>\n <div class=\"col-12 mb-4\">\n <justifi-business-generic-info formController={this.formController} />\n </div>\n <div class=\"col-12 mb-4\">\n <justifi-legal-address-form formController={this.formController} />\n </div>\n <div class=\"col-12 mb-4\">\n <justifi-additional-questions formController={this.formController} />\n </div>\n <div class=\"col-12 mb-4\">\n <justifi-business-representative formController={this.formController} />\n </div>\n <div class=\"col-12 mb-4\">\n <justifi-business-owners isEditing={!!this.businessId} formController={this.formController} />\n </div>\n <div class=\"col-12 d-flex flex-row-reverse\">\n <button\n type=\"submit\"\n class=\"btn btn-primary jfi-submit-button\"\n disabled={!this.authToken || this.isLoading}\n >\n {this.isLoading ? 'Loading...' : 'Submit'}\n </button>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"]}
|