angular-perfect-select 2.1.0 → 2.3.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
@@ -21,7 +21,21 @@ A modern, feature-rich, and fully accessible select component for Angular applic
21
21
 
22
22
  ### Advanced Features
23
23
 
24
- #### v2.1.0 Features 🆕
24
+ #### v2.3.0 Features 🎉 NEW
25
+ - **Fuzzy Search** - Advanced search algorithm supporting acronym-style matching (e.g., 'fb' matches 'Facebook')
26
+ - **Dark Mode** - Automatic dark mode detection with manual override and dedicated dark theme
27
+ - **Loading Skeleton** - Modern shimmer skeleton UI while loading async options
28
+ - **Compact Mode** - Ultra-dense layout variant with reduced padding for data-heavy UIs
29
+ - **Custom Tag Templates** - Full control over multi-select tag rendering with ng-template
30
+ - **Option Checkbox Mode** - Display checkboxes next to options for better visual selection feedback
31
+ - **Bulk Actions** - Action buttons for performing operations on all selected options
32
+ - **Option Sorting** - Built-in sorting modes (alphabetical, recently used, custom comparator)
33
+
34
+ #### v2.2.0 Features
35
+ - **Search Result Highlighting** - Automatically highlights matching text in options with customizable colors
36
+ - **Tag Overflow Management** - Show "+N more" or collapsible tags when exceeding visible limit
37
+
38
+ #### v2.1.0 Features
25
39
  - **Drag & Drop Reordering** - Reorder selected tags in multi-select mode with intuitive drag handles
26
40
  - **Option Pinning** - Pin frequently used options to the top with persistence support
27
41
 
@@ -130,6 +144,211 @@ export class AppModule { }
130
144
 
131
145
  ## Usage Examples
132
146
 
147
+ ### Fuzzy Search (v2.3.0)
148
+
149
+ Enable intelligent fuzzy search for better option matching:
150
+
151
+ ```typescript
152
+ <angular-perfect-select
153
+ [options]="options"
154
+ [enableFuzzySearch]="true"
155
+ [fuzzySearchThreshold]="0.3"
156
+ [fuzzySearchCaseSensitive]="false"
157
+ [isSearchable]="true"
158
+ placeholder="Try searching 'fb' to find 'Facebook'..."
159
+ />
160
+ ```
161
+
162
+ ### Dark Mode (v2.3.0)
163
+
164
+ Automatic dark mode detection with system preference:
165
+
166
+ ```typescript
167
+ <angular-perfect-select
168
+ [options]="options"
169
+ [enableAutoThemeDetection]="true"
170
+ [darkModeTheme]="'dark'"
171
+ [lightModeTheme]="'blue'"
172
+ [colorScheme]="'auto'"
173
+ placeholder="Auto dark mode..."
174
+ />
175
+
176
+ // Manual dark mode override
177
+ <angular-perfect-select
178
+ [options]="options"
179
+ [colorScheme]="'dark'"
180
+ placeholder="Always dark mode..."
181
+ />
182
+ ```
183
+
184
+ ### Loading Skeleton (v2.3.0)
185
+
186
+ Show modern skeleton UI while loading:
187
+
188
+ ```typescript
189
+ <angular-perfect-select
190
+ [loadOptions]="loadRemoteData"
191
+ [enableLoadingSkeleton]="true"
192
+ [skeletonItemCount]="5"
193
+ [skeletonItemHeight]="40"
194
+ [skeletonAnimationDelay]="800"
195
+ placeholder="Loading with skeleton..."
196
+ />
197
+ ```
198
+
199
+ ### Compact Mode (v2.3.0)
200
+
201
+ Dense layout for dashboards and data grids:
202
+
203
+ ```typescript
204
+ <angular-perfect-select
205
+ [options]="options"
206
+ [compactMode]="true"
207
+ placeholder="Compact select..."
208
+ />
209
+ ```
210
+
211
+ ### Custom Tag Templates (v2.3.0)
212
+
213
+ Fully customize how multi-select tags are rendered:
214
+
215
+ ```typescript
216
+ <angular-perfect-select
217
+ [options]="options"
218
+ [isMulti]="true"
219
+ [(ngModel)]="selectedValues"
220
+ >
221
+ <ng-template #tagTemplate let-option>
222
+ <div class="custom-tag">
223
+ <img [src]="option.avatar" alt="" class="tag-avatar" />
224
+ <span>{{option.label}}</span>
225
+ <span class="tag-badge">{{option.role}}</span>
226
+ </div>
227
+ </ng-template>
228
+ </angular-perfect-select>
229
+ ```
230
+
231
+ ### Option Checkbox Mode (v2.3.0)
232
+
233
+ Display checkboxes for better visual feedback:
234
+
235
+ ```typescript
236
+ <angular-perfect-select
237
+ [options]="options"
238
+ [isMulti]="true"
239
+ [showOptionCheckboxes]="true"
240
+ [checkboxPosition]="'left'"
241
+ [checkboxStyle]="'filled'"
242
+ placeholder="Select with checkboxes..."
243
+ />
244
+ ```
245
+
246
+ ### Bulk Actions (v2.3.0)
247
+
248
+ Add action buttons for selected options:
249
+
250
+ ```typescript
251
+ // Component
252
+ bulkActions: BulkAction[] = [
253
+ {
254
+ id: 'export',
255
+ label: 'Export',
256
+ icon: '/assets/export.svg',
257
+ action: (selectedOptions) => this.exportSelected(selectedOptions)
258
+ },
259
+ {
260
+ id: 'delete',
261
+ label: 'Delete All',
262
+ action: (selectedOptions) => this.deleteSelected(selectedOptions)
263
+ }
264
+ ];
265
+
266
+ // Template
267
+ <angular-perfect-select
268
+ [options]="options"
269
+ [isMulti]="true"
270
+ [enableBulkActions]="true"
271
+ [bulkActions]="bulkActions"
272
+ [bulkActionsPosition]="'above'"
273
+ [bulkActionsLabel]="'Actions:'"
274
+ (bulkActionSelected)="onBulkAction($event)"
275
+ />
276
+ ```
277
+
278
+ ### Option Sorting (v2.3.0)
279
+
280
+ Sort options automatically:
281
+
282
+ ```typescript
283
+ // Alphabetical sorting
284
+ <angular-perfect-select
285
+ [options]="options"
286
+ [sortMode]="'alphabetical-asc'"
287
+ placeholder="Sorted A-Z..."
288
+ />
289
+
290
+ // Recently used sorting
291
+ <angular-perfect-select
292
+ [options]="options"
293
+ [sortMode]="'recently-used'"
294
+ [recentlyUsedLimit]="10"
295
+ placeholder="Recently used first..."
296
+ />
297
+
298
+ // Custom sorting
299
+ <angular-perfect-select
300
+ [options]="options"
301
+ [sortMode]="'custom'"
302
+ [customSortComparator]="customSort"
303
+ placeholder="Custom sorted..."
304
+ />
305
+
306
+ // Component
307
+ customSort = (a: SelectOption, b: SelectOption) => {
308
+ return a.priority - b.priority;
309
+ };
310
+ ```
311
+
312
+ ### Search Result Highlighting (v2.2.0)
313
+
314
+ Highlight matching text in options during search:
315
+
316
+ ```typescript
317
+ <angular-perfect-select
318
+ [options]="options"
319
+ [enableSearchHighlight]="true"
320
+ [searchHighlightColor]="'#ffeb3b'"
321
+ [searchHighlightTextColor]="'#000'"
322
+ [isSearchable]="true"
323
+ placeholder="Search with highlighting..."
324
+ />
325
+ ```
326
+
327
+ ### Tag Overflow Management (v2.2.0)
328
+
329
+ Show "+N more" when tags exceed limit:
330
+
331
+ ```typescript
332
+ <angular-perfect-select
333
+ [options]="options"
334
+ [isMulti]="true"
335
+ [maxVisibleTags]="3"
336
+ [showMoreTagsText]="'+{count} more'"
337
+ placeholder="Select multiple..."
338
+ />
339
+
340
+ // With collapsible tags
341
+ <angular-perfect-select
342
+ [options]="options"
343
+ [isMulti]="true"
344
+ [maxVisibleTags]="3"
345
+ [collapsibleTags]="true"
346
+ [showAllTagsText]="'Show all'"
347
+ [showLessTagsText]="'Show less'"
348
+ placeholder="Select multiple (collapsible)..."
349
+ />
350
+ ```
351
+
133
352
  ### Drag & Drop Reordering (v2.1.0)
134
353
 
135
354
  Reorder selected tags in multi-select mode with drag-and-drop:
package/dist/README.md CHANGED
@@ -21,7 +21,21 @@ A modern, feature-rich, and fully accessible select component for Angular applic
21
21
 
22
22
  ### Advanced Features
23
23
 
24
- #### v2.1.0 Features 🆕
24
+ #### v2.3.0 Features 🎉 NEW
25
+ - **Fuzzy Search** - Advanced search algorithm supporting acronym-style matching (e.g., 'fb' matches 'Facebook')
26
+ - **Dark Mode** - Automatic dark mode detection with manual override and dedicated dark theme
27
+ - **Loading Skeleton** - Modern shimmer skeleton UI while loading async options
28
+ - **Compact Mode** - Ultra-dense layout variant with reduced padding for data-heavy UIs
29
+ - **Custom Tag Templates** - Full control over multi-select tag rendering with ng-template
30
+ - **Option Checkbox Mode** - Display checkboxes next to options for better visual selection feedback
31
+ - **Bulk Actions** - Action buttons for performing operations on all selected options
32
+ - **Option Sorting** - Built-in sorting modes (alphabetical, recently used, custom comparator)
33
+
34
+ #### v2.2.0 Features
35
+ - **Search Result Highlighting** - Automatically highlights matching text in options with customizable colors
36
+ - **Tag Overflow Management** - Show "+N more" or collapsible tags when exceeding visible limit
37
+
38
+ #### v2.1.0 Features
25
39
  - **Drag & Drop Reordering** - Reorder selected tags in multi-select mode with intuitive drag handles
26
40
  - **Option Pinning** - Pin frequently used options to the top with persistence support
27
41
 
@@ -130,6 +144,211 @@ export class AppModule { }
130
144
 
131
145
  ## Usage Examples
132
146
 
147
+ ### Fuzzy Search (v2.3.0)
148
+
149
+ Enable intelligent fuzzy search for better option matching:
150
+
151
+ ```typescript
152
+ <angular-perfect-select
153
+ [options]="options"
154
+ [enableFuzzySearch]="true"
155
+ [fuzzySearchThreshold]="0.3"
156
+ [fuzzySearchCaseSensitive]="false"
157
+ [isSearchable]="true"
158
+ placeholder="Try searching 'fb' to find 'Facebook'..."
159
+ />
160
+ ```
161
+
162
+ ### Dark Mode (v2.3.0)
163
+
164
+ Automatic dark mode detection with system preference:
165
+
166
+ ```typescript
167
+ <angular-perfect-select
168
+ [options]="options"
169
+ [enableAutoThemeDetection]="true"
170
+ [darkModeTheme]="'dark'"
171
+ [lightModeTheme]="'blue'"
172
+ [colorScheme]="'auto'"
173
+ placeholder="Auto dark mode..."
174
+ />
175
+
176
+ // Manual dark mode override
177
+ <angular-perfect-select
178
+ [options]="options"
179
+ [colorScheme]="'dark'"
180
+ placeholder="Always dark mode..."
181
+ />
182
+ ```
183
+
184
+ ### Loading Skeleton (v2.3.0)
185
+
186
+ Show modern skeleton UI while loading:
187
+
188
+ ```typescript
189
+ <angular-perfect-select
190
+ [loadOptions]="loadRemoteData"
191
+ [enableLoadingSkeleton]="true"
192
+ [skeletonItemCount]="5"
193
+ [skeletonItemHeight]="40"
194
+ [skeletonAnimationDelay]="800"
195
+ placeholder="Loading with skeleton..."
196
+ />
197
+ ```
198
+
199
+ ### Compact Mode (v2.3.0)
200
+
201
+ Dense layout for dashboards and data grids:
202
+
203
+ ```typescript
204
+ <angular-perfect-select
205
+ [options]="options"
206
+ [compactMode]="true"
207
+ placeholder="Compact select..."
208
+ />
209
+ ```
210
+
211
+ ### Custom Tag Templates (v2.3.0)
212
+
213
+ Fully customize how multi-select tags are rendered:
214
+
215
+ ```typescript
216
+ <angular-perfect-select
217
+ [options]="options"
218
+ [isMulti]="true"
219
+ [(ngModel)]="selectedValues"
220
+ >
221
+ <ng-template #tagTemplate let-option>
222
+ <div class="custom-tag">
223
+ <img [src]="option.avatar" alt="" class="tag-avatar" />
224
+ <span>{{option.label}}</span>
225
+ <span class="tag-badge">{{option.role}}</span>
226
+ </div>
227
+ </ng-template>
228
+ </angular-perfect-select>
229
+ ```
230
+
231
+ ### Option Checkbox Mode (v2.3.0)
232
+
233
+ Display checkboxes for better visual feedback:
234
+
235
+ ```typescript
236
+ <angular-perfect-select
237
+ [options]="options"
238
+ [isMulti]="true"
239
+ [showOptionCheckboxes]="true"
240
+ [checkboxPosition]="'left'"
241
+ [checkboxStyle]="'filled'"
242
+ placeholder="Select with checkboxes..."
243
+ />
244
+ ```
245
+
246
+ ### Bulk Actions (v2.3.0)
247
+
248
+ Add action buttons for selected options:
249
+
250
+ ```typescript
251
+ // Component
252
+ bulkActions: BulkAction[] = [
253
+ {
254
+ id: 'export',
255
+ label: 'Export',
256
+ icon: '/assets/export.svg',
257
+ action: (selectedOptions) => this.exportSelected(selectedOptions)
258
+ },
259
+ {
260
+ id: 'delete',
261
+ label: 'Delete All',
262
+ action: (selectedOptions) => this.deleteSelected(selectedOptions)
263
+ }
264
+ ];
265
+
266
+ // Template
267
+ <angular-perfect-select
268
+ [options]="options"
269
+ [isMulti]="true"
270
+ [enableBulkActions]="true"
271
+ [bulkActions]="bulkActions"
272
+ [bulkActionsPosition]="'above'"
273
+ [bulkActionsLabel]="'Actions:'"
274
+ (bulkActionSelected)="onBulkAction($event)"
275
+ />
276
+ ```
277
+
278
+ ### Option Sorting (v2.3.0)
279
+
280
+ Sort options automatically:
281
+
282
+ ```typescript
283
+ // Alphabetical sorting
284
+ <angular-perfect-select
285
+ [options]="options"
286
+ [sortMode]="'alphabetical-asc'"
287
+ placeholder="Sorted A-Z..."
288
+ />
289
+
290
+ // Recently used sorting
291
+ <angular-perfect-select
292
+ [options]="options"
293
+ [sortMode]="'recently-used'"
294
+ [recentlyUsedLimit]="10"
295
+ placeholder="Recently used first..."
296
+ />
297
+
298
+ // Custom sorting
299
+ <angular-perfect-select
300
+ [options]="options"
301
+ [sortMode]="'custom'"
302
+ [customSortComparator]="customSort"
303
+ placeholder="Custom sorted..."
304
+ />
305
+
306
+ // Component
307
+ customSort = (a: SelectOption, b: SelectOption) => {
308
+ return a.priority - b.priority;
309
+ };
310
+ ```
311
+
312
+ ### Search Result Highlighting (v2.2.0)
313
+
314
+ Highlight matching text in options during search:
315
+
316
+ ```typescript
317
+ <angular-perfect-select
318
+ [options]="options"
319
+ [enableSearchHighlight]="true"
320
+ [searchHighlightColor]="'#ffeb3b'"
321
+ [searchHighlightTextColor]="'#000'"
322
+ [isSearchable]="true"
323
+ placeholder="Search with highlighting..."
324
+ />
325
+ ```
326
+
327
+ ### Tag Overflow Management (v2.2.0)
328
+
329
+ Show "+N more" when tags exceed limit:
330
+
331
+ ```typescript
332
+ <angular-perfect-select
333
+ [options]="options"
334
+ [isMulti]="true"
335
+ [maxVisibleTags]="3"
336
+ [showMoreTagsText]="'+{count} more'"
337
+ placeholder="Select multiple..."
338
+ />
339
+
340
+ // With collapsible tags
341
+ <angular-perfect-select
342
+ [options]="options"
343
+ [isMulti]="true"
344
+ [maxVisibleTags]="3"
345
+ [collapsibleTags]="true"
346
+ [showAllTagsText]="'Show all'"
347
+ [showLessTagsText]="'Show less'"
348
+ placeholder="Select multiple (collapsible)..."
349
+ />
350
+ ```
351
+
133
352
  ### Drag & Drop Reordering (v2.1.0)
134
353
 
135
354
  Reorder selected tags in multi-select mode with drag-and-drop: