@sumaris-net/ngx-components 2.4.12 → 2.4.13

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "2.4.12",
4
+ "version": "2.4.13",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -126,3 +126,4 @@ export declare class Beans {
126
126
  [key: string]: T;
127
127
  };
128
128
  }
129
+ export declare function findParentWithClass(elem: HTMLElement, className: string): HTMLElement;
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, ViewRef } from '@angular/core';
2
2
  import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@angular/forms';
3
3
  import { BehaviorSubject, Observable } from 'rxjs';
4
4
  import { SuggestFn } from '../../services/entity-service.class';
@@ -7,11 +7,15 @@ import { DisplayFn, EqualsFn } from '../../form/field.model';
7
7
  import { FloatLabelType, MatFormFieldAppearance } from '@angular/material/form-field';
8
8
  import { MatSelect } from '@angular/material/select';
9
9
  import { MatAutocomplete, MatAutocompleteTrigger } from '@angular/material/autocomplete';
10
- import { IonSearchbar } from '@ionic/angular';
10
+ import { IonSearchbar, ModalController } from '@ionic/angular';
11
11
  import { MatAutocompleteFieldConfig } from './material.autocomplete.config';
12
12
  import * as i0 from "@angular/core";
13
- export declare class MatAutocompleteField implements OnInit, OnDestroy, InputElement, ControlValueAccessor {
13
+ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDestroy, InputElement, ControlValueAccessor {
14
14
  protected cd: ChangeDetectorRef;
15
+ protected modalController: ModalController;
16
+ protected renderer: Renderer2;
17
+ protected document: Document;
18
+ private viewRef;
15
19
  private formGroupDir;
16
20
  private _onChangeCallback;
17
21
  private _onTouchedCallback;
@@ -75,7 +79,7 @@ export declare class MatAutocompleteField implements OnInit, OnDestroy, InputEle
75
79
  private _$filter;
76
80
  private _itemCount;
77
81
  private _reload$;
78
- constructor(cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
82
+ constructor(cd: ChangeDetectorRef, modalController: ModalController, renderer: Renderer2, document: Document, viewRef: ViewRef, formGroupDir: FormGroupDirective);
79
83
  get itemCount(): number;
80
84
  get canFetchMore(): boolean;
81
85
  set filter(value: any);
@@ -92,6 +96,7 @@ export declare class MatAutocompleteField implements OnInit, OnDestroy, InputEle
92
96
  get loading(): boolean;
93
97
  get desktop(): boolean;
94
98
  ngOnInit(): void;
99
+ ngAfterViewInit(): void;
95
100
  ngOnDestroy(): void;
96
101
  /**
97
102
  * Allow to reload content. Useful when filter has been changed but not detected
@@ -120,6 +125,15 @@ export declare class MatAutocompleteField implements OnInit, OnDestroy, InputEle
120
125
  private getMatSelectPanel;
121
126
  private markForCheck;
122
127
  protected markAsLoading(): void;
123
- static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteField, [null, { optional: true; }]>;
128
+ private _fixMatSelectPositionAndSearchbar;
129
+ private _fixMatSelectPanelPosition;
130
+ /**
131
+ * Hack : if we are in a IonModal, it's necessary to move the CdkOverlay container
132
+ * in the IonModal to might keep focus in IonSearchbar.
133
+ * @param panelElement
134
+ * @private
135
+ */
136
+ private _fixSearchbarOverlay;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteField, [null, null, null, null, null, { optional: true; }]>;
124
138
  static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocompleteField, "mat-autocomplete-field", never, { "equals": "equals"; "logPrefix": "logPrefix"; "formControl": "formControl"; "formControlName": "formControlName"; "floatLabel": "floatLabel"; "appearance": "appearance"; "placeholder": "placeholder"; "suggestFn": "suggestFn"; "required": "required"; "mobile": "mobile"; "clearable": "clearable"; "debounceTime": "debounceTime"; "displayWith": "displayWith"; "displayAttributes": "displayAttributes"; "displayColumnSizes": "displayColumnSizes"; "displayColumnNames": "displayColumnNames"; "highlightAccent": "highlightAccent"; "showAllOnFocus": "showAllOnFocus"; "showPanelOnFocus": "showPanelOnFocus"; "autofocus": "autofocus"; "config": "config"; "i18nPrefix": "i18nPrefix"; "noResultMessage": "noResultMessage"; "classList": "class"; "panelWidth": "panelWidth"; "matAutocompletePosition": "matAutocompletePosition"; "multiple": "multiple"; "itemSize": "itemSize"; "fetchMoreThreshold": "fetchMoreThreshold"; "suggestLengthThreshold": "suggestLengthThreshold"; "showLoadingSpinner": "showLoadingSpinner"; "debug": "debug"; "showSearchBar": "showSearchBar"; "stickySearchBar": "stickySearchBar"; "filter": "filter"; "readonly": "readonly"; "tabindex": "tabindex"; "items": "items"; }, { "clicked": "click"; "blurred": "blur"; "focused": "focus"; "dropButtonClick": "dropButtonClick"; "keydownEscape": "keydown.escape"; "keyupEnter": "keyup.enter"; }, never, ["[matError]", "[matAfter]", "[matPrefix]", "[matSuffix]"], false>;
125
139
  }
@@ -4,6 +4,7 @@ import { MatAutocompleteField } from '../material.autocomplete';
4
4
  import { Subscription } from 'rxjs';
5
5
  import { LoadResult } from '../../../services/entity-service.class';
6
6
  import { MatAutocompleteConfigHolder } from '../material.autocomplete.config';
7
+ import { IonModal } from '@ionic/angular';
7
8
  import * as i0 from "@angular/core";
8
9
  declare class EntityTestClass {
9
10
  id: number;
@@ -22,6 +23,7 @@ export declare class AutocompleteTestPage implements OnInit, AfterViewInit {
22
23
  memoryTimer: Subscription;
23
24
  mode: 'mobile' | 'desktop' | 'memory' | 'temp';
24
25
  farEntityField: MatAutocompleteField;
26
+ ionModal: IonModal;
25
27
  constructor(formBuilder: UntypedFormBuilder);
26
28
  ngOnInit(): void;
27
29
  ngAfterViewInit(): void;