From ddf1e886e2f760593c711b0d685751bb6e758efa Mon Sep 17 00:00:00 2001 From: qa46hx Date: Thu, 12 Mar 2020 17:15:38 +0100 Subject: [PATCH 1/9] chore: storybook fixes --- .../stories/{checkbox-group.stories.mdx => index.stories.mdx} | 0 packages/form-system/stories/20-System-Overview.stories.mdx | 2 +- packages/input-email/stories/index.stories.mdx | 2 +- packages/localize/stories/10-intro.stories.mdx | 2 +- .../stories/{radio-group.stories.mdx => index.stories.mdx} | 4 ++-- packages/tabs/stories/index.stories.mdx | 2 -- packages/textarea/stories/index.stories.mdx | 2 +- 7 files changed, 6 insertions(+), 8 deletions(-) rename packages/checkbox-group/stories/{checkbox-group.stories.mdx => index.stories.mdx} (100%) rename packages/radio-group/stories/{radio-group.stories.mdx => index.stories.mdx} (98%) diff --git a/packages/checkbox-group/stories/checkbox-group.stories.mdx b/packages/checkbox-group/stories/index.stories.mdx similarity index 100% rename from packages/checkbox-group/stories/checkbox-group.stories.mdx rename to packages/checkbox-group/stories/index.stories.mdx diff --git a/packages/form-system/stories/20-System-Overview.stories.mdx b/packages/form-system/stories/20-System-Overview.stories.mdx index 3d9fe11da..a83a21d36 100644 --- a/packages/form-system/stories/20-System-Overview.stories.mdx +++ b/packages/form-system/stories/20-System-Overview.stories.mdx @@ -90,4 +90,4 @@ Fieldsets are at the base of: - [Model Value](?path=/docs/forms-system-modelvalue--page) - [Formatting and parsing](?path=/docs/forms-system-formatting-and-parsing--parser) - [Interaction states](?path=/docs/forms-system-interaction-states--interaction-states) -- [Validation System](?path=/docs/forms-validation-overview--page) +- [Validation System](?path=/docs/forms-validation-overview--page) diff --git a/packages/input-email/stories/index.stories.mdx b/packages/input-email/stories/index.stories.mdx index 68386148e..893cd46a7 100644 --- a/packages/input-email/stories/index.stories.mdx +++ b/packages/input-email/stories/index.stories.mdx @@ -55,7 +55,7 @@ Use `loadDefaultFeedbackMessages` to get our default feedback messages displayed ```js -import { loadDefaultFeedbackMessages } from 'lion/validate'; +import { loadDefaultFeedbackMessages } from '@lion/validate'; loadDefaultFeedbackMessages(); ``` diff --git a/packages/localize/stories/10-intro.stories.mdx b/packages/localize/stories/10-intro.stories.mdx index 25cd1d6bb..91ca67618 100644 --- a/packages/localize/stories/10-intro.stories.mdx +++ b/packages/localize/stories/10-intro.stories.mdx @@ -23,7 +23,7 @@ Further examples can be seen at [Features Overview Demo](?path=/docs/localize-fe | --------------------------------------------------------------------- | --------------------------------------------- | | [Translate Text](?path=/docs/localize-translate-text--function-story) | Load and translate text in multiple languages | | [Format Numbers](?path=/docs/localize-numbers--formatting) | Format numbers in multiple languages | -| [Format Dates](?path=/docs/localize-dates--formatting)--formatting) | Format dates in multiple languages | +| [Format Dates](?path=/docs/localize-dates--formatting) | Format dates in multiple languages | ## How to use diff --git a/packages/radio-group/stories/radio-group.stories.mdx b/packages/radio-group/stories/index.stories.mdx similarity index 98% rename from packages/radio-group/stories/radio-group.stories.mdx rename to packages/radio-group/stories/index.stories.mdx index 1e7d2d549..94cbb4021 100644 --- a/packages/radio-group/stories/radio-group.stories.mdx +++ b/packages/radio-group/stories/index.stories.mdx @@ -166,7 +166,7 @@ You can do the same thing for the entire group by setting the `disabled` attribu ```js -import { loadDefaultFeedbackMessages, Required } from 'lion/validate'; +import { loadDefaultFeedbackMessages, Required } from '@lion/validate'; loadDefaultFeedbackMessages(); const validate = () => { const radioGroup = document.querySelector('#dinosGroup'); @@ -224,7 +224,7 @@ You can also create a validator that validates whether a certain option is check ```js -import { loadDefaultFeedbackMessages, Required, Validator } from 'lion/validate'; +import { loadDefaultFeedbackMessages, Required, Validator } from '@lion/validate'; class IsBrontosaurus extends Validator { static get validatorName() { diff --git a/packages/tabs/stories/index.stories.mdx b/packages/tabs/stories/index.stories.mdx index 466e52ea5..c506e1df8 100644 --- a/packages/tabs/stories/index.stories.mdx +++ b/packages/tabs/stories/index.stories.mdx @@ -34,8 +34,6 @@ import '../lion-tabs.js'; npm i --save @lion/tabs; ``` -### Usage - ```js import '@lion/tabs/lion-tabs.js'; ``` diff --git a/packages/textarea/stories/index.stories.mdx b/packages/textarea/stories/index.stories.mdx index 809577cdd..2bfd0a150 100644 --- a/packages/textarea/stories/index.stories.mdx +++ b/packages/textarea/stories/index.stories.mdx @@ -11,7 +11,7 @@ import '../lion-textarea.js'; Its purpose is to provide a way for users to write text that is multiple lines long. - + {html` `} From af03fd41b05efece395518b1ae938cad56f247f1 Mon Sep 17 00:00:00 2001 From: CircleCI Date: Thu, 12 Mar 2020 16:34:05 +0000 Subject: [PATCH 2/9] chore: release new versions - @lion/checkbox-group@0.8.4 - @lion/choice-input@0.7.6 - @lion/form-system@0.6.5 - @lion/radio-group@0.8.4 - @lion/select-rich@0.12.1 - @lion/switch@0.7.1 --- packages/checkbox-group/CHANGELOG.md | 8 ++++++++ packages/checkbox-group/package.json | 4 ++-- packages/choice-input/CHANGELOG.md | 11 +++++++++++ packages/choice-input/package.json | 2 +- packages/form-system/CHANGELOG.md | 8 ++++++++ packages/form-system/package.json | 8 ++++---- packages/radio-group/CHANGELOG.md | 8 ++++++++ packages/radio-group/package.json | 4 ++-- packages/select-rich/CHANGELOG.md | 8 ++++++++ packages/select-rich/package.json | 4 ++-- packages/switch/CHANGELOG.md | 8 ++++++++ packages/switch/package.json | 4 ++-- 12 files changed, 64 insertions(+), 13 deletions(-) diff --git a/packages/checkbox-group/CHANGELOG.md b/packages/checkbox-group/CHANGELOG.md index 3897bcce5..cfc446813 100644 --- a/packages/checkbox-group/CHANGELOG.md +++ b/packages/checkbox-group/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.4](https://github.com/ing-bank/lion/compare/@lion/checkbox-group@0.8.3...@lion/checkbox-group@0.8.4) (2020-03-12) + +**Note:** Version bump only for package @lion/checkbox-group + + + + + ## [0.8.3](https://github.com/ing-bank/lion/compare/@lion/checkbox-group@0.8.2...@lion/checkbox-group@0.8.3) (2020-03-05) **Note:** Version bump only for package @lion/checkbox-group diff --git a/packages/checkbox-group/package.json b/packages/checkbox-group/package.json index 81db307df..f49b644ce 100644 --- a/packages/checkbox-group/package.json +++ b/packages/checkbox-group/package.json @@ -1,6 +1,6 @@ { "name": "@lion/checkbox-group", - "version": "0.8.3", + "version": "0.8.4", "description": "A container for multiple checkboxes", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,7 +34,7 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.5", + "@lion/choice-input": "0.7.6", "@lion/core": "0.4.5", "@lion/fieldset": "0.9.3", "@lion/input": "0.5.18" diff --git a/packages/choice-input/CHANGELOG.md b/packages/choice-input/CHANGELOG.md index 16fc2a938..c1f13bcf4 100644 --- a/packages/choice-input/CHANGELOG.md +++ b/packages/choice-input/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.7.6](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.5...@lion/choice-input@0.7.6) (2020-03-12) + + +### Bug Fixes + +* **choice-input:** fix serializedValue setter check ([0445b86](https://github.com/ing-bank/lion/commit/0445b86350f65649c03ed84bfaf9652838c43e55)) + + + + + ## [0.7.5](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.4...@lion/choice-input@0.7.5) (2020-03-05) **Note:** Version bump only for package @lion/choice-input diff --git a/packages/choice-input/package.json b/packages/choice-input/package.json index 74a27ef93..38be155fd 100644 --- a/packages/choice-input/package.json +++ b/packages/choice-input/package.json @@ -1,6 +1,6 @@ { "name": "@lion/choice-input", - "version": "0.7.5", + "version": "0.7.6", "description": "Base for all choise inputs like checkbox/radio", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", diff --git a/packages/form-system/CHANGELOG.md b/packages/form-system/CHANGELOG.md index f3fd513f9..c4435889b 100644 --- a/packages/form-system/CHANGELOG.md +++ b/packages/form-system/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.5](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.4...@lion/form-system@0.6.5) (2020-03-12) + +**Note:** Version bump only for package @lion/form-system + + + + + ## [0.6.4](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.3...@lion/form-system@0.6.4) (2020-03-09) **Note:** Version bump only for package @lion/form-system diff --git a/packages/form-system/package.json b/packages/form-system/package.json index 889a6233d..2e66134f9 100644 --- a/packages/form-system/package.json +++ b/packages/form-system/package.json @@ -1,6 +1,6 @@ { "name": "@lion/form-system", - "version": "0.6.4", + "version": "0.6.5", "description": "The Form System allows you to create complex forms with various validation in an easy way", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -33,7 +33,7 @@ "*.js" ], "devDependencies": { - "@lion/checkbox-group": "0.8.3", + "@lion/checkbox-group": "0.8.4", "@lion/core": "0.4.5", "@lion/field": "0.11.3", "@lion/fieldset": "0.9.3", @@ -45,9 +45,9 @@ "@lion/input-iban": "0.6.3", "@lion/input-range": "0.2.18", "@lion/localize": "0.8.10", - "@lion/radio-group": "0.8.3", + "@lion/radio-group": "0.8.4", "@lion/select": "0.5.18", - "@lion/select-rich": "0.12.0", + "@lion/select-rich": "0.12.1", "@lion/textarea": "0.5.19", "@lion/validate": "0.8.0", "@open-wc/demoing-storybook": "^1.10.4", diff --git a/packages/radio-group/CHANGELOG.md b/packages/radio-group/CHANGELOG.md index b682b8174..9e8ae98ad 100644 --- a/packages/radio-group/CHANGELOG.md +++ b/packages/radio-group/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.4](https://github.com/ing-bank/lion/compare/@lion/radio-group@0.8.3...@lion/radio-group@0.8.4) (2020-03-12) + +**Note:** Version bump only for package @lion/radio-group + + + + + ## [0.8.3](https://github.com/ing-bank/lion/compare/@lion/radio-group@0.8.2...@lion/radio-group@0.8.3) (2020-03-05) **Note:** Version bump only for package @lion/radio-group diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 66b71e369..6cb90394d 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -1,6 +1,6 @@ { "name": "@lion/radio-group", - "version": "0.8.3", + "version": "0.8.4", "description": "Manage a group of choices", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,7 +34,7 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.5", + "@lion/choice-input": "0.7.6", "@lion/core": "0.4.5", "@lion/fieldset": "0.9.3", "@lion/input": "0.5.18" diff --git a/packages/select-rich/CHANGELOG.md b/packages/select-rich/CHANGELOG.md index a4fd42edf..0ee1e57da 100644 --- a/packages/select-rich/CHANGELOG.md +++ b/packages/select-rich/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.1](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.12.0...@lion/select-rich@0.12.1) (2020-03-12) + +**Note:** Version bump only for package @lion/select-rich + + + + + # [0.12.0](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.11.4...@lion/select-rich@0.12.0) (2020-03-05) diff --git a/packages/select-rich/package.json b/packages/select-rich/package.json index d35b6e75a..fabe806f2 100644 --- a/packages/select-rich/package.json +++ b/packages/select-rich/package.json @@ -1,6 +1,6 @@ { "name": "@lion/select-rich", - "version": "0.12.0", + "version": "0.12.1", "description": "Provides a select with options that can contain html", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -39,7 +39,7 @@ ], "dependencies": { "@lion/button": "0.5.9", - "@lion/choice-input": "0.7.5", + "@lion/choice-input": "0.7.6", "@lion/core": "0.4.5", "@lion/field": "0.11.3", "@lion/overlays": "0.12.4", diff --git a/packages/switch/CHANGELOG.md b/packages/switch/CHANGELOG.md index 9a9214a59..224f510d5 100644 --- a/packages/switch/CHANGELOG.md +++ b/packages/switch/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.7.1](https://github.com/ing-bank/lion/compare/@lion/switch@0.7.0...@lion/switch@0.7.1) (2020-03-12) + +**Note:** Version bump only for package @lion/switch + + + + + # [0.7.0](https://github.com/ing-bank/lion/compare/@lion/switch@0.6.3...@lion/switch@0.7.0) (2020-03-05) diff --git a/packages/switch/package.json b/packages/switch/package.json index b660fd50b..cdfc2967c 100644 --- a/packages/switch/package.json +++ b/packages/switch/package.json @@ -1,6 +1,6 @@ { "name": "@lion/switch", - "version": "0.7.0", + "version": "0.7.1", "description": "A Switch is used for switching a property or feature on and off", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,7 +34,7 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.5", + "@lion/choice-input": "0.7.6", "@lion/core": "0.4.5", "@lion/field": "0.11.3" }, From 19b36b02fa8602172aedfaa6bc772dd6fcd24276 Mon Sep 17 00:00:00 2001 From: David Marcu Date: Thu, 12 Mar 2020 22:00:07 +0200 Subject: [PATCH 3/9] chore(steps): fix steps storybook event examples (#637) --- packages/steps/stories/index.stories.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/steps/stories/index.stories.mdx b/packages/steps/stories/index.stories.mdx index 301f49d55..c6aeb139c 100644 --- a/packages/steps/stories/index.stories.mdx +++ b/packages/steps/stories/index.stories.mdx @@ -118,7 +118,7 @@ If you have an intermediate step loading data via AJAX request and then automati If you need to be notified when transition between steps happens use `transition` event providing steps data: ```html - + Step 1 Step 2 Step 3 @@ -140,9 +140,9 @@ For notifications about specific step status change you can use individual event ```html - Step 1 - Step 2 - Step 3 + Step 1 + Step 2 + Step 3 ``` From 720d6a097c3f4064fb2368bc34b5b2403d030893 Mon Sep 17 00:00:00 2001 From: Joren Broekema Date: Tue, 17 Mar 2020 09:25:23 +0100 Subject: [PATCH 4/9] chore(form-system): fix links in docs --- .../stories/20-System-Overview.stories.mdx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/form-system/stories/20-System-Overview.stories.mdx b/packages/form-system/stories/20-System-Overview.stories.mdx index a83a21d36..b318b8a66 100644 --- a/packages/form-system/stories/20-System-Overview.stories.mdx +++ b/packages/form-system/stories/20-System-Overview.stories.mdx @@ -52,18 +52,18 @@ Platform field wrappers add all of the functionality described above to native f Dedicated fields are less generic fields in a sense that they by default expect a certain type of modelValue. This means that they have validators, parsers and formatters preconfigured. -- [`LionInputDate`](?path=/docs/forms-input-date--default-story) -- [`LionInputDatepicker`](?path=/docs/forms-input-datepicker--default-story) -- [`LionInputEmail`](?path=/docs/forms-input-email--default-story) -- [`LionInputAmount`](?path=/docs/forms-input-amount--default-story) -- [`LionInputIban`](?path=/docs/forms-input-iban--default-story) +- [LionInputDate](?path=/docs/forms-input-date--default-story) +- [LionInputDatepicker](?path=/docs/forms-input-datepicker--default-story) +- [LionInputEmail](?path=/docs/forms-input-email--default-story) +- [LionInputAmount](?path=/docs/forms-input-amount--default-story) +- [LionInputIban](?path=/docs/forms-input-iban--default-story) ### Custom fields Instead of wrapping native elements, this category of fields contains custom built form elements. -- [`LionSelectRich`](?path=/docs/forms-select-rich--default-story), an advanced (rich) version of `` One could also think of components like: @@ -80,14 +80,14 @@ Fieldsets are groups of fields. They can be considered fields on their own as we partly share the normalized api via `FormControlMixin`. Fieldsets are at the base of: -- [`LionFieldset`](?path=/docs/forms-fieldset-overview--page) -- [`LionForm`](?path=/docs/forms-form-overview--page) -- [`LionRadioGroup`](?path=/docs/forms-radio-group--default-story) -- [`LionCheckboxGroup`](?path=/docs/forms-checkbox-group--default-story) +- [LionFieldset](?path=/docs/forms-fieldset-overview--page) +- [LionForm](?path=/docs/forms-form-overview--page) +- [LionRadioGroup](?path=/docs/forms-radio-group--default-story) +- [LionCheckboxGroup](?path=/docs/forms-checkbox-group--default-story) ## Other Resources - [Model Value](?path=/docs/forms-system-modelvalue--page) - [Formatting and parsing](?path=/docs/forms-system-formatting-and-parsing--parser) - [Interaction states](?path=/docs/forms-system-interaction-states--interaction-states) -- [Validation System](?path=/docs/forms-validation-overview--page) +- [Validation System](?path=/docs/forms-validation-overview--page) From 571baa9c5353d62f0e869bae17ef7de0281a7bcf Mon Sep 17 00:00:00 2001 From: qa46hx Date: Wed, 18 Mar 2020 09:33:34 +0100 Subject: [PATCH 5/9] chore: small storybook updates --- .../17-Validation-Examples.stories.mdx | 88 +++++++++---------- .../stories/50-system-overview.stories.mdx | 2 +- .../overlays/stories/20-index.stories.mdx | 4 +- 3 files changed, 46 insertions(+), 48 deletions(-) diff --git a/packages/form-system/stories/17-Validation-Examples.stories.mdx b/packages/form-system/stories/17-Validation-Examples.stories.mdx index 14babb3a3..cd13a519c 100644 --- a/packages/form-system/stories/17-Validation-Examples.stories.mdx +++ b/packages/form-system/stories/17-Validation-Examples.stories.mdx @@ -35,9 +35,11 @@ For an input that may mean that it is not an empty string, while for a checkbox group it means at least one checkbox needs to be checked. - {html` + {() => { + loadDefaultFeedbackMessages(); + return html` - `} + `}} ```html @@ -242,7 +244,7 @@ const tomorrow = new Date(year, month, day + 1); ## Validation Types When defining your own component you can decide to allow for multiple types of validation. -By default only `error` is used however there are certainly use cases where warning or success messages make sense. +By default only `error` is used, however there are certainly use cases where warning or success messages make sense. {() => { @@ -258,29 +260,24 @@ By default only `error` is used however there are certainly use cases where warn } return html` `; }} @@ -315,29 +313,24 @@ try { ```html ``` @@ -421,9 +415,11 @@ class MyValidator extends Validator { > ``` -## Override default messages +## Default messages -Oftern +To get default validation messages you need to import and call the `loadDefaultFeedbackMessages` function once in your application. + +Sometimes the default messages don't make sense for your input field. In that case you want to override it by adding a `getMessage` function to your validator. {html` @@ -469,6 +465,8 @@ Oftern ## Override fieldName +In the scenario that the default messages are correct, but you only want to change the `fieldName`, this can both be done for a single specific validator or for all at once. + {html` diff --git a/packages/localize/stories/50-system-overview.stories.mdx b/packages/localize/stories/50-system-overview.stories.mdx index e863e245f..c5773ce51 100644 --- a/packages/localize/stories/50-system-overview.stories.mdx +++ b/packages/localize/stories/50-system-overview.stories.mdx @@ -277,7 +277,7 @@ If you want to optimize the page rendering and you can inline some of your local ```js // my-inlined-data.js -import { localize } from 'lion-localize/localize.js'; +import { localize } from '@lion/localize'; localize.addData('en-GB', 'my-namespace', { /* data */ }); diff --git a/packages/overlays/stories/20-index.stories.mdx b/packages/overlays/stories/20-index.stories.mdx index 9af2d4850..ece81f005 100644 --- a/packages/overlays/stories/20-index.stories.mdx +++ b/packages/overlays/stories/20-index.stories.mdx @@ -21,7 +21,7 @@ On top of this, the system was built having accessibility in mind. For a detailed rationale, please consult [Rationale](?path=/docs/overlay-rationale--page). - + {html` @@ -312,7 +312,7 @@ Below is another demo where you can toggle between configurations using buttons. ```js -import { withModalDialogConfig, withBottomSheetConfig, withDropdownConfig } from 'lion/overlays'; +import { withModalDialogConfig, withBottomSheetConfig, withDropdownConfig } from '@lion/overlays'; ``` ```html From 1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b Mon Sep 17 00:00:00 2001 From: Alex Ghiu Date: Wed, 18 Mar 2020 15:45:40 +0100 Subject: [PATCH 6/9] fix: normalization model-value-changed events Co-authored-by: Thijs Louisse --- packages/choice-input/src/ChoiceGroupMixin.js | 37 ++- .../test/ChoiceGroupMixin.test.js | 13 +- packages/field/package.json | 1 + packages/field/src/FormControlMixin.js | 108 +++++++ packages/field/src/FormatMixin.js | 5 +- .../src/registration/FormRegistrarMixin.js | 13 + packages/field/test-helpers.js | 1 + packages/field/test-helpers/formFixture.js | 11 + packages/field/test/FormControlMixin.test.js | 115 +++++++- packages/fieldset/src/FormGroupMixin.js | 4 +- packages/fieldset/src/LionFieldset.js | 1 + packages/fieldset/test/lion-fieldset.test.js | 2 +- packages/form-system/package.json | 1 + .../stories/15-features-overview.stories.mdx | 6 +- .../test/model-value-consistency.test.js | 274 ++++++++++++++++++ .../test/model-value-event.test.js | 144 +++++++++ .../src/configurations/withDropdownConfig.js | 2 +- packages/select-rich/src/LionSelectRich.js | 44 ++- .../test/lion-select-rich-interaction.test.js | 3 +- .../select-rich/test/lion-select-rich.test.js | 13 +- packages/select/src/LionSelect.js | 6 +- 21 files changed, 746 insertions(+), 58 deletions(-) create mode 100644 packages/field/test-helpers.js create mode 100644 packages/field/test-helpers/formFixture.js create mode 100644 packages/form-system/test/model-value-consistency.test.js create mode 100644 packages/form-system/test/model-value-event.test.js diff --git a/packages/choice-input/src/ChoiceGroupMixin.js b/packages/choice-input/src/ChoiceGroupMixin.js index f7543c626..cbf3ca8ed 100644 --- a/packages/choice-input/src/ChoiceGroupMixin.js +++ b/packages/choice-input/src/ChoiceGroupMixin.js @@ -55,20 +55,7 @@ export const ChoiceGroupMixin = dedupeMixin( constructor() { super(); this.multipleChoice = false; - } - - connectedCallback() { - super.connectedCallback(); - if (!this.multipleChoice) { - this.addEventListener('model-value-changed', this._checkSingleChoiceElements); - } - } - - disconnectedCallback() { - super.disconnectedCallback(); - if (!this.multipleChoice) { - this.removeEventListener('model-value-changed', this._checkSingleChoiceElements); - } + this._repropagationRole = 'choice-group'; // configures event propagation logic of FormControlMixin } /** @@ -157,9 +144,10 @@ export const ChoiceGroupMixin = dedupeMixin( } } - __triggerCheckedValueChanged() { + __setChoiceGroupTouched() { const value = this.modelValue; if (value != null && value !== this.__previousCheckedValue) { + // TODO: what happens here exactly? Needs to be based on user interaction (?) this.touched = true; this.__previousCheckedValue = value; } @@ -179,5 +167,24 @@ export const ChoiceGroupMixin = dedupeMixin( ); } } + + /** + * @override FormControlMixin + */ + _onBeforeRepropagateChildrenValues(ev) { + // Normalize target, since we might receive 'portal events' (from children in a modal, + // see select-rich) + const target = (ev.detail && ev.detail.element) || ev.target; + if (this.multipleChoice || !target.checked) { + return; + } + this.formElements.forEach(option => { + if (target.choiceValue !== option.choiceValue) { + option.checked = false; // eslint-disable-line no-param-reassign + } + }); + this.__setChoiceGroupTouched(); + this.requestUpdate('modelValue'); + } }, ); diff --git a/packages/choice-input/test/ChoiceGroupMixin.test.js b/packages/choice-input/test/ChoiceGroupMixin.test.js index 5d1f01f32..4014a7892 100644 --- a/packages/choice-input/test/ChoiceGroupMixin.test.js +++ b/packages/choice-input/test/ChoiceGroupMixin.test.js @@ -2,7 +2,8 @@ import { html, LitElement } from '@lion/core'; import { FormGroupMixin } from '@lion/fieldset'; import { LionInput } from '@lion/input'; import { Required } from '@lion/validate'; -import { expect, fixture, nextFrame } from '@open-wc/testing'; +import { expect, nextFrame } from '@open-wc/testing'; +import { formFixture as fixture } from '@lion/field/test-helpers.js'; import { ChoiceGroupMixin } from '../src/ChoiceGroupMixin.js'; import { ChoiceInputMixin } from '../src/ChoiceInputMixin.js'; import '@lion/fieldset/lion-fieldset.js'; @@ -182,21 +183,21 @@ describe('ChoiceGroupMixin', () => { counter = 0; // reset after setup which may result in different results el.formElements[0].checked = true; - expect(counter).to.equal(2); // male becomes checked, female becomes unchecked + expect(counter).to.equal(1); // male becomes checked, female becomes unchecked // not changed values trigger no event el.formElements[0].checked = true; - expect(counter).to.equal(2); + expect(counter).to.equal(1); el.formElements[2].checked = true; - expect(counter).to.equal(4); // other becomes checked, male becomes unchecked + expect(counter).to.equal(2); // other becomes checked, male becomes unchecked // not found values trigger no event el.modelValue = 'foo'; - expect(counter).to.equal(4); + expect(counter).to.equal(2); el.modelValue = 'male'; - expect(counter).to.equal(6); // male becomes checked, other becomes unchecked + expect(counter).to.equal(3); // male becomes checked, other becomes unchecked }); it('can be required', async () => { diff --git a/packages/field/package.json b/packages/field/package.json index d357f84fe..f7041ecc9 100644 --- a/packages/field/package.json +++ b/packages/field/package.json @@ -31,6 +31,7 @@ "stories", "test", "test-suites", + "test-helpers", "translations", "*.js" ], diff --git a/packages/field/src/FormControlMixin.js b/packages/field/src/FormControlMixin.js index 75e06e879..2bb8d4ddf 100644 --- a/packages/field/src/FormControlMixin.js +++ b/packages/field/src/FormControlMixin.js @@ -55,6 +55,22 @@ export const FormControlMixin = dedupeMixin( * Contains all elements that should end up in aria-describedby of `._inputNode` */ _ariaDescribedNodes: Array, + /** + * Based on the role, details of handling model-value-changed repropagation differ. + * @type {'child'|'fieldset'|'choice-group'} + */ + _repropagationRole: String, + /** + * By default, a field with _repropagationRole 'choice-group' will act as an + * 'endpoint'. This means it will be considered as an individual field: for + * a select, individual options will not be part of the formPath. They + * will. + * Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise' + * (from Application Developer perspective) need to be more like fields + * (think of an amount-input with a currency select box next to it), can set this + * to true to hide private internals in the formPath. + */ + _isRepropagationEndpoint: Boolean, }; } @@ -151,6 +167,8 @@ export const FormControlMixin = dedupeMixin( this._inputId = uuid(this.localName); this._ariaLabelledNodes = []; this._ariaDescribedNodes = []; + this._repropagationRole = 'child'; + this.addEventListener('model-value-changed', this.__repropagateChildrenValues); } connectedCallback() { @@ -553,5 +571,95 @@ export const FormControlMixin = dedupeMixin( __getDirectSlotChild(slotName) { return [...this.children].find(el => el.slot === slotName); } + + firstUpdated(changedProperties) { + super.firstUpdated(changedProperties); + this.__dispatchInitialModelValueChangedEvent(); + } + + async __dispatchInitialModelValueChangedEvent() { + // When we are not a fieldset / choice-group, we don't need to wait for our children + // to send a unified event + if (this._repropagationRole === 'child') { + return; + } + + await this.registrationComplete; + // Initially we don't repropagate model-value-changed events coming + // from children. On firstUpdated we re-dispatch this event to maintain + // 'count consistency' (to not confuse the application developer with a + // large number of initial events). Initially the source field will not + // be part of the formPath but afterwards it will. + this.__repropagateChildrenInitialized = true; + this.dispatchEvent( + new CustomEvent('model-value-changed', { + bubbles: true, + detail: { formPath: [this], initialize: true }, + }), + ); + } + + // eslint-disable-next-line class-methods-use-this, no-unused-vars + _onBeforeRepropagateChildrenValues(ev) {} + + __repropagateChildrenValues(ev) { + // Allows sub classes to internally listen to the children change events + // (before stopImmediatePropagation is called below). + this._onBeforeRepropagateChildrenValues(ev); + // Normalize target, we also might get it from 'portals' (rich select) + const target = (ev.detail && ev.detail.element) || ev.target; + const isEndpoint = + this._isRepropagationEndpoint || this._repropagationRole === 'choice-group'; + + // Prevent eternal loops after we sent the event below. + if (target === this) { + return; + } + + // A. Stop sibling handlers + // + // Make sure our sibling event listeners (added by Application developers) will not get + // the child model-value-changed event, but the repropagated one at the bottom of this + // method + ev.stopImmediatePropagation(); + + // B1. Are we still initializing? If so, halt... + // + // Stop repropagating children events before firstUpdated and make sure we de not + // repropagate init events of our children (we already sent our own + // initial model-value-change event in firstUpdated) + const isGroup = this._repropagationRole !== 'child'; // => fieldset or choice-group + const isSelfInitializing = isGroup && !this.__repropagateChildrenInitialized; + const isChildGroupInitializing = ev.detail && ev.detail.initialize; + if (isSelfInitializing || isChildGroupInitializing) { + return; + } + + // B2. Are we a single choice choice-group? If so, halt when unchecked + // + // We only send the checked changed up (not the unchecked). In this way a choice group + // (radio-group, checkbox-group, select/listbox) acts as an 'endpoint' (a single Field) + // just like the native '; @@ -179,4 +181,113 @@ describe('FormControlMixin', () => { .getAttribute('aria-live'), ).to.equal('polite'); }); + + describe('Model-value-changed event propagation', () => { + const FormControlWithRegistrarMixinClass = class extends FormControlMixin( + FormRegistrarMixin(SlotMixin(LitElement)), + ) { + static get properties() { + return { + modelValue: { + type: String, + }, + }; + } + }; + + const groupElem = defineCE(FormControlWithRegistrarMixinClass); + const groupTag = unsafeStatic(groupElem); + + describe('On initialization', () => { + it('redispatches one event from host', async () => { + const formSpy = sinon.spy(); + const fieldsetSpy = sinon.spy(); + const formEl = await fixture(html` + <${groupTag} name="form" ._repropagationRole=${'form-group'} @model-value-changed=${formSpy}> + <${groupTag} name="fieldset" ._repropagationRole=${'form-group'} @model-value-changed=${fieldsetSpy}> + <${tag} name="field"> + + + `); + const fieldsetEl = formEl.querySelector('[name=fieldset]'); + + expect(fieldsetSpy.callCount).to.equal(1); + const fieldsetEv = fieldsetSpy.firstCall.args[0]; + expect(fieldsetEv.target).to.equal(fieldsetEl); + expect(fieldsetEv.detail.formPath).to.eql([fieldsetEl]); + + expect(formSpy.callCount).to.equal(1); + const formEv = formSpy.firstCall.args[0]; + expect(formEv.target).to.equal(formEl); + expect(formEv.detail.formPath).to.eql([formEl]); + }); + }); + + describe('After initialization', () => { + it('redispatches one event from host and keeps formPath history', async () => { + const formSpy = sinon.spy(); + const fieldsetSpy = sinon.spy(); + const fieldSpy = sinon.spy(); + const formEl = await fixture(html` + <${groupTag} name="form"> + <${groupTag} name="fieldset"> + <${tag} name="field"> + + + `); + const fieldEl = formEl.querySelector('[name=field]'); + const fieldsetEl = formEl.querySelector('[name=fieldset]'); + + formEl.addEventListener('model-value-changed', formSpy); + fieldsetEl.addEventListener('model-value-changed', fieldsetSpy); + fieldEl.addEventListener('model-value-changed', fieldSpy); + + fieldEl.dispatchEvent(new Event('model-value-changed', { bubbles: true })); + + expect(fieldsetSpy.callCount).to.equal(1); + const fieldsetEv = fieldsetSpy.firstCall.args[0]; + expect(fieldsetEv.target).to.equal(fieldsetEl); + expect(fieldsetEv.detail.formPath).to.eql([fieldEl, fieldsetEl]); + + expect(formSpy.callCount).to.equal(1); + const formEv = formSpy.firstCall.args[0]; + expect(formEv.target).to.equal(formEl); + expect(formEv.detail.formPath).to.eql([fieldEl, fieldsetEl, formEl]); + }); + + it('sends one event for single select choice-groups', async () => { + const formSpy = sinon.spy(); + const choiceGroupSpy = sinon.spy(); + const formEl = await fixture(html` + <${groupTag} name="form"> + <${groupTag} name="choice-group" ._repropagationRole=${'choice-group'}> + <${tag} name="choice-group" id="option1" .checked=${true}> + <${tag} name="choice-group" id="option2"> + + + `); + const choiceGroupEl = formEl.querySelector('[name=choice-group]'); + const option1El = formEl.querySelector('#option1'); + const option2El = formEl.querySelector('#option2'); + formEl.addEventListener('model-value-changed', formSpy); + choiceGroupEl.addEventListener('model-value-changed', choiceGroupSpy); + + // Simulate check + option2El.checked = true; + option2El.dispatchEvent(new Event('model-value-changed', { bubbles: true })); + option1El.checked = false; + option1El.dispatchEvent(new Event('model-value-changed', { bubbles: true })); + + expect(choiceGroupSpy.callCount).to.equal(1); + const choiceGroupEv = choiceGroupSpy.firstCall.args[0]; + expect(choiceGroupEv.target).to.equal(choiceGroupEl); + expect(choiceGroupEv.detail.formPath).to.eql([choiceGroupEl]); + + expect(formSpy.callCount).to.equal(1); + const formEv = formSpy.firstCall.args[0]; + expect(formEv.target).to.equal(formEl); + expect(formEv.detail.formPath).to.eql([choiceGroupEl, formEl]); + }); + }); + }); }); diff --git a/packages/fieldset/src/FormGroupMixin.js b/packages/fieldset/src/FormGroupMixin.js index bc29d8174..d328cfa35 100644 --- a/packages/fieldset/src/FormGroupMixin.js +++ b/packages/fieldset/src/FormGroupMixin.js @@ -135,8 +135,8 @@ export const FormGroupMixin = dedupeMixin( } async __initInteractionStates() { - if (!this.__readyForRegistration) { - await this.registrationReady; + if (!this.registrationHasCompleted) { + await this.registrationComplete; } this.formElements.forEach(el => { if (typeof el.initInteractionState === 'function') { diff --git a/packages/fieldset/src/LionFieldset.js b/packages/fieldset/src/LionFieldset.js index 9ea5829d1..76fe3f57d 100644 --- a/packages/fieldset/src/LionFieldset.js +++ b/packages/fieldset/src/LionFieldset.js @@ -25,5 +25,6 @@ export class LionFieldset extends FormGroupMixin(LitElement) { super(); /** @override from FormRegistrarMixin */ this._isFormOrFieldset = true; + this._repropagationRole = 'fieldset'; // configures FormControlMixin } } diff --git a/packages/fieldset/test/lion-fieldset.test.js b/packages/fieldset/test/lion-fieldset.test.js index 13207bf9e..e0b05f6fb 100644 --- a/packages/fieldset/test/lion-fieldset.test.js +++ b/packages/fieldset/test/lion-fieldset.test.js @@ -1,6 +1,5 @@ import { expect, - fixture, fixtureSync, html, unsafeStatic, @@ -8,6 +7,7 @@ import { nextFrame, defineCE, } from '@open-wc/testing'; +import { formFixture as fixture } from '@lion/field/test-helpers.js'; import sinon from 'sinon'; import { Validator, IsNumber } from '@lion/validate'; import { localizeTearDown } from '@lion/localize/test-helpers.js'; diff --git a/packages/form-system/package.json b/packages/form-system/package.json index 889a6233d..baad034a2 100644 --- a/packages/form-system/package.json +++ b/packages/form-system/package.json @@ -41,6 +41,7 @@ "@lion/input": "0.5.18", "@lion/input-amount": "0.5.18", "@lion/input-date": "0.5.19", + "@lion/input-datepicker": "0.10.1", "@lion/input-email": "0.6.3", "@lion/input-iban": "0.6.3", "@lion/input-range": "0.2.18", diff --git a/packages/form-system/stories/15-features-overview.stories.mdx b/packages/form-system/stories/15-features-overview.stories.mdx index 5ac3683e9..c2295ef62 100644 --- a/packages/form-system/stories/15-features-overview.stories.mdx +++ b/packages/form-system/stories/15-features-overview.stories.mdx @@ -33,9 +33,9 @@ For usage and installation please see the appropriate packages. {() => { Required.getMessage = () => 'Please enter a value'; return html` - +
- + `should dispatch ${count} time(s) on first paint`; +const getInteractionTitle = count => `should dispatch ${count} time(s) on interaction`; + +const firstStampCount = 1; +const interactionCount = 1; + +const fieldDispatchesCountOnFirstPaint = (tagname, count) => { + const tag = unsafeStatic(tagname); + const spy = sinon.spy(); + it(getFirstPaintTitle(count), async () => { + await fixture(html`<${tag} @model-value-changed="${spy}">`); + expect(spy.callCount).to.equal(count); + }); +}; + +const fieldDispatchesCountOnInteraction = (tagname, count) => { + const tag = unsafeStatic(tagname); + const spy = sinon.spy(); + it(getInteractionTitle(count), async () => { + const el = await fixture(html`<${tag}>`); + el.addEventListener('model-value-changed', spy); + // TODO: discuss if this is the "correct" way to interact with component + el.modelValue = 'foo'; + await el.updateComplete; + expect(spy.callCount).to.equal(count); + }); +}; + +const choiceDispatchesCountOnFirstPaint = (tagname, count) => { + const tag = unsafeStatic(tagname); + const spy = sinon.spy(); + it(getFirstPaintTitle(count), async () => { + await fixture(html`<${tag} @model-value-changed="${spy}" .choiceValue="${'option'}">`); + expect(spy.callCount).to.equal(count); + }); +}; + +const choiceDispatchesCountOnInteraction = (tagname, count) => { + const tag = unsafeStatic(tagname); + const spy = sinon.spy(); + it(getInteractionTitle(count), async () => { + const el = await fixture(html`<${tag} .choiceValue="${'option'}">`); + el.addEventListener('model-value-changed', spy); + el.checked = true; + expect(spy.callCount).to.equal(count); + }); +}; + +const choiceGroupDispatchesCountOnFirstPaint = (groupTagname, itemTagname, count) => { + const groupTag = unsafeStatic(groupTagname); + const itemTag = unsafeStatic(itemTagname); + it(getFirstPaintTitle(count), async () => { + const spy = sinon.spy(); + await fixture(html` + <${groupTag} @model-value-changed="${spy}"> + <${itemTag} .choiceValue="${'option1'}"> + <${itemTag} .choiceValue="${'option2'}"> + <${itemTag} .choiceValue="${'option3'}"> + + `); + expect(spy.callCount).to.equal(count); + }); +}; + +const choiceGroupDispatchesCountOnInteraction = (groupTagname, itemTagname, count) => { + const groupTag = unsafeStatic(groupTagname); + const itemTag = unsafeStatic(itemTagname); + it(getInteractionTitle(count), async () => { + const spy = sinon.spy(); + const el = await fixture(html` + <${groupTag}> + <${itemTag} .choiceValue="${'option1'}"> + <${itemTag} .choiceValue="${'option2'}"> + <${itemTag} .choiceValue="${'option3'}"> + + `); + el.addEventListener('model-value-changed', spy); + const option2 = el.querySelector(`${itemTagname}:nth-child(2)`); + option2.checked = true; + expect(spy.callCount).to.equal(count); + + spy.resetHistory(); + + const option3 = el.querySelector(`${itemTagname}:nth-child(3)`); + option3.checked = true; + expect(spy.callCount).to.equal(count); + }); +}; + +[ + 'input', + 'input-amount', + 'input-date', + 'input-datepicker', + 'input-email', + 'input-iban', + 'input-range', + 'textarea', +].forEach(chunk => { + const tagname = `lion-${chunk}`; + describe(`${tagname}`, () => { + describe(featureName, () => { + fieldDispatchesCountOnFirstPaint(tagname, firstStampCount); + fieldDispatchesCountOnInteraction(tagname, interactionCount); + }); + }); +}); + +['checkbox', 'radio'].forEach(chunk => { + const groupTagname = `lion-${chunk}-group`; + const itemTagname = `lion-${chunk}`; + + describe(`${itemTagname}`, () => { + describe(featureName, () => { + choiceDispatchesCountOnFirstPaint(itemTagname, firstStampCount); + choiceDispatchesCountOnInteraction(itemTagname, interactionCount); + }); + }); + + describe(`${groupTagname}`, () => { + describe(featureName, () => { + choiceGroupDispatchesCountOnFirstPaint(groupTagname, itemTagname, firstStampCount); + choiceGroupDispatchesCountOnInteraction(groupTagname, itemTagname, interactionCount); + }); + }); +}); + +describe('lion-select', () => { + describe(featureName, () => { + it(getFirstPaintTitle(firstStampCount), async () => { + const spy = sinon.spy(); + await fixture(html` + + + + `); + expect(spy.callCount).to.equal(firstStampCount); + }); + + it(getInteractionTitle(interactionCount), async () => { + const spy = sinon.spy(); + const el = await fixture(html` + + + + `); + el.addEventListener('model-value-changed', spy); + const option2 = el.querySelector('option:nth-child(2)'); + + // mimic user input + option2.selected = true; + el._inputNode.dispatchEvent(new CustomEvent('change')); + + expect(spy.callCount).to.equal(interactionCount); + + spy.resetHistory(); + + const option3 = el.querySelector('option:nth-child(3)'); + + // mimic user input + option3.selected = true; + el._inputNode.dispatchEvent(new CustomEvent('change')); + + expect(spy.callCount).to.equal(interactionCount); + }); + }); +}); + +describe('lion-select-rich', () => { + describe(featureName, () => { + it(getFirstPaintTitle(firstStampCount), async () => { + const spy = sinon.spy(); + await fixture(html` + + + + + + + + `); + expect(spy.callCount).to.equal(firstStampCount); + }); + + it(getInteractionTitle(interactionCount), async () => { + const spy = sinon.spy(); + const el = await fixture(html` + + + + + + + + `); + el.addEventListener('model-value-changed', spy); + const option2 = el.querySelector('lion-option:nth-child(2)'); + option2.checked = true; + expect(spy.callCount).to.equal(interactionCount); + + spy.resetHistory(); + + const option3 = el.querySelector('lion-option:nth-child(3)'); + option3.checked = true; + expect(spy.callCount).to.equal(interactionCount); + }); + }); +}); + +describe('lion-fieldset', () => { + describe(featureName, () => { + it(getFirstPaintTitle(firstStampCount), async () => { + const spy = sinon.spy(); + await fixture(html` + + + + `); + expect(spy.callCount).to.equal(firstStampCount); + }); + + it(getInteractionTitle(interactionCount), async () => { + const spy = sinon.spy(); + const el = await fixture(html` + + + + `); + el.addEventListener('model-value-changed', spy); + const input = el.querySelector('lion-input'); + input.modelValue = 'foo'; + expect(spy.callCount).to.equal(interactionCount); + }); + }); +}); diff --git a/packages/form-system/test/model-value-event.test.js b/packages/form-system/test/model-value-event.test.js new file mode 100644 index 000000000..6308b8cba --- /dev/null +++ b/packages/form-system/test/model-value-event.test.js @@ -0,0 +1,144 @@ +import { expect, html } from '@open-wc/testing'; +import { formFixture as fixture } from '@lion/field/test-helpers.js'; + +// eslint-disable-next-line import/no-extraneous-dependencies +import sinon from 'sinon'; + +import '@lion/input/lion-input.js'; +import '@lion/fieldset/lion-fieldset.js'; + +describe('model value event', () => { + describe('form path', () => { + it('should be property', async () => { + const spy = sinon.spy(); + const input = await fixture(html` + + `); + input.addEventListener('model-value-changed', spy); + input.modelValue = 'woof'; + const e = spy.firstCall.args[0]; + expect(e.detail).to.have.a.property('formPath'); + }); + + it('should contain dispatching field', async () => { + const spy = sinon.spy(); + const input = await fixture(html` + + `); + input.addEventListener('model-value-changed', spy); + input.modelValue = 'foo'; + const e = spy.firstCall.args[0]; + expect(e.detail.formPath).to.eql([input]); + }); + + it('should contain field and group', async () => { + const spy = sinon.spy(); + const fieldset = await fixture(html` + + + + `); + fieldset.addEventListener('model-value-changed', spy); + const input = fieldset.querySelector('lion-input'); + input.modelValue = 'foo'; + const e = spy.firstCall.args[0]; + expect(e.detail.formPath).to.eql([input, fieldset]); + }); + + it('should contain deep elements', async () => { + const spy = sinon.spy(); + const grandparent = await fixture(html` + + + + + + `); + const parent = grandparent.querySelector('[name=parent]'); + const input = grandparent.querySelector('[name=input]'); + grandparent.addEventListener('model-value-changed', spy); + input.modelValue = 'foo'; + const e = spy.firstCall.args[0]; + expect(e.detail.formPath).to.eql([input, parent, grandparent]); + }); + + it('should ignore elements that are not fields or fieldsets', async () => { + const spy = sinon.spy(); + const grandparent = await fixture(html` + +
+ +
+
+ +
+
+
+
+
+ `); + const parent = grandparent.querySelector('[name=parent]'); + const input = grandparent.querySelector('[name=input]'); + grandparent.addEventListener('model-value-changed', spy); + input.modelValue = 'foo'; + const e = spy.firstCall.args[0]; + expect(e.detail.formPath).to.eql([input, parent, grandparent]); + }); + }); + + describe('signature', () => { + let e; + beforeEach(async () => { + const spy = sinon.spy(); + const el = await fixture( + html` + + `, + ); + el.addEventListener('model-value-changed', spy); + el.modelValue = 'foo'; + // eslint-disable-next-line prefer-destructuring + e = spy.firstCall.args[0]; + }); + + // TODO: Re-enable at some point... + // In my opinion (@CubLion) we should not bubble events. + // Instead each parent should explicitly listen to children events, + // and then re-dispatch on themselves. + it.skip('should not bubble', async () => { + expect(e.bubbles).to.be.false; + }); + + it('should not leave shadow boundary', async () => { + expect(e.composed).to.be.false; + }); + }); + + describe('propagation', () => { + it('should dispatch different event at each level', async () => { + const grandparent = await fixture(html` + + + + + + `); + const parent = grandparent.querySelector('[name="parent"]'); + const input = grandparent.querySelector('[name="input"]'); + const spies = []; + [grandparent, parent, input].forEach(element => { + const spy = sinon.spy(); + spies.push(spy); + element.addEventListener('model-value-changed', spy); + }); + input.modelValue = 'foo'; + spies.forEach((spy, index) => { + const currentEvent = spy.firstCall.args[0]; + for (let i = index + 1; i < spies.length; i += 1) { + const nextEvent = spies[i].firstCall.args[0]; + expect(currentEvent).not.to.eql(nextEvent); + } + }); + }); + }); +}); diff --git a/packages/overlays/src/configurations/withDropdownConfig.js b/packages/overlays/src/configurations/withDropdownConfig.js index a0a9d59b1..1bf9c45a6 100644 --- a/packages/overlays/src/configurations/withDropdownConfig.js +++ b/packages/overlays/src/configurations/withDropdownConfig.js @@ -1,7 +1,7 @@ export const withDropdownConfig = () => ({ placementMode: 'local', - inheritsReferenceWidth: true, + inheritsReferenceWidth: 'full', hidesOnOutsideClick: true, popperConfig: { placement: 'bottom-start', diff --git a/packages/select-rich/src/LionSelectRich.js b/packages/select-rich/src/LionSelectRich.js index c88d8946a..1f4efe594 100644 --- a/packages/select-rich/src/LionSelectRich.js +++ b/packages/select-rich/src/LionSelectRich.js @@ -148,7 +148,6 @@ export class LionSelectRich extends ScopedElementsMixin( this.__cachedUserSetModelValue = value; } - this.__syncInvokerElement(); this.requestUpdate('modelValue'); } @@ -199,8 +198,9 @@ export class LionSelectRich extends ScopedElementsMixin( // for interaction states this._listboxActiveDescendant = null; this.__hasInitialSelectedFormElement = false; - + this._repropagationRole = 'choice-group'; // configures FormControlMixin this.__setupEventListeners(); + this.__initInteractionStates(); } connectedCallback() { @@ -250,6 +250,15 @@ export class LionSelectRich extends ScopedElementsMixin( } } + async __initInteractionStates() { + await this.registrationComplete; + // This timeout is here, so that we know we handle after the initial model-value + // event (see firstUpdated method FormConrtolMixin) has fired. + setTimeout(() => { + this.initInteractionState(); + }); + } + get _inputNode() { // In FormControl, we get direct child [slot="input"]. This doesn't work, because the overlay // system wraps it in [slot="_overlay-shadow-outlet"] @@ -298,6 +307,10 @@ export class LionSelectRich extends ScopedElementsMixin( this._invokerNode.setAttribute('aria-invalid', this._hasFeedbackVisibleFor('error')); } } + + if (changedProperties.has('modelValue')) { + this.__syncInvokerElement(); + } } toggle() { @@ -345,24 +358,27 @@ export class LionSelectRich extends ScopedElementsMixin( this.__setAttributeForAllFormElements('aria-setsize', this.formElements.length); child.setAttribute('aria-posinset', this.formElements.length); - this.__onChildModelValueChanged({ target: child }); + this.__proxyChildModelValueChanged({ target: child }); this.resetInteractionState(); /* eslint-enable no-param-reassign */ } __setupEventListeners() { this.__onChildActiveChanged = this.__onChildActiveChanged.bind(this); - this.__onChildModelValueChanged = this.__onChildModelValueChanged.bind(this); + this.__proxyChildModelValueChanged = this.__proxyChildModelValueChanged.bind(this); this.__onKeyUp = this.__onKeyUp.bind(this); this._listboxNode.addEventListener('active-changed', this.__onChildActiveChanged); - this._listboxNode.addEventListener('model-value-changed', this.__onChildModelValueChanged); + this._listboxNode.addEventListener('model-value-changed', this.__proxyChildModelValueChanged); this.addEventListener('keyup', this.__onKeyUp); } __teardownEventListeners() { this._listboxNode.removeEventListener('active-changed', this.__onChildActiveChanged); - this._listboxNode.removeEventListener('model-value-changed', this.__onChildModelValueChanged); + this._listboxNode.removeEventListener( + 'model-value-changed', + this.__proxyChildModelValueChanged, + ); this._listboxNode.removeEventListener('keyup', this.__onKeyUp); } @@ -391,16 +407,14 @@ export class LionSelectRich extends ScopedElementsMixin( }); } - __onChildModelValueChanged({ target }) { - if (target.checked) { - this.formElements.forEach(formElement => { - if (formElement !== target) { - // eslint-disable-next-line no-param-reassign - formElement.checked = false; - } - }); - this.modelValue = target.value; + __proxyChildModelValueChanged(ev) { + // We need to redispatch the model-value-changed event on 'this', so it will + // align with FormControl.__repropagateChildrenValues method. Also, this makes + // it act like a portal, in case the listbox is put in a modal overlay on body level. + if (ev.stopPropagation) { + ev.stopPropagation(); } + this.dispatchEvent(new CustomEvent('model-value-changed', { detail: { element: ev.target } })); } __syncInvokerElement() { diff --git a/packages/select-rich/test/lion-select-rich-interaction.test.js b/packages/select-rich/test/lion-select-rich-interaction.test.js index 7b421e4e5..9c3ab4687 100644 --- a/packages/select-rich/test/lion-select-rich-interaction.test.js +++ b/packages/select-rich/test/lion-select-rich-interaction.test.js @@ -1,5 +1,6 @@ import { Required } from '@lion/validate'; -import { expect, fixture, html, triggerBlurFor, triggerFocusFor } from '@open-wc/testing'; +import { expect, html, triggerBlurFor, triggerFocusFor } from '@open-wc/testing'; +import { formFixture as fixture } from '@lion/field/test-helpers.js'; import '../lion-option.js'; import '../lion-options.js'; diff --git a/packages/select-rich/test/lion-select-rich.test.js b/packages/select-rich/test/lion-select-rich.test.js index a8d33010b..274577688 100644 --- a/packages/select-rich/test/lion-select-rich.test.js +++ b/packages/select-rich/test/lion-select-rich.test.js @@ -1,15 +1,9 @@ import { LitElement } from '@lion/core'; import { OverlayController } from '@lion/overlays'; import { Required } from '@lion/validate'; -import { - aTimeout, - defineCE, - expect, - fixture, - html, - nextFrame, - unsafeStatic, -} from '@open-wc/testing'; +import { aTimeout, defineCE, expect, html, nextFrame, unsafeStatic } from '@open-wc/testing'; +import { formFixture as fixture } from '@lion/field/test-helpers.js'; + import { LionSelectRich } from '../index.js'; import '../lion-option.js'; import '../lion-options.js'; @@ -246,6 +240,7 @@ describe('lion-select-rich', () => { expect(el._invokerNode.selectedElement).dom.to.equal(options[1]); el.checkedIndex = 0; + await el.updateComplete; expect(el._invokerNode.selectedElement).dom.to.equal(options[0]); }); diff --git a/packages/select/src/LionSelect.js b/packages/select/src/LionSelect.js index 96708eddf..d1b7b18f4 100644 --- a/packages/select/src/LionSelect.js +++ b/packages/select/src/LionSelect.js @@ -32,16 +32,16 @@ import { LionField } from '@lion/field'; export class LionSelect extends LionField { connectedCallback() { super.connectedCallback(); - this.addEventListener('change', this._proxyChangeEvent); + this._inputNode.addEventListener('change', this._proxyChangeEvent); } disconnectedCallback() { super.disconnectedCallback(); - this.removeEventListener('change', this._proxyChangeEvent); + this._inputNode.removeEventListener('change', this._proxyChangeEvent); } _proxyChangeEvent() { - this._inputNode.dispatchEvent( + this.dispatchEvent( new CustomEvent('user-input-changed', { bubbles: true, composed: true, From f286e3ac28fe0b34284383344fda4dc8e9ea593d Mon Sep 17 00:00:00 2001 From: CircleCI Date: Thu, 19 Mar 2020 09:07:33 +0000 Subject: [PATCH 7/9] chore: release new versions - @lion/checkbox-group@0.8.5 - @lion/choice-input@0.7.7 - @lion/dialog@0.4.10 - @lion/field@0.11.4 - @lion/fieldset@0.9.4 - @lion/form-system@0.6.6 - @lion/form@0.4.19 - @lion/input-amount@0.5.19 - @lion/input-date@0.5.20 - @lion/input-datepicker@0.10.2 - @lion/input-email@0.6.4 - @lion/input-iban@0.6.4 - @lion/input-range@0.2.19 - @lion/input@0.5.19 - @lion/overlays@0.12.5 - @lion/radio-group@0.8.5 - @lion/select-rich@0.12.2 - @lion/select@0.5.19 - @lion/switch@0.7.2 - @lion/textarea@0.5.20 - @lion/tooltip@0.8.5 --- packages/checkbox-group/CHANGELOG.md | 8 +++++++ packages/checkbox-group/package.json | 8 +++---- packages/choice-input/CHANGELOG.md | 11 +++++++++ packages/choice-input/package.json | 8 +++---- packages/dialog/CHANGELOG.md | 8 +++++++ packages/dialog/package.json | 4 ++-- packages/field/CHANGELOG.md | 11 +++++++++ packages/field/package.json | 2 +- packages/fieldset/CHANGELOG.md | 11 +++++++++ packages/fieldset/package.json | 4 ++-- packages/form-system/CHANGELOG.md | 11 +++++++++ packages/form-system/package.json | 32 +++++++++++++------------- packages/form/CHANGELOG.md | 8 +++++++ packages/form/package.json | 6 ++--- packages/input-amount/CHANGELOG.md | 8 +++++++ packages/input-amount/package.json | 6 ++--- packages/input-date/CHANGELOG.md | 8 +++++++ packages/input-date/package.json | 6 ++--- packages/input-datepicker/CHANGELOG.md | 8 +++++++ packages/input-datepicker/package.json | 8 +++---- packages/input-email/CHANGELOG.md | 8 +++++++ packages/input-email/package.json | 6 ++--- packages/input-iban/CHANGELOG.md | 8 +++++++ packages/input-iban/package.json | 6 ++--- packages/input-range/CHANGELOG.md | 8 +++++++ packages/input-range/package.json | 6 ++--- packages/input/CHANGELOG.md | 8 +++++++ packages/input/package.json | 4 ++-- packages/overlays/CHANGELOG.md | 11 +++++++++ packages/overlays/package.json | 2 +- packages/radio-group/CHANGELOG.md | 8 +++++++ packages/radio-group/package.json | 8 +++---- packages/select-rich/CHANGELOG.md | 11 +++++++++ packages/select-rich/package.json | 10 ++++---- packages/select/CHANGELOG.md | 11 +++++++++ packages/select/package.json | 4 ++-- packages/switch/CHANGELOG.md | 8 +++++++ packages/switch/package.json | 6 ++--- packages/textarea/CHANGELOG.md | 8 +++++++ packages/textarea/package.json | 4 ++-- packages/tooltip/CHANGELOG.md | 8 +++++++ packages/tooltip/package.json | 4 ++-- 42 files changed, 261 insertions(+), 72 deletions(-) diff --git a/packages/checkbox-group/CHANGELOG.md b/packages/checkbox-group/CHANGELOG.md index cfc446813..9303d1047 100644 --- a/packages/checkbox-group/CHANGELOG.md +++ b/packages/checkbox-group/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.5](https://github.com/ing-bank/lion/compare/@lion/checkbox-group@0.8.4...@lion/checkbox-group@0.8.5) (2020-03-19) + +**Note:** Version bump only for package @lion/checkbox-group + + + + + ## [0.8.4](https://github.com/ing-bank/lion/compare/@lion/checkbox-group@0.8.3...@lion/checkbox-group@0.8.4) (2020-03-12) **Note:** Version bump only for package @lion/checkbox-group diff --git a/packages/checkbox-group/package.json b/packages/checkbox-group/package.json index f49b644ce..7b7fc475e 100644 --- a/packages/checkbox-group/package.json +++ b/packages/checkbox-group/package.json @@ -1,6 +1,6 @@ { "name": "@lion/checkbox-group", - "version": "0.8.4", + "version": "0.8.5", "description": "A container for multiple checkboxes", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,10 +34,10 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.6", + "@lion/choice-input": "0.7.7", "@lion/core": "0.4.5", - "@lion/fieldset": "0.9.3", - "@lion/input": "0.5.18" + "@lion/fieldset": "0.9.4", + "@lion/input": "0.5.19" }, "devDependencies": { "@lion/localize": "0.8.10", diff --git a/packages/choice-input/CHANGELOG.md b/packages/choice-input/CHANGELOG.md index c1f13bcf4..9f9e0a52a 100644 --- a/packages/choice-input/CHANGELOG.md +++ b/packages/choice-input/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.7.7](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.6...@lion/choice-input@0.7.7) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.7.6](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.5...@lion/choice-input@0.7.6) (2020-03-12) diff --git a/packages/choice-input/package.json b/packages/choice-input/package.json index 38be155fd..0b3a5be7f 100644 --- a/packages/choice-input/package.json +++ b/packages/choice-input/package.json @@ -1,6 +1,6 @@ { "name": "@lion/choice-input", - "version": "0.7.6", + "version": "0.7.7", "description": "Base for all choise inputs like checkbox/radio", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,11 +35,11 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3" + "@lion/field": "0.11.4" }, "devDependencies": { - "@lion/fieldset": "0.9.3", - "@lion/input": "0.5.18", + "@lion/fieldset": "0.9.4", + "@lion/input": "0.5.19", "@lion/validate": "0.8.0", "@open-wc/demoing-storybook": "^1.10.4", "@open-wc/testing": "^2.5.0", diff --git a/packages/dialog/CHANGELOG.md b/packages/dialog/CHANGELOG.md index f4543240d..26f72e570 100644 --- a/packages/dialog/CHANGELOG.md +++ b/packages/dialog/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.10](https://github.com/ing-bank/lion/compare/@lion/dialog@0.4.9...@lion/dialog@0.4.10) (2020-03-19) + +**Note:** Version bump only for package @lion/dialog + + + + + ## [0.4.9](https://github.com/ing-bank/lion/compare/@lion/dialog@0.4.8...@lion/dialog@0.4.9) (2020-03-11) **Note:** Version bump only for package @lion/dialog diff --git a/packages/dialog/package.json b/packages/dialog/package.json index 90b9f1fb9..b7e3c81b5 100644 --- a/packages/dialog/package.json +++ b/packages/dialog/package.json @@ -1,6 +1,6 @@ { "name": "@lion/dialog", - "version": "0.4.9", + "version": "0.4.10", "description": "Show relative overlay content on click, as a webcomponent", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -33,7 +33,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/overlays": "0.12.4" + "@lion/overlays": "0.12.5" }, "devDependencies": { "@open-wc/demoing-storybook": "^1.10.4", diff --git a/packages/field/CHANGELOG.md b/packages/field/CHANGELOG.md index 510239d07..1cbb19af2 100644 --- a/packages/field/CHANGELOG.md +++ b/packages/field/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.11.4](https://github.com/ing-bank/lion/compare/@lion/field@0.11.3...@lion/field@0.11.4) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.11.3](https://github.com/ing-bank/lion/compare/@lion/field@0.11.2...@lion/field@0.11.3) (2020-03-05) **Note:** Version bump only for package @lion/field diff --git a/packages/field/package.json b/packages/field/package.json index f7041ecc9..0cf8b3b81 100644 --- a/packages/field/package.json +++ b/packages/field/package.json @@ -1,6 +1,6 @@ { "name": "@lion/field", - "version": "0.11.3", + "version": "0.11.4", "description": "Fields are the most fundamental building block of the Form System", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", diff --git a/packages/fieldset/CHANGELOG.md b/packages/fieldset/CHANGELOG.md index 8a874c15a..a7048bb39 100644 --- a/packages/fieldset/CHANGELOG.md +++ b/packages/fieldset/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.9.4](https://github.com/ing-bank/lion/compare/@lion/fieldset@0.9.3...@lion/fieldset@0.9.4) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.9.3](https://github.com/ing-bank/lion/compare/@lion/fieldset@0.9.2...@lion/fieldset@0.9.3) (2020-03-05) **Note:** Version bump only for package @lion/fieldset diff --git a/packages/fieldset/package.json b/packages/fieldset/package.json index c9b646dc3..055615e6d 100644 --- a/packages/fieldset/package.json +++ b/packages/fieldset/package.json @@ -1,6 +1,6 @@ { "name": "@lion/fieldset", - "version": "0.9.3", + "version": "0.9.4", "description": "Allows to groups multiple input fields or other fieldsets together", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,7 +35,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", + "@lion/field": "0.11.4", "@lion/validate": "0.8.0" }, "devDependencies": { diff --git a/packages/form-system/CHANGELOG.md b/packages/form-system/CHANGELOG.md index c4435889b..501210a34 100644 --- a/packages/form-system/CHANGELOG.md +++ b/packages/form-system/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.6](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.5...@lion/form-system@0.6.6) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.6.5](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.4...@lion/form-system@0.6.5) (2020-03-12) **Note:** Version bump only for package @lion/form-system diff --git a/packages/form-system/package.json b/packages/form-system/package.json index 20e490013..fc2ed399d 100644 --- a/packages/form-system/package.json +++ b/packages/form-system/package.json @@ -1,6 +1,6 @@ { "name": "@lion/form-system", - "version": "0.6.5", + "version": "0.6.6", "description": "The Form System allows you to create complex forms with various validation in an easy way", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -33,23 +33,23 @@ "*.js" ], "devDependencies": { - "@lion/checkbox-group": "0.8.4", + "@lion/checkbox-group": "0.8.5", "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/fieldset": "0.9.3", - "@lion/form": "0.4.18", - "@lion/input": "0.5.18", - "@lion/input-amount": "0.5.18", - "@lion/input-date": "0.5.19", - "@lion/input-datepicker": "0.10.1", - "@lion/input-email": "0.6.3", - "@lion/input-iban": "0.6.3", - "@lion/input-range": "0.2.18", + "@lion/field": "0.11.4", + "@lion/fieldset": "0.9.4", + "@lion/form": "0.4.19", + "@lion/input": "0.5.19", + "@lion/input-amount": "0.5.19", + "@lion/input-date": "0.5.20", + "@lion/input-datepicker": "0.10.2", + "@lion/input-email": "0.6.4", + "@lion/input-iban": "0.6.4", + "@lion/input-range": "0.2.19", "@lion/localize": "0.8.10", - "@lion/radio-group": "0.8.4", - "@lion/select": "0.5.18", - "@lion/select-rich": "0.12.1", - "@lion/textarea": "0.5.19", + "@lion/radio-group": "0.8.5", + "@lion/select": "0.5.19", + "@lion/select-rich": "0.12.2", + "@lion/textarea": "0.5.20", "@lion/validate": "0.8.0", "@open-wc/demoing-storybook": "^1.10.4", "@open-wc/testing": "^2.5.0" diff --git a/packages/form/CHANGELOG.md b/packages/form/CHANGELOG.md index a2dbb14a6..55b26c7c1 100644 --- a/packages/form/CHANGELOG.md +++ b/packages/form/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.19](https://github.com/ing-bank/lion/compare/@lion/form@0.4.18...@lion/form@0.4.19) (2020-03-19) + +**Note:** Version bump only for package @lion/form + + + + + ## [0.4.18](https://github.com/ing-bank/lion/compare/@lion/form@0.4.17...@lion/form@0.4.18) (2020-03-05) **Note:** Version bump only for package @lion/form diff --git a/packages/form/package.json b/packages/form/package.json index 5f9343f87..6f4441c0f 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -1,6 +1,6 @@ { "name": "@lion/form", - "version": "0.4.18", + "version": "0.4.19", "description": "It enhances the functionality of the native `form` component. It is designed to interact with (instances of) form fields", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,10 +35,10 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/fieldset": "0.9.3" + "@lion/fieldset": "0.9.4" }, "devDependencies": { - "@lion/field": "0.11.3", + "@lion/field": "0.11.4", "@lion/validate": "0.8.0", "@open-wc/demoing-storybook": "^1.10.4", "@open-wc/testing": "^2.5.0", diff --git a/packages/input-amount/CHANGELOG.md b/packages/input-amount/CHANGELOG.md index 868f6110a..d06cdd8b6 100644 --- a/packages/input-amount/CHANGELOG.md +++ b/packages/input-amount/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.19](https://github.com/ing-bank/lion/compare/@lion/input-amount@0.5.18...@lion/input-amount@0.5.19) (2020-03-19) + +**Note:** Version bump only for package @lion/input-amount + + + + + ## [0.5.18](https://github.com/ing-bank/lion/compare/@lion/input-amount@0.5.17...@lion/input-amount@0.5.18) (2020-03-05) **Note:** Version bump only for package @lion/input-amount diff --git a/packages/input-amount/package.json b/packages/input-amount/package.json index c58a3f063..82767f84d 100644 --- a/packages/input-amount/package.json +++ b/packages/input-amount/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-amount", - "version": "0.5.18", + "version": "0.5.19", "description": "Provide a way for users to fill in an amount", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,8 +35,8 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input": "0.5.18", + "@lion/field": "0.11.4", + "@lion/input": "0.5.19", "@lion/localize": "0.8.10", "@lion/validate": "0.8.0" }, diff --git a/packages/input-date/CHANGELOG.md b/packages/input-date/CHANGELOG.md index c91cebfae..f4bc795b4 100644 --- a/packages/input-date/CHANGELOG.md +++ b/packages/input-date/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.20](https://github.com/ing-bank/lion/compare/@lion/input-date@0.5.19...@lion/input-date@0.5.20) (2020-03-19) + +**Note:** Version bump only for package @lion/input-date + + + + + ## [0.5.19](https://github.com/ing-bank/lion/compare/@lion/input-date@0.5.18...@lion/input-date@0.5.19) (2020-03-09) diff --git a/packages/input-date/package.json b/packages/input-date/package.json index dd8e8f550..b50ce0a51 100644 --- a/packages/input-date/package.json +++ b/packages/input-date/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-date", - "version": "0.5.19", + "version": "0.5.20", "description": "Provide a way for users to fill in a date", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,8 +35,8 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input": "0.5.18", + "@lion/field": "0.11.4", + "@lion/input": "0.5.19", "@lion/localize": "0.8.10", "@lion/validate": "0.8.0" }, diff --git a/packages/input-datepicker/CHANGELOG.md b/packages/input-datepicker/CHANGELOG.md index abbc184b3..56d6240bc 100644 --- a/packages/input-datepicker/CHANGELOG.md +++ b/packages/input-datepicker/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.10.2](https://github.com/ing-bank/lion/compare/@lion/input-datepicker@0.10.1...@lion/input-datepicker@0.10.2) (2020-03-19) + +**Note:** Version bump only for package @lion/input-datepicker + + + + + ## [0.10.1](https://github.com/ing-bank/lion/compare/@lion/input-datepicker@0.10.0...@lion/input-datepicker@0.10.1) (2020-03-09) **Note:** Version bump only for package @lion/input-datepicker diff --git a/packages/input-datepicker/package.json b/packages/input-datepicker/package.json index f4d6a8aaa..130828e07 100644 --- a/packages/input-datepicker/package.json +++ b/packages/input-datepicker/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-datepicker", - "version": "0.10.1", + "version": "0.10.2", "description": "Provide a way for users to fill in a date via a calendar overlay", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -40,10 +40,10 @@ "dependencies": { "@lion/calendar": "0.6.13", "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input-date": "0.5.19", + "@lion/field": "0.11.4", + "@lion/input-date": "0.5.20", "@lion/localize": "0.8.10", - "@lion/overlays": "0.12.4", + "@lion/overlays": "0.12.5", "@lion/validate": "0.8.0", "@open-wc/scoped-elements": "^0.5.0" }, diff --git a/packages/input-email/CHANGELOG.md b/packages/input-email/CHANGELOG.md index dca94e0a9..08345de01 100644 --- a/packages/input-email/CHANGELOG.md +++ b/packages/input-email/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.4](https://github.com/ing-bank/lion/compare/@lion/input-email@0.6.3...@lion/input-email@0.6.4) (2020-03-19) + +**Note:** Version bump only for package @lion/input-email + + + + + ## [0.6.3](https://github.com/ing-bank/lion/compare/@lion/input-email@0.6.2...@lion/input-email@0.6.3) (2020-03-05) **Note:** Version bump only for package @lion/input-email diff --git a/packages/input-email/package.json b/packages/input-email/package.json index fe6157072..92b9d5814 100644 --- a/packages/input-email/package.json +++ b/packages/input-email/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-email", - "version": "0.6.3", + "version": "0.6.4", "description": "Provide a way for users to fill in an email", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,8 +35,8 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input": "0.5.18", + "@lion/field": "0.11.4", + "@lion/input": "0.5.19", "@lion/localize": "0.8.10", "@lion/validate": "0.8.0" }, diff --git a/packages/input-iban/CHANGELOG.md b/packages/input-iban/CHANGELOG.md index 4ca21ad60..b6214f99b 100644 --- a/packages/input-iban/CHANGELOG.md +++ b/packages/input-iban/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.4](https://github.com/ing-bank/lion/compare/@lion/input-iban@0.6.3...@lion/input-iban@0.6.4) (2020-03-19) + +**Note:** Version bump only for package @lion/input-iban + + + + + ## [0.6.3](https://github.com/ing-bank/lion/compare/@lion/input-iban@0.6.2...@lion/input-iban@0.6.3) (2020-03-05) **Note:** Version bump only for package @lion/input-iban diff --git a/packages/input-iban/package.json b/packages/input-iban/package.json index 79e6b028e..090722fbd 100644 --- a/packages/input-iban/package.json +++ b/packages/input-iban/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-iban", - "version": "0.6.3", + "version": "0.6.4", "description": "Provide a way for users to fill in an iban", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,8 +35,8 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input": "0.5.18", + "@lion/field": "0.11.4", + "@lion/input": "0.5.19", "@lion/localize": "0.8.10", "@lion/validate": "0.8.0", "ibantools": "^2.2.0" diff --git a/packages/input-range/CHANGELOG.md b/packages/input-range/CHANGELOG.md index 0aba51f66..8b3b4d263 100644 --- a/packages/input-range/CHANGELOG.md +++ b/packages/input-range/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.19](https://github.com/ing-bank/lion/compare/@lion/input-range@0.2.18...@lion/input-range@0.2.19) (2020-03-19) + +**Note:** Version bump only for package @lion/input-range + + + + + ## [0.2.18](https://github.com/ing-bank/lion/compare/@lion/input-range@0.2.17...@lion/input-range@0.2.18) (2020-03-05) **Note:** Version bump only for package @lion/input-range diff --git a/packages/input-range/package.json b/packages/input-range/package.json index fe4fc51a5..8501424d5 100644 --- a/packages/input-range/package.json +++ b/packages/input-range/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input-range", - "version": "0.2.18", + "version": "0.2.19", "description": "Provide a way for users to select one value from a range of values", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,8 +34,8 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/input": "0.5.18", + "@lion/field": "0.11.4", + "@lion/input": "0.5.19", "@lion/localize": "0.8.10" }, "devDependencies": { diff --git a/packages/input/CHANGELOG.md b/packages/input/CHANGELOG.md index e4ed05866..badcdf5e7 100644 --- a/packages/input/CHANGELOG.md +++ b/packages/input/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.19](https://github.com/ing-bank/lion/compare/@lion/input@0.5.18...@lion/input@0.5.19) (2020-03-19) + +**Note:** Version bump only for package @lion/input + + + + + ## [0.5.18](https://github.com/ing-bank/lion/compare/@lion/input@0.5.17...@lion/input@0.5.18) (2020-03-05) **Note:** Version bump only for package @lion/input diff --git a/packages/input/package.json b/packages/input/package.json index 48e2e2a28..10d993641 100644 --- a/packages/input/package.json +++ b/packages/input/package.json @@ -1,6 +1,6 @@ { "name": "@lion/input", - "version": "0.5.18", + "version": "0.5.19", "description": "It enhances the functionality of the native `` element", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,7 +35,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3" + "@lion/field": "0.11.4" }, "devDependencies": { "@lion/localize": "0.8.10", diff --git a/packages/overlays/CHANGELOG.md b/packages/overlays/CHANGELOG.md index 0e446e352..71c1e976e 100644 --- a/packages/overlays/CHANGELOG.md +++ b/packages/overlays/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.5](https://github.com/ing-bank/lion/compare/@lion/overlays@0.12.4...@lion/overlays@0.12.5) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.12.4](https://github.com/ing-bank/lion/compare/@lion/overlays@0.12.3...@lion/overlays@0.12.4) (2020-03-05) **Note:** Version bump only for package @lion/overlays diff --git a/packages/overlays/package.json b/packages/overlays/package.json index c252db8e6..191fb1fc2 100644 --- a/packages/overlays/package.json +++ b/packages/overlays/package.json @@ -1,6 +1,6 @@ { "name": "@lion/overlays", - "version": "0.12.4", + "version": "0.12.5", "description": "Overlays System using lit-html for rendering", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", diff --git a/packages/radio-group/CHANGELOG.md b/packages/radio-group/CHANGELOG.md index 9e8ae98ad..d0baf70c7 100644 --- a/packages/radio-group/CHANGELOG.md +++ b/packages/radio-group/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.5](https://github.com/ing-bank/lion/compare/@lion/radio-group@0.8.4...@lion/radio-group@0.8.5) (2020-03-19) + +**Note:** Version bump only for package @lion/radio-group + + + + + ## [0.8.4](https://github.com/ing-bank/lion/compare/@lion/radio-group@0.8.3...@lion/radio-group@0.8.4) (2020-03-12) **Note:** Version bump only for package @lion/radio-group diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 6cb90394d..1f431ba5f 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -1,6 +1,6 @@ { "name": "@lion/radio-group", - "version": "0.8.4", + "version": "0.8.5", "description": "Manage a group of choices", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,10 +34,10 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.6", + "@lion/choice-input": "0.7.7", "@lion/core": "0.4.5", - "@lion/fieldset": "0.9.3", - "@lion/input": "0.5.18" + "@lion/fieldset": "0.9.4", + "@lion/input": "0.5.19" }, "devDependencies": { "@lion/validate": "0.8.0", diff --git a/packages/select-rich/CHANGELOG.md b/packages/select-rich/CHANGELOG.md index 0ee1e57da..cc14964dc 100644 --- a/packages/select-rich/CHANGELOG.md +++ b/packages/select-rich/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.2](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.12.1...@lion/select-rich@0.12.2) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.12.1](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.12.0...@lion/select-rich@0.12.1) (2020-03-12) **Note:** Version bump only for package @lion/select-rich diff --git a/packages/select-rich/package.json b/packages/select-rich/package.json index fabe806f2..17b88f4fa 100644 --- a/packages/select-rich/package.json +++ b/packages/select-rich/package.json @@ -1,6 +1,6 @@ { "name": "@lion/select-rich", - "version": "0.12.1", + "version": "0.12.2", "description": "Provides a select with options that can contain html", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -39,14 +39,14 @@ ], "dependencies": { "@lion/button": "0.5.9", - "@lion/choice-input": "0.7.6", + "@lion/choice-input": "0.7.7", "@lion/core": "0.4.5", - "@lion/field": "0.11.3", - "@lion/overlays": "0.12.4", + "@lion/field": "0.11.4", + "@lion/overlays": "0.12.5", "@lion/validate": "0.8.0" }, "devDependencies": { - "@lion/form": "0.4.18", + "@lion/form": "0.4.19", "@open-wc/demoing-storybook": "^1.10.4", "@open-wc/testing": "^2.5.0", "sinon": "^7.2.2" diff --git a/packages/select/CHANGELOG.md b/packages/select/CHANGELOG.md index 7290d21fa..a230940f9 100644 --- a/packages/select/CHANGELOG.md +++ b/packages/select/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.19](https://github.com/ing-bank/lion/compare/@lion/select@0.5.18...@lion/select@0.5.19) (2020-03-19) + + +### Bug Fixes + +* normalization model-value-changed events ([1b6c3a4](https://github.com/ing-bank/lion/commit/1b6c3a44c820b9d61c26849b91bbb1bc8d6c772b)) + + + + + ## [0.5.18](https://github.com/ing-bank/lion/compare/@lion/select@0.5.17...@lion/select@0.5.18) (2020-03-05) **Note:** Version bump only for package @lion/select diff --git a/packages/select/package.json b/packages/select/package.json index e8b2912bc..db08aff7b 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -1,6 +1,6 @@ { "name": "@lion/select", - "version": "0.5.18", + "version": "0.5.19", "description": "Provide a set of options where you can select one", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,7 +35,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3" + "@lion/field": "0.11.4" }, "devDependencies": { "@lion/validate": "0.8.0", diff --git a/packages/switch/CHANGELOG.md b/packages/switch/CHANGELOG.md index 224f510d5..240bf8519 100644 --- a/packages/switch/CHANGELOG.md +++ b/packages/switch/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.7.2](https://github.com/ing-bank/lion/compare/@lion/switch@0.7.1...@lion/switch@0.7.2) (2020-03-19) + +**Note:** Version bump only for package @lion/switch + + + + + ## [0.7.1](https://github.com/ing-bank/lion/compare/@lion/switch@0.7.0...@lion/switch@0.7.1) (2020-03-12) **Note:** Version bump only for package @lion/switch diff --git a/packages/switch/package.json b/packages/switch/package.json index cdfc2967c..561cacccf 100644 --- a/packages/switch/package.json +++ b/packages/switch/package.json @@ -1,6 +1,6 @@ { "name": "@lion/switch", - "version": "0.7.1", + "version": "0.7.2", "description": "A Switch is used for switching a property or feature on and off", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -34,9 +34,9 @@ "*.js" ], "dependencies": { - "@lion/choice-input": "0.7.6", + "@lion/choice-input": "0.7.7", "@lion/core": "0.4.5", - "@lion/field": "0.11.3" + "@lion/field": "0.11.4" }, "devDependencies": { "@lion/helpers": "0.3.3", diff --git a/packages/textarea/CHANGELOG.md b/packages/textarea/CHANGELOG.md index 4ecfa781f..5d48e1054 100644 --- a/packages/textarea/CHANGELOG.md +++ b/packages/textarea/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.20](https://github.com/ing-bank/lion/compare/@lion/textarea@0.5.19...@lion/textarea@0.5.20) (2020-03-19) + +**Note:** Version bump only for package @lion/textarea + + + + + ## [0.5.19](https://github.com/ing-bank/lion/compare/@lion/textarea@0.5.18...@lion/textarea@0.5.19) (2020-03-05) **Note:** Version bump only for package @lion/textarea diff --git a/packages/textarea/package.json b/packages/textarea/package.json index fd3811a4f..4e5d09b23 100644 --- a/packages/textarea/package.json +++ b/packages/textarea/package.json @@ -1,6 +1,6 @@ { "name": "@lion/textarea", - "version": "0.5.19", + "version": "0.5.20", "description": "Provide a way for users to write text that is multiple lines long", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,7 +35,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/field": "0.11.3", + "@lion/field": "0.11.4", "autosize": "4.0.2" }, "devDependencies": { diff --git a/packages/tooltip/CHANGELOG.md b/packages/tooltip/CHANGELOG.md index 6d1427d0d..2e8f09fb7 100644 --- a/packages/tooltip/CHANGELOG.md +++ b/packages/tooltip/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.8.5](https://github.com/ing-bank/lion/compare/@lion/tooltip@0.8.4...@lion/tooltip@0.8.5) (2020-03-19) + +**Note:** Version bump only for package @lion/tooltip + + + + + ## [0.8.4](https://github.com/ing-bank/lion/compare/@lion/tooltip@0.8.3...@lion/tooltip@0.8.4) (2020-03-05) **Note:** Version bump only for package @lion/tooltip diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index d989e7ddb..0a60acb09 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -1,6 +1,6 @@ { "name": "@lion/tooltip", - "version": "0.8.4", + "version": "0.8.5", "description": "Show relative overlay content on hover", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -35,7 +35,7 @@ ], "dependencies": { "@lion/core": "0.4.5", - "@lion/overlays": "0.12.4" + "@lion/overlays": "0.12.5" }, "devDependencies": { "@open-wc/demoing-storybook": "^1.10.4", From 9cd0ed364fd440353c0b4a94bb1e5001ea9415c0 Mon Sep 17 00:00:00 2001 From: Wessel Loth Date: Thu, 19 Mar 2020 10:25:40 +0100 Subject: [PATCH 8/9] fix(form): remove correct reset event listener on teardown --- packages/form/src/LionForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/form/src/LionForm.js b/packages/form/src/LionForm.js index 257716533..9080972c6 100644 --- a/packages/form/src/LionForm.js +++ b/packages/form/src/LionForm.js @@ -57,6 +57,6 @@ export class LionForm extends LionFieldset { __teardownEventsForLionForm() { this._formNode.removeEventListener('submit', this._submit); - this._formNode.removeEventListener('rest', this._reset); + this._formNode.removeEventListener('reset', this._reset); } } From 3d88c58510319178ca6ac3835a44b5d5bfc9e847 Mon Sep 17 00:00:00 2001 From: CircleCI Date: Thu, 19 Mar 2020 10:39:16 +0000 Subject: [PATCH 9/9] chore: release new versions - @lion/form-system@0.6.7 - @lion/form@0.4.20 - @lion/select-rich@0.12.3 --- packages/form-system/CHANGELOG.md | 8 ++++++++ packages/form-system/package.json | 6 +++--- packages/form/CHANGELOG.md | 11 +++++++++++ packages/form/package.json | 2 +- packages/select-rich/CHANGELOG.md | 8 ++++++++ packages/select-rich/package.json | 4 ++-- 6 files changed, 33 insertions(+), 6 deletions(-) diff --git a/packages/form-system/CHANGELOG.md b/packages/form-system/CHANGELOG.md index 501210a34..0dfabed09 100644 --- a/packages/form-system/CHANGELOG.md +++ b/packages/form-system/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.6.7](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.6...@lion/form-system@0.6.7) (2020-03-19) + +**Note:** Version bump only for package @lion/form-system + + + + + ## [0.6.6](https://github.com/ing-bank/lion/compare/@lion/form-system@0.6.5...@lion/form-system@0.6.6) (2020-03-19) diff --git a/packages/form-system/package.json b/packages/form-system/package.json index fc2ed399d..083a6523f 100644 --- a/packages/form-system/package.json +++ b/packages/form-system/package.json @@ -1,6 +1,6 @@ { "name": "@lion/form-system", - "version": "0.6.6", + "version": "0.6.7", "description": "The Form System allows you to create complex forms with various validation in an easy way", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -37,7 +37,7 @@ "@lion/core": "0.4.5", "@lion/field": "0.11.4", "@lion/fieldset": "0.9.4", - "@lion/form": "0.4.19", + "@lion/form": "0.4.20", "@lion/input": "0.5.19", "@lion/input-amount": "0.5.19", "@lion/input-date": "0.5.20", @@ -48,7 +48,7 @@ "@lion/localize": "0.8.10", "@lion/radio-group": "0.8.5", "@lion/select": "0.5.19", - "@lion/select-rich": "0.12.2", + "@lion/select-rich": "0.12.3", "@lion/textarea": "0.5.20", "@lion/validate": "0.8.0", "@open-wc/demoing-storybook": "^1.10.4", diff --git a/packages/form/CHANGELOG.md b/packages/form/CHANGELOG.md index 55b26c7c1..21662696a 100644 --- a/packages/form/CHANGELOG.md +++ b/packages/form/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.4.20](https://github.com/ing-bank/lion/compare/@lion/form@0.4.19...@lion/form@0.4.20) (2020-03-19) + + +### Bug Fixes + +* **form:** remove correct reset event listener on teardown ([9cd0ed3](https://github.com/ing-bank/lion/commit/9cd0ed364fd440353c0b4a94bb1e5001ea9415c0)) + + + + + ## [0.4.19](https://github.com/ing-bank/lion/compare/@lion/form@0.4.18...@lion/form@0.4.19) (2020-03-19) **Note:** Version bump only for package @lion/form diff --git a/packages/form/package.json b/packages/form/package.json index 6f4441c0f..9bcfae971 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -1,6 +1,6 @@ { "name": "@lion/form", - "version": "0.4.19", + "version": "0.4.20", "description": "It enhances the functionality of the native `form` component. It is designed to interact with (instances of) form fields", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", diff --git a/packages/select-rich/CHANGELOG.md b/packages/select-rich/CHANGELOG.md index cc14964dc..b372def0b 100644 --- a/packages/select-rich/CHANGELOG.md +++ b/packages/select-rich/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.12.3](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.12.2...@lion/select-rich@0.12.3) (2020-03-19) + +**Note:** Version bump only for package @lion/select-rich + + + + + ## [0.12.2](https://github.com/ing-bank/lion/compare/@lion/select-rich@0.12.1...@lion/select-rich@0.12.2) (2020-03-19) diff --git a/packages/select-rich/package.json b/packages/select-rich/package.json index 17b88f4fa..a05ddd691 100644 --- a/packages/select-rich/package.json +++ b/packages/select-rich/package.json @@ -1,6 +1,6 @@ { "name": "@lion/select-rich", - "version": "0.12.2", + "version": "0.12.3", "description": "Provides a select with options that can contain html", "author": "ing-bank", "homepage": "https://github.com/ing-bank/lion/", @@ -46,7 +46,7 @@ "@lion/validate": "0.8.0" }, "devDependencies": { - "@lion/form": "0.4.19", + "@lion/form": "0.4.20", "@open-wc/demoing-storybook": "^1.10.4", "@open-wc/testing": "^2.5.0", "sinon": "^7.2.2"