@justifi/webcomponents 4.2.2 → 4.4.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-7303478d.js} +3 -2
- package/dist/cjs/Api-7303478d.js.map +1 -0
- package/dist/cjs/business-form-schema-63b311b2.js +132 -0
- package/dist/cjs/business-form-schema-63b311b2.js.map +1 -0
- package/dist/cjs/form-control-select_2.cjs.entry.js +61 -0
- package/dist/cjs/form-control-select_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-34312a38.js → index-83b2ec02.js} +136 -20
- package/dist/cjs/index-83b2ec02.js.map +1 -0
- package/dist/cjs/{index.esm-bcf90c56.js → index.esm-7e12ce07.js} +301 -14
- package/dist/cjs/index.esm-7e12ce07.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-address-form.cjs.entry.js +37 -0
- package/dist/cjs/justifi-business-address-form.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-form.cjs.entry.js +751 -0
- package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -0
- package/dist/cjs/justifi-business-generic-info_3.cjs.entry.js +148 -0
- package/dist/cjs/justifi-business-generic-info_3.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-payment-form.cjs.entry.js +24 -7
- package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +22 -17
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +75 -4038
- package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +113 -0
- package/dist/cjs/justifi-payouts-list.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/utils-4ee7e080.js +3979 -0
- package/dist/cjs/utils-4ee7e080.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 +3 -2
- package/dist/collection/api/Api.js.map +1 -1
- package/dist/collection/api/Payout.js +33 -0
- package/dist/collection/api/Payout.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/collection-manifest.json +18 -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-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 +72 -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 +149 -0
- package/dist/collection/components/business-form/business-form-schema.js.map +1 -0
- package/dist/collection/components/business-form/business-form.css +2532 -0
- package/dist/collection/components/business-form/business-form.js +76 -0
- package/dist/collection/components/business-form/business-form.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 +79 -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 +2489 -0
- package/dist/collection/components/business-form/business-owners/business-owners.js +120 -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 +76 -0
- package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -0
- package/dist/collection/components/business-form/businessForm.stories.js +115 -0
- package/dist/collection/components/business-form/businessForm.stories.js.map +1 -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/{business-address/business-address.css → form/form-control-select.css} +344 -1212
- package/dist/collection/components/form/form-control-select.js +168 -0
- package/dist/collection/components/form/form-control-select.js.map +1 -0
- package/dist/collection/components/form/form-control-text.css +1794 -0
- package/dist/collection/components/form/form-control-text.js +152 -0
- package/dist/collection/components/form/form-control-text.js.map +1 -0
- package/dist/collection/components/form/form.js +85 -0
- package/dist/collection/components/form/form.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 +7954 -1
- package/dist/collection/components/payments-list/payments-list.js +104 -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 +82 -18
- package/dist/collection/components/payments-list/test/payments-list.spec.js.map +1 -1
- package/dist/collection/components/payouts-list/payouts-list.css +7983 -0
- package/dist/collection/components/payouts-list/payouts-list.js +181 -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/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/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/utils.js +7 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/Api.js +2 -1
- package/dist/components/Api.js.map +1 -1
- package/dist/components/billing-form.js +2 -2
- package/dist/components/billing-form.js.map +1 -1
- package/dist/components/business-address-form.js +65 -0
- package/dist/components/business-address-form.js.map +1 -0
- package/dist/components/business-generic-info.js +190 -0
- package/dist/components/business-generic-info.js.map +1 -0
- package/dist/components/business-owners.js +102 -0
- package/dist/components/business-owners.js.map +1 -0
- package/dist/components/business-representative.js +75 -0
- package/dist/components/business-representative.js.map +1 -0
- package/dist/components/{justifi-business-info.d.ts → form-control-select.d.ts} +4 -4
- 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 +53 -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 +51 -0
- package/dist/components/form-control-text2.js.map +1 -0
- package/dist/components/index.esm.js +298 -14
- package/dist/components/index.esm.js.map +1 -1
- 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 +802 -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-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-payment-form.js +23 -4
- package/dist/components/justifi-payment-form.js.map +1 -1
- package/dist/components/justifi-payments-list.js +78 -4038
- package/dist/components/justifi-payments-list.js.map +1 -1
- package/dist/components/justifi-payouts-list.d.ts +11 -0
- package/dist/components/justifi-payouts-list.js +134 -0
- package/dist/components/justifi-payouts-list.js.map +1 -0
- package/dist/components/payment-method-form.js +21 -16
- 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/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/text-input2.js +2 -2
- package/dist/components/text-input2.js.map +1 -1
- package/dist/components/utils.js +3972 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/esm/{Api-a07f0057.js → Api-436dfa09.js} +3 -2
- package/dist/esm/Api-436dfa09.js.map +1 -0
- package/dist/esm/business-form-schema-30c48693.js +128 -0
- package/dist/esm/business-form-schema-30c48693.js.map +1 -0
- package/dist/esm/form-control-select_2.entry.js +56 -0
- package/dist/esm/form-control-select_2.entry.js.map +1 -0
- package/dist/esm/{index-044f93fc.js → index-c8f391de.js} +136 -20
- package/dist/esm/index-c8f391de.js.map +1 -0
- package/dist/esm/{index.esm-5624a5ed.js → index.esm-be2cd327.js} +299 -15
- package/dist/esm/index.esm-be2cd327.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-address-form.entry.js +33 -0
- package/dist/esm/justifi-business-address-form.entry.js.map +1 -0
- package/dist/esm/justifi-business-form.entry.js +747 -0
- package/dist/esm/justifi-business-form.entry.js.map +1 -0
- package/dist/esm/justifi-business-generic-info_3.entry.js +142 -0
- package/dist/esm/justifi-business-generic-info_3.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-payment-form.entry.js +21 -4
- package/dist/esm/justifi-payment-form.entry.js.map +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +22 -17
- package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
- package/dist/esm/justifi-payments-list.entry.js +75 -4038
- package/dist/esm/justifi-payments-list.entry.js.map +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +109 -0
- package/dist/esm/justifi-payouts-list.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/utils-e7782126.js +3972 -0
- package/dist/esm/utils-e7782126.js.map +1 -0
- package/dist/esm/webcomponents.js +4 -7
- package/dist/esm/webcomponents.js.map +1 -1
- package/dist/types/api/Payout.d.ts +62 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/components/business-form/business-address/business-address-form.d.ts +9 -0
- package/dist/types/components/{business-info/business-info-schema.d.ts → business-form/business-form-schema.d.ts} +55 -4
- package/dist/types/components/business-form/business-form.d.ts +14 -0
- package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +16 -0
- package/dist/types/components/business-form/business-owners/business-owners.d.ts +32 -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 +12 -0
- package/dist/types/components/business-form/businessForm.stories.d.ts +21 -0
- package/dist/types/components/form/form-control-select.d.ts +16 -0
- package/dist/types/components/form/form-control-text.d.ts +12 -0
- package/dist/types/components/form/form.d.ts +21 -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 +38 -5
- package/dist/types/components/payments-list/payments-list.stories.d.ts +17 -0
- package/dist/types/components/payouts-list/payouts-list.d.ts +45 -0
- package/dist/types/components/payouts-list/payouts-list.stories.d.ts +16 -0
- package/dist/types/components.d.ts +339 -26
- package/dist/types/stencil-public-runtime.d.ts +14 -2
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/webcomponents/p-0fd4aae2.js +2 -0
- package/dist/webcomponents/p-0fd4aae2.js.map +1 -0
- package/dist/webcomponents/p-1953797f.entry.js +2 -0
- package/dist/webcomponents/p-1953797f.entry.js.map +1 -0
- package/dist/webcomponents/p-1a1f2196.js +2 -0
- package/dist/webcomponents/p-1a1f2196.js.map +1 -0
- package/dist/webcomponents/p-23e9c7d4.entry.js +2 -0
- package/dist/webcomponents/p-23e9c7d4.entry.js.map +1 -0
- package/dist/webcomponents/p-309a886f.entry.js +2 -0
- package/dist/webcomponents/p-309a886f.entry.js.map +1 -0
- package/dist/webcomponents/p-33d69eb5.entry.js +2 -0
- package/dist/webcomponents/p-33d69eb5.entry.js.map +1 -0
- package/dist/webcomponents/p-3a80a2ec.entry.js +2 -0
- package/dist/webcomponents/p-3a80a2ec.entry.js.map +1 -0
- package/dist/webcomponents/p-45fea6a8.entry.js +2 -0
- package/dist/webcomponents/p-45fea6a8.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-7041a637.entry.js +2 -0
- package/dist/webcomponents/p-7041a637.entry.js.map +1 -0
- package/dist/webcomponents/p-79456add.js +2 -0
- package/dist/webcomponents/p-79456add.js.map +1 -0
- package/dist/webcomponents/{p-1f151d49.js → p-af080b21.js} +2 -2
- package/dist/webcomponents/p-af080b21.js.map +1 -0
- package/dist/webcomponents/p-bc969904.js +3 -0
- package/dist/webcomponents/p-bc969904.js.map +1 -0
- package/dist/webcomponents/p-cd097ce9.entry.js +2 -0
- package/dist/webcomponents/p-cd097ce9.entry.js.map +1 -0
- package/dist/webcomponents/p-d5bc9f22.entry.js +2 -0
- package/dist/webcomponents/p-d5bc9f22.entry.js.map +1 -0
- package/dist/webcomponents/p-d5cadc78.entry.js +2 -0
- package/dist/webcomponents/p-d5cadc78.entry.js.map +1 -0
- package/dist/webcomponents/p-dd1ebc0b.entry.js +2 -0
- package/dist/webcomponents/p-dd1ebc0b.entry.js.map +1 -0
- package/dist/webcomponents/p-e05e0c6b.entry.js +2 -0
- package/dist/webcomponents/p-e05e0c6b.entry.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 +12 -14
- 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 +0 -73
- 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 +0 -71
- 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 +0 -71
- 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.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.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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Host, h } from
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class SelectInput {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.name = undefined;
|
|
5
5
|
this.label = undefined;
|
|
6
6
|
this.defaultValue = undefined;
|
|
7
7
|
this.error = undefined;
|
|
8
|
-
this.options =
|
|
8
|
+
this.options = [];
|
|
9
9
|
this.internalValue = '';
|
|
10
10
|
}
|
|
11
11
|
onInput(event) {
|
|
@@ -14,7 +14,7 @@ export class SelectInput {
|
|
|
14
14
|
this.fieldReceivedInput.emit({ name: name, value: target.value });
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
|
-
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label" }, this.label), h("select", { name: this.name, onInput: event => this.onInput(event), part: `input
|
|
17
|
+
return (h(Host, { exportparts: "label,input,input-invalid" }, h("label", { part: "label", class: "form-label" }, this.label), h("select", { name: this.name, onInput: event => this.onInput(event), part: `input${this.error ? ' input-invalid' : ''}`, class: this.error ? 'form-select is-invalid' : 'form-select' }, this.options.map(option => (h("option", { value: option.value }, option.label)))), this.error && h("div", { class: "invalid-feedback" }, this.error)));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "select-input"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -111,7 +111,8 @@ export class SelectInput {
|
|
|
111
111
|
"docs": {
|
|
112
112
|
"tags": [],
|
|
113
113
|
"text": ""
|
|
114
|
-
}
|
|
114
|
+
},
|
|
115
|
+
"defaultValue": "[]"
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input.js","sourceRoot":"","sources":["../../../../src/components/select-input/select-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,WAAW
|
|
1
|
+
{"version":3,"file":"select-input.js","sourceRoot":"","sources":["../../../../src/components/select-input/select-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,WAAW;;;;;;mBAKgC,EAAE;yBAE/B,EAAE;;EAE3B,OAAO,CAAC,KAAK;IACX,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;EACpE,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,IAAC,WAAW,EAAC,2BAA2B;MAC3C,aAAO,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,IACnC,IAAI,CAAC,KAAK,CACL;MACR,cACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EACrC,IAAI,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAAE,EAClD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,aAAa,IAE3D,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAC1B,cAAQ,KAAK,EAAE,MAAM,CAAC,KAAK,IAAG,MAAM,CAAC,KAAK,CAAU,CACrD,CAAC,CACK;MACR,IAAI,CAAC,KAAK,IAAI,WAAK,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAO,CAC1D,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, Host, Prop, h, EventEmitter, State } from '@stencil/core';\n\n@Component({\n tag: 'select-input',\n styleUrl: 'select-input.scss',\n shadow: true,\n})\nexport class SelectInput {\n @Prop() name: string;\n @Prop() label: string;\n @Prop() defaultValue: string;\n @Prop() error: string;\n @Prop() options: { label: string; value: string }[] = [];\n @Event() fieldReceivedInput: EventEmitter<{ name: string; value: string }>;\n @State() internalValue = '';\n\n onInput(event) {\n const target = event.target;\n const name = target.getAttribute('name');\n this.fieldReceivedInput.emit({ name: name, value: target.value });\n }\n\n render() {\n return (\n <Host exportparts=\"label,input,input-invalid\">\n <label part=\"label\" class=\"form-label\">\n {this.label}\n </label>\n <select\n name={this.name}\n onInput={event => this.onInput(event)}\n part={`input${this.error ? ' input-invalid' : ''}`}\n class={this.error ? 'form-select is-invalid' : 'form-select'}\n >\n {this.options.map(option => (\n <option value={option.value}>{option.label}</option>\n ))}\n </select>\n {this.error && <div class=\"invalid-feedback\">{this.error}</div>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,36 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { SelectInput } from '../select-input';
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { SelectInput } from "../select-input";
|
|
4
3
|
describe('select-input', () => {
|
|
4
|
+
let page;
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
page = await newSpecPage({
|
|
7
|
+
components: [SelectInput],
|
|
8
|
+
html: `<select-input></select-input>`,
|
|
9
|
+
});
|
|
10
|
+
});
|
|
5
11
|
it('renders', async () => {
|
|
6
|
-
|
|
12
|
+
page.root.options = [
|
|
13
|
+
{ label: 'Option 1', value: 'option1' },
|
|
14
|
+
{ label: 'Option 2', value: 'option2' },
|
|
15
|
+
];
|
|
16
|
+
await page.waitForChanges();
|
|
17
|
+
expect(page.root).toEqualHtml(`
|
|
18
|
+
<select-input exportparts="label,input,input-invalid">
|
|
19
|
+
<mock:shadow-root>
|
|
20
|
+
<label part="label" class="form-label"></label>
|
|
21
|
+
<select class="form-select" part="input">
|
|
22
|
+
<option value="option1">
|
|
23
|
+
Option 1
|
|
24
|
+
</option>
|
|
25
|
+
<option value="option2">
|
|
26
|
+
Option 2
|
|
27
|
+
</option>
|
|
28
|
+
</select>
|
|
29
|
+
</mock:shadow-root>
|
|
30
|
+
</select-input>
|
|
31
|
+
`);
|
|
32
|
+
});
|
|
33
|
+
it('renders with props', async () => {
|
|
34
|
+
const { root } = await newSpecPage({
|
|
7
35
|
components: [SelectInput],
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
label: 'Option 1',
|
|
11
|
-
value: 'option1',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
label: 'Option 2',
|
|
15
|
-
value: 'option2',
|
|
16
|
-
},
|
|
17
|
-
] })),
|
|
36
|
+
html: `<select-input name="test" label="Test Label"></select-input>`,
|
|
18
37
|
});
|
|
38
|
+
root.options = [{ label: 'Option 1', value: '1' }];
|
|
39
|
+
await page.waitForChanges();
|
|
40
|
+
expect(root).toEqualHtml(`
|
|
41
|
+
<select-input exportparts="label,input,input-invalid" label="Test Label" name="test">
|
|
42
|
+
<mock:shadow-root>
|
|
43
|
+
<label part="label" class="form-label">Test Label</label>
|
|
44
|
+
<select class="form-select" name="test" part="input">
|
|
45
|
+
<option value="1">
|
|
46
|
+
Option 1
|
|
47
|
+
</option>
|
|
48
|
+
</select>
|
|
49
|
+
</mock:shadow-root>
|
|
50
|
+
</select-input>
|
|
51
|
+
`);
|
|
52
|
+
});
|
|
53
|
+
it('emits event on input', async () => {
|
|
54
|
+
page.root.name = 'test';
|
|
55
|
+
page.root.options = [{ label: 'Option 1', value: '1' }];
|
|
56
|
+
await page.waitForChanges();
|
|
57
|
+
const fieldReceivedInputHandler = jest.fn();
|
|
58
|
+
page.root.addEventListener('fieldReceivedInput', fieldReceivedInputHandler);
|
|
59
|
+
const select = page.root.shadowRoot.querySelector('select');
|
|
60
|
+
select.value = '1';
|
|
61
|
+
select.dispatchEvent(new Event('input'));
|
|
62
|
+
expect(fieldReceivedInputHandler).toHaveBeenCalled();
|
|
63
|
+
});
|
|
64
|
+
it('renders with error', async () => {
|
|
65
|
+
page.root.error = 'Test Error';
|
|
66
|
+
await page.waitForChanges();
|
|
19
67
|
expect(page.root).toEqualHtml(`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</select>
|
|
31
|
-
</mock:shadow-root>
|
|
32
|
-
</select-input>
|
|
33
|
-
`);
|
|
68
|
+
<select-input exportparts="label,input,input-invalid">
|
|
69
|
+
<mock:shadow-root>
|
|
70
|
+
<label part="label" class="form-label"></label>
|
|
71
|
+
<select class="form-select is-invalid" part="input input-invalid"></select>
|
|
72
|
+
<div class="invalid-feedback">
|
|
73
|
+
Test Error
|
|
74
|
+
</div>
|
|
75
|
+
</mock:shadow-root>
|
|
76
|
+
</select-input>
|
|
77
|
+
`);
|
|
34
78
|
});
|
|
35
79
|
});
|
|
36
80
|
//# sourceMappingURL=select-input.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-input.spec.js","sourceRoot":"","sources":["../../../../../src/components/select-input/test/select-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"select-input.spec.js","sourceRoot":"","sources":["../../../../../src/components/select-input/test/select-input.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;EAC5B,IAAI,IAAc,CAAC;EAEnB,UAAU,CAAC,KAAK,IAAI,EAAE;IACpB,IAAI,GAAG,MAAM,WAAW,CAAC;MACvB,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,+BAA+B;KACtC,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG;MAClB,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;MACvC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;KACxC,CAAC;IACF,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;;;;GAc/B,CAAC,CAAC;EACH,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;IAClC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;MACjC,UAAU,EAAE,CAAC,WAAW,CAAC;MACzB,IAAI,EAAE,8DAA8D;KACrE,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACnD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;;GAW1B,CAAC,CAAC;EACH,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;IACpC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACxB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACxD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAE5B,MAAM,yBAAyB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC5C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,yBAAyB,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC;IACnB,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACzC,MAAM,CAAC,yBAAyB,CAAC,CAAC,gBAAgB,EAAE,CAAC;EACvD,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;IAClC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IAC/B,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;;;GAU/B,CAAC,CAAC;EACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from '@stencil/core/testing';\nimport { SelectInput } from '../select-input';\n\ndescribe('select-input', () => {\n let page: SpecPage;\n\n beforeEach(async () => {\n page = await newSpecPage({\n components: [SelectInput],\n html: `<select-input></select-input>`,\n });\n });\n\n it('renders', async () => {\n page.root.options = [\n { label: 'Option 1', value: 'option1' },\n { label: 'Option 2', value: 'option2' },\n ];\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <select-input exportparts=\"label,input,input-invalid\">\n <mock:shadow-root>\n <label part=\"label\" class=\"form-label\"></label>\n <select class=\"form-select\" part=\"input\">\n <option value=\"option1\">\n Option 1\n </option>\n <option value=\"option2\">\n Option 2\n </option>\n </select>\n </mock:shadow-root>\n </select-input>\n `);\n });\n\n it('renders with props', async () => {\n const { root } = await newSpecPage({\n components: [SelectInput],\n html: `<select-input name=\"test\" label=\"Test Label\"></select-input>`,\n });\n\n root.options = [{ label: 'Option 1', value: '1' }];\n await page.waitForChanges();\n\n expect(root).toEqualHtml(`\n <select-input exportparts=\"label,input,input-invalid\" label=\"Test Label\" name=\"test\">\n <mock:shadow-root>\n <label part=\"label\" class=\"form-label\">Test Label</label>\n <select class=\"form-select\" name=\"test\" part=\"input\">\n <option value=\"1\">\n Option 1\n </option>\n </select>\n </mock:shadow-root>\n </select-input>\n `);\n });\n\n it('emits event on input', async () => {\n page.root.name = 'test';\n page.root.options = [{ label: 'Option 1', value: '1' }];\n await page.waitForChanges();\n\n const fieldReceivedInputHandler = jest.fn();\n page.root.addEventListener('fieldReceivedInput', fieldReceivedInputHandler);\n const select = page.root.shadowRoot.querySelector('select');\n select.value = '1';\n select.dispatchEvent(new Event('input'));\n expect(fieldReceivedInputHandler).toHaveBeenCalled();\n });\n\n it('renders with error', async () => {\n page.root.error = 'Test Error';\n await page.waitForChanges();\n expect(page.root).toEqualHtml(`\n <select-input exportparts=\"label,input,input-invalid\">\n <mock:shadow-root>\n <label part=\"label\" class=\"form-label\"></label>\n <select class=\"form-select is-invalid\" part=\"input input-invalid\"></select>\n <div class=\"invalid-feedback\">\n Test Error\n </div>\n </mock:shadow-root>\n </select-input>\n `);\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,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,0EAA0E;KACjF,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;KAO7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;IAClC,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,wDAAwD;KAC/D,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;KAQ7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;IACvD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,SAAS,CAAC;MACvB,IAAI,EAAE,0EAA0E;KACjF,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1D,IAAI,aAAa,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC;IAE3E,KAAK,CAAC,KAAK,GAAG,cAAc,CAAC;IAC7B,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAExC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC5B,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;EAChF,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"]}
|