@justifi/webcomponents 4.2.2 → 4.5.0
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/LICENSE +21 -0
- package/dist/cjs/{Api-11362403.js → Api-d2df6e84.js} +17 -4
- package/dist/cjs/Api-d2df6e84.js.map +1 -0
- package/dist/cjs/{Payment-ac4dea02.js → Payout-4906a445.js} +44 -1
- package/dist/cjs/Payout-4906a445.js.map +1 -0
- package/dist/cjs/business-form-schema-725ec6f5.js +150 -0
- 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-number_3.cjs.entry.js +148 -0
- 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-34312a38.js → index-4ffc90c0.js} +145 -20
- package/dist/cjs/index-4ffc90c0.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-bcf90c56.js → index.esm-84a0a7a8.js} +283 -14
- 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 +8 -3
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-business-form.cjs.entry.js +833 -0
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -0
- 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 +8 -3
- 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 +25 -7
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +26 -19
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +78 -4039
- 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 +123 -0
- package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -0
- 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 +3 -12
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/select-input_2.cjs.entry.js +6 -6
- package/dist/cjs/select-input_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{state-options-efeaa587.js → state-options-83b52cd1.js} +1 -1
- package/dist/{esm/state-options-188acc34.js.map → cjs/state-options-83b52cd1.js.map} +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-0fd61dbd.js +3918 -0
- package/dist/cjs/utils-0fd61dbd.js.map +1 -0
- package/dist/cjs/utils-a5b5bfdf.js +35 -0
- package/dist/cjs/utils-a5b5bfdf.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +3 -6
- package/dist/cjs/webcomponents.cjs.js.map +1 -1
- package/dist/collection/api/Api.js +17 -4
- 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 +42 -0
- package/dist/collection/api/Payout.js.map +1 -0
- package/dist/collection/api/Proceed.js +42 -0
- package/dist/collection/api/Proceed.js.map +1 -0
- package/dist/collection/api/index.js +1 -0
- package/dist/collection/api/index.js.map +1 -1
- package/dist/collection/api/mockData/MockPayments.js +1 -1
- package/dist/collection/api/shared.js +2 -0
- package/dist/collection/api/shared.js.map +1 -0
- package/dist/collection/collection-manifest.json +30 -12
- package/dist/collection/components/bank-account-form/bank-account-form.js +38 -10
- 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 +2 -0
- package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
- package/dist/collection/components/bank-account-form/test/bank-account-form.e2e.js +1 -1
- package/dist/collection/components/bank-account-form/test/bank-account-form.spec.js +3 -3
- package/dist/collection/components/billing-form/billing-form-schema.js +1 -1
- package/dist/collection/components/billing-form/billing-form.css +212 -39
- package/dist/collection/components/billing-form/billing-form.js +16 -10
- package/dist/collection/components/billing-form/billing-form.js.map +1 -1
- package/dist/collection/components/billing-form/test/billing-form.spec.js +51 -24
- package/dist/collection/components/billing-form/test/billing-form.spec.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-address/business-address-schema.js → business-form/business-address/business-address-form-schema.js} +2 -2
- package/dist/collection/components/business-form/business-address/business-address-form-schema.js.map +1 -0
- package/dist/collection/components/business-form/business-address/business-address-form.css +2532 -0
- package/dist/collection/components/business-form/business-address/business-address-form.js +98 -0
- package/dist/collection/components/business-form/business-address/business-address-form.js.map +1 -0
- package/dist/collection/components/business-form/business-address/test/business-address.e2e.js +10 -0
- package/dist/collection/components/business-form/business-address/test/business-address.e2e.js.map +1 -0
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js +76 -0
- package/dist/collection/components/business-form/business-address/test/business-address.spec.js.map +1 -0
- package/dist/collection/components/business-form/business-form-schema.js +160 -0
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -0
- package/dist/collection/components/business-form/business-form.css +7772 -0
- package/dist/collection/components/business-form/business-form.js +153 -0
- package/dist/collection/components/business-form/business-form.js.map +1 -0
- package/dist/collection/components/business-form/business-form.stories.js +115 -0
- package/dist/collection/components/business-form/business-form.stories.js.map +1 -0
- package/dist/collection/components/{business-info/business-info.css → business-form/business-generic-info/business-generic-info.css} +745 -530
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +72 -0
- package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -0
- package/dist/collection/components/business-form/business-owners/business-owners.css +7772 -0
- package/dist/collection/components/business-form/business-owners/business-owners.js +131 -0
- package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -0
- package/dist/collection/components/business-form/business-representative/business-representative-schema.js +2 -0
- package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -0
- package/dist/collection/components/business-form/business-representative/business-representative.css +2489 -0
- package/dist/collection/components/business-form/business-representative/business-representative.js +71 -0
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -0
- 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 +38 -10
- package/dist/collection/components/card-form/card-form.js.map +1 -1
- package/dist/collection/components/card-form/card-form.stories.js +5 -2
- package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
- package/dist/collection/components/card-form/test/card-form.e2e.js +1 -1
- package/dist/collection/components/card-form/test/card-form.spec.js +3 -3
- 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/{business-address/business-address.css → form/form-control-select.css} +350 -1212
- package/dist/collection/components/form/form-control-select.js +200 -0
- package/dist/collection/components/form/form-control-select.js.map +1 -0
- package/dist/collection/components/form/form-control-text.css +1801 -0
- package/dist/collection/components/form/form-control-text.js +194 -0
- package/dist/collection/components/form/form-control-text.js.map +1 -0
- package/dist/collection/components/form/form.js +93 -0
- package/dist/collection/components/form/form.js.map +1 -0
- 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-form/payment-form.css +220 -45
- package/dist/collection/components/payment-form/payment-form.js +47 -7
- package/dist/collection/components/payment-form/payment-form.js.map +1 -1
- package/dist/collection/components/payment-form/payment-form.stories.js +3 -2
- package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
- package/dist/collection/components/payment-form/payment-method-selector.css +348 -145
- package/dist/collection/components/payment-form/payment-method-selector.js +5 -3
- package/dist/collection/components/payment-form/payment-method-selector.js.map +1 -1
- package/dist/collection/components/payment-form/test/payment-form.e2e.js +1 -1
- package/dist/collection/components/payment-form/test/payment-form.spec.js +4 -3
- package/dist/collection/components/payment-form/test/payment-form.spec.js.map +1 -1
- package/dist/collection/components/payment-method-form/get-computed-theme.js +2 -0
- package/dist/collection/components/payment-method-form/get-computed-theme.js.map +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +19 -11
- 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.e2e.js +1 -1
- package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +3 -3
- package/dist/collection/components/payment-method-form/theme.js.map +1 -1
- package/dist/collection/components/payments-list/example.js +12 -0
- package/dist/collection/components/payments-list/payments-list.css +574 -1
- package/dist/collection/components/payments-list/payments-list.js +130 -27
- package/dist/collection/components/payments-list/payments-list.js.map +1 -1
- package/dist/collection/components/payments-list/payments-list.stories.js +78 -0
- package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -0
- package/dist/collection/components/payments-list/test/payments-list.spec.js +31 -18
- 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 +576 -0
- package/dist/collection/components/payouts-list/payouts-list.js +215 -0
- package/dist/collection/components/payouts-list/payouts-list.js.map +1 -0
- package/dist/collection/components/payouts-list/payouts-list.stories.js +69 -0
- package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -0
- 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/select-input/select-input.css +344 -141
- package/dist/collection/components/select-input/select-input.js +5 -4
- package/dist/collection/components/select-input/select-input.js.map +1 -1
- package/dist/collection/components/select-input/test/select-input.spec.js +72 -28
- package/dist/collection/components/select-input/test/select-input.spec.js.map +1 -1
- 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/components/text-input/test/text-input.spec.js +47 -5
- package/dist/collection/components/text-input/test/text-input.spec.js.map +1 -1
- package/dist/collection/components/text-input/text-input.css +344 -141
- package/dist/collection/components/text-input/text-input.js +2 -2
- package/dist/collection/components/text-input/text-input.js.map +1 -1
- 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 +47 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +16 -3
- package/dist/components/Api.js.map +1 -1
- package/dist/{esm/Payment-c86e1e84.js → components/Payout.js} +44 -2
- 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/billing-form.js +2 -2
- package/dist/components/billing-form.js.map +1 -1
- package/dist/components/business-address-form.js +71 -0
- package/dist/components/business-address-form.js.map +1 -0
- package/dist/components/business-generic-info.js +216 -0
- package/dist/components/business-generic-info.js.map +1 -0
- package/dist/components/business-owners.js +118 -0
- package/dist/components/business-owners.js.map +1 -0
- package/dist/components/business-representative.js +91 -0
- package/dist/components/business-representative.js.map +1 -0
- package/dist/components/details.js +66 -0
- package/dist/components/details.js.map +1 -0
- package/dist/components/{justifi-business-info.d.ts → form-control-datepart.d.ts} +4 -4
- 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.d.ts +11 -0
- package/dist/components/form-control-select.js +8 -0
- package/dist/components/form-control-select.js.map +1 -0
- package/dist/components/form-control-select2.js +66 -0
- package/dist/components/form-control-select2.js.map +1 -0
- package/dist/components/form-control-text.d.ts +11 -0
- package/dist/components/form-control-text.js +8 -0
- package/dist/components/form-control-text.js.map +1 -0
- package/dist/components/form-control-text2.js +70 -0
- package/dist/components/form-control-text2.js.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.esm.js +281 -14
- 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 +7 -2
- package/dist/components/justifi-bank-account-form.js.map +1 -1
- package/dist/components/justifi-business-address-form.d.ts +11 -0
- package/dist/components/justifi-business-address-form.js +8 -0
- package/dist/components/justifi-business-address-form.js.map +1 -0
- package/dist/components/justifi-business-form.d.ts +11 -0
- package/dist/components/justifi-business-form.js +920 -0
- package/dist/components/justifi-business-form.js.map +1 -0
- package/dist/components/justifi-business-generic-info.d.ts +11 -0
- package/dist/components/justifi-business-generic-info.js +8 -0
- package/dist/components/justifi-business-generic-info.js.map +1 -0
- 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-business-owners.d.ts +11 -0
- package/dist/components/justifi-business-owners.js +8 -0
- package/dist/components/justifi-business-owners.js.map +1 -0
- package/dist/components/justifi-business-representative.d.ts +11 -0
- package/dist/components/justifi-business-representative.js +8 -0
- package/dist/components/justifi-business-representative.js.map +1 -0
- package/dist/components/justifi-card-form.js +7 -2
- 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 +24 -4
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +88 -4041
- 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.d.ts +11 -0
- package/dist/components/justifi-payouts-list.js +149 -0
- package/dist/components/justifi-payouts-list.js.map +1 -0
- 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 +25 -18
- package/dist/components/payment-method-form.js.map +1 -1
- package/dist/components/payment-method-selector.js +1 -1
- package/dist/components/payment-method-selector.js.map +1 -1
- package/dist/components/phone-masks.js +7 -0
- package/dist/components/phone-masks.js.map +1 -0
- package/dist/components/select-input2.js +3 -3
- package/dist/components/select-input2.js.map +1 -1
- package/dist/components/state-options.js.map +1 -1
- package/dist/components/table.js +94 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/text-input2.js +2 -2
- package/dist/components/text-input2.js.map +1 -1
- package/dist/components/utils.js +3911 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/esm/{Api-a07f0057.js → Api-a95f17ac.js} +17 -4
- package/dist/esm/Api-a95f17ac.js.map +1 -0
- package/dist/{components/Payment.js → esm/Payout-9a1f2859.js} +44 -2
- package/dist/esm/Payout-9a1f2859.js.map +1 -0
- package/dist/esm/business-form-schema-5885d3d6.js +146 -0
- 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-number_3.entry.js +142 -0
- 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-044f93fc.js → index-609a2c67.js} +145 -21
- package/dist/esm/index-609a2c67.js.map +1 -0
- package/dist/esm/{index.esm-5624a5ed.js → index.esm-89fe6af9.js} +282 -15
- 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 +8 -3
- package/dist/esm/justifi-bank-account-form.entry.js.map +1 -1
- package/dist/esm/justifi-billing-form_2.entry.js +5 -5
- package/dist/esm/justifi-billing-form_2.entry.js.map +1 -1
- package/dist/esm/justifi-business-form.entry.js +829 -0
- package/dist/esm/justifi-business-form.entry.js.map +1 -0
- 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 +8 -3
- 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 +22 -4
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +26 -19
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +78 -4039
- 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 +119 -0
- package/dist/esm/justifi-payouts-list.entry.js.map +1 -0
- 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 +4 -13
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/select-input_2.entry.js +6 -6
- package/dist/esm/select-input_2.entry.js.map +1 -1
- package/dist/esm/{state-options-188acc34.js → state-options-ece00aa2.js} +1 -1
- package/dist/esm/state-options-ece00aa2.js.map +1 -0
- package/dist/esm/table-utils-6cdcaa8c.js +11 -0
- package/dist/esm/table-utils-6cdcaa8c.js.map +1 -0
- package/dist/esm/utils-ad0bbe03.js +3911 -0
- package/dist/esm/utils-ad0bbe03.js.map +1 -0
- package/dist/esm/utils-cdf0b984.js +28 -0
- package/dist/esm/utils-cdf0b984.js.map +1 -0
- package/dist/esm/webcomponents.js +4 -7
- 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 +60 -0
- package/dist/types/api/Proceed.d.ts +60 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/shared.d.ts +11 -0
- package/dist/types/components/business-form/additional-questions/additional-questions.d.ts +15 -0
- package/dist/types/components/business-form/business-address/business-address-form.d.ts +9 -0
- package/dist/types/components/business-form/business-form-schema.d.ts +119 -0
- package/dist/types/components/business-form/business-form.d.ts +19 -0
- package/dist/types/components/business-form/business-form.stories.d.ts +21 -0
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +15 -0
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +33 -0
- package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +15 -0
- package/dist/types/components/business-form/business-representative/business-representative.d.ts +11 -0
- 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/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 +21 -0
- package/dist/types/components/form/form-control-text.d.ts +18 -0
- package/dist/types/components/form/form.d.ts +22 -0
- 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-form/payment-form.d.ts +2 -0
- package/dist/types/components/payment-method-form/theme.d.ts +2 -0
- package/dist/types/components/payments-list/payments-list.d.ts +30 -5
- package/dist/types/components/payments-list/payments-list.stories.d.ts +10 -0
- 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 +37 -0
- package/dist/types/components/payouts-list/payouts-list.stories.d.ts +9 -0
- 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 +964 -28
- package/dist/types/stencil-public-runtime.d.ts +16 -2
- 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 +3 -0
- package/dist/webcomponents/p-0237a6bc.entry.js +2 -0
- package/dist/webcomponents/p-0237a6bc.entry.js.map +1 -0
- package/dist/webcomponents/p-0d6e9f76.entry.js +2 -0
- package/dist/webcomponents/p-0d6e9f76.entry.js.map +1 -0
- package/dist/webcomponents/p-126146d4.js +2 -0
- package/dist/webcomponents/p-126146d4.js.map +1 -0
- package/dist/webcomponents/p-239564c6.entry.js +2 -0
- package/dist/webcomponents/p-239564c6.entry.js.map +1 -0
- package/dist/webcomponents/p-27b15fe8.entry.js +2 -0
- package/dist/webcomponents/p-27b15fe8.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-308b6784.js +3 -0
- package/dist/webcomponents/p-308b6784.js.map +1 -0
- package/dist/webcomponents/p-391b8f1d.entry.js +2 -0
- package/dist/webcomponents/p-391b8f1d.entry.js.map +1 -0
- package/dist/webcomponents/p-439fc294.entry.js +2 -0
- package/dist/webcomponents/p-439fc294.entry.js.map +1 -0
- package/dist/webcomponents/{p-0ea23153.js → p-47bc59b5.js} +1 -1
- package/dist/webcomponents/p-47bc59b5.js.map +1 -0
- package/dist/webcomponents/p-66f010e5.entry.js +2 -0
- package/dist/webcomponents/p-66f010e5.entry.js.map +1 -0
- package/dist/webcomponents/p-7abb092c.entry.js +2 -0
- package/dist/webcomponents/p-7abb092c.entry.js.map +1 -0
- package/dist/webcomponents/p-7e3bbe32.entry.js +2 -0
- package/dist/webcomponents/p-7e3bbe32.entry.js.map +1 -0
- package/dist/webcomponents/p-86464cab.entry.js +2 -0
- package/dist/webcomponents/p-86464cab.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-ab0756ff.js +2 -0
- package/dist/webcomponents/p-ab0756ff.js.map +1 -0
- package/dist/webcomponents/p-b042bf80.entry.js +2 -0
- package/dist/webcomponents/p-b042bf80.entry.js.map +1 -0
- package/dist/webcomponents/p-b967262f.entry.js +2 -0
- package/dist/webcomponents/p-b967262f.entry.js.map +1 -0
- package/dist/webcomponents/p-bf9c2be2.entry.js +2 -0
- package/dist/webcomponents/p-bf9c2be2.entry.js.map +1 -0
- package/dist/webcomponents/p-c18d876e.entry.js +2 -0
- package/dist/webcomponents/p-c18d876e.entry.js.map +1 -0
- package/dist/webcomponents/p-c1e4288d.entry.js +2 -0
- package/dist/webcomponents/p-c1e4288d.entry.js.map +1 -0
- package/dist/webcomponents/p-c46241ba.js +2 -0
- 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-d1bbf409.entry.js +2 -0
- package/dist/webcomponents/p-d1bbf409.entry.js.map +1 -0
- package/dist/webcomponents/p-e26d7eea.entry.js +2 -0
- package/dist/webcomponents/p-e26d7eea.entry.js.map +1 -0
- package/dist/webcomponents/p-e77d8c6e.entry.js +2 -0
- package/dist/webcomponents/p-e77d8c6e.entry.js.map +1 -0
- package/dist/webcomponents/p-f0acb27e.entry.js +2 -0
- package/dist/webcomponents/p-f0acb27e.entry.js.map +1 -0
- package/dist/webcomponents/p-f8d49acb.entry.js +2 -0
- package/dist/webcomponents/p-f8d49acb.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/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/dist/webcomponents/webcomponents.esm.js.map +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +16 -16
- package/CHANGELOG.md +0 -208
- package/changelog-template.hbs +0 -10
- package/dist/cjs/Api-11362403.js.map +0 -1
- package/dist/cjs/Payment-ac4dea02.js.map +0 -1
- package/dist/cjs/index-34312a38.js.map +0 -1
- package/dist/cjs/index.esm-bcf90c56.js.map +0 -1
- package/dist/cjs/justifi-business-address.cjs.entry.js +0 -69
- package/dist/cjs/justifi-business-address.cjs.entry.js.map +0 -1
- package/dist/cjs/justifi-business-info.cjs.entry.js +0 -174
- package/dist/cjs/justifi-business-info.cjs.entry.js.map +0 -1
- package/dist/cjs/state-options-efeaa587.js.map +0 -1
- package/dist/collection/components/business-address/business-address-schema.js.map +0 -1
- package/dist/collection/components/business-address/business-address.js +0 -100
- package/dist/collection/components/business-address/business-address.js.map +0 -1
- package/dist/collection/components/business-address/test/business-address.e2e.js +0 -10
- package/dist/collection/components/business-address/test/business-address.e2e.js.map +0 -1
- package/dist/collection/components/business-address/test/business-address.spec.js +0 -18
- package/dist/collection/components/business-address/test/business-address.spec.js.map +0 -1
- package/dist/collection/components/business-info/business-info-schema.js +0 -94
- package/dist/collection/components/business-info/business-info-schema.js.map +0 -1
- package/dist/collection/components/business-info/business-info.js +0 -168
- package/dist/collection/components/business-info/business-info.js.map +0 -1
- package/dist/components/Payment.js.map +0 -1
- package/dist/components/justifi-business-address.d.ts +0 -11
- package/dist/components/justifi-business-address.js +0 -99
- package/dist/components/justifi-business-address.js.map +0 -1
- package/dist/components/justifi-business-info.js +0 -207
- package/dist/components/justifi-business-info.js.map +0 -1
- package/dist/esm/Api-a07f0057.js.map +0 -1
- package/dist/esm/Payment-c86e1e84.js.map +0 -1
- package/dist/esm/index-044f93fc.js.map +0 -1
- package/dist/esm/index.esm-5624a5ed.js.map +0 -1
- package/dist/esm/justifi-business-address.entry.js +0 -65
- package/dist/esm/justifi-business-address.entry.js.map +0 -1
- package/dist/esm/justifi-business-info.entry.js +0 -170
- package/dist/esm/justifi-business-info.entry.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/types/components/bank-account-form/bank-account-form.d.ts +0 -56
- package/dist/types/components/business-address/business-address.d.ts +0 -11
- package/dist/types/components/business-info/business-info-schema.d.ts +0 -42
- package/dist/types/components/business-info/business-info.d.ts +0 -20
- package/dist/types/components/card-form/card-form.d.ts +0 -62
- package/dist/webcomponents/p-0969db8f.entry.js +0 -2
- package/dist/webcomponents/p-0969db8f.entry.js.map +0 -1
- package/dist/webcomponents/p-0ea23153.js.map +0 -1
- package/dist/webcomponents/p-1ca0646b.js +0 -2
- package/dist/webcomponents/p-1ca0646b.js.map +0 -1
- package/dist/webcomponents/p-1f151d49.js +0 -2
- package/dist/webcomponents/p-1f151d49.js.map +0 -1
- package/dist/webcomponents/p-255b1284.entry.js +0 -2
- package/dist/webcomponents/p-255b1284.entry.js.map +0 -1
- package/dist/webcomponents/p-3aa91155.js +0 -3
- package/dist/webcomponents/p-3aa91155.js.map +0 -1
- package/dist/webcomponents/p-4ecc9860.entry.js +0 -2
- package/dist/webcomponents/p-4ecc9860.entry.js.map +0 -1
- package/dist/webcomponents/p-90c0d9e1.entry.js +0 -2
- package/dist/webcomponents/p-90c0d9e1.entry.js.map +0 -1
- package/dist/webcomponents/p-bd5352d6.entry.js +0 -2
- package/dist/webcomponents/p-bd5352d6.entry.js.map +0 -1
- package/dist/webcomponents/p-c903cc5a.entry.js +0 -2
- package/dist/webcomponents/p-c903cc5a.entry.js.map +0 -1
- package/dist/webcomponents/p-d87b0711.entry.js +0 -2
- package/dist/webcomponents/p-d87b0711.entry.js.map +0 -1
- package/dist/webcomponents/p-dbf7100f.entry.js +0 -2
- package/dist/webcomponents/p-dbf7100f.entry.js.map +0 -1
- package/dist/webcomponents/p-e0054bc3.js +0 -2
- package/dist/webcomponents/p-e0054bc3.js.map +0 -1
- package/dist/webcomponents/p-f30d1567.entry.js +0 -2
- package/dist/webcomponents/p-f30d1567.entry.js.map +0 -1
- /package/dist/types/components/{business-address/business-address-schema.d.ts → business-form/business-address/business-address-form-schema.d.ts} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { pagingDefaults } from "../table/table-utils";
|
|
3
|
+
const ExtendedPagingDefaults = Object.assign(Object.assign({}, pagingDefaults), { onPrev: () => { }, onNext: () => { } });
|
|
4
|
+
export class Table {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.emptyState = () => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (h("tr", null, h("td", { class: "empty-state", part: "empty-state", colSpan: (_a = this.columnData) === null || _a === void 0 ? void 0 : _a.length, style: { textAlign: 'center' } }, "No payments to show")));
|
|
9
|
+
};
|
|
10
|
+
this.errorState = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
return (h("tr", null, h("td", { class: "error-state", part: "error-state", colSpan: (_a = this.columnData) === null || _a === void 0 ? void 0 : _a.length, style: { textAlign: 'center' } }, "An unexpected error occurred: ", this.errorMessage)));
|
|
13
|
+
};
|
|
14
|
+
this.loadingState = () => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (h("tr", null, h("td", { class: "loading-state", part: "loading-state-cell", colSpan: (_a = this.columnData) === null || _a === void 0 ? void 0 : _a.length, style: { textAlign: 'center' } }, h("div", { part: "loading-state-spinner", class: "spinner-border", role: "status" }, h("span", { class: "visually-hidden" }, "Loading...")))));
|
|
17
|
+
};
|
|
18
|
+
this.paginationBar = () => {
|
|
19
|
+
return (h("nav", { "aria-label": "Table pagination", class: "d-flex justify-content-end gap-3" }, h("ul", { class: "pagination m-0" }, h("li", { onClick: (e) => {
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
this.paging.onPrev();
|
|
22
|
+
}, part: `previous-button${this.paging.has_previous ? '' : ' button-disabled'}`, class: `page-item ${this.paging.has_previous ? '' : ' disabled'}` }, h("a", { href: "#", class: "page-link" }, h("span", { class: "me-1", part: "arrow arrow-left" }, "\u00AB"), h("span", { part: "previous-button-text" }, "Previous"))), h("li", { onClick: (e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
this.paging.onNext();
|
|
25
|
+
}, part: `${this.paging.has_next ? '' : ' button-disabled'}`, class: `page-item ${this.paging.has_next ? '' : ' disabled'}` }, h("a", { href: "#", class: "page-link" }, h("span", { part: "next-button-text" }, "Next"), h("span", { class: "ms-1", part: "arrow arrow-right" }, "\u00BB"))))));
|
|
26
|
+
};
|
|
27
|
+
this.loading = true;
|
|
28
|
+
this.errorMessage = '';
|
|
29
|
+
this.rowData = [];
|
|
30
|
+
this.columnData = undefined;
|
|
31
|
+
this.paging = ExtendedPagingDefaults;
|
|
32
|
+
this.entityId = undefined;
|
|
33
|
+
this.rowClickHandler = undefined;
|
|
34
|
+
}
|
|
35
|
+
showEmptyState() {
|
|
36
|
+
return this.rowData ? this.rowData.length < 1 : true;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
return (h(Host, { exportparts: "\n table-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\n table-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\n empty-state,pagination-bar,arrow,arrow-left,arrow-right,button-disabled,\n previous-button-text,next-button-text\n " }, this.columnData ?
|
|
41
|
+
h("table", { class: "table table-hover" }, h("thead", { class: "table-head sticky-top", part: "table-head" }, h("tr", { class: "table-light", part: 'table-head-row' }, (_a = this.columnData) === null || _a === void 0 ? void 0 : _a.map((column) => h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, !Array.isArray(column) ? column : column[0])))), h("tbody", { class: "table-body", part: 'table-body' }, this.loading ? this.loadingState() :
|
|
42
|
+
this.errorMessage ? this.errorState() :
|
|
43
|
+
this.showEmptyState() ? this.emptyState() :
|
|
44
|
+
(_b = this.rowData) === null || _b === void 0 ? void 0 : _b.map((data, index) => {
|
|
45
|
+
return (h("tr", { "data-row-entity-id": this.entityId[index], onClick: e => this.rowClickHandler ? this.rowClickHandler(e) : null, part: `table-row${index % 2 ? ' table-row-even' : ' table-row-odd'}` }, data.map((dataEntry) => {
|
|
46
|
+
return (!(dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type)
|
|
47
|
+
? h("td", { part: "table-cell" }, dataEntry)
|
|
48
|
+
: h("th", { scope: "row", part: "table-cell" }, h("td", { part: "table-cell", innerHTML: dataEntry.value })));
|
|
49
|
+
})));
|
|
50
|
+
})), this.paging &&
|
|
51
|
+
h("tfoot", { class: "sticky-bottom" }, h("tr", { class: "table-light align-middle" }, h("td", { part: "pagination-bar", colSpan: (_c = this.columnData) === null || _c === void 0 ? void 0 : _c.length }, this.paginationBar()))))
|
|
52
|
+
:
|
|
53
|
+
h("div", { "data-test-id": "empty-error-state" }, "Column data is required")));
|
|
54
|
+
}
|
|
55
|
+
static get is() { return "justifi-table"; }
|
|
56
|
+
static get encapsulation() { return "shadow"; }
|
|
57
|
+
static get originalStyleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["./table.scss"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get styleUrls() {
|
|
63
|
+
return {
|
|
64
|
+
"$": ["table.css"]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get properties() {
|
|
68
|
+
return {
|
|
69
|
+
"loading": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "TableProps['loading']",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {
|
|
76
|
+
"TableProps": {
|
|
77
|
+
"location": "local",
|
|
78
|
+
"path": "/home/runner/work/web-component-library/web-component-library/stencil-library/src/components/table/table.tsx",
|
|
79
|
+
"id": "src/components/table/table.tsx::TableProps"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": ""
|
|
88
|
+
},
|
|
89
|
+
"attribute": "loading",
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"defaultValue": "true"
|
|
92
|
+
},
|
|
93
|
+
"errorMessage": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "TableProps['errorMessage']",
|
|
98
|
+
"resolved": "string",
|
|
99
|
+
"references": {
|
|
100
|
+
"TableProps": {
|
|
101
|
+
"location": "local",
|
|
102
|
+
"path": "/home/runner/work/web-component-library/web-component-library/stencil-library/src/components/table/table.tsx",
|
|
103
|
+
"id": "src/components/table/table.tsx::TableProps"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"attribute": "error-message",
|
|
114
|
+
"reflect": false,
|
|
115
|
+
"defaultValue": "''"
|
|
116
|
+
},
|
|
117
|
+
"rowData": {
|
|
118
|
+
"type": "unknown",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "TableProps['rowData']",
|
|
122
|
+
"resolved": "any[]",
|
|
123
|
+
"references": {
|
|
124
|
+
"TableProps": {
|
|
125
|
+
"location": "local",
|
|
126
|
+
"path": "/home/runner/work/web-component-library/web-component-library/stencil-library/src/components/table/table.tsx",
|
|
127
|
+
"id": "src/components/table/table.tsx::TableProps"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"defaultValue": "[]"
|
|
138
|
+
},
|
|
139
|
+
"columnData": {
|
|
140
|
+
"type": "unknown",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "TableProps['columnData']",
|
|
144
|
+
"resolved": "(string | string[])[]",
|
|
145
|
+
"references": {
|
|
146
|
+
"TableProps": {
|
|
147
|
+
"location": "local",
|
|
148
|
+
"path": "/home/runner/work/web-component-library/web-component-library/stencil-library/src/components/table/table.tsx",
|
|
149
|
+
"id": "src/components/table/table.tsx::TableProps"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": true,
|
|
154
|
+
"optional": false,
|
|
155
|
+
"docs": {
|
|
156
|
+
"tags": [],
|
|
157
|
+
"text": ""
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"paging": {
|
|
161
|
+
"type": "unknown",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "TableProps['paging']",
|
|
165
|
+
"resolved": "ExtendedPagingInfo",
|
|
166
|
+
"references": {
|
|
167
|
+
"TableProps": {
|
|
168
|
+
"location": "local",
|
|
169
|
+
"path": "/home/runner/work/web-component-library/web-component-library/stencil-library/src/components/table/table.tsx",
|
|
170
|
+
"id": "src/components/table/table.tsx::TableProps"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"defaultValue": "ExtendedPagingDefaults"
|
|
181
|
+
},
|
|
182
|
+
"entityId": {
|
|
183
|
+
"type": "unknown",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "string[]",
|
|
187
|
+
"resolved": "string[]",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": false,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": ""
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"rowClickHandler": {
|
|
198
|
+
"type": "unknown",
|
|
199
|
+
"mutable": false,
|
|
200
|
+
"complexType": {
|
|
201
|
+
"original": "(e: any) => any",
|
|
202
|
+
"resolved": "(e: any) => any",
|
|
203
|
+
"references": {}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [],
|
|
209
|
+
"text": ""
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../src/components/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAc,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOlE,MAAM,sBAAsB,mCACvB,cAAc,KACjB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,EAChB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC,GACjB,CAAA;AAgBD,MAAM,OAAO,KAAK;;IAahB,eAAU,GAAG,GAAG,EAAE;;MAAC,OAAA,CACjB;QACE,UAAI,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAA0B,CAClI,CACN,CAAA;KAAA,CAAC;IAEF,eAAU,GAAG,GAAG,EAAE;;MAAC,OAAA,CACjB;QACE,UAAI,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE,KAAK,EAAE,E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AI,KAAK,EAAC,0BAA0B;cAClC,UAAI,IAAI,EAAC,gBAAgB,EAAC,OAAO,EAAE,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,IACvD,IAAI,CAAC,aAAa,EAAE,CAClB,CACF,CACC,CAEJ;MACR,CAAC;QACD,2BAAkB,mBAAmB,8BAA8B,CAC9D,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { PagingInfo, pagingDefaults } from '../table/table-utils';\n\ninterface ExtendedPagingInfo extends PagingInfo {\n onPrev: () => void;\n onNext: () => void;\n}\n\nconst ExtendedPagingDefaults: ExtendedPagingInfo = {\n ...pagingDefaults,\n onPrev: () => {},\n onNext: () => {},\n}\n\nexport interface TableProps {\n loading: boolean;\n errorMessage: string;\n columnData: (string|string[])[];\n rowData: any[];\n paging: ExtendedPagingInfo;\n}\n\n@Component({\n tag: 'justifi-table',\n styleUrl: './table.scss',\n shadow: true,\n})\n\nexport class Table {\n @Prop() loading: TableProps['loading'] = true;\n @Prop() errorMessage: TableProps['errorMessage'] = '';\n @Prop() rowData: TableProps['rowData'] = [];\n @Prop() columnData!: TableProps['columnData'];\n @Prop() paging: TableProps['paging'] = ExtendedPagingDefaults;\n @Prop() entityId: string[];\n @Prop() rowClickHandler: (e: any) => any;\n\n showEmptyState() {\n return this.rowData ? this.rowData.length < 1 : true;\n }\n\n emptyState = () => (\n <tr>\n <td class=\"empty-state\" part=\"empty-state\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>No payments to show</td>\n </tr>\n );\n\n errorState = () => (\n <tr>\n <td class=\"error-state\" part=\"error-state\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>\n An unexpected error occurred: {this.errorMessage}\n </td>\n </tr>\n );\n\n loadingState = () => (\n <tr>\n <td class=\"loading-state\" part=\"loading-state-cell\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>\n <div part=\"loading-state-spinner\" class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </td>\n </tr>\n );\n\n paginationBar = () => {\n return (\n <nav aria-label=\"Table pagination\" class=\"d-flex justify-content-end gap-3\">\n <ul class=\"pagination m-0\">\n <li\n onClick={(e) => {\n e.preventDefault();\n this.paging.onPrev();\n }}\n part={`previous-button${this.paging.has_previous ? '' : ' button-disabled'}`}\n class={`page-item ${this.paging.has_previous ? '' : ' disabled'}`}\n >\n <a href=\"#\" class=\"page-link\">\n <span class=\"me-1\" part=\"arrow arrow-left\">«</span>\n <span part=\"previous-button-text\">Previous</span>\n </a>\n </li>\n <li\n onClick={(e) => {\n e.preventDefault();\n this.paging.onNext();\n }}\n part={`${this.paging.has_next ? '' : ' button-disabled'}`}\n class={`page-item ${this.paging.has_next ? '' : ' disabled'}`}\n >\n <a href=\"#\" class=\"page-link\">\n <span part=\"next-button-text\">Next</span>\n <span class=\"ms-1\" part=\"arrow arrow-right\">»</span>\n </a>\n </li>\n </ul>\n </nav>\n )\n };\n\n render() {\n return (\n <Host exportparts=\"\n table-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\n table-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\n empty-state,pagination-bar,arrow,arrow-left,arrow-right,button-disabled,\n previous-button-text,next-button-text\n \">\n {this.columnData ?\n <table class=\"table table-hover\">\n <thead class=\"table-head sticky-top\" part=\"table-head\">\n <tr class=\"table-light\" part='table-head-row'>\n {\n this.columnData?.map((column) =>\n <th part=\"table-head-cell\" scope=\"col\" title={Array.isArray(column) ? column[1] : ''}>\n {!Array.isArray(column) ? column : column[0]}\n </th>\n )\n }\n </tr>\n </thead>\n <tbody class=\"table-body\" part='table-body'>\n {\n this.loading ? this.loadingState() :\n this.errorMessage ? this.errorState() :\n this.showEmptyState() ? this.emptyState() :\n this.rowData?.map((data, index) => {\n return (\n <tr\n data-row-entity-id={this.entityId[index]}\n onClick={e => this.rowClickHandler ? this.rowClickHandler(e) : null}\n part={`table-row${index%2 ? ' table-row-even' : ' table-row-odd'}`}\n >\n {\n data.map((dataEntry: any) =>\n { return (\n !dataEntry?.type\n ? <td part=\"table-cell\">{dataEntry}</td>\n : <th scope=\"row\" part=\"table-cell\">\n <td part=\"table-cell\" innerHTML={dataEntry.value}></td>\n </th>\n )\n }\n )\n }\n </tr>\n )\n })\n }\n </tbody>\n {this.paging &&\n <tfoot class=\"sticky-bottom\">\n <tr class=\"table-light align-middle\">\n <td part=\"pagination-bar\" colSpan={this.columnData?.length}>\n {this.paginationBar()}\n </td>\n </tr>\n </tfoot>\n }\n </table>\n :\n <div data-test-id=\"empty-error-state\">Column data is required</div>}\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
3
|
+
import { Table } from "../table";
|
|
4
|
+
describe('justifi-table', () => {
|
|
5
|
+
it('does not render properly without columnData', async () => {
|
|
6
|
+
const page = await newSpecPage({
|
|
7
|
+
components: [Table],
|
|
8
|
+
html: `<justifi-table></justifi-table>`,
|
|
9
|
+
});
|
|
10
|
+
const error = page.root.shadowRoot.querySelector('[data-test-id="empty-error-state"]');
|
|
11
|
+
expect(error).toBeTruthy();
|
|
12
|
+
});
|
|
13
|
+
it('stops loading', async () => {
|
|
14
|
+
const page = await newSpecPage({
|
|
15
|
+
components: [Table],
|
|
16
|
+
template: () => h("justifi-table", { columnData: ['test', 'test'], loading: false })
|
|
17
|
+
});
|
|
18
|
+
const loading = page.root.shadowRoot.querySelector('.loading-state');
|
|
19
|
+
expect(loading).toBeNull();
|
|
20
|
+
});
|
|
21
|
+
it('renders the state and displays error message passed', async () => {
|
|
22
|
+
const ERROR_TEXT = 'error-123';
|
|
23
|
+
const page = await newSpecPage({
|
|
24
|
+
components: [Table],
|
|
25
|
+
template: () => h("justifi-table", { columnData: ['test', 'test'], loading: false, errorMessage: ERROR_TEXT })
|
|
26
|
+
});
|
|
27
|
+
const error = page.root.shadowRoot.querySelector('.error-state');
|
|
28
|
+
expect(error).not.toBeNull();
|
|
29
|
+
const errorText = error.innerHTML;
|
|
30
|
+
expect(errorText).toBe(`An unexpected error occurred: ${ERROR_TEXT}`);
|
|
31
|
+
});
|
|
32
|
+
it('renders the pagination bar when pagination is passed', async () => {
|
|
33
|
+
const PAG = {
|
|
34
|
+
amount: 25,
|
|
35
|
+
start_cursor: '',
|
|
36
|
+
end_cursor: '',
|
|
37
|
+
has_previous: false,
|
|
38
|
+
has_next: false,
|
|
39
|
+
onPrev: () => { },
|
|
40
|
+
onNext: () => { }
|
|
41
|
+
};
|
|
42
|
+
const page = await newSpecPage({
|
|
43
|
+
components: [Table],
|
|
44
|
+
template: () => h("justifi-table", { columnData: ['test', 'test'], loading: false, paging: PAG })
|
|
45
|
+
});
|
|
46
|
+
const error = page.root.shadowRoot.querySelector('[part="pagination-bar"]');
|
|
47
|
+
expect(error).not.toBeNull();
|
|
48
|
+
});
|
|
49
|
+
it('has an ID for each row', async () => {
|
|
50
|
+
const page = await newSpecPage({
|
|
51
|
+
components: [Table],
|
|
52
|
+
template: () => h("justifi-table", { entityId: ['123'], rowData: [['test']], columnData: ['test', 'test'], loading: false })
|
|
53
|
+
});
|
|
54
|
+
const row = page.root.shadowRoot.querySelector('[data-row-entity-id]');
|
|
55
|
+
expect(row).not.toBeNull();
|
|
56
|
+
expect(row.dataset.rowEntityId).toBe('123');
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=table.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.spec.js","sourceRoot":"","sources":["../../../../../src/components/table/test/table.spec.tsx"],"names":[],"mappings":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,QAAQ,EAAE,GAAG,EAAE,CAAC,qBAAe,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,GAAI;KACxH,CAAC,CAAC;IAEH,MAAM,GAAG,GAAgB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACpF,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC3B,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;EAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { h } from '@stencil/core';\nimport { newSpecPage } from '@stencil/core/testing';\nimport { Table } from '../table';\n\ndescribe('justifi-table', () => {\n it('does not render properly without columnData', async () => {\n const page = await newSpecPage({\n components: [Table],\n html: `<justifi-table></justifi-table>`,\n });\n\n const error = page.root.shadowRoot.querySelector('[data-test-id=\"empty-error-state\"]');\n expect(error).toBeTruthy();\n });\n\n it('stops loading', async () => {\n const page = await newSpecPage({\n components: [Table],\n template: () => <justifi-table columnData={['test', 'test']} loading={false} />\n });\n\n const loading = page.root.shadowRoot.querySelector('.loading-state');\n\n expect(loading).toBeNull();\n });\n\n it('renders the state and displays error message passed', async () => {\n const ERROR_TEXT = 'error-123';\n const page = await newSpecPage({\n components: [Table],\n template: () => <justifi-table columnData={['test', 'test']} loading={false} errorMessage={ERROR_TEXT} />\n });\n\n const error = page.root.shadowRoot.querySelector('.error-state');\n expect(error).not.toBeNull();\n\n const errorText = error.innerHTML;\n expect(errorText).toBe(`An unexpected error occurred: ${ERROR_TEXT}`);\n });\n\n it('renders the pagination bar when pagination is passed', async () => {\n const PAG = {\n amount: 25,\n start_cursor: '',\n end_cursor: '',\n has_previous: false,\n has_next: false,\n onPrev: () => {},\n onNext: () => {}\n };\n const page = await newSpecPage({\n components: [Table],\n template: () => <justifi-table columnData={['test', 'test']} loading={false} paging={PAG} />\n });\n\n const error = page.root.shadowRoot.querySelector('[part=\"pagination-bar\"]');\n expect(error).not.toBeNull();\n });\n\n it('has an ID for each row', async () => {\n const page = await newSpecPage({\n components: [Table],\n template: () => <justifi-table entityId={['123']} rowData={[['test']]} columnData={['test', 'test']} loading={false} />\n });\n\n const row: HTMLElement = page.root.shadowRoot.querySelector('[data-row-entity-id]');\n expect(row).not.toBeNull();\n expect(row.dataset.rowEntityId).toBe('123');\n });\n});\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { newSpecPage } from
|
|
2
|
-
import { TextInput } from
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { TextInput } from "../text-input";
|
|
3
3
|
describe('text-input', () => {
|
|
4
4
|
it('renders', async () => {
|
|
5
5
|
const page = await newSpecPage({
|
|
@@ -7,13 +7,55 @@ describe('text-input', () => {
|
|
|
7
7
|
html: `<text-input></text-input>`,
|
|
8
8
|
});
|
|
9
9
|
expect(page.root).toEqualHtml(`
|
|
10
|
-
<text-input>
|
|
10
|
+
<text-input exportparts="label,input,input-invalid">
|
|
11
11
|
<mock:shadow-root>
|
|
12
|
-
<label></label>
|
|
13
|
-
<input type="text">
|
|
12
|
+
<label class="form-label" part="label"></label>
|
|
13
|
+
<input class="form-control" part="input" type="text">
|
|
14
14
|
</mock:shadow-root>
|
|
15
15
|
</text-input>
|
|
16
16
|
`);
|
|
17
17
|
});
|
|
18
|
+
it('renders with values', async () => {
|
|
19
|
+
const page = await newSpecPage({
|
|
20
|
+
components: [TextInput],
|
|
21
|
+
html: `<text-input name="test" label="Test" default-value="Hello"></text-input>`,
|
|
22
|
+
});
|
|
23
|
+
expect(page.root).toEqualHtml(`
|
|
24
|
+
<text-input name="test" label="Test" default-value="Hello" exportparts="label,input,input-invalid">
|
|
25
|
+
<mock:shadow-root>
|
|
26
|
+
<label class="form-label" part="label">Test</label>
|
|
27
|
+
<input class="form-control" name="test" part="input" type="text" value="Hello">
|
|
28
|
+
</mock:shadow-root>
|
|
29
|
+
</text-input>
|
|
30
|
+
`);
|
|
31
|
+
});
|
|
32
|
+
it('renders with error', async () => {
|
|
33
|
+
const page = await newSpecPage({
|
|
34
|
+
components: [TextInput],
|
|
35
|
+
html: `<text-input error="Something went wrong"></text-input>`,
|
|
36
|
+
});
|
|
37
|
+
expect(page.root).toEqualHtml(`
|
|
38
|
+
<text-input error="Something went wrong" exportparts="label,input,input-invalid">
|
|
39
|
+
<mock:shadow-root>
|
|
40
|
+
<label class="form-label" part="label"></label>
|
|
41
|
+
<input class="form-control is-invalid" part="input input-invalid" type="text">
|
|
42
|
+
<div class="invalid-feedback">Something went wrong</div>
|
|
43
|
+
</mock:shadow-root>
|
|
44
|
+
</text-input>
|
|
45
|
+
`);
|
|
46
|
+
});
|
|
47
|
+
it('emits fieldReceivedInput event on input', async () => {
|
|
48
|
+
const page = await newSpecPage({
|
|
49
|
+
components: [TextInput],
|
|
50
|
+
html: `<text-input name="test" label="Test" default-value="Hello"></text-input>`,
|
|
51
|
+
});
|
|
52
|
+
const input = page.root.shadowRoot.querySelector('input');
|
|
53
|
+
let receivedEvent = null;
|
|
54
|
+
page.root.addEventListener('fieldReceivedInput', e => (receivedEvent = e));
|
|
55
|
+
input.value = 'Updated text';
|
|
56
|
+
input.dispatchEvent(new Event('input'));
|
|
57
|
+
await page.waitForChanges();
|
|
58
|
+
expect(receivedEvent.detail).toEqual({ name: 'test', value: 'Updated text' });
|
|
59
|
+
});
|
|
18
60
|
});
|
|
19
61
|
//# sourceMappingURL=text-input.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.spec.js","sourceRoot":"","sources":["../../../../../src/components/text-input/test/text-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;KAO7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { TextInput } from '../text-input';\n\ndescribe('text-input', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input></text-input>`,\n });\n expect(page.root).toEqualHtml(`\n <text-input>\n <mock:shadow-root>\n <label></label>\n <input type=\"text\">\n </mock:shadow-root>\n </text-input>\n `);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"text-input.spec.js","sourceRoot":"","sources":["../../../../../src/components/text-input/test/text-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;EAC1B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,2BAA2B;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;KAO7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;IACnC,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CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { TextInput } from '../text-input';\n\ndescribe('text-input', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input></text-input>`,\n });\n expect(page.root).toEqualHtml(`\n <text-input exportparts=\"label,input,input-invalid\">\n <mock:shadow-root>\n <label class=\"form-label\" part=\"label\"></label>\n <input class=\"form-control\" part=\"input\" type=\"text\">\n </mock:shadow-root>\n </text-input>\n `);\n });\n\n it('renders with values', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input name=\"test\" label=\"Test\" default-value=\"Hello\"></text-input>`,\n });\n expect(page.root).toEqualHtml(`\n <text-input name=\"test\" label=\"Test\" default-value=\"Hello\" exportparts=\"label,input,input-invalid\">\n <mock:shadow-root>\n <label class=\"form-label\" part=\"label\">Test</label>\n <input class=\"form-control\" name=\"test\" part=\"input\" type=\"text\" value=\"Hello\">\n </mock:shadow-root>\n </text-input>\n `);\n });\n\n it('renders with error', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input error=\"Something went wrong\"></text-input>`,\n });\n expect(page.root).toEqualHtml(`\n <text-input error=\"Something went wrong\" exportparts=\"label,input,input-invalid\">\n <mock:shadow-root>\n <label class=\"form-label\" part=\"label\"></label>\n <input class=\"form-control is-invalid\" part=\"input input-invalid\" type=\"text\">\n <div class=\"invalid-feedback\">Something went wrong</div>\n </mock:shadow-root>\n </text-input>\n `);\n });\n\n it('emits fieldReceivedInput event on input', async () => {\n const page = await newSpecPage({\n components: [TextInput],\n html: `<text-input name=\"test\" label=\"Test\" default-value=\"Hello\"></text-input>`,\n });\n\n const input = page.root.shadowRoot.querySelector('input');\n let receivedEvent = null;\n page.root.addEventListener('fieldReceivedInput', e => (receivedEvent = e));\n\n input.value = 'Updated text';\n input.dispatchEvent(new Event('input'));\n\n await page.waitForChanges();\n expect(receivedEvent.detail).toEqual({ name: 'test', value: 'Updated text' });\n });\n});\n"]}
|