zek 17.3.97 → 17.3.119

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.
@@ -0,0 +1,15 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { NumberInput } from '../components';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ZekDelayedInputDirective implements OnInit {
5
+ private _inputSubject$;
6
+ delayedInput: EventEmitter<string>;
7
+ private _delay;
8
+ get delay(): number;
9
+ set delay(v: NumberInput);
10
+ ngOnInit(): void;
11
+ private initSubscription;
12
+ onInput(value: string): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZekDelayedInputDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ZekDelayedInputDirective, "[zek-delayed-input]", never, { "delay": { "alias": "delay"; "required": false; }; }, { "delayedInput": "delayedInput"; }, never, never, true, never>;
15
+ }
@@ -0,0 +1 @@
1
+ export * from './delayed-input.directive';
@@ -17,4 +17,5 @@ export * from './nav.model';
17
17
  export * from './pager.model';
18
18
  export * from './print.model';
19
19
  export * from './tree.model';
20
+ export * from './tree';
20
21
  export * from './valid-event-args.model';
@@ -0,0 +1,22 @@
1
+ export interface IFlattenTree<TKey = any, TValue = any> {
2
+ key?: TKey | null;
3
+ value?: TValue | null;
4
+ indent: number;
5
+ count: number;
6
+ }
7
+ export interface INode {
8
+ id: number;
9
+ parentId?: number | null;
10
+ name: string | null;
11
+ checked?: boolean | null;
12
+ }
13
+ export interface ITreeNode extends INode {
14
+ children: ITreeNode[] | null;
15
+ }
16
+ export interface IFlattenTreeNode {
17
+ id?: number | null;
18
+ name?: string | null;
19
+ indent: number;
20
+ count: number;
21
+ checked?: boolean | null;
22
+ }
@@ -1,4 +1,7 @@
1
1
  import { KeyPairChecked } from './key-pair.model';
2
+ /**
3
+ * @deprecated use ITreeNode
4
+ */
2
5
  export declare class Tree extends KeyPairChecked<number, string> {
3
6
  parentId?: number | null;
4
7
  children?: Tree[] | null;
@@ -19,7 +19,7 @@ export declare class WebApiClient {
19
19
  protected toHttpParams(obj: any): HttpParams | undefined;
20
20
  post<T = any>(url: string, body?: any | null): Observable<T>;
21
21
  put<T = any>(url: string, body?: any | null): Observable<T>;
22
- delete(url: string, body?: any | null): Observable<any>;
22
+ delete<T = any>(url: string, body?: any | null): Observable<T>;
23
23
  patch<T = any>(url: string, body?: any | null): Observable<T>;
24
24
  protected getHeaders(body?: any | null): HttpHeaders;
25
25
  static ɵfac: i0.ɵɵFactoryDeclaration<WebApiClient, never>;
@@ -1,5 +1,5 @@
1
1
  import { KeyPair, KeyPairEx, Tree } from "../models";
2
- import { IFlattenTree } from "../models/flatten-tree";
2
+ import { IFlattenTree, IFlattenTreeNode, INode, ITreeNode } from "../models/tree";
3
3
  export declare class ArrayHelper {
4
4
  static insert(array: any[], index: number, item: any): void;
5
5
  /**
@@ -20,8 +20,19 @@ export declare class ArrayHelper {
20
20
  static distinct(array: any[]): any[];
21
21
  static filterByKey(filterValue: any, key: string, array: any[]): any[];
22
22
  static flatten(array: any, indent?: number): any[];
23
+ /**
24
+ * @deprecated use flattenDropDownList2
25
+ */
23
26
  static flattenDropDownList(tree: Tree | Tree[], indent?: number): IFlattenTree<any, any>[];
27
+ static flattenTreeNodeDropDownList(tree: ITreeNode | ITreeNode[], indent?: number): IFlattenTreeNode[];
24
28
  private static enumToKeyPairBaseArray;
25
29
  static enumToKeyPairArray(value: any): KeyPair<number, string>[];
26
30
  static enumToKeyPairExArray(value: any): KeyPairEx<number, string>[];
31
+ /**
32
+ * Method to create a tree from a flat array of nodes
33
+ * @param array
34
+ * @param safe if tue and some nodes not have parent thand adds as a root node. if false than thoose nodes skipped.
35
+ * @returns
36
+ */
37
+ static createTree(array: INode[], safe?: boolean): ITreeNode[];
27
38
  }
@@ -21,6 +21,7 @@ export * from './storage-helper';
21
21
  export * from './string-helper';
22
22
  export * from './thenBy';
23
23
  export * from './time-helper';
24
+ export * from './interval-helper';
24
25
  export * from './tmp-helper';
25
26
  export * from './url-helper';
26
27
  export * from './validation-helper';
@@ -0,0 +1,12 @@
1
+ export interface ITimeout {
2
+ id: number;
3
+ callback: string;
4
+ interval: number;
5
+ createdAt: Date;
6
+ }
7
+ export declare class IntervalHelper {
8
+ private static _timeouts;
9
+ static create(callback: Function, ms: number): ITimeout;
10
+ static clear(id: number): boolean;
11
+ static clearAll(): void;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zek",
3
- "version": "17.3.97",
3
+ "version": "17.3.119",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0",
6
6
  "@angular/core": "^17.3.0"
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./lib/components";
2
+ export * from "./lib/directives";
2
3
  export * from "./lib/models";
3
4
  export * from "./lib/modules";
4
5
  export * from "./lib/services";
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdHRlbi10cmVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvemVrL3NyYy9saWIvbW9kZWxzL2ZsYXR0ZW4tdHJlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJRmxhdHRlblRyZWU8VEtleSA9IGFueSwgVFZhbHVlID0gYW55PiB7XHJcbiAgICBrZXk/OiBUS2V5IHwgbnVsbDtcclxuICAgIHZhbHVlPzogVFZhbHVlIHwgbnVsbDtcclxuICAgIGluZGVudDogbnVtYmVyO1xyXG4gICAgY291bnQ6IG51bWJlcjtcclxufVxyXG4iXX0=
@@ -1,6 +0,0 @@
1
- export interface IFlattenTree<TKey = any, TValue = any> {
2
- key?: TKey | null;
3
- value?: TValue | null;
4
- indent: number;
5
- count: number;
6
- }