@open-rlb/ng-bootstrap 3.3.11 → 3.3.12

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.
@@ -6370,6 +6370,8 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
6370
6370
  this.userDefinedId = input('', { ...(ngDevMode ? { debugName: "userDefinedId" } : /* istanbul ignore next */ {}), alias: 'id', transform: (v) => v || '' });
6371
6371
  this.enableFlagIcons = input(true, { ...(ngDevMode ? { debugName: "enableFlagIcons" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-flag-icons' });
6372
6372
  this.enableValidation = input(false, { ...(ngDevMode ? { debugName: "enableValidation" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-validation' });
6373
+ this.openOnFocus = input(false, { ...(ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'open-on-focus' });
6374
+ this.detectLocale = input(false, { ...(ngDevMode ? { debugName: "detectLocale" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'detect-locale' });
6373
6375
  this.el = viewChild('field', ...(ngDevMode ? [{ debugName: "el" }] : /* istanbul ignore next */ []));
6374
6376
  this.dropdown = viewChild('autocomplete', ...(ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []));
6375
6377
  this.selected = output();
@@ -7591,6 +7593,16 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7591
7593
  data: 'ZW',
7592
7594
  },
7593
7595
  ];
7596
+ const destroyRef = inject(DestroyRef);
7597
+ const onScroll = (event) => {
7598
+ if (!this.isOpen())
7599
+ return;
7600
+ if (this.dropdown()?.nativeElement.contains(event.target))
7601
+ return;
7602
+ this.closeDropdown();
7603
+ };
7604
+ document.addEventListener('scroll', onScroll, { capture: true });
7605
+ destroyRef.onDestroy(() => document.removeEventListener('scroll', onScroll, { capture: true }));
7594
7606
  }
7595
7607
  onEscape(event) {
7596
7608
  if (this.isOpen()) {
@@ -7598,6 +7610,11 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7598
7610
  this.el()?.nativeElement?.blur();
7599
7611
  }
7600
7612
  }
7613
+ onFocus() {
7614
+ if (this.openOnFocus() && !this.isOpen()) {
7615
+ this.manageSuggestions('', true);
7616
+ }
7617
+ }
7601
7618
  update(ev) {
7602
7619
  if (this.typingTimeout)
7603
7620
  clearTimeout(this.typingTimeout);
@@ -7616,16 +7633,33 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7616
7633
  }
7617
7634
  return `${d.text} (${d.value})`;
7618
7635
  }
7619
- manageSuggestions(query) {
7620
- if (query && query.length > 0) {
7636
+ manageSuggestions(query, showAll = false) {
7637
+ if (showAll || (query && query.length > 0)) {
7621
7638
  this.openDropdown();
7622
- const rawSuggestions = this.getCountries().filter(c => c.text.toLowerCase().includes(query.toLowerCase()) || c.value.includes(query));
7623
- this.suggestions.set(rawSuggestions);
7639
+ let results = showAll && !query
7640
+ ? this.getCountries()
7641
+ : this.getCountries().filter(c => c.text.toLowerCase().includes(query.toLowerCase()) || c.value.includes(query));
7642
+ if (this.detectLocale()) {
7643
+ const code = this._localeCountryCode();
7644
+ if (code) {
7645
+ const idx = results.findIndex(c => c.data === code);
7646
+ if (idx > 0)
7647
+ results = [results[idx], ...results.filter((_, i) => i !== idx)];
7648
+ }
7649
+ }
7650
+ this.suggestions.set(results);
7624
7651
  }
7625
7652
  else {
7626
7653
  this.closeDropdown();
7627
7654
  }
7628
7655
  }
7656
+ _localeCountryCode() {
7657
+ const lang = navigator.languages?.[0] ?? navigator.language;
7658
+ if (!lang)
7659
+ return null;
7660
+ const parts = lang.split('-');
7661
+ return parts.length > 1 ? parts[parts.length - 1].toUpperCase() : null;
7662
+ }
7629
7663
  selectItem(item, ev) {
7630
7664
  ev?.preventDefault();
7631
7665
  ev?.stopPropagation();
@@ -7669,7 +7703,7 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7669
7703
  }));
7670
7704
  }
7671
7705
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AutocompleteCountryDialCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7672
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteCountryDialCodeComponent, isStandalone: true, selector: "rlb-autocomplete-country-dial-code", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableFlagIcons: { classPropertyName: "enableFlagIcons", publicName: "enable-flag-icons", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
7706
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteCountryDialCodeComponent, isStandalone: true, selector: "rlb-autocomplete-country-dial-code", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableFlagIcons: { classPropertyName: "enableFlagIcons", publicName: "enable-flag-icons", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "open-on-focus", isSignal: true, isRequired: false, transformFunction: null }, detectLocale: { classPropertyName: "detectLocale", publicName: "detect-locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
7673
7707
  <ng-content select="[before]"></ng-content>
7674
7708
  <div class="input-group has-validation position-relative">
7675
7709
  <input
@@ -7684,6 +7718,7 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7684
7718
  [attr.placeholder]="placeholder()"
7685
7719
  [class.form-control-lg]="size() === 'large'"
7686
7720
  [class.form-control-sm]="size() === 'small'"
7721
+ (focus)="onFocus()"
7687
7722
  (blur)="touch()"
7688
7723
  [ngClass]="{
7689
7724
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -7765,6 +7800,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
7765
7800
  [attr.placeholder]="placeholder()"
7766
7801
  [class.form-control-lg]="size() === 'large'"
7767
7802
  [class.form-control-sm]="size() === 'small'"
7803
+ (focus)="onFocus()"
7768
7804
  (blur)="touch()"
7769
7805
  [ngClass]="{
7770
7806
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -7834,7 +7870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
7834
7870
  changeDetection: ChangeDetectionStrategy.OnPush,
7835
7871
  imports: [NgClass, InputValidationComponent, ProgressComponent],
7836
7872
  }]
7837
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableFlagIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-flag-icons", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
7873
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableFlagIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-flag-icons", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], openOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "open-on-focus", required: false }] }], detectLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "detect-locale", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
7838
7874
 
7839
7875
  class AutocompleteCountryComponent extends AbstractComponent {
7840
7876
  constructor() {
@@ -7854,6 +7890,8 @@ class AutocompleteCountryComponent extends AbstractComponent {
7854
7890
  this.userDefinedId = input('', { ...(ngDevMode ? { debugName: "userDefinedId" } : /* istanbul ignore next */ {}), alias: 'id', transform: (v) => v || '' });
7855
7891
  this.enableFlagIcons = input(false, { ...(ngDevMode ? { debugName: "enableFlagIcons" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-flag-icons' });
7856
7892
  this.enableValidation = input(false, { ...(ngDevMode ? { debugName: "enableValidation" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-validation' });
7893
+ this.openOnFocus = input(false, { ...(ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'open-on-focus' });
7894
+ this.detectLocale = input(false, { ...(ngDevMode ? { debugName: "detectLocale" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'detect-locale' });
7857
7895
  this.el = viewChild('field', ...(ngDevMode ? [{ debugName: "el" }] : /* istanbul ignore next */ []));
7858
7896
  this.dropdown = viewChild('autocomplete', ...(ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []));
7859
7897
  this.selected = output();
@@ -8058,6 +8096,16 @@ class AutocompleteCountryComponent extends AbstractComponent {
8058
8096
  { text: 'Zambia', value: 'ZM' },
8059
8097
  { text: 'Zimbabwe', value: 'ZW' },
8060
8098
  ];
8099
+ const destroyRef = inject(DestroyRef);
8100
+ const onScroll = (event) => {
8101
+ if (!this.isOpen())
8102
+ return;
8103
+ if (this.dropdown()?.nativeElement.contains(event.target))
8104
+ return;
8105
+ this.closeDropdown();
8106
+ };
8107
+ document.addEventListener('scroll', onScroll, { capture: true });
8108
+ destroyRef.onDestroy(() => document.removeEventListener('scroll', onScroll, { capture: true }));
8061
8109
  }
8062
8110
  onEscape(event) {
8063
8111
  if (this.isOpen()) {
@@ -8065,6 +8113,11 @@ class AutocompleteCountryComponent extends AbstractComponent {
8065
8113
  this.el()?.nativeElement?.blur();
8066
8114
  }
8067
8115
  }
8116
+ onFocus() {
8117
+ if (this.openOnFocus() && !this.isOpen()) {
8118
+ this.manageSuggestions('', true);
8119
+ }
8120
+ }
8068
8121
  update(ev) {
8069
8122
  if (this.typingTimeout)
8070
8123
  clearTimeout(this.typingTimeout);
@@ -8083,16 +8136,33 @@ class AutocompleteCountryComponent extends AbstractComponent {
8083
8136
  }
8084
8137
  return d?.text;
8085
8138
  }
8086
- manageSuggestions(query) {
8087
- if (query && query.length > 0) {
8139
+ manageSuggestions(query, showAll = false) {
8140
+ if (showAll || (query && query.length > 0)) {
8088
8141
  this.openDropdown();
8089
- const rawSuggestions = this.getCountries().filter(c => c.text.toLowerCase().includes(query.toLowerCase()));
8090
- this.suggestions.set(rawSuggestions);
8142
+ let results = showAll && !query
8143
+ ? this.getCountries()
8144
+ : this.getCountries().filter(c => c.text.toLowerCase().includes(query.toLowerCase()));
8145
+ if (this.detectLocale()) {
8146
+ const code = this._localeCountryCode();
8147
+ if (code) {
8148
+ const idx = results.findIndex(c => c.value === code);
8149
+ if (idx > 0)
8150
+ results = [results[idx], ...results.filter((_, i) => i !== idx)];
8151
+ }
8152
+ }
8153
+ this.suggestions.set(results);
8091
8154
  }
8092
8155
  else {
8093
8156
  this.closeDropdown();
8094
8157
  }
8095
8158
  }
8159
+ _localeCountryCode() {
8160
+ const lang = navigator.languages?.[0] ?? navigator.language;
8161
+ if (!lang)
8162
+ return null;
8163
+ const parts = lang.split('-');
8164
+ return parts.length > 1 ? parts[parts.length - 1].toUpperCase() : null;
8165
+ }
8096
8166
  selectItem(item, ev) {
8097
8167
  ev?.preventDefault();
8098
8168
  ev?.stopPropagation();
@@ -8139,7 +8209,7 @@ class AutocompleteCountryComponent extends AbstractComponent {
8139
8209
  }));
8140
8210
  }
8141
8211
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AutocompleteCountryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteCountryComponent, isStandalone: true, selector: "rlb-autocomplete-country", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableFlagIcons: { classPropertyName: "enableFlagIcons", publicName: "enable-flag-icons", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8212
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteCountryComponent, isStandalone: true, selector: "rlb-autocomplete-country", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableFlagIcons: { classPropertyName: "enableFlagIcons", publicName: "enable-flag-icons", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "open-on-focus", isSignal: true, isRequired: false, transformFunction: null }, detectLocale: { classPropertyName: "detectLocale", publicName: "detect-locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8143
8213
  <ng-content select="[before]"></ng-content>
8144
8214
  <div class="input-group has-validation position-relative">
8145
8215
  <input
@@ -8154,6 +8224,7 @@ class AutocompleteCountryComponent extends AbstractComponent {
8154
8224
  [attr.placeholder]="placeholder()"
8155
8225
  [class.form-control-lg]="size() === 'large'"
8156
8226
  [class.form-control-sm]="size() === 'small'"
8227
+ (focus)="onFocus()"
8157
8228
  (blur)="touch()"
8158
8229
  [ngClass]="{
8159
8230
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -8224,6 +8295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8224
8295
  [attr.placeholder]="placeholder()"
8225
8296
  [class.form-control-lg]="size() === 'large'"
8226
8297
  [class.form-control-sm]="size() === 'small'"
8298
+ (focus)="onFocus()"
8227
8299
  (blur)="touch()"
8228
8300
  [ngClass]="{
8229
8301
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -8283,12 +8355,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8283
8355
  changeDetection: ChangeDetectionStrategy.OnPush,
8284
8356
  imports: [NgClass, InputValidationComponent],
8285
8357
  }]
8286
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableFlagIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-flag-icons", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8358
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableFlagIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-flag-icons", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], openOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "open-on-focus", required: false }] }], detectLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "detect-locale", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8287
8359
 
8288
8360
  class AutocompleteTimezonesComponent extends AbstractComponent {
8289
8361
  constructor() {
8290
8362
  super();
8291
8363
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
8364
+ this.dropdownTop = signal(0, ...(ngDevMode ? [{ debugName: "dropdownTop" }] : /* istanbul ignore next */ []));
8365
+ this.dropdownLeft = signal(0, ...(ngDevMode ? [{ debugName: "dropdownLeft" }] : /* istanbul ignore next */ []));
8366
+ this.dropdownWidth = signal(0, ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
8292
8367
  this.suggestions = signal([], ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
8293
8368
  this.hasSuggestions = computed(() => this.suggestions().length > 0, ...(ngDevMode ? [{ debugName: "hasSuggestions" }] : /* istanbul ignore next */ []));
8294
8369
  this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -8300,10 +8375,21 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8300
8375
  this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8301
8376
  this.userDefinedId = input('', { ...(ngDevMode ? { debugName: "userDefinedId" } : /* istanbul ignore next */ {}), alias: 'id', transform: (v) => v || '' });
8302
8377
  this.enableValidation = input(false, { ...(ngDevMode ? { debugName: "enableValidation" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-validation' });
8378
+ this.openOnFocus = input(false, { ...(ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'open-on-focus' });
8303
8379
  this.el = viewChild('field', ...(ngDevMode ? [{ debugName: "el" }] : /* istanbul ignore next */ []));
8304
8380
  this.dropdown = viewChild('autocomplete', ...(ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []));
8305
8381
  this.selected = output();
8306
8382
  this.hostRef = inject((ElementRef));
8383
+ const destroyRef = inject(DestroyRef);
8384
+ const onScroll = (event) => {
8385
+ if (!this.isOpen())
8386
+ return;
8387
+ if (this.dropdown()?.nativeElement.contains(event.target))
8388
+ return;
8389
+ this.closeDropdown();
8390
+ };
8391
+ document.addEventListener('scroll', onScroll, { capture: true });
8392
+ destroyRef.onDestroy(() => document.removeEventListener('scroll', onScroll, { capture: true }));
8307
8393
  }
8308
8394
  onEscape(event) {
8309
8395
  if (this.isOpen()) {
@@ -8311,6 +8397,11 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8311
8397
  this.el()?.nativeElement?.blur();
8312
8398
  }
8313
8399
  }
8400
+ onFocus() {
8401
+ if (this.openOnFocus() && !this.isOpen()) {
8402
+ this.manageSuggestions('', true);
8403
+ }
8404
+ }
8314
8405
  update(ev) {
8315
8406
  if (this.typingTimeout)
8316
8407
  clearTimeout(this.typingTimeout);
@@ -8323,11 +8414,13 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8323
8414
  // We leave onWrite empty because [value]="value() || ''" in the template
8324
8415
  // handles the synchronization automatically in a Zoneless/Signal world.
8325
8416
  onWrite(data) { }
8326
- manageSuggestions(query) {
8327
- if (query && query.length > 0) {
8417
+ manageSuggestions(query, showAll = false) {
8418
+ if (showAll || (query && query.length > 0)) {
8328
8419
  this.openDropdown();
8329
8420
  const timezones = DateTz.timezones();
8330
- const filtered = timezones.filter(tz => tz.toLowerCase().includes(query.toLowerCase()));
8421
+ const filtered = showAll && !query
8422
+ ? timezones
8423
+ : timezones.filter(tz => tz.toLowerCase().includes(query.toLowerCase()));
8331
8424
  this.suggestions.set(filtered.map(tz => ({ text: tz, value: tz })));
8332
8425
  }
8333
8426
  else {
@@ -8359,13 +8452,19 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8359
8452
  this.closeDropdown();
8360
8453
  }
8361
8454
  openDropdown() {
8455
+ const rect = this.el()?.nativeElement.getBoundingClientRect();
8456
+ if (rect) {
8457
+ this.dropdownTop.set(rect.bottom);
8458
+ this.dropdownLeft.set(rect.left);
8459
+ this.dropdownWidth.set(rect.width);
8460
+ }
8362
8461
  this.isOpen.set(true);
8363
8462
  }
8364
8463
  closeDropdown() {
8365
8464
  this.isOpen.set(false);
8366
8465
  }
8367
8466
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AutocompleteTimezonesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8368
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteTimezonesComponent, isStandalone: true, selector: "rlb-autocomplete-timezones", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8467
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteTimezonesComponent, isStandalone: true, selector: "rlb-autocomplete-timezones", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "open-on-focus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "handleOutsideEvent($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8369
8468
  <ng-content select="[before]"></ng-content>
8370
8469
  <div class="input-group has-validation position-relative">
8371
8470
  <input
@@ -8380,6 +8479,7 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8380
8479
  [attr.placeholder]="placeholder()"
8381
8480
  [class.form-control-lg]="size() === 'large'"
8382
8481
  [class.form-control-sm]="size() === 'small'"
8482
+ (focus)="onFocus()"
8383
8483
  (blur)="touch()"
8384
8484
  [ngClass]="{
8385
8485
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -8397,10 +8497,13 @@ class AutocompleteTimezonesComponent extends AbstractComponent {
8397
8497
  @if (isOpen()) {
8398
8498
  <div
8399
8499
  #autocomplete
8400
- class="dropdown-menu show w-100 position-absolute overflow-y-auto shadow"
8500
+ class="dropdown-menu show overflow-y-auto shadow"
8401
8501
  [style.max-height.px]="maxHeight()"
8402
8502
  [style.max-width.px]="menuMaxWidth()"
8403
- style="z-index: 1000; top: 100%;"
8503
+ [style.top.px]="dropdownTop()"
8504
+ [style.left.px]="dropdownLeft()"
8505
+ [style.width.px]="dropdownWidth()"
8506
+ style="z-index: 1050; position: fixed;"
8404
8507
  >
8405
8508
  @if (!hasSuggestions()) {
8406
8509
  <a class="dropdown-item disabled text-center italic">No suggestions</a>
@@ -8448,6 +8551,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8448
8551
  [attr.placeholder]="placeholder()"
8449
8552
  [class.form-control-lg]="size() === 'large'"
8450
8553
  [class.form-control-sm]="size() === 'small'"
8554
+ (focus)="onFocus()"
8451
8555
  (blur)="touch()"
8452
8556
  [ngClass]="{
8453
8557
  'is-invalid': controlTouched() && invalid() && enableValidation(),
@@ -8465,10 +8569,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8465
8569
  @if (isOpen()) {
8466
8570
  <div
8467
8571
  #autocomplete
8468
- class="dropdown-menu show w-100 position-absolute overflow-y-auto shadow"
8572
+ class="dropdown-menu show overflow-y-auto shadow"
8469
8573
  [style.max-height.px]="maxHeight()"
8470
8574
  [style.max-width.px]="menuMaxWidth()"
8471
- style="z-index: 1000; top: 100%;"
8575
+ [style.top.px]="dropdownTop()"
8576
+ [style.left.px]="dropdownLeft()"
8577
+ [style.width.px]="dropdownWidth()"
8578
+ style="z-index: 1050; position: fixed;"
8472
8579
  >
8473
8580
  @if (!hasSuggestions()) {
8474
8581
  <a class="dropdown-item disabled text-center italic">No suggestions</a>
@@ -8504,7 +8611,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8504
8611
  changeDetection: ChangeDetectionStrategy.OnPush,
8505
8612
  imports: [NgClass, InputValidationComponent, ProgressComponent],
8506
8613
  }]
8507
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8614
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], openOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "open-on-focus", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8508
8615
 
8509
8616
  class AutocompleteComponent extends AbstractComponent {
8510
8617
  onDocumentPointerDown(event) {
@@ -8540,17 +8647,32 @@ class AutocompleteComponent extends AbstractComponent {
8540
8647
  this.userDefinedId = input('', { ...(ngDevMode ? { debugName: "userDefinedId" } : /* istanbul ignore next */ {}), alias: 'id', transform: (v) => v || '' });
8541
8648
  this.enableValidation = input(false, { ...(ngDevMode ? { debugName: "enableValidation" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enable-validation' });
8542
8649
  this.inputAutocomplete = input('off', ...(ngDevMode ? [{ debugName: "inputAutocomplete" }] : /* istanbul ignore next */ []));
8650
+ this.openOnFocus = input(false, { ...(ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'open-on-focus' });
8543
8651
  this.el = viewChild('field', ...(ngDevMode ? [{ debugName: "el" }] : /* istanbul ignore next */ []));
8544
8652
  this.dropdown = viewChild('autocomplete', ...(ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []));
8545
8653
  this.selected = output();
8546
8654
  this.hostRef = inject((ElementRef));
8547
8655
  this.searchSubject = new Subject();
8548
- // Use RxJS for cleaner debouncing
8549
8656
  this.searchSubject
8550
8657
  .pipe(debounceTime(300), distinctUntilChanged(), takeUntilDestroyed())
8551
8658
  .subscribe(val => {
8552
8659
  this.manageSuggestions(val);
8553
8660
  });
8661
+ const destroyRef = inject(DestroyRef);
8662
+ const onScroll = (event) => {
8663
+ if (!this.isOpen())
8664
+ return;
8665
+ if (this.dropdown()?.nativeElement.contains(event.target))
8666
+ return;
8667
+ this.closeDropdown();
8668
+ };
8669
+ document.addEventListener('scroll', onScroll, { capture: true });
8670
+ destroyRef.onDestroy(() => document.removeEventListener('scroll', onScroll, { capture: true }));
8671
+ }
8672
+ onFocus() {
8673
+ if (this.openOnFocus() && !this.isOpen()) {
8674
+ this.manageSuggestions('', true);
8675
+ }
8554
8676
  }
8555
8677
  update(ev) {
8556
8678
  if (this.disabled())
@@ -8571,10 +8693,10 @@ class AutocompleteComponent extends AbstractComponent {
8571
8693
  // }
8572
8694
  // }
8573
8695
  }
8574
- manageSuggestions(data) {
8696
+ manageSuggestions(data, showAll = false) {
8575
8697
  // 1. Reset suggestions but keep dropdown state logic clean
8576
8698
  this.suggestions.set([]);
8577
- if (data && data.length >= this.charsToSearch()) {
8699
+ if (showAll || (data && data.length >= this.charsToSearch())) {
8578
8700
  this.openDropdown();
8579
8701
  try {
8580
8702
  const result = this.autocomplete()(data);
@@ -8668,7 +8790,7 @@ class AutocompleteComponent extends AbstractComponent {
8668
8790
  this.acLoading.set(false);
8669
8791
  }
8670
8792
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8671
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteComponent, isStandalone: true, selector: "rlb-autocomplete", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, charsToSearch: { classPropertyName: "charsToSearch", publicName: "chars-to-search", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null }, inputAutocomplete: { classPropertyName: "inputAutocomplete", publicName: "inputAutocomplete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "onDocumentPointerDown($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8793
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: AutocompleteComponent, isStandalone: true, selector: "rlb-autocomplete", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "max-height", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, charsToSearch: { classPropertyName: "charsToSearch", publicName: "chars-to-search", isSignal: true, isRequired: false, transformFunction: null }, menuMaxWidth: { classPropertyName: "menuMaxWidth", publicName: "menu-max-width", isSignal: true, isRequired: false, transformFunction: null }, userDefinedId: { classPropertyName: "userDefinedId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, enableValidation: { classPropertyName: "enableValidation", publicName: "enable-validation", isSignal: true, isRequired: false, transformFunction: null }, inputAutocomplete: { classPropertyName: "inputAutocomplete", publicName: "inputAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "open-on-focus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", selected: "selected" }, host: { listeners: { "document:pointerdown": "onDocumentPointerDown($event)", "document:keydown.escape": "onEscape($event)" }, properties: { "attr.id": "null" } }, viewQueries: [{ propertyName: "el", first: true, predicate: ["field"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["autocomplete"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8672
8794
  <ng-content select="[before]"></ng-content>
8673
8795
  <div class="input-group has-validation position-relative">
8674
8796
  <input
@@ -8678,6 +8800,7 @@ class AutocompleteComponent extends AbstractComponent {
8678
8800
  [value]="getText(value())"
8679
8801
  (input)="update($event.target)"
8680
8802
  (keyup.enter)="onEnter($event.target)"
8803
+ (focus)="onFocus()"
8681
8804
  (blur)="touch()"
8682
8805
  [id]="id()"
8683
8806
  [type]="type()"
@@ -8749,6 +8872,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8749
8872
  [value]="getText(value())"
8750
8873
  (input)="update($event.target)"
8751
8874
  (keyup.enter)="onEnter($event.target)"
8875
+ (focus)="onFocus()"
8752
8876
  (blur)="touch()"
8753
8877
  [id]="id()"
8754
8878
  [type]="type()"
@@ -8813,7 +8937,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
8813
8937
  changeDetection: ChangeDetectionStrategy.OnPush,
8814
8938
  imports: [NgClass, InputValidationComponent],
8815
8939
  }]
8816
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], charsToSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "chars-to-search", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], inputAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAutocomplete", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8940
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "max-height", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], charsToSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "chars-to-search", required: false }] }], menuMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "menu-max-width", required: false }] }], userDefinedId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], enableValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "enable-validation", required: false }] }], inputAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAutocomplete", required: false }] }], openOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "open-on-focus", required: false }] }], el: [{ type: i0.ViewChild, args: ['field', { isSignal: true }] }], dropdown: [{ type: i0.ViewChild, args: ['autocomplete', { isSignal: true }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
8817
8941
 
8818
8942
  class CheckboxComponent extends AbstractComponent {
8819
8943
  setExtValidation(val) {