You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-17Lines changed: 43 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,29 +140,59 @@ with this code in place, we can now use the following CSP meta tag (which is wha
140
140
> [!NOTE]
141
141
> in our demo we are only adding `unsafe-inline` simply because we are using Vite (which is not CSP compliant in Dev mode), but the library should work nonetheless without `unsafe-inline`.
142
142
143
+
## Major Changes
144
+
145
+
### version 3.0
146
+
- remove deprecated options
147
+
- new Modern Look by using SVG icons
148
+
149
+
### version 4.0
150
+
- build ESM-Only and drop CJS (CommonJS) build (aka `require()`)
151
+
152
+
### version 5.0
153
+
154
+
Locale management has been refactored to remove usage of the global `window` object. Locales are now provided via a modular registry and injected through options. This change affects how you load, switch, and reference locales. Also, the `multiple-select-` prefix has been removed from all locale import paths (single and merged) and no longer exists on the `window` object
155
+
156
+
**Migration Example:**
157
+
158
+
```diff
159
+
// 1. load every locale individually, it could be import in 2 ways (named import OR import on window object)
See the [Example09](https://ghiscoding.github.io/multiple-select-vanilla/#/example09) for details on dynamic locale loading.
178
+
143
179
### Installation / Structure
144
180
145
-
There are multiple ways to install and use the library, you can see below the folder structure of the distribution files
146
-
1. `dist/browser`: Standalone build which assigns `multipleSelect` on the `window.multipleSelect` object
147
-
- browser standalone means that you can simply load it with `<script></script>` and then `multipleSelect('#mySelect')`
148
-
- only ESM build (`.js`) are provided, you will need to load it with `<scripttype="module">`
149
-
2. `esm`: to use as ESM with `importfrom'multiple-select-vanilla'`
181
+
The library is now ESM Only, the library does include optional locales that can be loaded through imports or you can use and define your own custom texts as well. Here's the full library structure of the project
- build ESM-Only and drop CJS (CommonJS) build (aka `require()`)
69
+
70
+
### version 5.0
71
+
72
+
Locale management has been refactored to remove usage of the global `window` object. Locales are now provided via a modular registry and injected through options. This change affects how you load, switch, and reference locales. Also, the `multiple-select-` prefix has been removed from all locale import paths (single and merged) and no longer exists on the `window` object
73
+
74
+
**Migration Example:**
75
+
76
+
```diff
77
+
// 1. load every locale individually, it could be import in 2 ways (named import OR import on window object)
78
+
- // named import
79
+
- import { Spanish } from 'multiple-select-vanilla/dist/locales/multiple-select-es-ES.js';
0 commit comments