ng-select2-component 16.0.0 → 17.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/README.md CHANGED
@@ -12,26 +12,30 @@ npm i ng-select2-component --save
12
12
 
13
13
  ## Requirements
14
14
 
15
- - peerDependencies:
16
-
17
- - `angular` 19.0.0 and more
18
- - `angular/cdk` 19.0.0 and more
19
-
20
- - dependencies (include):
21
- - `ngx-infinite-scroll` 19.0.0 and more
22
-
23
- > **Note:**<br>
24
- >
25
- > - For `angular` 7, 8 and 9 (View Engine): use version `7.3.1`.
26
- > - For `angular` 10, 11 and 12 (View Engine): use version `8.1.0`.
27
- > - For `angular` 13 (Ivy): use version `9.0.0`.
28
- > - For `angular` 14 (Ivy): use version `10.0.0`.
29
- > - For `angular` 15 (Ivy): use version `11.1.0`.
30
- > - For `angular` 16 (Ivy): use version `12.1.0`.
31
- > - For `angular` 16.1 (Ivy): use version `13.0.12`.
32
- > - For `angular` 17 (Ivy): use version `14.0.1`.
33
- > - For `angular` 18 (Ivy): use version `15.3.0`.
34
- > - For `angular` 19 and more (Ivy): use version `16.0.0`.
15
+ - peerDependencies:
16
+
17
+ - `angular` 19.0.0 and more
18
+ - `angular/cdk` 19.0.0 and more
19
+
20
+ - dependencies (include):
21
+
22
+ - `ngx-infinite-scroll` 19.0.0 and more
23
+
24
+ ### Notes
25
+
26
+ | Version  | For **Angular** | Notes |
27
+ | --------- | --------------- | ----------------- |
28
+ | `7.3.1` | 7, 8 and 9 | View Engine |
29
+ | `8.1.0` | 10, 11 and 12 | View Engine |
30
+ | `9.0.0` | 13 | Ivy |
31
+ | `10.0.0` | 14 | Ivy |
32
+ | `11.1.0` | 15 | Ivy |
33
+ | `12.1.0` | 16 | Ivy |
34
+ | `13.0.12` | 16.1 | Ivy |
35
+ | `14.0.1` | 17 | Ivy |
36
+ | `15.3.0` | 18 | Ivy |
37
+ | `16.0.0` | 19 | Ivy / Module |
38
+ | `17.0.0` | 19 and more | Ivy / Stand-alone |
35
39
 
36
40
  ## Demo
37
41
 
@@ -39,34 +43,37 @@ npm i ng-select2-component --save
39
43
 
40
44
  ## Features
41
45
 
42
- - select one
43
- - options or groups (list or grid)
44
- - scroll
45
- - local search
46
- - select by keyboard
47
- - disabled option
48
- - disabled component
49
- - hide search box
50
- - placeholder
51
- - multiple selection
52
- - add items not found in multiple
53
- - material style
54
- - form binding
55
- - templating
46
+ - select one
47
+ - options or groups (list or grid)
48
+ - scroll
49
+ - local search
50
+ - select by keyboard
51
+ - disabled option
52
+ - disabled component
53
+ - hide search box
54
+ - placeholder
55
+ - multiple selection
56
+ - add items not found in multiple
57
+ - material style
58
+ - form binding
59
+ - templating
56
60
 
57
61
  ## Usage
58
62
 
59
63
  ### example
60
64
 
61
65
  ```ts
62
- import { Select2Module } from 'ng-select2-component';
66
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
67
+
68
+ import { Select2, Select2Hint, Select2Label } from 'ng-select2-component';
63
69
 
64
- @NgModule({
65
- imports: [BrowserModule, FormsModule, Select2Module],
66
- declarations: [MainComponent],
67
- bootstrap: [MainComponent],
70
+ @Component({
71
+ selector: 'my-component',
72
+ templateUrl: './my-component.component.html',
73
+ styleUrls: ['./my-component.component.scss'],
74
+ imports: [FormsModule, ReactiveFormsModule, Select2, Select2Hint, Select2Label],
68
75
  })
69
- class MainModule {}
76
+ class MyComponent {}
70
77
  ```
71
78
 
72
79
  ```html
@@ -108,7 +115,7 @@ class MainModule {}
108
115
  | `selectionNoWrap` | `boolean` | | `false` | Force selection on one line | |
109
116
  | `showSelectAll` | `boolean` | | `false` | Add an option to select all options | with `multiple` |
110
117
  | `selectAllText` | `string` | | `'Select all'` | Text when all options as not selected | with `multiple` |
111
- | `removeAllText` | `string` | | `'Remove all'` | Text when all options as selected | with `multiple` |
118
+ | `removeAllText` | `string` | | `'Remove all'` | Text when all options as selected | with `multiple` |
112
119
  | `editPattern` | `(str: string) => string` | | | use it for change the pattern of the filter search | |
113
120
  | `ngModel`<br>`id`<br>`required`<br>`disabled`<br>`readonly`<br>`tabIndex` | | | | just like a `select` control | |
114
121
  | `(update)` | `(event: `[`Select2UpdateEvent`](#select2-data-structure)`) => void` | event | | triggered when user select an option | |
@@ -288,37 +295,37 @@ const data: Select2Data = [
288
295
 
289
296
  #### Possible object
290
297
 
291
- - `TemplateRef`
292
- - `{template: TemplateRef}`
293
- - `{option?: TemplateRef, group?: TemplateRef}`
294
- - `{templateId1: TemplateRef, ...}`
298
+ - `TemplateRef`
299
+ - `{template: TemplateRef}`
300
+ - `{option?: TemplateRef, group?: TemplateRef}`
301
+ - `{templateId1: TemplateRef, ...}`
295
302
 
296
303
  In addition to the rendering templates of options and groups, in addition to going through the `templateSelection` attribute, it is possible to define that of the selection :
297
304
 
298
- - `{templateSelection: TemplateRef}`
299
- - `{optionSelection: TemplateRef}`
305
+ - `{templateSelection: TemplateRef}`
306
+ - `{optionSelection: TemplateRef}`
300
307
 
301
308
  #### Priority order
302
309
 
303
310
  For group or option:
304
311
 
305
- - `'id'` (from item data `templateId`)
306
- - `'group'` or `'option'`
307
- - `'template'`
308
- - `TemplateRef` (from html attribute `templates`)
309
- - Default render
312
+ - `'id'` (from item data `templateId`)
313
+ - `'group'` or `'option'`
314
+ - `'template'`
315
+ - `TemplateRef` (from html attribute `templates`)
316
+ - Default render
310
317
 
311
318
  For the selection:
312
319
 
313
- - `'id'` (from item data `templateSelectionId`)
314
- - `'optionSelection'`
315
- - `'templateSelection'`
316
- - `TemplateRef` (from html attribute `templateSelection`)
317
- - `'id'` (from item data `templateId`)
318
- - `'option'`
319
- - `'template'`
320
- - `TemplateRef` (from html attribute `templates`)
321
- - Default render
320
+ - `'id'` (from item data `templateSelectionId`)
321
+ - `'optionSelection'`
322
+ - `'templateSelection'`
323
+ - `TemplateRef` (from html attribute `templateSelection`)
324
+ - `'id'` (from item data `templateId`)
325
+ - `'option'`
326
+ - `'template'`
327
+ - `TemplateRef` (from html attribute `templates`)
328
+ - Default render
322
329
 
323
330
  ### Overlay
324
331