@rlucan/ui 19.0.3 → 19.0.4
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/fesm2022/rlucan-ui.mjs
CHANGED
|
@@ -3281,6 +3281,7 @@ class AutoCompleteComponent extends UiBaseComponent {
|
|
|
3281
3281
|
this.idAttribute = 'id';
|
|
3282
3282
|
this.panelClass = '';
|
|
3283
3283
|
this.clearButton = false;
|
|
3284
|
+
this.removeDiacritics = false;
|
|
3284
3285
|
this.filteredOptions = [];
|
|
3285
3286
|
this.filteredMaxItemsShown = this.SHOWN_USERS_DELTA;
|
|
3286
3287
|
// skipBlur = false;
|
|
@@ -3298,7 +3299,9 @@ class AutoCompleteComponent extends UiBaseComponent {
|
|
|
3298
3299
|
return this.options.map(o => ({
|
|
3299
3300
|
...o,
|
|
3300
3301
|
unselectable: this.optionDisabled(o),
|
|
3301
|
-
searchString:
|
|
3302
|
+
searchString: this.removeDiacritics
|
|
3303
|
+
? `${this.optionFormatter(o)}`.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase()
|
|
3304
|
+
: `${this.optionFormatter(o)}`.toLowerCase()
|
|
3302
3305
|
}));
|
|
3303
3306
|
}
|
|
3304
3307
|
filterOptions(text) {
|
|
@@ -3332,7 +3335,9 @@ class AutoCompleteComponent extends UiBaseComponent {
|
|
|
3332
3335
|
// }
|
|
3333
3336
|
// });
|
|
3334
3337
|
this.inputControl.valueChanges.pipe(debounceTime(200)).subscribe(v => {
|
|
3335
|
-
const lcv =
|
|
3338
|
+
const lcv = this.removeDiacritics
|
|
3339
|
+
? v.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase()
|
|
3340
|
+
: v.toLowerCase();
|
|
3336
3341
|
this.filteredOptions = this.filterOptions(lcv);
|
|
3337
3342
|
if (this.filteredOptions.length > 0) {
|
|
3338
3343
|
this.focusedOption = this.filteredOptions[0];
|
|
@@ -3611,7 +3616,7 @@ class AutoCompleteComponent extends UiBaseComponent {
|
|
|
3611
3616
|
}
|
|
3612
3617
|
}
|
|
3613
3618
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AutoCompleteComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3614
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AutoCompleteComponent, isStandalone: false, selector: "ui-auto-complete", inputs: { templates: "templates", options: "options", multiple: "multiple", allowNew: "allowNew", displayAttribute: "displayAttribute", idAttribute: "idAttribute", panelClass: "panelClass", clearButton: "clearButton", optionDisabled: "optionDisabled", optionFormatter: "optionFormatter" }, providers: [{
|
|
3619
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AutoCompleteComponent, isStandalone: false, selector: "ui-auto-complete", inputs: { templates: "templates", options: "options", multiple: "multiple", allowNew: "allowNew", displayAttribute: "displayAttribute", idAttribute: "idAttribute", panelClass: "panelClass", clearButton: "clearButton", removeDiacritics: "removeDiacritics", optionDisabled: "optionDisabled", optionFormatter: "optionFormatter" }, providers: [{
|
|
3615
3620
|
provide: NG_VALUE_ACCESSOR,
|
|
3616
3621
|
multi: true,
|
|
3617
3622
|
useExisting: AutoCompleteComponent
|
|
@@ -3646,6 +3651,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3646
3651
|
type: Input
|
|
3647
3652
|
}], clearButton: [{
|
|
3648
3653
|
type: Input
|
|
3654
|
+
}], removeDiacritics: [{
|
|
3655
|
+
type: Input
|
|
3649
3656
|
}], input: [{
|
|
3650
3657
|
type: ViewChild,
|
|
3651
3658
|
args: ['input']
|