angular-perfect-select 2.0.0 → 2.2.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 +90 -1
- package/dist/README.md +90 -1
- package/dist/fesm2022/angular-perfect-select.mjs +202 -8
- package/dist/fesm2022/angular-perfect-select.mjs.map +1 -1
- package/dist/index.d.ts +52 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,15 @@ A modern, feature-rich, and fully accessible select component for Angular applic
|
|
|
21
21
|
|
|
22
22
|
### Advanced Features
|
|
23
23
|
|
|
24
|
-
#### v2.
|
|
24
|
+
#### v2.2.0 Features 🆕
|
|
25
|
+
- **Search Result Highlighting** - Automatically highlights matching text in options with customizable colors
|
|
26
|
+
- **Tag Overflow Management** - Show "+N more" or collapsible tags when exceeding visible limit
|
|
27
|
+
|
|
28
|
+
#### v2.1.0 Features
|
|
29
|
+
- **Drag & Drop Reordering** - Reorder selected tags in multi-select mode with intuitive drag handles
|
|
30
|
+
- **Option Pinning** - Pin frequently used options to the top with persistence support
|
|
31
|
+
|
|
32
|
+
#### v2.0.0 Features
|
|
25
33
|
- **Virtual Scrolling** - Handle 10,000+ options without performance degradation using Angular CDK
|
|
26
34
|
- **Custom Option Templates** - Full control over option rendering with ng-template support
|
|
27
35
|
- **Validation States** - Visual error, warning, success, and info states with custom messages
|
|
@@ -126,6 +134,87 @@ export class AppModule { }
|
|
|
126
134
|
|
|
127
135
|
## Usage Examples
|
|
128
136
|
|
|
137
|
+
### Search Result Highlighting (v2.2.0)
|
|
138
|
+
|
|
139
|
+
Highlight matching text in options during search:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
<angular-perfect-select
|
|
143
|
+
[options]="options"
|
|
144
|
+
[enableSearchHighlight]="true"
|
|
145
|
+
[searchHighlightColor]="'#ffeb3b'"
|
|
146
|
+
[searchHighlightTextColor]="'#000'"
|
|
147
|
+
[isSearchable]="true"
|
|
148
|
+
placeholder="Search with highlighting..."
|
|
149
|
+
/>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Tag Overflow Management (v2.2.0)
|
|
153
|
+
|
|
154
|
+
Show "+N more" when tags exceed limit:
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
<angular-perfect-select
|
|
158
|
+
[options]="options"
|
|
159
|
+
[isMulti]="true"
|
|
160
|
+
[maxVisibleTags]="3"
|
|
161
|
+
[showMoreTagsText]="'+{count} more'"
|
|
162
|
+
placeholder="Select multiple..."
|
|
163
|
+
/>
|
|
164
|
+
|
|
165
|
+
// With collapsible tags
|
|
166
|
+
<angular-perfect-select
|
|
167
|
+
[options]="options"
|
|
168
|
+
[isMulti]="true"
|
|
169
|
+
[maxVisibleTags]="3"
|
|
170
|
+
[collapsibleTags]="true"
|
|
171
|
+
[showAllTagsText]="'Show all'"
|
|
172
|
+
[showLessTagsText]="'Show less'"
|
|
173
|
+
placeholder="Select multiple (collapsible)..."
|
|
174
|
+
/>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Drag & Drop Reordering (v2.1.0)
|
|
178
|
+
|
|
179
|
+
Reorder selected tags in multi-select mode with drag-and-drop:
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
<angular-perfect-select
|
|
183
|
+
[options]="options"
|
|
184
|
+
[isMulti]="true"
|
|
185
|
+
[enableDragDrop]="true"
|
|
186
|
+
[dragDropPlaceholder]="'Drop here'"
|
|
187
|
+
[dragDropAnimation]="200"
|
|
188
|
+
(reorder)="handleReorder($event)"
|
|
189
|
+
/>
|
|
190
|
+
|
|
191
|
+
// In your component
|
|
192
|
+
handleReorder(event: SelectReorderEvent) {
|
|
193
|
+
console.log('Reordered from', event.previousIndex, 'to', event.currentIndex);
|
|
194
|
+
console.log('New order:', event.values);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Option Pinning (v2.1.0)
|
|
199
|
+
|
|
200
|
+
Pin frequently used options to the top of the dropdown:
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
<angular-perfect-select
|
|
204
|
+
[options]="options"
|
|
205
|
+
[enablePinning]="true"
|
|
206
|
+
[maxPinnedOptions]="3"
|
|
207
|
+
[persistPinnedOptions]="true"
|
|
208
|
+
[pinnedOptionsLabel]="'Favorites'"
|
|
209
|
+
(pin)="handlePin($event)"
|
|
210
|
+
/>
|
|
211
|
+
|
|
212
|
+
// In your component
|
|
213
|
+
handlePin(event: SelectPinEvent) {
|
|
214
|
+
console.log('Option', event.option.label, event.pinned ? 'pinned' : 'unpinned');
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
129
218
|
### Max Selection Limit (v1.1.0)
|
|
130
219
|
|
|
131
220
|
Limit the number of selections in multi-select mode:
|
package/dist/README.md
CHANGED
|
@@ -21,7 +21,15 @@ A modern, feature-rich, and fully accessible select component for Angular applic
|
|
|
21
21
|
|
|
22
22
|
### Advanced Features
|
|
23
23
|
|
|
24
|
-
#### v2.
|
|
24
|
+
#### v2.2.0 Features 🆕
|
|
25
|
+
- **Search Result Highlighting** - Automatically highlights matching text in options with customizable colors
|
|
26
|
+
- **Tag Overflow Management** - Show "+N more" or collapsible tags when exceeding visible limit
|
|
27
|
+
|
|
28
|
+
#### v2.1.0 Features
|
|
29
|
+
- **Drag & Drop Reordering** - Reorder selected tags in multi-select mode with intuitive drag handles
|
|
30
|
+
- **Option Pinning** - Pin frequently used options to the top with persistence support
|
|
31
|
+
|
|
32
|
+
#### v2.0.0 Features
|
|
25
33
|
- **Virtual Scrolling** - Handle 10,000+ options without performance degradation using Angular CDK
|
|
26
34
|
- **Custom Option Templates** - Full control over option rendering with ng-template support
|
|
27
35
|
- **Validation States** - Visual error, warning, success, and info states with custom messages
|
|
@@ -126,6 +134,87 @@ export class AppModule { }
|
|
|
126
134
|
|
|
127
135
|
## Usage Examples
|
|
128
136
|
|
|
137
|
+
### Search Result Highlighting (v2.2.0)
|
|
138
|
+
|
|
139
|
+
Highlight matching text in options during search:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
<angular-perfect-select
|
|
143
|
+
[options]="options"
|
|
144
|
+
[enableSearchHighlight]="true"
|
|
145
|
+
[searchHighlightColor]="'#ffeb3b'"
|
|
146
|
+
[searchHighlightTextColor]="'#000'"
|
|
147
|
+
[isSearchable]="true"
|
|
148
|
+
placeholder="Search with highlighting..."
|
|
149
|
+
/>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Tag Overflow Management (v2.2.0)
|
|
153
|
+
|
|
154
|
+
Show "+N more" when tags exceed limit:
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
<angular-perfect-select
|
|
158
|
+
[options]="options"
|
|
159
|
+
[isMulti]="true"
|
|
160
|
+
[maxVisibleTags]="3"
|
|
161
|
+
[showMoreTagsText]="'+{count} more'"
|
|
162
|
+
placeholder="Select multiple..."
|
|
163
|
+
/>
|
|
164
|
+
|
|
165
|
+
// With collapsible tags
|
|
166
|
+
<angular-perfect-select
|
|
167
|
+
[options]="options"
|
|
168
|
+
[isMulti]="true"
|
|
169
|
+
[maxVisibleTags]="3"
|
|
170
|
+
[collapsibleTags]="true"
|
|
171
|
+
[showAllTagsText]="'Show all'"
|
|
172
|
+
[showLessTagsText]="'Show less'"
|
|
173
|
+
placeholder="Select multiple (collapsible)..."
|
|
174
|
+
/>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Drag & Drop Reordering (v2.1.0)
|
|
178
|
+
|
|
179
|
+
Reorder selected tags in multi-select mode with drag-and-drop:
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
<angular-perfect-select
|
|
183
|
+
[options]="options"
|
|
184
|
+
[isMulti]="true"
|
|
185
|
+
[enableDragDrop]="true"
|
|
186
|
+
[dragDropPlaceholder]="'Drop here'"
|
|
187
|
+
[dragDropAnimation]="200"
|
|
188
|
+
(reorder)="handleReorder($event)"
|
|
189
|
+
/>
|
|
190
|
+
|
|
191
|
+
// In your component
|
|
192
|
+
handleReorder(event: SelectReorderEvent) {
|
|
193
|
+
console.log('Reordered from', event.previousIndex, 'to', event.currentIndex);
|
|
194
|
+
console.log('New order:', event.values);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Option Pinning (v2.1.0)
|
|
199
|
+
|
|
200
|
+
Pin frequently used options to the top of the dropdown:
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
<angular-perfect-select
|
|
204
|
+
[options]="options"
|
|
205
|
+
[enablePinning]="true"
|
|
206
|
+
[maxPinnedOptions]="3"
|
|
207
|
+
[persistPinnedOptions]="true"
|
|
208
|
+
[pinnedOptionsLabel]="'Favorites'"
|
|
209
|
+
(pin)="handlePin($event)"
|
|
210
|
+
/>
|
|
211
|
+
|
|
212
|
+
// In your component
|
|
213
|
+
handlePin(event: SelectPinEvent) {
|
|
214
|
+
console.log('Option', event.option.label, event.pinned ? 'pinned' : 'unpinned');
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
129
218
|
### Max Selection Limit (v1.1.0)
|
|
130
219
|
|
|
131
220
|
Limit the number of selections in multi-select mode:
|