@justifi/webcomponents 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Api-7303478d.js → Api-d2df6e84.js} +16 -4
- package/dist/cjs/Api-d2df6e84.js.map +1 -0
- package/dist/cjs/Payout-4906a445.js +116 -0
- package/dist/cjs/Payout-4906a445.js.map +1 -0
- package/dist/cjs/{business-form-schema-63b311b2.js → business-form-schema-725ec6f5.js} +40 -22
- package/dist/cjs/business-form-schema-725ec6f5.js.map +1 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js +107 -0
- package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js +65 -0
- package/dist/cjs/form-control-monetary.cjs.entry.js.map +1 -0
- package/dist/cjs/{form-control-select_2.cjs.entry.js → form-control-number_3.cjs.entry.js} +99 -12
- package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -0
- package/dist/cjs/form-control-select.cjs.entry.js +47 -0
- package/dist/cjs/form-control-select.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-83b2ec02.js → index-3533152c.js} +10 -6
- package/dist/cjs/index-3533152c.js.map +1 -0
- package/dist/cjs/index-5a880722.js +3233 -0
- package/dist/cjs/index-5a880722.js.map +1 -0
- package/dist/cjs/{index.esm-7e12ce07.js → index.esm-84a0a7a8.js} +1 -19
- package/dist/cjs/index.esm-84a0a7a8.js.map +1 -0
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +396 -0
- package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +98 -16
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-list.cjs.entry.js +189 -0
- package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-details.cjs.entry.js +30 -0
- package/dist/cjs/justifi-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js +63 -0
- package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1487 -19
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +49 -47
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payout-details.cjs.entry.js +61 -0
- package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +64 -54
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +156 -0
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-table.cjs.entry.js +68 -0
- package/dist/cjs/justifi-table.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/select-input_2.cjs.entry.js +1 -1
- package/dist/cjs/table-utils-617126e5.js +13 -0
- package/dist/cjs/table-utils-617126e5.js.map +1 -0
- package/dist/cjs/{utils-4ee7e080.js → utils-0fd61dbd.js} +43 -104
- package/dist/cjs/utils-0fd61dbd.js.map +1 -0
- package/dist/cjs/utils-d95b09c2.js +35 -0
- package/dist/cjs/utils-d95b09c2.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/cjs/webcomponents.cjs.js.map +1 -1
- package/dist/collection/api/Api.js +15 -3
- package/dist/collection/api/Api.js.map +1 -1
- package/dist/collection/api/Business.js +50 -0
- package/dist/collection/api/Business.js.map +1 -0
- package/dist/collection/api/Payment.js.map +1 -1
- package/dist/collection/api/Payout.js +9 -0
- package/dist/collection/api/Payout.js.map +1 -1
- package/dist/collection/api/Proceed.js +42 -0
- package/dist/collection/api/Proceed.js.map +1 -0
- package/dist/collection/api/shared.js +2 -0
- package/dist/collection/api/shared.js.map +1 -0
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +6 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js.map +1 -1
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js +8 -0
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
- package/dist/collection/components/business-form/additional-questions/additional-questions.js +59 -0
- package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -0
- package/dist/collection/components/business-form/business-address/business-address-form.js +1 -1
- package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -1
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js +22 -18
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -1
- package/dist/collection/components/business-form/business-form-schema.js +48 -37
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
- package/dist/collection/components/business-form/business-form.css +5283 -43
- package/dist/collection/components/business-form/business-form.js +83 -6
- package/dist/collection/components/business-form/business-form.js.map +1 -1
- package/dist/collection/components/business-form/{businessForm.stories.js → business-form.stories.js} +8 -8
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +10 -17
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
- package/dist/collection/components/business-form/business-owners/business-owners.css +5283 -0
- package/dist/collection/components/business-form/business-owners/business-owners.js +48 -37
- package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
- package/dist/collection/components/business-form/business-representative/business-representative.js +12 -17
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
- package/dist/collection/components/business-form/test/business-form.spec.js +44 -0
- package/dist/collection/components/business-form/test/business-form.spec.js.map +1 -0
- package/dist/collection/components/business-list/business-list.css +576 -0
- package/dist/collection/components/business-list/business-list.js +209 -0
- package/dist/collection/components/business-list/business-list.js.map +1 -0
- package/dist/collection/components/business-list/business-list.stories.js +68 -0
- package/dist/collection/components/business-list/business-list.stories.js.map +1 -0
- package/dist/collection/components/business-list/example.js +12 -0
- package/dist/collection/components/card-form/card-form.js +6 -1
- package/dist/collection/components/card-form/card-form.js.map +1 -1
- package/dist/collection/components/card-form/card-form.stories.js +8 -0
- package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
- package/dist/collection/components/details/details.css +7983 -0
- package/dist/collection/components/details/details.js +66 -0
- package/dist/collection/components/details/details.js.map +1 -0
- package/dist/collection/components/details/utils.js +10 -0
- package/dist/collection/components/details/utils.js.map +1 -0
- package/dist/collection/components/form/form-control-datepart.js +233 -0
- package/dist/collection/components/form/form-control-datepart.js.map +1 -0
- package/dist/collection/components/form/form-control-monetary.js +186 -0
- package/dist/collection/components/form/form-control-monetary.js.map +1 -0
- package/dist/collection/components/form/form-control-number-masked.js +217 -0
- package/dist/collection/components/form/form-control-number-masked.js.map +1 -0
- package/dist/collection/components/form/form-control-number.css +1818 -0
- package/dist/collection/components/form/form-control-number.js +194 -0
- package/dist/collection/components/form/form-control-number.js.map +1 -0
- package/dist/collection/components/form/form-control-select.css +6 -0
- package/dist/collection/components/form/form-control-select.js +36 -4
- package/dist/collection/components/form/form-control-select.js.map +1 -1
- package/dist/collection/components/form/form-control-text.css +7 -0
- package/dist/collection/components/form/form-control-text.js +45 -3
- package/dist/collection/components/form/form-control-text.js.map +1 -1
- package/dist/collection/components/form/form.js +16 -8
- package/dist/collection/components/form/form.js.map +1 -1
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js +11 -0
- package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +1 -0
- package/dist/collection/components/legal-address-form/legal-address-form.css +2489 -0
- package/dist/collection/components/legal-address-form/legal-address-form.js +90 -0
- package/dist/collection/components/legal-address-form/legal-address-form.js.map +1 -0
- package/dist/collection/components/payment-details/example.js +12 -0
- package/dist/collection/components/payment-details/payment-details.css +7983 -0
- package/dist/collection/components/payment-details/payment-details.js +129 -0
- package/dist/collection/components/payment-details/payment-details.js.map +1 -0
- package/dist/collection/components/payment-details/payment-details.stories.js +47 -0
- package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -0
- package/dist/collection/components/payment-method-form/payment-method-form.css +5 -0
- package/dist/collection/components/payment-method-form/payment-method-form.js +25 -35
- package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +7 -7
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.css +0 -7380
- package/dist/collection/components/payments-list/payments-list.js +69 -43
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +10 -10
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
- package/dist/collection/components/payments-list/test/payments-list.spec.js +3 -54
- package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
- package/dist/collection/components/payout-details/example.js +12 -0
- package/dist/collection/components/payout-details/payout-details.css +7983 -0
- package/dist/collection/components/payout-details/payout-details.js +126 -0
- package/dist/collection/components/payout-details/payout-details.js.map +1 -0
- package/dist/collection/components/payout-details/payout-details.stories.js +47 -0
- package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -0
- package/dist/collection/components/payouts-list/example.js +12 -0
- package/dist/collection/components/payouts-list/payouts-list.css +0 -7407
- package/dist/collection/components/payouts-list/payouts-list.js +82 -48
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.stories.js +10 -10
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
- package/dist/collection/components/proceeds-list/example.js +12 -0
- package/dist/collection/components/proceeds-list/proceeds-list.css +576 -0
- package/dist/collection/components/proceeds-list/proceeds-list.js +207 -0
- package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -0
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js +69 -0
- package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -0
- package/dist/collection/components/table/table-utils.js +8 -0
- package/dist/collection/components/table/table-utils.js.map +1 -0
- package/dist/collection/components/table/table.css +8077 -0
- package/dist/collection/components/table/table.js +215 -0
- package/dist/collection/components/table/table.js.map +1 -0
- package/dist/collection/components/table/test/table.spec.js +59 -0
- package/dist/collection/components/table/test/table.spec.js.map +1 -0
- package/dist/collection/utils/country-options.js +202 -0
- package/dist/collection/utils/country-options.js.map +1 -0
- package/dist/collection/utils/phone-masks.js +4 -0
- package/dist/collection/utils/phone-masks.js.map +1 -0
- package/dist/collection/utils/utils.js +40 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +15 -3
- package/dist/components/Api.js.map +1 -1
- package/dist/components/Payout.js +113 -0
- package/dist/components/Payout.js.map +1 -0
- package/dist/components/additional-questions.js +51 -0
- package/dist/components/additional-questions.js.map +1 -0
- package/dist/components/business-address-form.js +8 -2
- package/dist/components/business-address-form.js.map +1 -1
- package/dist/components/business-generic-info.js +61 -35
- package/dist/components/business-generic-info.js.map +1 -1
- package/dist/components/business-owners.js +52 -36
- package/dist/components/business-owners.js.map +1 -1
- package/dist/components/business-representative.js +31 -15
- package/dist/components/business-representative.js.map +1 -1
- package/dist/components/details.js +66 -0
- package/dist/components/details.js.map +1 -0
- package/dist/components/form-control-datepart.d.ts +11 -0
- package/dist/components/form-control-datepart.js +8 -0
- package/dist/components/form-control-datepart.js.map +1 -0
- package/dist/components/form-control-datepart2.js +97 -0
- package/dist/components/form-control-datepart2.js.map +1 -0
- package/dist/components/form-control-monetary.d.ts +11 -0
- package/dist/components/form-control-monetary.js +8 -0
- package/dist/components/form-control-monetary.js.map +1 -0
- package/dist/components/form-control-monetary2.js +82 -0
- package/dist/components/form-control-monetary2.js.map +1 -0
- package/dist/components/form-control-number-masked.d.ts +11 -0
- package/dist/components/form-control-number-masked.js +8 -0
- package/dist/components/form-control-number-masked.js.map +1 -0
- package/dist/components/form-control-number-masked2.js +81 -0
- package/dist/components/form-control-number-masked2.js.map +1 -0
- package/dist/components/form-control-number.d.ts +11 -0
- package/dist/components/form-control-number.js +8 -0
- package/dist/components/form-control-number.js.map +1 -0
- package/dist/components/form-control-number2.js +70 -0
- package/dist/components/form-control-number2.js.map +1 -0
- package/dist/components/form-control-select.js +2 -2
- package/dist/components/form-control-select2.js +20 -7
- package/dist/components/form-control-select2.js.map +1 -1
- package/dist/components/form-control-text2.js +23 -4
- package/dist/components/form-control-text2.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.esm.js +1 -18
- package/dist/components/index.esm.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +3231 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/justifi-additional-questions.d.ts +11 -0
- package/dist/components/justifi-additional-questions.js +8 -0
- package/dist/components/justifi-additional-questions.js.map +1 -0
- package/dist/components/justifi-bank-account-form.js +2 -0
- package/dist/components/justifi-bank-account-form.js.map +1 -1
- package/dist/components/justifi-business-form.js +146 -28
- package/dist/components/justifi-business-form.js.map +1 -1
- package/dist/components/justifi-business-generic-info.js +1 -1
- package/dist/components/justifi-business-list.d.ts +11 -0
- package/dist/components/justifi-business-list.js +215 -0
- package/dist/components/justifi-business-list.js.map +1 -0
- package/dist/components/justifi-card-form.js +2 -0
- package/dist/components/justifi-card-form.js.map +1 -1
- package/dist/components/justifi-details.d.ts +11 -0
- package/dist/components/justifi-details.js +8 -0
- package/dist/components/justifi-details.js.map +1 -0
- package/dist/components/justifi-legal-address-form.d.ts +11 -0
- package/dist/components/justifi-legal-address-form.js +8 -0
- package/dist/components/justifi-legal-address-form.js.map +1 -0
- package/dist/components/justifi-payment-details.d.ts +11 -0
- package/dist/components/justifi-payment-details.js +88 -0
- package/dist/components/justifi-payment-details.js.map +1 -0
- package/dist/components/justifi-payment-form.js +2 -1
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +52 -45
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payout-details.d.ts +11 -0
- package/dist/components/justifi-payout-details.js +86 -0
- package/dist/components/justifi-payout-details.js.map +1 -0
- package/dist/components/justifi-payouts-list.js +65 -50
- package/dist/components/justifi-payouts-list.js.map +1 -1
- package/dist/components/justifi-proceeds-list.d.ts +11 -0
- package/dist/components/justifi-proceeds-list.js +182 -0
- package/dist/components/justifi-proceeds-list.js.map +1 -0
- package/dist/components/justifi-table.d.ts +11 -0
- package/dist/components/justifi-table.js +8 -0
- package/dist/components/justifi-table.js.map +1 -0
- package/dist/components/legal-address-form.js +271 -0
- package/dist/components/legal-address-form.js.map +1 -0
- package/dist/components/payment-method-form.js +1488 -21
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/phone-masks.js +7 -0
- package/dist/components/phone-masks.js.map +1 -0
- package/dist/components/table.js +94 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/utils.js +41 -102
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/{Api-436dfa09.js → Api-a95f17ac.js} +16 -4
- package/dist/esm/Api-a95f17ac.js.map +1 -0
- package/dist/esm/Payout-9a1f2859.js +113 -0
- package/dist/esm/Payout-9a1f2859.js.map +1 -0
- package/dist/esm/{business-form-schema-30c48693.js → business-form-schema-5885d3d6.js} +40 -22
- package/dist/esm/business-form-schema-5885d3d6.js.map +1 -0
- package/dist/esm/form-control-datepart_2.entry.js +102 -0
- package/dist/esm/form-control-datepart_2.entry.js.map +1 -0
- package/dist/esm/form-control-monetary.entry.js +61 -0
- package/dist/esm/form-control-monetary.entry.js.map +1 -0
- package/dist/esm/{form-control-select_2.entry.js → form-control-number_3.entry.js} +98 -12
- package/dist/esm/form-control-number_3.entry.js.map +1 -0
- package/dist/esm/form-control-select.entry.js +43 -0
- package/dist/esm/form-control-select.entry.js.map +1 -0
- package/dist/esm/index-5ed53c20.js +3231 -0
- package/dist/esm/index-5ed53c20.js.map +1 -0
- package/dist/esm/{index-c8f391de.js → index-fe877d03.js} +10 -7
- package/dist/esm/index-fe877d03.js.map +1 -0
- package/dist/esm/{index.esm-be2cd327.js → index.esm-89fe6af9.js} +2 -19
- package/dist/esm/index.esm-89fe6af9.js.map +1 -0
- package/dist/esm/justifi-additional-questions_5.entry.js +388 -0
- package/dist/esm/justifi-additional-questions_5.entry.js.map +1 -0
- package/dist/esm/justifi-bank-account-form.entry.js +3 -1
- package/dist/esm/justifi-bank-account-form.entry.js.map +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +98 -16
- package/dist/esm/justifi-business-form.entry.js.map +1 -1
- package/dist/esm/justifi-business-list.entry.js +185 -0
- package/dist/esm/justifi-business-list.entry.js.map +1 -0
- package/dist/esm/justifi-card-form.entry.js +3 -1
- package/dist/esm/justifi-card-form.entry.js.map +1 -1
- package/dist/esm/justifi-details.entry.js +26 -0
- package/dist/esm/justifi-details.entry.js.map +1 -0
- package/dist/esm/justifi-payment-details.entry.js +59 -0
- package/dist/esm/justifi-payment-details.entry.js.map +1 -0
- package/dist/esm/justifi-payment-form.entry.js +3 -2
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +1487 -19
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +47 -45
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payout-details.entry.js +57 -0
- package/dist/esm/justifi-payout-details.entry.js.map +1 -0
- package/dist/esm/justifi-payouts-list.entry.js +60 -50
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
- package/dist/esm/justifi-proceeds-list.entry.js +152 -0
- package/dist/esm/justifi-proceeds-list.entry.js.map +1 -0
- package/dist/esm/justifi-table.entry.js +64 -0
- package/dist/esm/justifi-table.entry.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/select-input_2.entry.js +1 -1
- package/dist/esm/table-utils-6cdcaa8c.js +11 -0
- package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
- package/dist/esm/utils-1e7d6279.js +28 -0
- package/dist/esm/utils-1e7d6279.js.map +1 -0
- package/dist/esm/{utils-e7782126.js → utils-ad0bbe03.js} +42 -103
- package/dist/esm/utils-ad0bbe03.js.map +1 -0
- package/dist/esm/webcomponents.js +4 -4
- package/dist/esm/webcomponents.js.map +1 -1
- package/dist/types/api/Api.d.ts +1 -1
- package/dist/types/api/Business.d.ts +133 -0
- package/dist/types/api/Payment.d.ts +1 -0
- package/dist/types/api/Payout.d.ts +10 -12
- package/dist/types/api/Proceed.d.ts +60 -0
- package/dist/types/api/shared.d.ts +11 -0
- package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +6 -0
- package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
- package/dist/types/components/business-form/business-form-schema.d.ts +47 -21
- package/dist/types/components/business-form/business-form.d.ts +7 -2
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +1 -2
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +3 -2
- package/dist/types/components/business-form/business-representative/business-representative.d.ts +1 -2
- package/dist/types/components/business-list/business-list.d.ts +35 -0
- package/dist/types/components/business-list/business-list.stories.d.ts +9 -0
- package/dist/types/components/card-form/card-form.stories.d.ts +6 -0
- package/dist/types/components/details/details.d.ts +7 -0
- package/dist/types/components/details/utils.d.ts +19 -0
- package/dist/types/components/form/form-control-datepart.d.ts +19 -0
- package/dist/types/components/form/form-control-monetary.d.ts +17 -0
- package/dist/types/components/form/form-control-number-masked.d.ts +19 -0
- package/dist/types/components/form/form-control-number.d.ts +18 -0
- package/dist/types/components/form/form-control-select.d.ts +6 -1
- package/dist/types/components/form/form-control-text.d.ts +6 -0
- package/dist/types/components/form/form.d.ts +5 -4
- package/dist/types/components/legal-address-form/legal-address-form-schema.d.ts +17 -0
- package/dist/types/components/legal-address-form/legal-address-form.d.ts +16 -0
- package/dist/types/components/payment-details/payment-details.d.ts +28 -0
- package/dist/types/components/payment-details/payment-details.stories.d.ts +8 -0
- package/dist/types/components/payment-method-form/payment-method-form.d.ts +1 -3
- package/dist/types/components/payments-list/payments-list.d.ts +6 -14
- package/dist/types/components/payments-list/payments-list.stories.d.ts +1 -8
- package/dist/types/components/payout-details/payout-details.d.ts +28 -0
- package/dist/types/components/payout-details/payout-details.stories.d.ts +8 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +7 -15
- package/dist/types/components/payouts-list/payouts-list.stories.d.ts +1 -8
- package/dist/types/components/proceeds-list/proceeds-list.d.ts +37 -0
- package/dist/types/components/proceeds-list/proceeds-list.stories.d.ts +9 -0
- package/dist/types/components/table/table-utils.d.ts +14 -0
- package/dist/types/components/table/table.d.ts +28 -0
- package/dist/types/components.d.ts +637 -12
- package/dist/types/stencil-public-runtime.d.ts +2 -0
- package/dist/types/utils/country-options.d.ts +5 -0
- package/dist/types/utils/phone-masks.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/dist/webcomponents/{p-1953797f.entry.js → p-1beaaba3.entry.js} +2 -2
- package/dist/webcomponents/{p-33d69eb5.entry.js → p-2b6f5e35.entry.js} +2 -2
- package/dist/webcomponents/p-2b6f5e35.entry.js.map +1 -0
- package/dist/webcomponents/p-2c2cde2d.js +2 -0
- package/dist/webcomponents/p-2c2cde2d.js.map +1 -0
- package/dist/webcomponents/p-2e66512d.entry.js +2 -0
- package/dist/webcomponents/p-2e66512d.entry.js.map +1 -0
- package/dist/webcomponents/p-640bfa9f.entry.js +2 -0
- package/dist/webcomponents/p-640bfa9f.entry.js.map +1 -0
- package/dist/webcomponents/p-641883b2.entry.js +2 -0
- package/dist/webcomponents/p-641883b2.entry.js.map +1 -0
- package/dist/webcomponents/p-6d549d84.entry.js +2 -0
- package/dist/webcomponents/p-6d549d84.entry.js.map +1 -0
- package/dist/webcomponents/p-75292cca.entry.js +2 -0
- package/dist/webcomponents/p-75292cca.entry.js.map +1 -0
- package/dist/webcomponents/p-7d6c309d.entry.js +2 -0
- package/dist/webcomponents/p-7d6c309d.entry.js.map +1 -0
- package/dist/webcomponents/p-8f421dc6.js +2 -0
- package/dist/webcomponents/p-8f421dc6.js.map +1 -0
- package/dist/webcomponents/p-9346ae33.js +2 -0
- package/dist/webcomponents/p-9346ae33.js.map +1 -0
- package/dist/webcomponents/p-a2aae7c9.entry.js +2 -0
- package/dist/webcomponents/p-a2aae7c9.entry.js.map +1 -0
- package/dist/webcomponents/{p-23e9c7d4.entry.js → p-a922b908.entry.js} +2 -2
- package/dist/webcomponents/p-ab0756ff.js +2 -0
- package/dist/webcomponents/p-ab0756ff.js.map +1 -0
- package/dist/webcomponents/{p-0fd4aae2.js → p-c46241ba.js} +2 -2
- package/dist/webcomponents/p-c46241ba.js.map +1 -0
- package/dist/webcomponents/p-ccb0e1c5.js +2 -0
- package/dist/webcomponents/p-ccb0e1c5.js.map +1 -0
- package/dist/webcomponents/{p-d5cadc78.entry.js → p-cd0eca25.entry.js} +2 -2
- package/dist/webcomponents/{p-d5cadc78.entry.js.map → p-cd0eca25.entry.js.map} +1 -1
- package/dist/webcomponents/{p-7041a637.entry.js → p-d92116e6.entry.js} +2 -2
- package/dist/webcomponents/{p-7041a637.entry.js.map → p-d92116e6.entry.js.map} +1 -1
- package/dist/webcomponents/p-da4e6389.entry.js +2 -0
- package/dist/webcomponents/p-da4e6389.entry.js.map +1 -0
- package/dist/webcomponents/p-db9945b1.entry.js +2 -0
- package/dist/webcomponents/p-db9945b1.entry.js.map +1 -0
- package/dist/webcomponents/p-e1f6c8ec.entry.js +2 -0
- package/dist/webcomponents/p-e1f6c8ec.entry.js.map +1 -0
- package/dist/webcomponents/p-e6695628.js +2 -0
- package/dist/webcomponents/p-e6695628.js.map +1 -0
- package/dist/webcomponents/p-e70b2a21.js +3 -0
- package/dist/webcomponents/p-e70b2a21.js.map +1 -0
- package/dist/webcomponents/p-ee32a236.entry.js +2 -0
- package/dist/webcomponents/p-ee32a236.entry.js.map +1 -0
- package/dist/webcomponents/p-f6cc37a6.entry.js +2 -0
- package/dist/webcomponents/{p-309a886f.entry.js.map → p-f6cc37a6.entry.js.map} +1 -1
- package/dist/webcomponents/p-f72c3084.entry.js +2 -0
- package/dist/webcomponents/p-f72c3084.entry.js.map +1 -0
- package/dist/webcomponents/p-f8067330.entry.js +2 -0
- package/dist/webcomponents/p-f8067330.entry.js.map +1 -0
- package/dist/webcomponents/p-f9e127a5.js +2 -0
- package/dist/webcomponents/p-f9e127a5.js.map +1 -0
- package/dist/webcomponents/p-fe2ec58b.entry.js +2 -0
- package/dist/webcomponents/p-fe2ec58b.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/package.json +8 -5
- package/dist/cjs/Api-7303478d.js.map +0 -1
- package/dist/cjs/business-form-schema-63b311b2.js.map +0 -1
- package/dist/cjs/form-control-select_2.cjs.entry.js.map +0 -1
- package/dist/cjs/index-83b2ec02.js.map +0 -1
- package/dist/cjs/index.esm-7e12ce07.js.map +0 -1
- package/dist/cjs/justifi-business-address-form.cjs.entry.js +0 -37
- package/dist/cjs/justifi-business-address-form.cjs.entry.js.map +0 -1
- package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js +0 -148
- package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js.map +0 -1
- package/dist/cjs/utils-4ee7e080.js.map +0 -1
- package/dist/collection/components/business-form/businessForm.stories.js.map +0 -1
- package/dist/esm/Api-436dfa09.js.map +0 -1
- package/dist/esm/business-form-schema-30c48693.js.map +0 -1
- package/dist/esm/form-control-select_2.entry.js.map +0 -1
- package/dist/esm/index-c8f391de.js.map +0 -1
- package/dist/esm/index.esm-be2cd327.js.map +0 -1
- package/dist/esm/justifi-business-address-form.entry.js +0 -33
- package/dist/esm/justifi-business-address-form.entry.js.map +0 -1
- package/dist/esm/justifi-business-generic-info_3.entry.js +0 -142
- package/dist/esm/justifi-business-generic-info_3.entry.js.map +0 -1
- package/dist/esm/utils-e7782126.js.map +0 -1
- package/dist/webcomponents/p-0fd4aae2.js.map +0 -1
- package/dist/webcomponents/p-1a1f2196.js +0 -2
- package/dist/webcomponents/p-1a1f2196.js.map +0 -1
- package/dist/webcomponents/p-309a886f.entry.js +0 -2
- package/dist/webcomponents/p-33d69eb5.entry.js.map +0 -1
- package/dist/webcomponents/p-3a80a2ec.entry.js +0 -2
- package/dist/webcomponents/p-3a80a2ec.entry.js.map +0 -1
- package/dist/webcomponents/p-45fea6a8.entry.js +0 -2
- package/dist/webcomponents/p-45fea6a8.entry.js.map +0 -1
- package/dist/webcomponents/p-79456add.js +0 -2
- package/dist/webcomponents/p-79456add.js.map +0 -1
- package/dist/webcomponents/p-af080b21.js +0 -2
- package/dist/webcomponents/p-af080b21.js.map +0 -1
- package/dist/webcomponents/p-bc969904.js +0 -3
- package/dist/webcomponents/p-bc969904.js.map +0 -1
- package/dist/webcomponents/p-cd097ce9.entry.js +0 -2
- package/dist/webcomponents/p-cd097ce9.entry.js.map +0 -1
- package/dist/webcomponents/p-d5bc9f22.entry.js +0 -2
- package/dist/webcomponents/p-d5bc9f22.entry.js.map +0 -1
- package/dist/webcomponents/p-dd1ebc0b.entry.js +0 -2
- package/dist/webcomponents/p-dd1ebc0b.entry.js.map +0 -1
- package/dist/webcomponents/p-e05e0c6b.entry.js +0 -2
- package/dist/webcomponents/p-e05e0c6b.entry.js.map +0 -1
- /package/dist/types/components/business-form/{businessForm.stories.d.ts → business-form.stories.d.ts} +0 -0
- /package/dist/webcomponents/{p-1953797f.entry.js.map → p-1beaaba3.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-23e9c7d4.entry.js.map → p-a922b908.entry.js.map} +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
export class NumberInput {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = undefined;
|
|
5
|
+
this.name = undefined;
|
|
6
|
+
this.error = undefined;
|
|
7
|
+
this.defaultValue = undefined;
|
|
8
|
+
this.inputHandler = undefined;
|
|
9
|
+
this.disabled = undefined;
|
|
10
|
+
this.input = undefined;
|
|
11
|
+
}
|
|
12
|
+
handleDefaultValueChange(newValue) {
|
|
13
|
+
this.updateInput(newValue);
|
|
14
|
+
}
|
|
15
|
+
updateInput(newValue) {
|
|
16
|
+
const inputElement = this.el.shadowRoot.querySelector('input');
|
|
17
|
+
if (inputElement) {
|
|
18
|
+
inputElement.value = newValue || '';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
handleFormControlInput(event) {
|
|
22
|
+
const target = event.target;
|
|
23
|
+
const name = target.getAttribute('name');
|
|
24
|
+
this.inputHandler(name, target.value);
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.updateInput(this.defaultValue);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
31
|
+
}
|
|
32
|
+
static get is() { return "form-control-number"; }
|
|
33
|
+
static get encapsulation() { return "shadow"; }
|
|
34
|
+
static get originalStyleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["form-control-number.scss"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get styleUrls() {
|
|
40
|
+
return {
|
|
41
|
+
"$": ["form-control-number.css"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static get properties() {
|
|
45
|
+
return {
|
|
46
|
+
"label": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "string",
|
|
51
|
+
"resolved": "string",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": false,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": ""
|
|
59
|
+
},
|
|
60
|
+
"attribute": "label",
|
|
61
|
+
"reflect": false
|
|
62
|
+
},
|
|
63
|
+
"name": {
|
|
64
|
+
"type": "any",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "any",
|
|
68
|
+
"resolved": "any",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"attribute": "name",
|
|
78
|
+
"reflect": false
|
|
79
|
+
},
|
|
80
|
+
"error": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "string",
|
|
85
|
+
"resolved": "string",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": ""
|
|
93
|
+
},
|
|
94
|
+
"attribute": "error",
|
|
95
|
+
"reflect": false
|
|
96
|
+
},
|
|
97
|
+
"defaultValue": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "string",
|
|
102
|
+
"resolved": "string",
|
|
103
|
+
"references": {}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"attribute": "default-value",
|
|
112
|
+
"reflect": false
|
|
113
|
+
},
|
|
114
|
+
"inputHandler": {
|
|
115
|
+
"type": "unknown",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "(name: string, value: string) => void",
|
|
119
|
+
"resolved": "(name: string, value: string) => void",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"disabled": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "boolean",
|
|
134
|
+
"resolved": "boolean",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"attribute": "disabled",
|
|
144
|
+
"reflect": false
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
static get states() {
|
|
149
|
+
return {
|
|
150
|
+
"input": {}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
static get events() {
|
|
154
|
+
return [{
|
|
155
|
+
"method": "formControlInput",
|
|
156
|
+
"name": "formControlInput",
|
|
157
|
+
"bubbles": true,
|
|
158
|
+
"cancelable": true,
|
|
159
|
+
"composed": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "any",
|
|
166
|
+
"resolved": "any",
|
|
167
|
+
"references": {}
|
|
168
|
+
}
|
|
169
|
+
}, {
|
|
170
|
+
"method": "formControlBlur",
|
|
171
|
+
"name": "formControlBlur",
|
|
172
|
+
"bubbles": true,
|
|
173
|
+
"cancelable": true,
|
|
174
|
+
"composed": true,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": ""
|
|
178
|
+
},
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "any",
|
|
181
|
+
"resolved": "any",
|
|
182
|
+
"references": {}
|
|
183
|
+
}
|
|
184
|
+
}];
|
|
185
|
+
}
|
|
186
|
+
static get elementRef() { return "el"; }
|
|
187
|
+
static get watchers() {
|
|
188
|
+
return [{
|
|
189
|
+
"propName": "defaultValue",
|
|
190
|
+
"methodName": "handleDefaultValueChange"
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=form-control-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control-number.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-number.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,WAAW;;;;;;;;;;EActB,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,YAAY,EAAE;MAChB,YAAY,CAAC,KAAK,GAAG,QAAQ,IAAI,EAAE,CAAC;KACrC;EACH,CAAC;EAED,sBAAsB,CAAC,KAAU;IAC/B,MAAM,MAAM,G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n Prop,\n Event,\n EventEmitter,\n State,\n Element,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'form-control-number',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class NumberInput {\n @Element() el: HTMLElement;\n\n @Prop() label: string;\n @Prop() name: any;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() inputHandler: (name: string, value: string) => void;\n @Prop() disabled: boolean;\n @State() input: string;\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n updateInput(newValue: any) {\n const inputElement = this.el.shadowRoot.querySelector('input');\n if (inputElement) {\n inputElement.value = newValue || '';\n }\n }\n\n handleFormControlInput(event: any) {\n const target = event.target;\n const name = target.getAttribute('name');\n this.inputHandler(name, target.value);\n }\n\n componentDidLoad() {\n this.updateInput(this.defaultValue);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n id={this.name}\n name={this.name}\n onInput={(event: any) => this.handleFormControlInput(event)}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"number\"\n disabled={this.disabled}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
export class SelectInput {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.label = undefined;
|
|
5
5
|
this.name = undefined;
|
|
@@ -7,15 +7,24 @@ export class TextInput {
|
|
|
7
7
|
this.defaultValue = undefined;
|
|
8
8
|
this.inputHandler = undefined;
|
|
9
9
|
this.options = undefined;
|
|
10
|
+
this.disabled = undefined;
|
|
11
|
+
}
|
|
12
|
+
handleDefaultValueChange(newValue) {
|
|
13
|
+
this.updateInput(newValue);
|
|
14
|
+
}
|
|
15
|
+
updateInput(newValue) {
|
|
16
|
+
this.selectElement.value = newValue;
|
|
10
17
|
}
|
|
11
18
|
handleFormControlInput(event) {
|
|
12
19
|
const target = event.target;
|
|
13
20
|
const name = target.getAttribute('name');
|
|
14
21
|
this.inputHandler(name, target.value);
|
|
15
22
|
}
|
|
16
|
-
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
this.updateInput(this.defaultValue);
|
|
25
|
+
}
|
|
17
26
|
render() {
|
|
18
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-select is-invalid' : 'form-select' }, this.options.map(option => (h("option", { value: option.value }, option.label)))), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
27
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { ref: el => (this.selectElement = el), id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, this.options.map(option => (h("option", { value: option.value }, option.label)))), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
19
28
|
}
|
|
20
29
|
static get is() { return "form-control-select"; }
|
|
21
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -128,6 +137,23 @@ export class TextInput {
|
|
|
128
137
|
"tags": [],
|
|
129
138
|
"text": ""
|
|
130
139
|
}
|
|
140
|
+
},
|
|
141
|
+
"disabled": {
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "boolean",
|
|
146
|
+
"resolved": "boolean",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"attribute": "disabled",
|
|
156
|
+
"reflect": false
|
|
131
157
|
}
|
|
132
158
|
};
|
|
133
159
|
}
|
|
@@ -164,5 +190,11 @@ export class TextInput {
|
|
|
164
190
|
}
|
|
165
191
|
}];
|
|
166
192
|
}
|
|
193
|
+
static get watchers() {
|
|
194
|
+
return [{
|
|
195
|
+
"propName": "defaultValue",
|
|
196
|
+
"methodName": "handleDefaultValueChange"
|
|
197
|
+
}];
|
|
198
|
+
}
|
|
167
199
|
}
|
|
168
200
|
//# sourceMappingURL=form-control-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-select.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-select.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"form-control-select.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,WAAW;;;;;;;;;;EActB,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,QAAQ,CAAC;EACtC,CAAC;EAED,sBAAsB,CAAC,KAAU;IAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,YAAY,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'form-control-select',\n styleUrl: 'form-control-select.scss',\n shadow: true,\n})\nexport class SelectInput {\n selectElement!: HTMLSelectElement;\n\n @Prop() label: string;\n @Prop() name: any;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() inputHandler: (name: string, value: string) => void;\n @Prop() options: { label: string; value: string }[];\n @Prop() disabled: boolean;\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n updateInput(newValue: any) {\n this.selectElement.value = newValue;\n }\n\n handleFormControlInput(event: any) {\n const target = event.target;\n const name = target.getAttribute('name');\n this.inputHandler(name, target.value);\n }\n\n componentDidLoad() {\n this.updateInput(this.defaultValue);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <select\n ref={el => (this.selectElement = el as HTMLSelectElement)}\n id={this.name}\n name={this.name}\n onInput={(event: any) => this.handleFormControlInput(event)}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-select is-invalid' : 'form-select'}\n disabled={this.disabled}\n >\n {this.options.map(option => (\n <option value={option.value}>{option.label}</option>\n ))}\n </select>\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1791,4 +1791,11 @@ textarea.form-control-lg {
|
|
|
1791
1791
|
line-height: 1.5;
|
|
1792
1792
|
color: #212529;
|
|
1793
1793
|
display: block;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
input[type=text][disabled] {
|
|
1797
|
+
color: var(--jfi-form-control-disabled-color);
|
|
1798
|
+
background-color: var(--jfi-form-control-disabled-background-color);
|
|
1799
|
+
opacity: 0.5;
|
|
1800
|
+
cursor: not-allowed;
|
|
1794
1801
|
}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
2
|
export class TextInput {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.label = undefined;
|
|
5
5
|
this.name = undefined;
|
|
6
6
|
this.error = undefined;
|
|
7
7
|
this.defaultValue = undefined;
|
|
8
|
+
this.disabled = undefined;
|
|
8
9
|
this.inputHandler = undefined;
|
|
10
|
+
this.input = undefined;
|
|
11
|
+
}
|
|
12
|
+
handleDefaultValueChange(newValue) {
|
|
13
|
+
this.updateInput(newValue);
|
|
14
|
+
}
|
|
15
|
+
updateInput(newValue) {
|
|
16
|
+
const inputElement = this.el.shadowRoot.querySelector('input');
|
|
17
|
+
if (inputElement) {
|
|
18
|
+
inputElement.value = newValue || '';
|
|
19
|
+
}
|
|
9
20
|
}
|
|
10
21
|
handleFormControlInput(event) {
|
|
11
22
|
const target = event.target;
|
|
12
23
|
const name = target.getAttribute('name');
|
|
13
24
|
this.inputHandler(name, target.value);
|
|
14
25
|
}
|
|
15
|
-
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
this.updateInput(this.defaultValue);
|
|
28
|
+
}
|
|
16
29
|
render() {
|
|
17
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text" }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
30
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { id: this.name, name: this.name, onInput: (event) => this.handleFormControlInput(event), onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'} ${this.disabled && 'input-disabled'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
18
31
|
}
|
|
19
32
|
static get is() { return "form-control-text"; }
|
|
20
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -98,6 +111,23 @@ export class TextInput {
|
|
|
98
111
|
"attribute": "default-value",
|
|
99
112
|
"reflect": false
|
|
100
113
|
},
|
|
114
|
+
"disabled": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "boolean",
|
|
119
|
+
"resolved": "boolean",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
},
|
|
128
|
+
"attribute": "disabled",
|
|
129
|
+
"reflect": false
|
|
130
|
+
},
|
|
101
131
|
"inputHandler": {
|
|
102
132
|
"type": "unknown",
|
|
103
133
|
"mutable": false,
|
|
@@ -115,6 +145,11 @@ export class TextInput {
|
|
|
115
145
|
}
|
|
116
146
|
};
|
|
117
147
|
}
|
|
148
|
+
static get states() {
|
|
149
|
+
return {
|
|
150
|
+
"input": {}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
118
153
|
static get events() {
|
|
119
154
|
return [{
|
|
120
155
|
"method": "formControlInput",
|
|
@@ -148,5 +183,12 @@ export class TextInput {
|
|
|
148
183
|
}
|
|
149
184
|
}];
|
|
150
185
|
}
|
|
186
|
+
static get elementRef() { return "el"; }
|
|
187
|
+
static get watchers() {
|
|
188
|
+
return [{
|
|
189
|
+
"propName": "defaultValue",
|
|
190
|
+
"methodName": "handleDefaultValueChange"
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
151
193
|
}
|
|
152
194
|
//# sourceMappingURL=form-control-text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-control-text.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-text.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"form-control-text.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,SAAS;;;;;;;;;;EAcpB,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,YAAY,EAAE;MAChB,YAAY,CAAC,KAAK,GAAG,QAAQ,IAAI,EAAE,CAAC;KACrC;EACH,CAAC;EAED,sBAAsB,CAAC,KAAU;IAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;EACxC,CAAC;EAED,gBAAgB;IACd,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;EACtC,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,WAAW,EAAC,2BAA2B;MAC3C,aAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,IAAI,IACtD,IAAI,CAAC,KAAK,CACL;MACR,aACE,EAAE,EAAE,IAAI,CAAC,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,EAC3D,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EACzC,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,IAC1C,IAAI,CAAC,QAAQ,IAAI,gBACnB,EAAE,EACF,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,EAC9D,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;MACD,IAAI,CAAC,KAAK,IAAI,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n State,\n Element,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'form-control-text',\n styleUrl: 'form-control-text.scss',\n shadow: true,\n})\nexport class TextInput {\n @Element() el: HTMLElement;\n\n @Prop() label: string;\n @Prop() name: any;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() disabled: boolean;\n @Prop() inputHandler: (name: string, value: string) => void;\n @State() input: string;\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n updateInput(newValue: any) {\n const inputElement = this.el.shadowRoot.querySelector('input');\n if (inputElement) {\n inputElement.value = newValue || '';\n }\n }\n\n handleFormControlInput(event: any) {\n const target = event.target;\n const name = target.getAttribute('name');\n this.inputHandler(name, target.value);\n }\n\n componentDidLoad() {\n this.updateInput(this.defaultValue);\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n id={this.name}\n name={this.name}\n onInput={(event: any) => this.handleFormControlInput(event)}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'} ${\n this.disabled && 'input-disabled'\n }`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n disabled={this.disabled}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { BehaviorSubject } from "rxjs";
|
|
2
2
|
export class FormController {
|
|
3
|
-
constructor(schema
|
|
4
|
-
this.defaultValues = new BehaviorSubject({});
|
|
3
|
+
constructor(schema) {
|
|
5
4
|
this.values = new BehaviorSubject({});
|
|
6
5
|
this.errors = new BehaviorSubject({});
|
|
7
|
-
this.
|
|
6
|
+
this._initialValues = {};
|
|
8
7
|
this._values = {};
|
|
9
8
|
this._errors = {};
|
|
10
9
|
this._isValid = true;
|
|
11
10
|
this._schema = schema;
|
|
12
|
-
this._defaultValues = defaultValues;
|
|
13
11
|
}
|
|
14
12
|
processArrayError(obj, property, remainingProperties, message) {
|
|
15
13
|
// Extract array name and index from the property string
|
|
16
|
-
const [arrayName, indexStr] = property
|
|
14
|
+
const [arrayName, indexStr] = property
|
|
15
|
+
.match(/^([a-zA-Z0-9]+)\[(\d+)\]/)
|
|
16
|
+
.slice(1);
|
|
17
17
|
const index = parseInt(indexStr, 10);
|
|
18
18
|
// Ensure the array exists and has an entry at the given index
|
|
19
19
|
obj[arrayName] = obj[arrayName] || [];
|
|
@@ -73,13 +73,21 @@ export class FormController {
|
|
|
73
73
|
submitHandler();
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
+
setInitialValues(values) {
|
|
77
|
+
this._initialValues = values;
|
|
78
|
+
this._values = values;
|
|
79
|
+
this.values.next(this._values);
|
|
80
|
+
}
|
|
76
81
|
setValues(values) {
|
|
77
82
|
this._values = Object.assign(Object.assign({}, this._values), values);
|
|
78
83
|
this.values.next(this._values);
|
|
79
84
|
}
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
85
|
+
resetValues() {
|
|
86
|
+
this._values = this._initialValues;
|
|
87
|
+
this.values.next(this._values);
|
|
88
|
+
}
|
|
89
|
+
getInitialValues() {
|
|
90
|
+
return this._initialValues;
|
|
83
91
|
}
|
|
84
92
|
}
|
|
85
93
|
//# sourceMappingURL=form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,OAAO,cAAc;EAUzB,YAAY,MAAyB;IAT9B,WAAM,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;IACtC,WAAM,GAAG,IAAI,eAAe,CAAM,EAAE,CAAC,CAAC;IAGrC,mBAAc,GAAQ,EAAE,CAAC;IACzB,YAAO,GAAQ,EAAE,CAAC;IAClB,YAAO,GAAQ,EAAE,CAAC;IAClB,aAAQ,GAAG,IAAI,CAAC;IAGtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;EACxB,CAAC;EAEO,iBAAiB,CACvB,GAAQ,EACR,QAAgB,EAChB,mBAA6B,EAC7B,OAAe;IAEf,wDAAwD;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AAI,CAAC,QAAQ,EAAE,CAAC;IACtC,IAAI,OAAO,EAAE;MACX,aAAa,EAAE,CAAC;KACjB;EACH,CAAC;EAEM,gBAAgB,CAAC,MAAW;IACjC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,SAAS,CAAC,MAAW;IAC1B,IAAI,CAAC,OAAO,mCAAQ,IAAI,CAAC,OAAO,GAAK,MAAM,CAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,WAAW;IAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC;IACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EACjC,CAAC;EAEM,gBAAgB;IACrB,OAAO,IAAI,CAAC,cAAc,CAAC;EAC7B,CAAC;CACF","sourcesContent":["import { BehaviorSubject } from 'rxjs';\nimport { ObjectSchema, ValidationError } from 'yup';\n\nexport class FormController {\n public values = new BehaviorSubject<any>({});\n public errors = new BehaviorSubject<any>({});\n\n private _schema: ObjectSchema<any>;\n private _initialValues: any = {};\n private _values: any = {};\n private _errors: any = {};\n private _isValid = true;\n\n constructor(schema: ObjectSchema<any>) {\n this._schema = schema;\n }\n\n private processArrayError(\n obj: any,\n property: string,\n remainingProperties: string[],\n message: string,\n ): void {\n // Extract array name and index from the property string\n const [arrayName, indexStr] = property\n .match(/^([a-zA-Z0-9]+)\\[(\\d+)\\]/)\n .slice(1);\n const index = parseInt(indexStr, 10);\n\n // Ensure the array exists and has an entry at the given index\n obj[arrayName] = obj[arrayName] || [];\n obj[arrayName][index] = obj[arrayName][index] || {};\n\n // Recursively set the error if there are remaining properties, else set the error message\n if (remainingProperties.length) {\n this.setNestedError(obj[arrayName][index], remainingProperties, message);\n } else {\n obj[arrayName][index] = message;\n }\n }\n\n private processRegularError(\n obj: any,\n property: string,\n remainingProperties: string[],\n message: string,\n ): void {\n // Ensure the property exists\n obj[property] = obj[property] || {};\n\n // Recursively set the error if there are remaining properties, else set the error message\n if (remainingProperties.length) {\n this.setNestedError(obj[property], remainingProperties, message);\n } else {\n obj[property] = message;\n }\n }\n\n private setNestedError(\n obj: any,\n properties: string[],\n message: string,\n ): void {\n const property = properties.shift();\n const isArrayError = property.includes('[');\n\n if (isArrayError) {\n this.processArrayError(obj, property, properties, message);\n } else {\n this.processRegularError(obj, property, properties, message);\n }\n }\n\n private setError(obj: any, path: string, message: string): void {\n // Convert path to properties array\n const properties = Array.isArray(path) ? path : path.split('.');\n this.setNestedError(obj, properties, message);\n }\n\n private async validate(): Promise<boolean> {\n this._isValid = true;\n this._errors = {};\n\n try {\n await this._schema.validate(this._values, { abortEarly: false });\n } catch (err) {\n this._isValid = false;\n err.inner.forEach((item: ValidationError) => {\n this.setError(this._errors, item.path, item.message);\n });\n }\n\n this.errors.next(this._errors);\n return this._isValid;\n }\n\n public async validateAndSubmit(submitHandler: () => void): Promise<void> {\n const isValid = await this.validate();\n if (isValid) {\n submitHandler();\n }\n }\n\n public setInitialValues(values: any): void {\n this._initialValues = values;\n this._values = values;\n this.values.next(this._values);\n }\n\n public setValues(values: any): void {\n this._values = { ...this._values, ...values };\n this.values.next(this._values);\n }\n\n public resetValues(): void {\n this._values = this._initialValues;\n this.values.next(this._values);\n }\n\n public getInitialValues(): any {\n return this._initialValues;\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Yup from "yup";
|
|
2
|
+
const legalAddressSchema = Yup.object({
|
|
3
|
+
line1: Yup.string().required('Enter street address'),
|
|
4
|
+
line2: Yup.string(),
|
|
5
|
+
city: Yup.string().required('Enter city'),
|
|
6
|
+
state: Yup.string().required('Select state'),
|
|
7
|
+
postal_code: Yup.string().required('Enter postal code'),
|
|
8
|
+
country: Yup.string().required('Select country'),
|
|
9
|
+
});
|
|
10
|
+
export default legalAddressSchema;
|
|
11
|
+
//# sourceMappingURL=legal-address-form-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal-address-form-schema.js","sourceRoot":"","sources":["../../../../src/components/legal-address-form/legal-address-form-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC;EACpC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;EACpD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE;EACnB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;EACzC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;EAC5C,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;EACvD,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CACjD,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC","sourcesContent":["import * as Yup from 'yup';\n\nconst legalAddressSchema = Yup.object({\n line1: Yup.string().required('Enter street address'),\n line2: Yup.string(),\n city: Yup.string().required('Enter city'),\n state: Yup.string().required('Select state'),\n postal_code: Yup.string().required('Enter postal code'),\n country: Yup.string().required('Select country'),\n});\n\nexport default legalAddressSchema;\n"]}
|