@sumaris-net/ngx-components 18.10.29 → 18.11.0

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.10.29",
4
+ "version": "18.11.0",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -107,4 +107,27 @@ export declare abstract class EntityUtils {
107
107
  static arrayDistinctFilterFn<E extends IEntity<any, any>>(item: E, index: number, values: E[]): boolean;
108
108
  static findById<E extends IEntity<any, ID> = IEntity<any, any>, ID = number>(items: E[], id: ID): E | undefined;
109
109
  static fromObject<E extends IEntity<any, any>>(source: any, dataType: new () => E): E;
110
+ /**
111
+ * Recursively converts any object, entity, or array to a plain JavaScript object.
112
+ * This method handles entities by calling their asObject() method, processes arrays recursively,
113
+ * and provides protection against circular references.
114
+ *
115
+ * @param {any} source - The source object, entity, array, or primitive value to convert
116
+ * @param {any} [opts] - Optional configuration object passed to entity asObject() methods
117
+ * @param {WeakSet} [visited=new WeakSet()] - Internal parameter for circular reference detection
118
+ * @returns {any} A plain JavaScript object representation of the source
119
+ *
120
+ * @example
121
+ * // Convert a simple entity
122
+ * const plainObject = EntityUtils.asObject(myEntity);
123
+ *
124
+ * @example
125
+ * // Convert an array of entities
126
+ * const plainArray = EntityUtils.asObject([entity1, entity2]);
127
+ *
128
+ * @example
129
+ * // Convert with options
130
+ * const result = EntityUtils.asObject(myEntity, { minify: true });
131
+ */
132
+ static asObject(source: any, opts?: any, visited?: WeakSet<object>): any;
110
133
  }
@@ -57,5 +57,5 @@ export declare function toDateISOString(value: any): string | undefined;
57
57
  export declare function fromDateISOString(value: any): Moment | undefined;
58
58
  export declare function fromUnixTimestamp(timeInSec: number): momentImported.Moment;
59
59
  export declare function fromUnixMsTimestamp(timeInMs: number): momentImported.Moment;
60
- export declare function toDuration(value: number, unit?: unitOfTime.DurationConstructor): Duration;
60
+ export declare function toDuration(value: number, unit?: unitOfTime.DurationConstructor): Duration | undefined;
61
61
  export {};
@@ -17,11 +17,12 @@ 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 | 0 | -1;
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;
24
- excludeEmptyInput?: boolean;
24
+ isEmpty?: boolean;
25
+ isNotEmpty?: boolean;
25
26
  }
26
27
  export interface GetFocusableInputOptions extends CanGainFocusOptions {
27
28
  sortByTabIndex?: boolean;
@@ -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.10.29",
5
+ "version": "18.11.0",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{