@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,66 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { ErrorState } from "./utils";
|
|
3
|
+
export class Details {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.errorMessage = undefined;
|
|
6
|
+
this.entity = undefined;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return (h(Host, { exportParts: 'detail-loading-spinner,detail-loading-state,detail-empty-state,\n detail-head,detail-title,detail-head-info,detail-head-info-item,\n detail-head-info-item-title,detail-head-info-item-data,detail-metadata,detail-metadata-title,\n detail-section,detail-section-title,detail-section-item-title,detail-section-item-data' }, this.errorMessage ?
|
|
11
|
+
ErrorState(this.errorMessage)
|
|
12
|
+
:
|
|
13
|
+
h("main", { class: "p-2" }, h("slot", { name: "head-info" }), h("slot", { name: 'detail-sections' }), ((_a = this.entity) === null || _a === void 0 ? void 0 : _a.metadata) && Object.keys((_b = this.entity) === null || _b === void 0 ? void 0 : _b.metadata).length ?
|
|
14
|
+
h("div", { class: "mt-4" }, h("h2", { part: "detail-metadata-title", class: "fs-3" }, "Metadata"), h("hr", null), h("pre", { part: "detail-metadata", class: "p-2", "aria-label": "metadata content" }, h("code", null, JSON.stringify(this.entity.metadata, null, 2))))
|
|
15
|
+
: null)));
|
|
16
|
+
}
|
|
17
|
+
static get is() { return "justifi-details"; }
|
|
18
|
+
static get encapsulation() { return "shadow"; }
|
|
19
|
+
static get originalStyleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["./details.scss"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get styleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["details.css"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
"errorMessage": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "string",
|
|
36
|
+
"resolved": "string",
|
|
37
|
+
"references": {}
|
|
38
|
+
},
|
|
39
|
+
"required": false,
|
|
40
|
+
"optional": false,
|
|
41
|
+
"docs": {
|
|
42
|
+
"tags": [],
|
|
43
|
+
"text": ""
|
|
44
|
+
},
|
|
45
|
+
"attribute": "error-message",
|
|
46
|
+
"reflect": false
|
|
47
|
+
},
|
|
48
|
+
"entity": {
|
|
49
|
+
"type": "unknown",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "{ metadata: any }",
|
|
53
|
+
"resolved": "{ metadata: any; }",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": ""
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../../src/components/details/details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAQrC,MAAM,OAAO,OAAO;;;;;EAIlB,MAAM;;IACJ,OAAO,CACL,EAAC,IAAI,IACH,WAAW,EAAC,kVAG2E,IAGrF,IAAI,CAAC,YAAY,CAAC,CAAC;MACjB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;MAC7B,CAAC;QACD,YAAM,KAAK,EAAC,KAAK;UACf,YAAM,IAAI,EAAC,WAAW,GAAG;UACzB,YAAM,IAAI,EAAC,iBAAiB,GAAG;UAC9B,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,KAAI,MAAM,CAAC,IAAI,CAAC,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;YACnE,WAAK,KAAK,EAAC,MAAM;cACf,UAAI,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAC,MAAM,eAAc;cAC3D,aAAM;cACN,WAAK,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,KAAK,gBAAY,kBAAkB;gBACnE,gBACG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CACzC,CACH,CACF;YACN,CAAC,CAAC,IAAI,CAEH,CAEN,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { ErrorState } from './utils';\n\n@Component({\n tag: 'justifi-details',\n styleUrl: './details.scss',\n shadow: true,\n})\n\nexport class Details {\n @Prop() errorMessage: string;\n @Prop() entity: { metadata: any };\n\n render() {\n return (\n <Host\n exportParts='detail-loading-spinner,detail-loading-state,detail-empty-state,\n detail-head,detail-title,detail-head-info,detail-head-info-item,\n detail-head-info-item-title,detail-head-info-item-data,detail-metadata,detail-metadata-title,\n detail-section,detail-section-title,detail-section-item-title,detail-section-item-data'\n >\n {\n this.errorMessage ?\n ErrorState(this.errorMessage)\n :\n <main class=\"p-2\">\n <slot name=\"head-info\" />\n <slot name='detail-sections' />\n {this.entity?.metadata && Object.keys(this.entity?.metadata).length ?\n <div class=\"mt-4\">\n <h2 part=\"detail-metadata-title\" class=\"fs-3\">Metadata</h2>\n <hr />\n <pre part=\"detail-metadata\" class=\"p-2\" aria-label=\"metadata content\">\n <code>\n {JSON.stringify(this.entity.metadata, null, 2)}\n </code>\n </pre>\n </div>\n : null\n }\n </main>\n }\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export const LoadingState = h("main", { part: 'detail-loading-state', class: "p-2 d-flex justify-content-center" }, h("div", { part: 'detail-loading-spinner', class: "spinner-border spinner-border-sm", role: "status" }, h("span", { class: "visually-hidden" }, "Loading...")));
|
|
3
|
+
export const ErrorState = (errorMessage) => h("main", { part: 'detail-empty-state', class: "p-2 d-flex justify-content-center" }, h("div", null, errorMessage));
|
|
4
|
+
export const DetailSection = ({ sectionTitle }, children) => h("div", { part: "detail-section", class: "p-2 mt-4" }, h("h5", { part: "detail-section-title" }, sectionTitle), h("hr", null), h("div", { class: "d-flex flex-column justify-content-center gap-2 text-nowrap" }, children));
|
|
5
|
+
export const DetailItem = ({ title, value }) => (title && value) ?
|
|
6
|
+
h("div", { class: "d-flex gap-2" }, h("span", { part: "detail-section-item-title", class: "fw-bold col-3" }, title), h("span", { part: "detail-section-item-data", innerHTML: value }))
|
|
7
|
+
: null;
|
|
8
|
+
export const EntityHeadInfoItem = ({ title, value, classes }) => h("div", { part: "detail-head-info-item", class: `d-flex flex-column ${classes}` }, h("span", { part: "detail-head-info-item-title", class: "fw-bold border-1 border-bottom ps-2 pe-2" }, title), h("span", { part: "detail-head-info-item-data", class: "pt-2 ps-2 pe-2" }, value));
|
|
9
|
+
export const EntityHeadInfo = ({ title, slot, badge }, children) => h("div", { slot: slot, part: 'detail-head', class: "p-2" }, h("div", { class: "d-flex flex-row align-items-center gap-2 mb-2" }, h("h1", { class: "m-0", part: 'detail-title' }, title), badge), h("div", { part: "detail-head-info", class: "d-flex flex-row align-items-top" }, children));
|
|
10
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/details/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GACvB,YAAM,IAAI,EAAC,sBAAsB,EAAC,KAAK,EAAC,mCAAmC;EACzE,WAAK,IAAI,EAAC,wBAAwB,EAAC,KAAK,EAAC,kCAAkC,EAAC,IAAI,EAAC,QAAQ;IACvF,YAAM,KAAK,EAAC,iBAAiB,iBAAkB,CAC3C,CACD,CAAA;AAET,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAE,EAAE,CACjD,YAAM,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAC,mCAAmC;EACvE,eAAM,YAAY,CAAO,CACpB,CAAA;AAET,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,YAAY,EAA4B,EAAE,QAAQ,EAAE,EAAE,CACpF,WAAK,IAAI,EAAC,gBAAgB,EAAC,KAAK,EAAC,UAAU;EACzC,UAAI,IAAI,EAAC,sBAAsB,IAAE,YAAY,CAAM;EACnD,aAAK;EACL,WAAK,KAAK,EAAC,6DAA6D,IACrE,QAAQ,CACL,CACF,CAAA;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAoC,EAAE,EAAE,CAC/E,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC;EAChB,WAAK,KAAK,EAAC,cAAc;IACvB,YAAM,IAAI,EAAC,2BAA2B,EAAC,KAAK,EAAC,eAAe,IAAE,KAAK,CAAQ;IAC3E,YAAM,IAAI,EAAC,0BAA0B,EAAC,SAAS,EAAE,KAAK,GAAS,CAC3D;EACR,CAAC,CAAC,IAAI,CAAA;AAGR,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAgD,EAAE,EAAE,CAC3G,WAAK,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,sBAAsB,OAAO,EAAE;EACtE,YAAM,IAAI,EAAC,6BAA6B,EAAC,KAAK,EAAC,0CAA0C,IAAE,KAAK,CAAQ;EACxG,YAAM,IAAI,EAAC,4BAA4B,EAAC,KAAK,EAAC,gBAAgB,IAAE,KAAK,CAAQ,CACzE,CAAA;AAER,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,EAAE,QAAQ,EAAE,EAAE,CAC/D,WAAK,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,aAAa,EAAC,KAAK,EAAC,KAAK;EAC7C,WAAK,KAAK,EAAC,+CAA+C;IACxD,UAAI,KAAK,EAAC,KAAK,EAAC,IAAI,EAAC,cAAc,IAAE,KAAK,CAAM;IAC/C,KAAK,CACF;EACN,WAAK,IAAI,EAAC,kBAAkB,EAAC,KAAK,EAAC,iCAAiC,IACjE,QAAQ,CACL,CACF,CAAA","sourcesContent":["import { h } from \"@stencil/core\";\n\nexport const LoadingState =\n <main part='detail-loading-state' class=\"p-2 d-flex justify-content-center\">\n <div part='detail-loading-spinner' class=\"spinner-border spinner-border-sm\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </main>\n\nexport const ErrorState = (errorMessage: string) =>\n <main part='detail-empty-state' class=\"p-2 d-flex justify-content-center\">\n <div>{errorMessage}</div>\n </main>\n\nexport const DetailSection = ({ sectionTitle }: { sectionTitle: string }, children) =>\n <div part=\"detail-section\" class=\"p-2 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\nexport const DetailItem = ({ title, value }: { title: string, value: string }) =>\n (title && value) ?\n <div class=\"d-flex gap-2\">\n <span part=\"detail-section-item-title\" class=\"fw-bold col-3\">{title}</span>\n <span part=\"detail-section-item-data\" innerHTML={value}></span>\n </div>\n : null\n\n\nexport const EntityHeadInfoItem = ({title, value, classes}: {title: string, value: any, classes?: string}) =>\n <div part=\"detail-head-info-item\" class={`d-flex flex-column ${classes}`}>\n <span part=\"detail-head-info-item-title\" class=\"fw-bold border-1 border-bottom ps-2 pe-2\">{title}</span>\n <span part=\"detail-head-info-item-data\" class=\"pt-2 ps-2 pe-2\">{value}</span>\n </div>\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'>{title}</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"]}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import IMask from "imask";
|
|
3
|
+
export class DatePartInput {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.imask = null;
|
|
6
|
+
this.label = undefined;
|
|
7
|
+
this.name = undefined;
|
|
8
|
+
this.error = undefined;
|
|
9
|
+
this.defaultValue = undefined;
|
|
10
|
+
this.type = undefined;
|
|
11
|
+
this.inputHandler = undefined;
|
|
12
|
+
this.disabled = undefined;
|
|
13
|
+
}
|
|
14
|
+
handleDefaultValueChange(newValue) {
|
|
15
|
+
this.updateInput(newValue);
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
if (this.textInput) {
|
|
19
|
+
let maskOptions;
|
|
20
|
+
switch (this.type) {
|
|
21
|
+
case 'day':
|
|
22
|
+
maskOptions = { mask: Number, min: 1, max: 31 };
|
|
23
|
+
break;
|
|
24
|
+
case 'month':
|
|
25
|
+
maskOptions = { mask: Number, min: 1, max: 12 };
|
|
26
|
+
break;
|
|
27
|
+
case 'year':
|
|
28
|
+
maskOptions = {
|
|
29
|
+
mask: Number,
|
|
30
|
+
min: 1900,
|
|
31
|
+
max: new Date().getFullYear(),
|
|
32
|
+
};
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
throw new Error('Invalid type prop');
|
|
36
|
+
}
|
|
37
|
+
this.imask = IMask(this.textInput, maskOptions);
|
|
38
|
+
this.imask.on('accept', () => {
|
|
39
|
+
const rawValue = this.imask.unmaskedValue;
|
|
40
|
+
this.inputHandler(this.name, rawValue);
|
|
41
|
+
});
|
|
42
|
+
this.textInput.addEventListener('blur', () => {
|
|
43
|
+
this.formControlBlur.emit();
|
|
44
|
+
});
|
|
45
|
+
this.updateInput(this.defaultValue);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
updateInput(newValue) {
|
|
49
|
+
if (this.imask) {
|
|
50
|
+
this.imask.value = newValue;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
var _a;
|
|
55
|
+
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, onBlur: () => this.formControlBlur.emit(), part: `input ${this.error && 'input-invalid'}`, class: this.error ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
59
|
+
}
|
|
60
|
+
static get is() { return "form-control-datepart"; }
|
|
61
|
+
static get encapsulation() { return "shadow"; }
|
|
62
|
+
static get originalStyleUrls() {
|
|
63
|
+
return {
|
|
64
|
+
"$": ["form-control-number.scss"]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get styleUrls() {
|
|
68
|
+
return {
|
|
69
|
+
"$": ["form-control-number.css"]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static get properties() {
|
|
73
|
+
return {
|
|
74
|
+
"label": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": ""
|
|
87
|
+
},
|
|
88
|
+
"attribute": "label",
|
|
89
|
+
"reflect": false
|
|
90
|
+
},
|
|
91
|
+
"name": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "string",
|
|
96
|
+
"resolved": "string",
|
|
97
|
+
"references": {}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": false,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": ""
|
|
104
|
+
},
|
|
105
|
+
"attribute": "name",
|
|
106
|
+
"reflect": false
|
|
107
|
+
},
|
|
108
|
+
"error": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "string",
|
|
113
|
+
"resolved": "string",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": ""
|
|
121
|
+
},
|
|
122
|
+
"attribute": "error",
|
|
123
|
+
"reflect": false
|
|
124
|
+
},
|
|
125
|
+
"defaultValue": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"mutable": false,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "string",
|
|
130
|
+
"resolved": "string",
|
|
131
|
+
"references": {}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"attribute": "default-value",
|
|
140
|
+
"reflect": false
|
|
141
|
+
},
|
|
142
|
+
"type": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "'day' | 'month' | 'year'",
|
|
147
|
+
"resolved": "\"day\" | \"month\" | \"year\"",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"attribute": "type",
|
|
157
|
+
"reflect": false
|
|
158
|
+
},
|
|
159
|
+
"inputHandler": {
|
|
160
|
+
"type": "unknown",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "(name: string, value: string) => void",
|
|
164
|
+
"resolved": "(name: string, value: string) => void",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": ""
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"disabled": {
|
|
175
|
+
"type": "boolean",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "boolean",
|
|
179
|
+
"resolved": "boolean",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": ""
|
|
187
|
+
},
|
|
188
|
+
"attribute": "disabled",
|
|
189
|
+
"reflect": false
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
static get events() {
|
|
194
|
+
return [{
|
|
195
|
+
"method": "formControlInput",
|
|
196
|
+
"name": "formControlInput",
|
|
197
|
+
"bubbles": true,
|
|
198
|
+
"cancelable": true,
|
|
199
|
+
"composed": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "any",
|
|
206
|
+
"resolved": "any",
|
|
207
|
+
"references": {}
|
|
208
|
+
}
|
|
209
|
+
}, {
|
|
210
|
+
"method": "formControlBlur",
|
|
211
|
+
"name": "formControlBlur",
|
|
212
|
+
"bubbles": true,
|
|
213
|
+
"cancelable": true,
|
|
214
|
+
"composed": true,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": ""
|
|
218
|
+
},
|
|
219
|
+
"complexType": {
|
|
220
|
+
"original": "any",
|
|
221
|
+
"resolved": "any",
|
|
222
|
+
"references": {}
|
|
223
|
+
}
|
|
224
|
+
}];
|
|
225
|
+
}
|
|
226
|
+
static get watchers() {
|
|
227
|
+
return [{
|
|
228
|
+
"propName": "defaultValue",
|
|
229
|
+
"methodName": "handleDefaultValueChange"
|
|
230
|
+
}];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=form-control-datepart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control-datepart.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-datepart.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,aAAa;;IAShB,UAAK,GAA0B,IAAI,CAAC;;;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,IAAI,WAAW,CAAC;MAEhB,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,KAAK;UACR,WAAW,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;UAChD,MAAM;QACR,KAAK,OAAO;UACV,WAAW,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;UAChD,MAAM;QACR,KAAK,MAAM;UACT,WAAW,GAAG;YACZ,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,IAAI;YACT,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;WAC9B,CAAC;UACF,MAAM;QACR;UACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;OACxC;MAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;MAEhD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MACzC,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;MAC9B,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACrC;EACH,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;KAC7B;EACH,CAAC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,EAAE,CAAC;EACxB,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,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,EAAE,EAAE,IAAI,CAAC,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EACzC,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE,EAC9C,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 Watch,\n} from '@stencil/core';\nimport IMask, { InputMask } from 'imask';\n\n@Component({\n tag: 'form-control-datepart',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class DatePartInput {\n @Prop() label: string;\n @Prop() name: string;\n @Prop() error: string;\n @Prop() defaultValue: string;\n @Prop() type: 'day' | 'month' | 'year';\n @Prop() inputHandler: (name: string, value: string) => void;\n @Prop() disabled: boolean;\n\n private imask: InputMask<any> | null = null;\n\n textInput!: HTMLInputElement;\n\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n componentDidLoad() {\n if (this.textInput) {\n let maskOptions;\n\n switch (this.type) {\n case 'day':\n maskOptions = { mask: Number, min: 1, max: 31 };\n break;\n case 'month':\n maskOptions = { mask: Number, min: 1, max: 12 };\n break;\n case 'year':\n maskOptions = {\n mask: Number,\n min: 1900,\n max: new Date().getFullYear(),\n };\n break;\n default:\n throw new Error('Invalid type prop');\n }\n\n this.imask = IMask(this.textInput, maskOptions);\n\n this.imask.on('accept', () => {\n const rawValue = this.imask.unmaskedValue;\n this.inputHandler(this.name, rawValue);\n });\n\n this.textInput.addEventListener('blur', () => {\n this.formControlBlur.emit();\n });\n\n this.updateInput(this.defaultValue);\n }\n }\n\n updateInput(newValue: any) {\n if (this.imask) {\n this.imask.value = newValue;\n }\n }\n\n disconnectedCallback() {\n this.imask?.destroy();\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n ref={el => (this.textInput = el as HTMLInputElement)}\n id={this.name}\n name={this.name}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n disabled={this.disabled}\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import IMask from "imask";
|
|
3
|
+
export class MonetaryInput {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.imask = null;
|
|
6
|
+
this.label = undefined;
|
|
7
|
+
this.name = undefined;
|
|
8
|
+
this.error = undefined;
|
|
9
|
+
this.defaultValue = undefined;
|
|
10
|
+
this.inputHandler = undefined;
|
|
11
|
+
}
|
|
12
|
+
handleDefaultValueChange(newValue) {
|
|
13
|
+
this.updateInput(newValue);
|
|
14
|
+
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this.textInput) {
|
|
17
|
+
this.imask = IMask(this.textInput, {
|
|
18
|
+
mask: Number,
|
|
19
|
+
scale: 2,
|
|
20
|
+
thousandsSeparator: ',',
|
|
21
|
+
padFractionalZeros: true,
|
|
22
|
+
normalizeZeros: true,
|
|
23
|
+
radix: '.',
|
|
24
|
+
});
|
|
25
|
+
this.imask.on('accept', () => {
|
|
26
|
+
const rawValue = this.imask.unmaskedValue;
|
|
27
|
+
this.inputHandler(this.name, rawValue);
|
|
28
|
+
});
|
|
29
|
+
this.textInput.addEventListener('blur', () => {
|
|
30
|
+
this.formControlBlur.emit();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
this.updateInput(this.defaultValue);
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
var _a;
|
|
37
|
+
(_a = this.imask) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
38
|
+
}
|
|
39
|
+
updateInput(newValue) {
|
|
40
|
+
if (this.imask) {
|
|
41
|
+
this.imask.value = String(newValue);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { ref: el => (this.textInput = el), id: this.name, name: this.name, 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)));
|
|
46
|
+
}
|
|
47
|
+
static get is() { return "form-control-monetary"; }
|
|
48
|
+
static get encapsulation() { return "shadow"; }
|
|
49
|
+
static get originalStyleUrls() {
|
|
50
|
+
return {
|
|
51
|
+
"$": ["form-control-number.scss"]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static get styleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["form-control-number.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get properties() {
|
|
60
|
+
return {
|
|
61
|
+
"label": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "string",
|
|
66
|
+
"resolved": "string",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": ""
|
|
74
|
+
},
|
|
75
|
+
"attribute": "label",
|
|
76
|
+
"reflect": false
|
|
77
|
+
},
|
|
78
|
+
"name": {
|
|
79
|
+
"type": "any",
|
|
80
|
+
"mutable": false,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "any",
|
|
83
|
+
"resolved": "any",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": false,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": ""
|
|
91
|
+
},
|
|
92
|
+
"attribute": "name",
|
|
93
|
+
"reflect": false
|
|
94
|
+
},
|
|
95
|
+
"error": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": ""
|
|
108
|
+
},
|
|
109
|
+
"attribute": "error",
|
|
110
|
+
"reflect": false
|
|
111
|
+
},
|
|
112
|
+
"defaultValue": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "string",
|
|
117
|
+
"resolved": "string",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": false,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": ""
|
|
125
|
+
},
|
|
126
|
+
"attribute": "default-value",
|
|
127
|
+
"reflect": false
|
|
128
|
+
},
|
|
129
|
+
"inputHandler": {
|
|
130
|
+
"type": "unknown",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "(name: string, value: string) => void",
|
|
134
|
+
"resolved": "(name: string, value: string) => void",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get events() {
|
|
147
|
+
return [{
|
|
148
|
+
"method": "formControlInput",
|
|
149
|
+
"name": "formControlInput",
|
|
150
|
+
"bubbles": true,
|
|
151
|
+
"cancelable": true,
|
|
152
|
+
"composed": true,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": ""
|
|
156
|
+
},
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "any",
|
|
159
|
+
"resolved": "any",
|
|
160
|
+
"references": {}
|
|
161
|
+
}
|
|
162
|
+
}, {
|
|
163
|
+
"method": "formControlBlur",
|
|
164
|
+
"name": "formControlBlur",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "any",
|
|
174
|
+
"resolved": "any",
|
|
175
|
+
"references": {}
|
|
176
|
+
}
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
|
+
static get watchers() {
|
|
180
|
+
return [{
|
|
181
|
+
"propName": "defaultValue",
|
|
182
|
+
"methodName": "handleDefaultValueChange"
|
|
183
|
+
}];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=form-control-monetary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-control-monetary.js","sourceRoot":"","sources":["../../../../src/components/form/form-control-monetary.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,MAAM,OAAO,aAAa;;IAOhB,UAAK,GAA0B,IAAI,CAAC;;;;;;;EAQ5C,wBAAwB,CAAC,QAAgB;IACvC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;EAC7B,CAAC;EAED,gBAAgB;IACd,IAAI,IAAI,CAAC,SAAS,EAAE;MAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;QACjC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,CAAC;QACR,kBAAkB,EAAE,GAAG;QACvB,kBAAkB,EAAE,IAAI;QACxB,cAAc,EAAE,IAAI;QACpB,KAAK,EAAE,GAAG;OACX,CAAC,CAAC;MAEH,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MACzC,CAAC,CAAC,CAAC;MAEH,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;QAC3C,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;MAC9B,CAAC,CAAC,CAAC;KACJ;IACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;EACtC,CAAC;EAED,oBAAoB;;IAClB,MAAA,IAAI,CAAC,KAAK,0CAAE,OAAO,EAAE,CAAC;EACxB,CAAC;EAED,WAAW,CAAC,QAAa;IACvB,IAAI,IAAI,CAAC,KAAK,EAAE;MACd,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;KACrC;EACH,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,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAsB,CAAC,EACpD,EAAE,EAAE,IAAI,CAAC,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,EACzC,IAAI,EAAE,SAAS,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE,EAC9C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,cAAc,EAC9D,IAAI,EAAC,MAAM,GACX;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 Watch,\n} from '@stencil/core';\nimport IMask, { InputMask } from 'imask';\n\n@Component({\n tag: 'form-control-monetary',\n styleUrl: 'form-control-number.scss',\n shadow: true,\n})\nexport class MonetaryInput {\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\n private imask: InputMask<any> | null = null;\n\n textInput!: HTMLInputElement;\n\n @Event() formControlInput: EventEmitter<any>;\n @Event() formControlBlur: EventEmitter<any>;\n\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.updateInput(newValue);\n }\n\n componentDidLoad() {\n if (this.textInput) {\n this.imask = IMask(this.textInput, {\n mask: Number,\n scale: 2,\n thousandsSeparator: ',',\n padFractionalZeros: true,\n normalizeZeros: true,\n radix: '.',\n });\n\n this.imask.on('accept', () => {\n const rawValue = this.imask.unmaskedValue;\n this.inputHandler(this.name, rawValue);\n });\n\n this.textInput.addEventListener('blur', () => {\n this.formControlBlur.emit();\n });\n }\n this.updateInput(this.defaultValue);\n }\n\n disconnectedCallback() {\n this.imask?.destroy();\n }\n\n updateInput(newValue: any) {\n if (this.imask) {\n this.imask.value = String(newValue);\n }\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\" htmlFor={this.name}>\n {this.label}\n </label>\n <input\n ref={el => (this.textInput = el as HTMLInputElement)}\n id={this.name}\n name={this.name}\n onBlur={() => this.formControlBlur.emit()}\n part={`input ${this.error && 'input-invalid'}`}\n class={this.error ? 'form-control is-invalid' : 'form-control'}\n type=\"text\"\n />\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|