@dotglitch/ngx-common 1.0.47 โ 1.0.49
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/esm2020/components/lazy-loader/lazy-loader.service.mjs +3 -3
- package/esm2020/components/react-magic-wrapper/react-magic-wrapper.component.mjs +1 -3
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/services/dialog.service.mjs +3 -3
- package/esm2020/services/navigation.service.mjs +3 -3
- package/esm2020/utils/index.mjs +172 -15
- package/fesm2015/dotglitch-ngx-common.mjs +175 -20
- package/fesm2015/dotglitch-ngx-common.mjs.map +1 -1
- package/fesm2020/dotglitch-ngx-common.mjs +175 -20
- package/fesm2020/dotglitch-ngx-common.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/utils/index.d.ts +107 -6
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -45,3 +45,4 @@ export * from './components/tabulator/tabulator.component';
|
|
|
45
45
|
export * from './components/vscode/vscode.component';
|
|
46
46
|
export * from './components/react-magic-wrapper/react-magic-wrapper.component';
|
|
47
47
|
export * from './components/types';
|
|
48
|
+
export { ConsoleLogger, LogIcon } from './utils/index';
|
package/utils/index.d.ts
CHANGED
|
@@ -3,17 +3,118 @@ export declare const sleep: (ms: any) => Promise<unknown>;
|
|
|
3
3
|
* Prompt the user to save a json file of the given object.
|
|
4
4
|
*/
|
|
5
5
|
export declare const saveObjectAsFile: (name: string, data: Object) => void;
|
|
6
|
+
declare class Emoticon {
|
|
7
|
+
icon: string;
|
|
8
|
+
constructor(icon: string);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* authorization ๐ \
|
|
12
|
+
* user ๐ชช \
|
|
13
|
+
* security ๐ก \
|
|
14
|
+
* system ๐ฅ \
|
|
15
|
+
* toolbox ๐งฐ \
|
|
16
|
+
* chore โ \
|
|
17
|
+
* config ๐ \
|
|
18
|
+
* renderer ๐ \
|
|
19
|
+
* package ๐ฆ \
|
|
20
|
+
* time โณ \
|
|
21
|
+
* download ๐ฅ \
|
|
22
|
+
* upload ๐ค \
|
|
23
|
+
* bug ๐ฆ \
|
|
24
|
+
* bomb ๐ฃ \
|
|
25
|
+
* tnt ๐งจ \
|
|
26
|
+
* warning โ ๏ธ \
|
|
27
|
+
* chart ๐ \
|
|
28
|
+
* chart_up ๐ \
|
|
29
|
+
* chart_down ๐ \
|
|
30
|
+
* circle_red ๐ด \
|
|
31
|
+
* circle_orange ๐ \
|
|
32
|
+
* circle_yellow ๐ก \
|
|
33
|
+
* circle_green ๐ข \
|
|
34
|
+
* circle_blue ๐ต \
|
|
35
|
+
* circle_violet ๐ฃ \
|
|
36
|
+
* circle_black โซ๏ธ \
|
|
37
|
+
* circle_white โช๏ธ \
|
|
38
|
+
* circle_brown ๐ค \
|
|
39
|
+
* square_red ๐ฅ \
|
|
40
|
+
* square_orange ๐ง \
|
|
41
|
+
* square_yellow ๐จ \
|
|
42
|
+
* square_green ๐ฉ \
|
|
43
|
+
* square_blue ๐ฆ \
|
|
44
|
+
* square_violet ๐ช \
|
|
45
|
+
* square_black โฌ๏ธ \
|
|
46
|
+
* square_white โฌ๏ธ \
|
|
47
|
+
* square_brown ๐ซ
|
|
48
|
+
*/
|
|
49
|
+
export declare const LogIcon: {
|
|
50
|
+
authorization: Emoticon;
|
|
51
|
+
user: Emoticon;
|
|
52
|
+
security: Emoticon;
|
|
53
|
+
system: Emoticon;
|
|
54
|
+
toolbox: Emoticon;
|
|
55
|
+
chore: Emoticon;
|
|
56
|
+
config: Emoticon;
|
|
57
|
+
renderer: Emoticon;
|
|
58
|
+
package: Emoticon;
|
|
59
|
+
time: Emoticon;
|
|
60
|
+
download: Emoticon;
|
|
61
|
+
upload: Emoticon;
|
|
62
|
+
bug: Emoticon;
|
|
63
|
+
bomb: Emoticon;
|
|
64
|
+
tnt: Emoticon;
|
|
65
|
+
warning: Emoticon;
|
|
66
|
+
chart: Emoticon;
|
|
67
|
+
chart_up: Emoticon;
|
|
68
|
+
chart_down: Emoticon;
|
|
69
|
+
circle_red: Emoticon;
|
|
70
|
+
circle_orange: Emoticon;
|
|
71
|
+
circle_yellow: Emoticon;
|
|
72
|
+
circle_green: Emoticon;
|
|
73
|
+
circle_blue: Emoticon;
|
|
74
|
+
circle_violet: Emoticon;
|
|
75
|
+
circle_black: Emoticon;
|
|
76
|
+
circle_white: Emoticon;
|
|
77
|
+
circle_brown: Emoticon;
|
|
78
|
+
square_red: Emoticon;
|
|
79
|
+
square_orange: Emoticon;
|
|
80
|
+
square_yellow: Emoticon;
|
|
81
|
+
square_green: Emoticon;
|
|
82
|
+
square_blue: Emoticon;
|
|
83
|
+
square_violet: Emoticon;
|
|
84
|
+
square_black: Emoticon;
|
|
85
|
+
square_white: Emoticon;
|
|
86
|
+
square_brown: Emoticon;
|
|
87
|
+
};
|
|
88
|
+
declare class Log {
|
|
89
|
+
private context;
|
|
90
|
+
private contextColor;
|
|
91
|
+
private textColor;
|
|
92
|
+
constructor(context: string, contextColor: string, textColor: string);
|
|
93
|
+
log(icon: Emoticon, message: string, ...args: any[]): any;
|
|
94
|
+
log(message: string, ...args: any[]): any;
|
|
95
|
+
warn(icon: Emoticon, message: string, ...args: any[]): any;
|
|
96
|
+
warn(message: string, ...args: any[]): any;
|
|
97
|
+
err(icon: Emoticon, message: string, ...args: any[]): any;
|
|
98
|
+
err(message: string, ...args: any[]): any;
|
|
99
|
+
error(icon: Emoticon, message: string, ...args: any[]): any;
|
|
100
|
+
error(message: string, ...args: any[]): any;
|
|
101
|
+
}
|
|
6
102
|
/**
|
|
7
103
|
* Formatted logger that will print a bit of context before the message.
|
|
8
104
|
* @returns
|
|
9
105
|
*/
|
|
10
|
-
export declare const
|
|
11
|
-
log: (message: any, ...args: any[]) => void;
|
|
12
|
-
warn: (message: any, ...args: any[]) => void;
|
|
13
|
-
err: (message: any, ...args: any[]) => void;
|
|
14
|
-
error: (message: any, ...args: any[]) => void;
|
|
15
|
-
};
|
|
106
|
+
export declare const ConsoleLogger: (context: string, contextColor: string, textColor?: string) => Log;
|
|
16
107
|
/**
|
|
17
108
|
* Convert a string `fooBAR baz_160054''"1]"` into a slug: `foobar-baz-1600541`
|
|
18
109
|
*/
|
|
19
110
|
export declare const stringToSlug: (text: string) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Helper to update the page URL.
|
|
113
|
+
* @param page component page ID to load.
|
|
114
|
+
* @param data string or JSON data for query params.
|
|
115
|
+
*/
|
|
116
|
+
export declare const updateUrl: (page?: string, data?: string | string[][] | Record<string, string | number> | URLSearchParams, replaceState?: boolean) => void;
|
|
117
|
+
export declare const getUrlData: (source?: string) => {
|
|
118
|
+
[x: number]: any;
|
|
119
|
+
};
|
|
120
|
+
export {};
|