zek 17.3.97 → 17.3.118
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/esm2022/lib/directives/delayed-input.directive.mjs +57 -0
- package/esm2022/lib/directives/index.mjs +2 -0
- package/esm2022/lib/models/tree.mjs +2 -0
- package/esm2022/lib/models/tree.model.mjs +4 -1
- package/esm2022/lib/modules/alert/toast/toast.mjs +3 -6
- package/esm2022/lib/modules/progress/progress.mjs +3 -6
- package/esm2022/lib/services/auth.service.mjs +14 -20
- package/esm2022/lib/services/web.api.mjs +1 -1
- package/esm2022/lib/utils/array-helper.mjs +91 -27
- package/esm2022/lib/utils/index.mjs +2 -1
- package/esm2022/lib/utils/interval-helper.mjs +32 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/zek.mjs +195 -56
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/directives/delayed-input.directive.d.ts +15 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/models/tree.d.ts +22 -0
- package/lib/models/tree.model.d.ts +3 -0
- package/lib/services/web.api.d.ts +1 -1
- package/lib/utils/array-helper.d.ts +12 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/interval-helper.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/models/flatten-tree.mjs +0 -2
- package/lib/models/flatten-tree.d.ts +0 -6
|
@@ -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';
|
|
@@ -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
|
+
}
|
|
@@ -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<
|
|
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/
|
|
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
|
}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -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
package/public-api.d.ts
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxhdHRlbi10cmVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvemVrL3NyYy9saWIvbW9kZWxzL2ZsYXR0ZW4tdHJlZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJRmxhdHRlblRyZWU8VEtleSA9IGFueSwgVFZhbHVlID0gYW55PiB7XHJcbiAgICBrZXk/OiBUS2V5IHwgbnVsbDtcclxuICAgIHZhbHVlPzogVFZhbHVlIHwgbnVsbDtcclxuICAgIGluZGVudDogbnVtYmVyO1xyXG4gICAgY291bnQ6IG51bWJlcjtcclxufVxyXG4iXX0=
|