@sumaris-net/ngx-components 18.8.17 → 18.8.19

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": "18.8.17",
4
+ "version": "18.8.19",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -169,3 +169,19 @@ export declare function noHtml(value: string): string;
169
169
  * @return {string} The interpolated string with placeholders replaced by corresponding values, or the original string if no placeholders are matched.
170
170
  */
171
171
  export declare function interpolateString(message: string, interpolateParams: Record<string, any>): string;
172
+ /**
173
+ *
174
+ * Transforms a value (typically a string) to a number.
175
+ * Intended to be used as a transform function of an input.
176
+ * BLA - SHould return n=undefined when for a nil input
177
+ * @param value Value to be transformed.
178
+ * @param fallbackValue Value to use if the provided value can't be parsed as a number.
179
+ *
180
+ * @usageNotes
181
+ * ```ts
182
+ * @Input({ transform: numberAttribute }) id!: number;
183
+ * ```
184
+ *
185
+ * @publicApi
186
+ */
187
+ export declare function numberAttribute(value: unknown, fallbackValue?: number): number;
@@ -17,7 +17,7 @@ export interface InputElement extends FocusableElement {
17
17
  }
18
18
  export declare function isInputElement(object: any): object is InputElement;
19
19
  export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
20
- export declare function tabindexComparator(a: InputElement, b: InputElement): 1 | -1 | 0;
20
+ export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
21
21
  export interface CanGainFocusOptions {
22
22
  minTabindex?: number;
23
23
  maxTabindex?: number;
@@ -3,19 +3,20 @@ import * as i0 from "@angular/core";
3
3
  export declare class MapGetPipe implements PipeTransform {
4
4
  transform<T = any, R = any>(val: T, args: keyof T | string | number | {
5
5
  key: keyof T | string | number;
6
+ defaultValue?: any;
6
7
  }): R;
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<MapGetPipe, never>;
8
9
  static ɵpipe: i0.ɵɵPipeDeclaration<MapGetPipe, "mapGet", false>;
9
10
  static ɵprov: i0.ɵɵInjectableDeclaration<MapGetPipe>;
10
11
  }
11
12
  export declare class MapKeysPipe implements PipeTransform {
12
- transform(map: any): any[];
13
+ transform(map: any, defaultValue?: any[]): any[];
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<MapKeysPipe, never>;
14
15
  static ɵpipe: i0.ɵɵPipeDeclaration<MapKeysPipe, "mapKeys", false>;
15
16
  static ɵprov: i0.ɵɵInjectableDeclaration<MapKeysPipe>;
16
17
  }
17
18
  export declare class MapValuesPipe implements PipeTransform {
18
- transform<K = any, V = any>(map: any | Map<K, V>): V[];
19
+ transform<K = any, V = any>(map: any | Map<K, V>, defaultValue?: V[]): V[];
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<MapValuesPipe, never>;
20
21
  static ɵpipe: i0.ɵɵPipeDeclaration<MapValuesPipe, "mapValues", false>;
21
22
  static ɵprov: i0.ɵɵInjectableDeclaration<MapValuesPipe>;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "18.8.17",
5
+ "version": "18.8.19",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{