@open-rlb/ng-bootstrap 3.3.7 → 3.3.8

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.
@@ -6225,7 +6225,14 @@ class AbstractAutocompleteComponent extends AbstractComponent {
6225
6225
  const dropdown = this.dropdownEl();
6226
6226
  if (!dropdown)
6227
6227
  return;
6228
- // Always ensure the display is set, even if isOpen was already true
6228
+ const rect = this.el?.nativeElement.getBoundingClientRect();
6229
+ if (rect) {
6230
+ this.renderer.setStyle(dropdown.nativeElement, 'position', 'fixed');
6231
+ this.renderer.setStyle(dropdown.nativeElement, 'top', `${rect.bottom}px`);
6232
+ this.renderer.setStyle(dropdown.nativeElement, 'left', `${rect.left}px`);
6233
+ this.renderer.setStyle(dropdown.nativeElement, 'width', `${rect.width}px`);
6234
+ this.renderer.setStyle(dropdown.nativeElement, 'z-index', '1050');
6235
+ }
6229
6236
  this.renderer.setStyle(dropdown.nativeElement, 'display', 'block');
6230
6237
  this.isOpen = true;
6231
6238
  }
@@ -6354,6 +6361,9 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
6354
6361
  constructor() {
6355
6362
  super();
6356
6363
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
6364
+ this.dropdownTop = signal(0, ...(ngDevMode ? [{ debugName: "dropdownTop" }] : /* istanbul ignore next */ []));
6365
+ this.dropdownLeft = signal(0, ...(ngDevMode ? [{ debugName: "dropdownLeft" }] : /* istanbul ignore next */ []));
6366
+ this.dropdownWidth = signal(0, ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
6357
6367
  this.suggestions = signal([], ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
6358
6368
  this.hasSuggestions = computed(() => this.suggestions().length > 0, ...(ngDevMode ? [{ debugName: "hasSuggestions" }] : /* istanbul ignore next */ []));
6359
6369
  this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -7646,6 +7656,12 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7646
7656
  this.closeDropdown();
7647
7657
  }
7648
7658
  openDropdown() {
7659
+ const rect = this.el()?.nativeElement.getBoundingClientRect();
7660
+ if (rect) {
7661
+ this.dropdownTop.set(rect.bottom);
7662
+ this.dropdownLeft.set(rect.left);
7663
+ this.dropdownWidth.set(rect.width);
7664
+ }
7649
7665
  this.isOpen.set(true);
7650
7666
  }
7651
7667
  closeDropdown() {
@@ -7690,10 +7706,13 @@ class AutocompleteCountryDialCodeComponent extends AbstractComponent {
7690
7706
  @if (isOpen()) {
7691
7707
  <div
7692
7708
  #autocomplete
7693
- class="dropdown-menu show w-100 position-absolute overflow-y-auto shadow"
7709
+ class="dropdown-menu show overflow-y-auto shadow"
7694
7710
  [style.max-height.px]="maxHeight()"
7695
7711
  [style.max-width.px]="menuMaxWidth()"
7696
- style="z-index: 1000; top: 100%;"
7712
+ [style.top.px]="dropdownTop()"
7713
+ [style.left.px]="dropdownLeft()"
7714
+ [style.width.px]="dropdownWidth()"
7715
+ style="z-index: 1050; position: fixed;"
7697
7716
  >
7698
7717
  @if (!hasSuggestions()) {
7699
7718
  <a class="dropdown-item disabled text-center italic">No suggestions</a>
@@ -7768,10 +7787,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
7768
7787
  @if (isOpen()) {
7769
7788
  <div
7770
7789
  #autocomplete
7771
- class="dropdown-menu show w-100 position-absolute overflow-y-auto shadow"
7790
+ class="dropdown-menu show overflow-y-auto shadow"
7772
7791
  [style.max-height.px]="maxHeight()"
7773
7792
  [style.max-width.px]="menuMaxWidth()"
7774
- style="z-index: 1000; top: 100%;"
7793
+ [style.top.px]="dropdownTop()"
7794
+ [style.left.px]="dropdownLeft()"
7795
+ [style.width.px]="dropdownWidth()"
7796
+ style="z-index: 1050; position: fixed;"
7775
7797
  >
7776
7798
  @if (!hasSuggestions()) {
7777
7799
  <a class="dropdown-item disabled text-center italic">No suggestions</a>
@@ -7815,12 +7837,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
7815
7837
  '[attr.id]': 'null',
7816
7838
  },
7817
7839
  changeDetection: ChangeDetectionStrategy.OnPush,
7818
- imports: [
7819
- NgClass,
7820
- InputValidationComponent,
7821
- ProgressComponent,
7822
- DataTableActionComponent,
7823
- ],
7840
+ imports: [NgClass, InputValidationComponent, ProgressComponent],
7824
7841
  }]
7825
7842
  }], 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"] }] } });
7826
7843
 
@@ -7828,6 +7845,9 @@ class AutocompleteCountryComponent extends AbstractComponent {
7828
7845
  constructor() {
7829
7846
  super();
7830
7847
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
7848
+ this.dropdownTop = signal(0, ...(ngDevMode ? [{ debugName: "dropdownTop" }] : /* istanbul ignore next */ []));
7849
+ this.dropdownLeft = signal(0, ...(ngDevMode ? [{ debugName: "dropdownLeft" }] : /* istanbul ignore next */ []));
7850
+ this.dropdownWidth = signal(0, ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
7831
7851
  this.suggestions = signal([], ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
7832
7852
  this.hasSuggestions = computed(() => this.suggestions().length > 0, ...(ngDevMode ? [{ debugName: "hasSuggestions" }] : /* istanbul ignore next */ []));
7833
7853
  this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
@@ -8105,6 +8125,12 @@ class AutocompleteCountryComponent extends AbstractComponent {
8105
8125
  this.closeDropdown();
8106
8126
  }
8107
8127
  openDropdown() {
8128
+ const rect = this.el()?.nativeElement.getBoundingClientRect();
8129
+ if (rect) {
8130
+ this.dropdownTop.set(rect.bottom);
8131
+ this.dropdownLeft.set(rect.left);
8132
+ this.dropdownWidth.set(rect.width);
8133
+ }
8108
8134
  this.isOpen.set(true);
8109
8135
  }
8110
8136
  closeDropdown() {
@@ -8149,10 +8175,13 @@ class AutocompleteCountryComponent extends AbstractComponent {
8149
8175
  @if (isOpen()) {
8150
8176
  <div
8151
8177
  #autocomplete
8152
- class="dropdown-menu show w-100 position-absolute overflow-y-auto"
8178
+ class="dropdown-menu show overflow-y-auto"
8153
8179
  [style.max-height.px]="maxHeight()"
8154
8180
  [style.max-width.px]="menuMaxWidth()"
8155
- style="z-index: 1000; top: 100%;"
8181
+ [style.top.px]="dropdownTop()"
8182
+ [style.left.px]="dropdownLeft()"
8183
+ [style.width.px]="dropdownWidth()"
8184
+ style="z-index: 1050; position: fixed;"
8156
8185
  >
8157
8186
  @if (!hasSuggestions()) {
8158
8187
  <a class="dropdown-item disabled text-center">No suggestions</a>
@@ -8216,10 +8245,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
8216
8245
  @if (isOpen()) {
8217
8246
  <div
8218
8247
  #autocomplete
8219
- class="dropdown-menu show w-100 position-absolute overflow-y-auto"
8248
+ class="dropdown-menu show overflow-y-auto"
8220
8249
  [style.max-height.px]="maxHeight()"
8221
8250
  [style.max-width.px]="menuMaxWidth()"
8222
- style="z-index: 1000; top: 100%;"
8251
+ [style.top.px]="dropdownTop()"
8252
+ [style.left.px]="dropdownLeft()"
8253
+ [style.width.px]="dropdownWidth()"
8254
+ style="z-index: 1050; position: fixed;"
8223
8255
  >
8224
8256
  @if (!hasSuggestions()) {
8225
8257
  <a class="dropdown-item disabled text-center">No suggestions</a>
@@ -8253,11 +8285,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
8253
8285
  '[attr.id]': 'null',
8254
8286
  },
8255
8287
  changeDetection: ChangeDetectionStrategy.OnPush,
8256
- imports: [
8257
- NgClass,
8258
- InputValidationComponent,
8259
- DataTableActionComponent,
8260
- ],
8288
+ imports: [NgClass, InputValidationComponent],
8261
8289
  }]
8262
8290
  }], 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"] }] } });
8263
8291
 
@@ -8501,6 +8529,9 @@ class AutocompleteComponent extends AbstractComponent {
8501
8529
  this.acLoading = signal(false, ...(ngDevMode ? [{ debugName: "acLoading" }] : /* istanbul ignore next */ []));
8502
8530
  // State
8503
8531
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
8532
+ this.dropdownTop = signal(0, ...(ngDevMode ? [{ debugName: "dropdownTop" }] : /* istanbul ignore next */ []));
8533
+ this.dropdownLeft = signal(0, ...(ngDevMode ? [{ debugName: "dropdownLeft" }] : /* istanbul ignore next */ []));
8534
+ this.dropdownWidth = signal(0, ...(ngDevMode ? [{ debugName: "dropdownWidth" }] : /* istanbul ignore next */ []));
8504
8535
  this.suggestions = signal([], ...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
8505
8536
  this.hasSuggestions = computed(() => this.suggestions().length > 0, ...(ngDevMode ? [{ debugName: "hasSuggestions" }] : /* istanbul ignore next */ []));
8506
8537
  // Inputs
@@ -8629,6 +8660,12 @@ class AutocompleteComponent extends AbstractComponent {
8629
8660
  openDropdown() {
8630
8661
  if (this.isOpen())
8631
8662
  return;
8663
+ const rect = this.el()?.nativeElement.getBoundingClientRect();
8664
+ if (rect) {
8665
+ this.dropdownTop.set(rect.bottom);
8666
+ this.dropdownLeft.set(rect.left);
8667
+ this.dropdownWidth.set(rect.width);
8668
+ }
8632
8669
  this.isOpen.set(true);
8633
8670
  }
8634
8671
  closeDropdown() {
@@ -8670,10 +8707,13 @@ class AutocompleteComponent extends AbstractComponent {
8670
8707
  @if (isOpen()) {
8671
8708
  <div
8672
8709
  #autocomplete
8673
- class="dropdown-menu show w-100 position-absolute overflow-y-auto"
8710
+ class="dropdown-menu show overflow-y-auto"
8674
8711
  [style.max-height.px]="maxHeight()"
8675
8712
  [style.max-width.px]="menuMaxWidth()"
8676
- style="z-index: 1000; top: 100%;"
8713
+ [style.top.px]="dropdownTop()"
8714
+ [style.left.px]="dropdownLeft()"
8715
+ [style.width.px]="dropdownWidth()"
8716
+ style="z-index: 1050; position: fixed;"
8677
8717
  >
8678
8718
  @if (acLoading()) {
8679
8719
  <div class="dropdown-item disabled text-center">Loading...</div>
@@ -8738,10 +8778,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
8738
8778
  @if (isOpen()) {
8739
8779
  <div
8740
8780
  #autocomplete
8741
- class="dropdown-menu show w-100 position-absolute overflow-y-auto"
8781
+ class="dropdown-menu show overflow-y-auto"
8742
8782
  [style.max-height.px]="maxHeight()"
8743
8783
  [style.max-width.px]="menuMaxWidth()"
8744
- style="z-index: 1000; top: 100%;"
8784
+ [style.top.px]="dropdownTop()"
8785
+ [style.left.px]="dropdownLeft()"
8786
+ [style.width.px]="dropdownWidth()"
8787
+ style="z-index: 1050; position: fixed;"
8745
8788
  >
8746
8789
  @if (acLoading()) {
8747
8790
  <div class="dropdown-item disabled text-center">Loading...</div>
@@ -8770,17 +8813,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
8770
8813
  <ng-content select="[after]"></ng-content>
8771
8814
  `,
8772
8815
  host: {
8773
- // Modern Angular 21 syntax for global listeners
8774
8816
  '(document:pointerdown)': 'onDocumentPointerDown($event)',
8775
8817
  '(document:keydown.escape)': 'onEscape($event)',
8776
8818
  '[attr.id]': 'null',
8777
8819
  },
8778
8820
  changeDetection: ChangeDetectionStrategy.OnPush,
8779
- imports: [
8780
- NgClass,
8781
- InputValidationComponent,
8782
- DataTableActionComponent,
8783
- ],
8821
+ imports: [NgClass, InputValidationComponent],
8784
8822
  }]
8785
8823
  }], 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"] }] } });
8786
8824