ng-select2-component 17.3.1 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog of ng-select2
2
2
 
3
+ ## V18.0.0 (2026-06-12)
4
+
5
+ - update to **Angular 22**
6
+ - use `inject()` and remove unnecessary params
7
+ - move `@HostBinding` & `@HostListener` to `host`
8
+ - refactor: replace `ngx-infinite-scroll` with native scroll listener
9
+ - Remove `ngx-infinite-scroll` dependency from `package.json` and library `package.json`
10
+ - Replace `InfiniteScrollDirective` with fromEvent-based native scroll listener
11
+
12
+ ## V17.3.2 (2026-05-24)
13
+
14
+ - feat: add Cyrillic, Greek Arabic and Hebrew for searches and highlight.
15
+ - feat: add `direction` (`rtl` & `ltr`) for options & groups
16
+
3
17
  ## V17.3.1 (2026-05-21)
4
18
 
5
19
  - feat: searches done in Japanese (e.g. はハばバぱパ are considered the same character)
package/README.md CHANGED
@@ -13,28 +13,26 @@ npm i ng-select2-component --save
13
13
  ## Requirements
14
14
 
15
15
  - peerDependencies:
16
- - `angular` `^18.1.0` to `^21.0.0`
17
- - `angular/cdk` `^18.1.0` to `^21.0.0`
18
-
19
- - dependencies (include):
20
- - `ngx-infinite-scroll` `^19.0.0` to `^21.0.0`
16
+ - `angular` `^22.0.0`
17
+ - `angular/cdk` `^22.0.0`
21
18
 
22
19
  ### Notes
23
20
 
24
- | Version | For **Angular** | Notes |
25
- | -------------------- | ---------------- | ----------------- |
26
- | `17.2.11` / `17.3.0` | 18.1, 19, 20, 21 | Ivy / Stand-alone |
27
- | `17.1.0` | 19 | Ivy / Stand-alone |
28
- | `16.0.0` | 19 | Ivy / Module |
29
- | `15.4.0` | 18 | Ivy |
30
- | `14.0.1` | 17 | Ivy |
31
- | `13.0.12` | 16.1 | Ivy |
32
- | `12.1.0` | 16 | Ivy |
33
- | `11.1.0` | 15 | Ivy |
34
- | `10.0.0` | 14 | Ivy |
35
- | `9.0.0` | 13 | Ivy |
36
- | `8.1.0` | 10, 11 and 12 | View Engine |
37
- | `7.3.1` | 7, 8 and 9 | View Engine |
21
+ | Version | For **Angular** | Notes |
22
+ | --------- | ---------------- | ----------------------------------------------------------- |
23
+ | `18.0.0` | 22 | Ivy / Stand-alone, native scroll (no `ngx-infinite-scroll`) |
24
+ | `17.3.2` | 18.1, 19, 20, 21 | Ivy / Stand-alone |
25
+ | `17.1.0` | 19 | Ivy / Stand-alone |
26
+ | `16.0.0` | 19 | Ivy / Module |
27
+ | `15.4.0` | 18 | Ivy |
28
+ | `14.0.1` | 17 | Ivy |
29
+ | `13.0.12` | 16.1 | Ivy |
30
+ | `12.1.0` | 16 | Ivy |
31
+ | `11.1.0` | 15 | Ivy |
32
+ | `10.0.0` | 14 | Ivy |
33
+ | `9.0.0` | 13 | Ivy |
34
+ | `8.1.0` | 10, 11 and 12 | View Engine |
35
+ | `7.3.1` | 7, 8 and 9 | View Engine |
38
36
 
39
37
  ## Demo
40
38
 
@@ -125,9 +123,9 @@ or
125
123
  | `maxResultsMessage` | `string` | `'Too much result…'` | message when maximum result | |
126
124
  | `grid` | `number` or `string` | | option by line in grid layout (empty or `0` = no grid layout)<br>`number`: item by line<br>`string`: minimal item width | |
127
125
  | `listPosition` | `'below'`<br>`'above'`<br>`'auto'` ¹ | `'below'` | the position for the dropdown list | ¹ `'auto'`: only with `overlay` |
128
- | `infiniteScroll` | `boolean` | `false` | active infiniteScroll on dropdown list | with `ngx-infinite-scroll` |
129
- | `infiniteScrollDistance` | `number` | `1.5` | infiniteScroll distance | with `ngx-infinite-scroll` |
130
- | `infiniteScrollThrottle` | `number` | `150` | infiniteScroll throttle | |
126
+ | `infiniteScroll` | `boolean` | `false` | enable infinite scroll on the dropdown list | |
127
+ | `infiniteScrollDistance` | `number` | `1.5` | scroll threshold as a fraction of the list height (e.g. `1.5` = bottom 15%) | |
128
+ | `infiniteScrollThrottle` | `number` | `150` | debounce time in ms between scroll event emissions | |
131
129
  | `overlay` | `boolean` | `false` | active an overlay mode for dropdown list (with angular cdk). (See [Overlay](#overlay)) | |
132
130
  | `styleMode` | `'default'`<br>`'material'`<br>`'noStyle'`<br>`'borderless'` | `'default'` | change style for material style or remove border and background color | |
133
131
  | `templates` | [`Select2Template`](#select2-data-structure)<br>(see ”possible object” in [Templating](#templating)) | | use templates for formatting content (see [Templating](#templating)) | |
@@ -148,7 +146,7 @@ or
148
146
  | `(focus)` | `(event: Select2) => void` | | triggered when user enters the component | |
149
147
  | `(blur)` | `(event: Select2) => void` | | triggered when user leaves the component | |
150
148
  | `(search)` | `(event: `[`Select2SearchEvent`](#select2-data-structure)`) => void` | | triggered when search text changed | with `customSearchEnabled` |
151
- | `(scroll)` | `(event: `[`Select2ScrollEvent`](#select2-data-structure)`) => void` | | triggered when infiniteScroll is on `up` or `down` position | with `ngx-infinite-scroll` |
149
+ | `(scroll)` | `(event: `[`Select2ScrollEvent`](#select2-data-structure)`) => void` | | triggered when infinite scroll reaches the `up` or `down` threshold | |
152
150
  | `(removeOption)` | `(event: `[`Select2RemoveEvent`](#select2-data-structure)`) => void` | | triggered when an option is removed from the list of selected options options list | with `multiple` |
153
151
  | `(autoCreateItem)` | `(event: `[`Select2AutoCreateEvent`](#select2-data-structure)`) => void` | | triggered when a new item has been added | with `autoCreate` |
154
152
 
@@ -166,6 +164,8 @@ export interface Select2Group {
166
164
  templateId?: string;
167
165
  /** template data */
168
166
  data?: any;
167
+ /** force left to right or right to left */
168
+ dir?: 'ltr' | 'rtl';
169
169
  }
170
170
 
171
171
  export interface Select2Option {
@@ -187,6 +187,8 @@ export interface Select2Option {
187
187
  data?: any;
188
188
  /** hide this option */
189
189
  hide?: boolean;
190
+ /** force left to right or right to left */
191
+ dir?: 'ltr' | 'rtl';
190
192
  }
191
193
 
192
194
  export type Select2Value = string | number | boolean | object | null | undefined;