@vuu-ui/vuu-utils 0.6.13-debug → 0.6.14-debug

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.
@@ -7,34 +7,38 @@ export interface AssertLogFn {
7
7
  export interface TableLogFn {
8
8
  (properties?: object): void;
9
9
  }
10
+ type loggingSettings = {
11
+ loggingLevel: LogLevel;
12
+ };
10
13
  export interface Logger {
11
- log: LogFn;
12
14
  warn: LogFn;
13
15
  error: LogFn;
14
- group: LogFn;
15
- groupCollapsed: LogFn;
16
- groupEnd: LogFn;
17
- assert: AssertLogFn;
18
- trace: LogFn;
19
16
  debug: LogFn;
20
17
  info: LogFn;
21
- table: TableLogFn;
22
18
  }
23
- export type BuildEnv = 'production' | 'development';
24
- export declare class ConsoleLogger implements Logger {
25
- readonly log: LogFn;
26
- readonly warn: LogFn;
27
- readonly error: LogFn;
28
- readonly group: LogFn;
29
- readonly groupCollapsed: LogFn;
30
- readonly groupEnd: LogFn;
31
- readonly assert: AssertLogFn;
32
- readonly trace: LogFn;
33
- readonly debug: LogFn;
34
- readonly info: LogFn;
35
- readonly table: TableLogFn;
36
- constructor(options?: {
37
- buildEnv?: string;
38
- }, level?: string);
19
+ export type LogLevel = "debug" | "info" | "warn" | "error";
20
+ export type BuildEnv = "production" | "development";
21
+ export declare const logger: (category: string) => {
22
+ errorEnabled: boolean;
23
+ error: (message: string) => void;
24
+ debugEnabled?: undefined;
25
+ infoEnabled?: undefined;
26
+ warnEnabled?: undefined;
27
+ info?: undefined;
28
+ warn?: undefined;
29
+ debug?: undefined;
30
+ } | {
31
+ debugEnabled: boolean;
32
+ infoEnabled: boolean;
33
+ warnEnabled: boolean;
34
+ errorEnabled: boolean;
35
+ info: (message: string) => void;
36
+ warn: (message: string) => void;
37
+ debug: (message: string) => void;
38
+ error: (message: string) => void;
39
+ };
40
+ export declare const getLoggingConfig: () => string;
41
+ declare global {
42
+ const loggingSettings: loggingSettings;
39
43
  }
40
- export declare const logger: ConsoleLogger;
44
+ export {};
@@ -0,0 +1,5 @@
1
+ type VoidFunction = (...args: any) => void;
2
+ export type PerfFunction<T extends VoidFunction> = (...args: Parameters<T>) => void;
3
+ export declare function debounce<T extends VoidFunction>(callback: T, timeInterval: number): PerfFunction<T>;
4
+ export declare function throttle<T extends VoidFunction>(callback: T, limit: number): PerfFunction<T>;
5
+ export {};
@@ -1 +0,0 @@
1
- export declare const loggingLevel: (level: string) => void;
@@ -1,10 +0,0 @@
1
- export type RowIndex = {
2
- [field: string]: number;
3
- };
4
- export type Row = {
5
- [strKey: string]: any;
6
- } & any[];
7
- export declare function addRowsToIndex(rows: Row[], index: RowIndex, indexField: string): RowIndex;
8
- export declare function indexRows(rows: Row[], indexField: string): RowIndex;
9
- export declare function isEmptyRow(row: Row): boolean;
10
- export declare function update(rows: Row[], updates: any): Row[];