diff --git a/.changeset/four-wolves-do.md b/.changeset/four-wolves-do.md deleted file mode 100644 index e7d11dc36..000000000 --- a/.changeset/four-wolves-do.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -'@lion/ui': patch ---- - -Side-effect-free alternative for `localize` (the globally shared instance of LocalizeManager). -When this function is imported, no side-effect happened yet, i.e. no global instance was registered yet. -The side effect-free approach generates: - -- smaller, optimized bundles -- a predictable loading order, that allows for: - - deduping strategies when multiple instances of the localizeManager are on a page - - providing a customized extension of LocalizeManager - -Also see: https://github.com/ing-bank/lion/discussions/1861 - -Use it like this: - -```js -function myFunction() { - // note that 'localizeManager' is the same as former 'localize' - const localizeManager = getLocalizeManger(); - // ... -} -``` - -In a class, we advise a shared instance: - -```js -class MyClass { - constructor() { - this._localizeManager = getLocalizeManger(); - } - // ... -} -``` - -Make sure to always call this method inside a function or class (otherwise side effects are created) - -Do you want to register your own LocalizeManager? -Make sure it's registered before anyone called `getLocalizeManager()` - -```js -import { singletonManager } from 'singleton-manager'; -import { getLocalizeManger } from '@lion/ui/localize-no-side-effects.js'; - -// First register your own LocalizeManager (for deduping or other reasons) -singletonManager.set('lion/ui::localize::0.x', class MyLocalizeManager extends LocalizeManager {}); - -// Now, all your code gets the right instance -export function myFn() { - const localizeManager = getLocalizeManager(); - // ... -} - -export class myClass() { - constructor() { - this._localizeManager = getLocalizeManager(); - // ... - } -} -``` diff --git a/.changeset/seven-hotels-reflect.md b/.changeset/seven-hotels-reflect.md deleted file mode 100644 index be6d56e3e..000000000 --- a/.changeset/seven-hotels-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@lion/ui': patch ---- - -[localize] parse negative numbers diff --git a/.changeset/violet-ducks-suffer.md b/.changeset/violet-ducks-suffer.md deleted file mode 100644 index d82dabf31..000000000 --- a/.changeset/violet-ducks-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@lion/ui': patch ---- - -lion-select: added test to assert that modelValue of lion-select is updated when the value or text of one or more options are changed diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index d026b25c2..28fe89b84 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,70 @@ # @lion/ui +## 0.1.1 + +### Patch Changes + +- cee40e55: Side-effect-free alternative for `localize` (the globally shared instance of LocalizeManager). + When this function is imported, no side-effect happened yet, i.e. no global instance was registered yet. + The side effect-free approach generates: + + - smaller, optimized bundles + - a predictable loading order, that allows for: + - deduping strategies when multiple instances of the localizeManager are on a page + - providing a customized extension of LocalizeManager + + Also see: https://github.com/ing-bank/lion/discussions/1861 + + Use it like this: + + ```js + function myFunction() { + // note that 'localizeManager' is the same as former 'localize' + const localizeManager = getLocalizeManger(); + // ... + } + ``` + + In a class, we advise a shared instance: + + ```js + class MyClass { + constructor() { + this._localizeManager = getLocalizeManger(); + } + // ... + } + ``` + + Make sure to always call this method inside a function or class (otherwise side effects are created) + + Do you want to register your own LocalizeManager? + Make sure it's registered before anyone called `getLocalizeManager()` + + ```js + import { singletonManager } from 'singleton-manager'; + import { getLocalizeManger } from '@lion/ui/localize-no-side-effects.js'; + + // First register your own LocalizeManager (for deduping or other reasons) + singletonManager.set('lion/ui::localize::0.x', class MyLocalizeManager extends LocalizeManager {}); + + // Now, all your code gets the right instance + export function myFn() { + const localizeManager = getLocalizeManager(); + // ... + } + + export class myClass() { + constructor() { + this._localizeManager = getLocalizeManager(); + // ... + } + } + ``` + +- 0efce8e1: [localize] parse negative numbers +- a47a6e61: lion-select: added test to assert that modelValue of lion-select is updated when the value or text of one or more options are changed + ## 0.1.0 ### Minor Changes diff --git a/packages/ui/package.json b/packages/ui/package.json index 778736c6b..6b59c5774 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@lion/ui", - "version": "0.1.0", + "version": "0.1.1", "description": "A package of extendable web components", "license": "MIT", "author": "ing-bank",