@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotglitch/ngx-common",
3
3
  "private": false,
4
- "version": "1.0.47",
4
+ "version": "1.0.49",
5
5
  "repository": {
6
6
  "url": "https://github.com/knackstedt/dotglitch-ngx/tree/main/packages/common"
7
7
  },
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 Logger: (context: string, contextColor: string, textColor?: string) => {
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 {};