@budibase/shared-core 3.39.27 → 3.39.28
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/dist/helpers/helpers.d.ts +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
export interface UserDisplayInfo {
|
|
2
|
+
_id?: string;
|
|
3
|
+
email: string;
|
|
4
|
+
firstName?: string;
|
|
5
|
+
lastName?: string;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Gets a key within an object. The key supports dot syntax for retrieving deep
|
|
4
9
|
* fields - e.g. "a.b.c".
|
|
@@ -14,17 +19,17 @@ export declare const deepGet: (obj: Record<string, any> | undefined, key: string
|
|
|
14
19
|
* Gets the initials to show in a user avatar.
|
|
15
20
|
* @param user the user
|
|
16
21
|
*/
|
|
17
|
-
export declare const getUserInitials: (user:
|
|
22
|
+
export declare const getUserInitials: (user: UserDisplayInfo | undefined) => string;
|
|
18
23
|
/**
|
|
19
24
|
* Gets a deterministic colour for a particular user
|
|
20
25
|
* @param user the user
|
|
21
26
|
*/
|
|
22
|
-
export declare const getUserColor: (user:
|
|
27
|
+
export declare const getUserColor: (user: UserDisplayInfo | undefined) => string;
|
|
23
28
|
/**
|
|
24
29
|
* Gets a friendly label to describe who a user is.
|
|
25
30
|
* @param user the user
|
|
26
31
|
*/
|
|
27
|
-
export declare const getUserLabel: (user:
|
|
32
|
+
export declare const getUserLabel: (user: UserDisplayInfo | undefined) => string;
|
|
28
33
|
export declare function cancelableTimeout(timeout: number): [Promise<unknown>, () => void];
|
|
29
34
|
export declare function withTimeout<T>(timeout: number, promise: () => Promise<T>): Promise<T>;
|
|
30
35
|
/**
|