coer-elements 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/Tools/Page.class.ts +12 -2
- package/Tools/Tools.ts +3 -3
- package/index.ts +1 -0
- package/interfaces/index.ts +17 -0
- package/package.json +1 -1
package/Tools/Page.class.ts
CHANGED
@@ -24,7 +24,7 @@ export class Page implements AfterViewInit, OnDestroy {
|
|
24
24
|
protected isReady: boolean = false;
|
25
25
|
|
26
26
|
/** */
|
27
|
-
protected
|
27
|
+
protected enableAnimations: boolean = false;
|
28
28
|
|
29
29
|
/** */
|
30
30
|
protected routeParams: any;
|
@@ -63,7 +63,7 @@ export class Page implements AfterViewInit, OnDestroy {
|
|
63
63
|
setTimeout(() => {
|
64
64
|
this.isReady = true;
|
65
65
|
this.RunPage();
|
66
|
-
setTimeout(() => { this.
|
66
|
+
setTimeout(() => { this.enableAnimations = true }, 1000);
|
67
67
|
});
|
68
68
|
|
69
69
|
}
|
@@ -184,4 +184,14 @@ export class Page implements AfterViewInit, OnDestroy {
|
|
184
184
|
if (Tools.IsNotNull(log)) console.log({ log, value });
|
185
185
|
else console.log(value);
|
186
186
|
}
|
187
|
+
|
188
|
+
|
189
|
+
/** Returns true if the value is null or undefined, false otherwise */
|
190
|
+
protected IsNotNull = Tools.IsNotNull;
|
191
|
+
|
192
|
+
/** Returns true if the value is null or undefined, false otherwise */
|
193
|
+
protected IsNull = Tools.IsNull;
|
194
|
+
|
195
|
+
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
196
|
+
protected IsOnlyWhiteSpace = Tools.IsOnlyWhiteSpace;
|
187
197
|
}
|
package/Tools/Tools.ts
CHANGED
@@ -10,7 +10,7 @@ export const Tools = {
|
|
10
10
|
|
11
11
|
|
12
12
|
/** Returns true if the value is null or undefined, false otherwise */
|
13
|
-
IsNull: (value:
|
13
|
+
IsNull: <T>(value: T | null | undefined): boolean => {
|
14
14
|
if (value === undefined) return true;
|
15
15
|
if (value === null) return true;
|
16
16
|
return false;
|
@@ -18,7 +18,7 @@ export const Tools = {
|
|
18
18
|
|
19
19
|
|
20
20
|
/** Returns true if the value is not null or undefined, false otherwise */
|
21
|
-
IsNotNull: (value:
|
21
|
+
IsNotNull: <T>(value: T | null | undefined): boolean => {
|
22
22
|
if (value === undefined) return false;
|
23
23
|
if (value === null) return false;
|
24
24
|
return true;
|
@@ -26,7 +26,7 @@ export const Tools = {
|
|
26
26
|
|
27
27
|
|
28
28
|
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
29
|
-
IsOnlyWhiteSpace: (value:
|
29
|
+
IsOnlyWhiteSpace: <T>(value: T | null | undefined): boolean => {
|
30
30
|
if (value === undefined) return true;
|
31
31
|
if (value === null) return true;
|
32
32
|
if((value as string).toString().trim() === '') return true;
|
package/index.ts
CHANGED
@@ -2,6 +2,7 @@ export * from './Tools/Breadcrumbs.class';
|
|
2
2
|
export * from './Tools/ControlValue';
|
3
3
|
export * from './Tools/DateTime.class';
|
4
4
|
export * from './Tools/Files.class';
|
5
|
+
export * from './Tools/Page.class';
|
5
6
|
export * from './Tools/Screen.class';
|
6
7
|
export * from './Tools/Source.class';
|
7
8
|
export * from './Tools/Tools'
|
package/interfaces/index.ts
CHANGED
@@ -1,20 +1,25 @@
|
|
1
|
+
import { TemplateRef, WritableSignal } from '@angular/core';
|
2
|
+
|
1
3
|
export interface IPatch {
|
2
4
|
op: 'remove' | 'add' | 'replace';
|
3
5
|
path: string;
|
4
6
|
value: any;
|
5
7
|
}
|
6
8
|
|
9
|
+
|
7
10
|
export interface IScreenSize {
|
8
11
|
width: number;
|
9
12
|
height: number;
|
10
13
|
breakpoin: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
11
14
|
}
|
12
15
|
|
16
|
+
|
13
17
|
export interface IAppSource {
|
14
18
|
page: string;
|
15
19
|
path: string;
|
16
20
|
}
|
17
21
|
|
22
|
+
|
18
23
|
export interface IBreadcrumb {
|
19
24
|
page: string;
|
20
25
|
path?: string | null;
|
@@ -22,9 +27,21 @@ export interface IBreadcrumb {
|
|
22
27
|
click?: (() => any);
|
23
28
|
}
|
24
29
|
|
30
|
+
|
25
31
|
export interface IGoBack {
|
26
32
|
show: boolean;
|
27
33
|
path?: string | null;
|
28
34
|
queryParams?: any;
|
29
35
|
click?: (() => any);
|
36
|
+
}
|
37
|
+
|
38
|
+
|
39
|
+
export interface ICoerRef {
|
40
|
+
coerRef: WritableSignal<string>;
|
41
|
+
title: WritableSignal<string>;
|
42
|
+
icon: WritableSignal<string>;
|
43
|
+
isDisabled: WritableSignal<boolean>;
|
44
|
+
show: WritableSignal<boolean>;
|
45
|
+
tooltip: WritableSignal<string>;
|
46
|
+
template: TemplateRef<any>;
|
30
47
|
}
|