command-center-v3-common 0.0.14 → 0.0.16

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.
@@ -1 +0,0 @@
1
- export { }
@@ -1,136 +0,0 @@
1
- declare class Cache_2 {
2
- storage: Storage;
3
- constructor(type: CacheType);
4
- setCache(key: string, value: any): void;
5
- getCache(key: string): any;
6
- removeCache(key: string): void;
7
- clear(): void;
8
- }
9
-
10
- declare enum CacheType {
11
- Local = 0,
12
- Session = 1
13
- }
14
-
15
- declare type Color = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'error';
16
-
17
- export declare class EventBus {
18
- private bus;
19
- private framework;
20
- constructor(framework?: string);
21
- private initializeBus;
22
- on(event: string, callback: EventCallback): void;
23
- once(event: string, callback: EventCallback): void;
24
- emit(event: string, ...args: any[]): void;
25
- off(event: string, callback: EventCallback): void;
26
- clear(): void;
27
- }
28
-
29
- export declare type EventCallback = (...args: Array<any>) => any;
30
-
31
- /**
32
- * 传入date对象 返回格式化后的数组
33
- * @param dateObj
34
- * @returns {[number, number, number]}
35
- */
36
- export declare function formatDay(dateObj: Date): [number, number, number];
37
-
38
- /**
39
- * 传入秒数 返回时分秒
40
- * @param value
41
- * @returns {string}
42
- */
43
- export declare function formatSeconds(value: number): string;
44
-
45
- export declare function formatTime(dateObj: Date): string[];
46
-
47
- export declare function formatTimeFn(number: number, format: string): string;
48
-
49
- /**
50
- * 获取传入日期的前几天日期数组
51
- * @param today
52
- * @param daysCount
53
- * @param cutOff
54
- * @returns {string[]}
55
- */
56
- export declare function getBeforeDays({ today, daysCount, cutOff }: {
57
- today?: string;
58
- daysCount: number;
59
- cutOff?: string;
60
- }): string[];
61
-
62
- export declare function getCurDtm(cutOff?: string): string;
63
-
64
- export declare function getMicroAppData(id: string): Window | null;
65
-
66
- /**
67
- * 获取传入日期的过后几天日期数组
68
- * @param today
69
- * @param daysCount
70
- * @param cutOff
71
- * @returns {string[]}
72
- */
73
- export declare function getNextDays({ today, daysCount, cutOff }: {
74
- today?: string;
75
- daysCount: number;
76
- cutOff?: string;
77
- }): string[];
78
-
79
- /**
80
- * 获取当天日期
81
- * @param cutOff 分隔号
82
- * @returns {string}
83
- */
84
- export declare function getToday(cutOff?: string): string;
85
-
86
- export declare function is(val: unknown, type: string): boolean;
87
-
88
- export declare function isArray(val: any): val is Array<any>;
89
-
90
- export declare function isBoolean(val: unknown): val is boolean;
91
-
92
- export declare const isClient: boolean;
93
-
94
- export declare function isDate(val: unknown): val is Date;
95
-
96
- export declare function isDef<T = unknown>(val?: T): val is T;
97
-
98
- export declare function isElement(val: unknown): val is Element;
99
-
100
- export declare function isEmpty<T = unknown>(val: T): val is T;
101
-
102
- export declare function isFunction(val: unknown): val is Function;
103
-
104
- export declare function isMap(val: unknown): val is Map<any, any>;
105
-
106
- export declare function isNull(val: unknown): val is null;
107
-
108
- export declare function isNullAndUnDef(val: unknown): val is null | undefined;
109
-
110
- export declare function isNullOrUnDef(val: unknown): val is null | undefined;
111
-
112
- export declare function isNumber(val: unknown): val is number;
113
-
114
- export declare function isObject(val: any): val is Record<any, any>;
115
-
116
- export declare function isPromise<T = any>(val: unknown): val is Promise<T>;
117
-
118
- export declare function isRegExp(val: unknown): val is RegExp;
119
-
120
- export declare const isServer: boolean;
121
-
122
- export declare function isString(val: unknown): val is string;
123
-
124
- export declare function isUnDef<T = unknown>(val?: T): val is T;
125
-
126
- export declare function isValidKey(key: string | number | symbol, object: object): key is keyof typeof object;
127
-
128
- export declare function isWindow(val: any): val is Window;
129
-
130
- export declare const localCache: Cache_2;
131
-
132
- export declare const logger: Record<Color, (model: string, ns: string, msg: string, ...args: any[]) => void>;
133
-
134
- export declare const sessionCache: Cache_2;
135
-
136
- export { }