@cellaware/utils 6.1.1 → 6.2.0

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,2 +0,0 @@
1
- export type ChatWMSDateFormat = 'MMDDYYYY' | 'DDMMYYYY' | 'YYYYMMDD';
2
- export declare const CHATWMS_DEFAULT_DATE_FORMAT: ChatWMSDateFormat;
@@ -1 +1 @@
1
- export const CHATWMS_DEFAULT_DATE_FORMAT = 'MMDDYYYY';
1
+ "use strict";
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,5 +1,4 @@
1
1
  import { HttpRequest } from "@azure/functions";
2
- import { ChatWMSDateFormat } from "./date.js";
3
2
  export interface ChatWMSUserData {
4
3
  userId: string;
5
4
  userDetails: string;
@@ -10,11 +9,17 @@ export declare function chatwmsInitUserData(): ChatWMSUserData;
10
9
  * NOTE: will throw error if empty principal or decode issue
11
10
  */
12
11
  export declare function chatwmsExtractUserDataFromHeaders(request: HttpRequest): ChatWMSUserData;
12
+ export declare const CHATWMS_DEFAULT_LANGUAGE: string;
13
+ export type ChatWMSTheme = 'light' | 'dark';
14
+ export declare const CHATWMS_THEME_LIGHT: ChatWMSTheme;
15
+ export declare const CHATWMS_THEME_DARK: ChatWMSTheme;
16
+ export type ChatWMSDateFormat = 'MMDDYYYY' | 'DDMMYYYY' | 'YYYYMMDD';
17
+ export declare const CHATWMS_DEFAULT_DATE_FORMAT: ChatWMSDateFormat;
13
18
  export interface ChatWMSUserSettings {
14
19
  userId: string;
15
20
  userDetails: string;
16
21
  language: string;
17
- theme: string;
22
+ theme: ChatWMSTheme;
18
23
  developer?: boolean;
19
24
  dateFormat?: ChatWMSDateFormat;
20
25
  clientId: string;
@@ -25,12 +25,16 @@ export function chatwmsExtractUserDataFromHeaders(request) {
25
25
  throw new Error(`Authorization header not found`);
26
26
  }
27
27
  }
28
+ export const CHATWMS_DEFAULT_LANGUAGE = 'English';
29
+ export const CHATWMS_THEME_LIGHT = 'light';
30
+ export const CHATWMS_THEME_DARK = 'dark';
31
+ export const CHATWMS_DEFAULT_DATE_FORMAT = 'MMDDYYYY';
28
32
  export function chatwmsInitUserSettings() {
29
33
  return {
30
34
  userId: '',
31
35
  userDetails: '',
32
- language: '',
33
- theme: '',
36
+ language: CHATWMS_DEFAULT_LANGUAGE,
37
+ theme: CHATWMS_THEME_LIGHT,
34
38
  clientId: ''
35
39
  };
36
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellaware/utils",
3
- "version": "6.1.1",
3
+ "version": "6.2.0",
4
4
  "description": "Cellaware Utilities for Node.js",
5
5
  "author": "Cellaware Technologies",
6
6
  "type": "module",