@stemy/ngx-utils 19.8.10 → 19.8.12

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.
@@ -340,6 +340,7 @@ export interface RectCoords {
340
340
  y: number;
341
341
  width: number;
342
342
  height: number;
343
+ meta?: Record<string, any>;
343
344
  }
344
345
  /**
345
346
  * Rectangle frame interface
@@ -17,3 +17,17 @@ export declare function provideEntryComponents(components: Type<any>[], moduleId
17
17
  export declare function provideOptions<O extends Record<string, any>>(options: O): Required<TypedValueProvider<O>>;
18
18
  export declare function provideWithOptions<O extends Record<string, any>, T = any>(type: Type<T>, options: O): TypedFactoryProvider<T>;
19
19
  export declare function injectOptions<O extends Record<string, any>>(defaults: O): O;
20
+ export interface DiffEntityResult<T extends {
21
+ id?: string | number;
22
+ }> {
23
+ removed: T[];
24
+ added: T[];
25
+ updated: T[];
26
+ }
27
+ /**
28
+ * Compares two arrays of entities and categorizes them into
29
+ * added, removed, and updated buckets.
30
+ */
31
+ export declare function diffEntities<T extends {
32
+ id?: string | number;
33
+ }>(current: T[], incoming: T[]): DiffEntityResult<T>;
@@ -1,4 +1,5 @@
1
1
  export declare class SetUtils {
2
2
  static equals(set: Set<any>, obj: any): boolean;
3
3
  static addArray(set: Set<any>, items: any[]): void;
4
+ static merge(set: Set<any>, other: Set<any>): void;
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.8.10",
3
+ "version": "19.8.12",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
package/public_api.d.ts CHANGED
@@ -21,7 +21,7 @@ export { stringify } from "./ngx-utils/utils/json.utils";
21
21
  export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
22
22
  export { LoaderUtils } from "./ngx-utils/utils/loader.utils";
23
23
  export { EPSILON, normalizeRange, clamp, overflow, isEqual, isZero, MathUtils } from "./ngx-utils/utils/math.utils";
24
- export { isBrowser, getRoot, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions } from "./ngx-utils/utils/misc";
24
+ export { isBrowser, getRoot, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions, DiffEntityResult, diffEntities } from "./ngx-utils/utils/misc";
25
25
  export { ObjectUtils } from "./ngx-utils/utils/object.utils";
26
26
  export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
27
27
  export { CancelablePromise, cancelablePromise, impatientPromise } from "./ngx-utils/utils/promise.utils";