@sumaris-net/ngx-components 1.0.5 → 1.0.9

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": "1.0.5",
4
+ "version": "1.0.9",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -292,7 +292,7 @@ export interface FormArrayHelperOptions {
292
292
  allowEmptyArray: boolean;
293
293
  validators?: ValidatorFn[];
294
294
  }
295
- export declare class FormArrayHelper<T = Entity<any>> {
295
+ export declare class FormArrayHelper<T = Entity<any>, C extends AbstractControl = AbstractControl> {
296
296
  private readonly _formArray;
297
297
  private createControl;
298
298
  private equals;
@@ -303,7 +303,7 @@ export declare class FormArrayHelper<T = Entity<any>> {
303
303
  get allowEmptyArray(): boolean;
304
304
  set allowEmptyArray(value: boolean);
305
305
  get formArray(): FormArray;
306
- constructor(_formArray: FormArray, createControl: (value?: T) => AbstractControl, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: FormArrayHelperOptions);
306
+ constructor(_formArray: FormArray, createControl: (value?: T) => C, equals: (v1: T, v2: T) => boolean, isEmpty: (value: T) => boolean, options?: FormArrayHelperOptions);
307
307
  add(value?: T, options?: {
308
308
  emitEvent: boolean;
309
309
  }): boolean;
@@ -313,7 +313,7 @@ export declare class FormArrayHelper<T = Entity<any>> {
313
313
  isLast(index: number): boolean;
314
314
  removeAllEmpty(): void;
315
315
  size(): number;
316
- at(index: number): AbstractControl;
316
+ at(index: number): C;
317
317
  disable(opts?: {
318
318
  onlySelf?: boolean;
319
319
  emitEvent?: boolean;
@@ -322,6 +322,6 @@ export declare class FormArrayHelper<T = Entity<any>> {
322
322
  onlySelf?: boolean;
323
323
  emitEvent?: boolean;
324
324
  }): void;
325
- forEach(ite: (control: AbstractControl) => void): void;
325
+ forEach(ite: (control: C) => void): void;
326
326
  protected setAllowEmptyArray(value: boolean): void;
327
327
  }
@@ -1,8 +1,19 @@
1
- import { PipeTransform } from '@angular/core';
1
+ import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { FormErrorTranslator, FormErrorTranslatorOptions } from '../validator/form-error-adapter.class';
4
- export declare class FormErrorTranslatePipe implements PipeTransform {
4
+ export declare class FormErrorTranslatePipe implements PipeTransform, OnDestroy {
5
5
  private adapter;
6
- constructor(adapter: FormErrorTranslator);
6
+ private _ref;
7
+ value: string;
8
+ private _lastForm;
9
+ private _lastOptions;
10
+ private _onFormStatusChange;
11
+ constructor(adapter: FormErrorTranslator, _ref: ChangeDetectorRef);
7
12
  transform(form: FormGroup, opts?: FormErrorTranslatorOptions): string;
13
+ ngOnDestroy(): void;
14
+ private _updateValue;
15
+ /**
16
+ * Clean any existing subscription to change events
17
+ */
18
+ private _dispose;
8
19
  }
@@ -1,13 +1,8 @@
1
- import { ChangeDetectorRef, PipeTransform } from '@angular/core';
1
+ import { PipeTransform } from '@angular/core';
2
2
  import { TranslateContextService } from '../services/translate-context.service';
3
3
  export declare class TranslateContextPipe implements PipeTransform {
4
4
  private translate;
5
- private _ref;
6
- value: string;
7
- lastKey: string | null;
8
- lastSuffix: string | null;
9
- lastParams: any[];
10
- constructor(translate: TranslateContextService, _ref: ChangeDetectorRef);
5
+ constructor(translate: TranslateContextService);
11
6
  transform(query: string, ...params: any[]): string;
12
7
  }
13
8
  export declare class TranslatablePipe implements PipeTransform {