mgtypes 1.0.57 → 1.0.59

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,6 +1,6 @@
1
1
  {
2
2
  "name": "mgtypes",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,5 +23,8 @@
23
23
  "eslint": "^8.57.1",
24
24
  "eslint-config-airbnb": "^19.0.4",
25
25
  "eslint-plugin-import": "^2.32.0"
26
+ },
27
+ "dependencies": {
28
+ "@types/react": "^19.2.8"
26
29
  }
27
30
  }
@@ -1,4 +1,5 @@
1
1
  import { mgMapBillboards } from './Content';
2
+ import { ReactElement } from 'react';
2
3
 
3
4
  /**
4
5
  * Mother Config object
@@ -49,6 +50,7 @@ export interface mgFeedConfig {
49
50
  iconOrientation: 'left' | 'right' | 'top' | 'bottom';
50
51
  opacity: number;
51
52
  };
53
+ DISPLAY_NETWORK_INDICATOR: boolean
52
54
  }
53
55
 
54
56
  /**
@@ -197,7 +199,7 @@ export interface mgFeaturesConfig {
197
199
 
198
200
  export interface mgAuthenticationConfig {
199
201
  USER_AUTH_MODE: 'guest only' | 'account only' | 'guest or account';
200
- AUTH_PAGE_SETTINGS: {
202
+ AUTH_PAGE: {
201
203
  DISPLAY_MODE: 'never' | 'interval' | 'always';
202
204
  INTERVAL:
203
205
  | null
@@ -207,6 +209,7 @@ export interface mgAuthenticationConfig {
207
209
  | '1 day'
208
210
  | '1 week'
209
211
  | '1 month';
212
+ PAGE_COMPONENT: ReactElement
210
213
  };
211
214
  }
212
215
 
@@ -1,3 +1,5 @@
1
+ // TITLES /////////////////////////////////////////////
2
+
1
3
  export enum mgNativePermissionTitle {
2
4
  LOCATION_FOREGROUND = 'LOCATION_FOREGROUND',
3
5
  LOCATION_BACKGROUND = 'LOCATION_BACKGROUND',
@@ -38,33 +40,39 @@ export enum mgNotificationsPermissionTitle {
38
40
  RECEIVE_MARKETING_NOTIFICATIONS = 'RECEIVE_MARKETING_NOTIFICATIONS',
39
41
  }
40
42
 
43
+ // STATE //////////////////////////////////////////////
41
44
  export interface mgPermissionsState {
42
45
  NATIVE: {
43
- [permission: string]: {
44
- status: 'granted' | 'undetermined' | 'denied';
45
- canAskAgain: boolean;
46
- // will display in info modal: these are non-native, non-toggleable, and true
47
- defaultTruePermissions: mgLocationPermissionTitle[]; // TODO:permissionsConfig
48
- toggleablePermissions: mgLocationPermissionTitle[]; // TODO:permissionsConfig
49
- };
46
+ [permission: string]: mgNativePermission;
50
47
  };
51
48
  LOCATION: {
52
49
  [permission: string]: mgNonNativePermission;
53
50
  };
54
51
  }
55
52
 
53
+ export interface mgNativePermission {
54
+ status: 'granted' | 'undetermined' | 'denied';
55
+ canAskAgain: boolean;
56
+ // will display in info modal: these are non-native, non-toggleable, and true
57
+ defaultTruePermissions: mgNonNativePermissionTitle[]; // TODO:permissionsConfig
58
+ toggleablePermissions: mgNonNativePermissionTitle[]; // TODO:permissionsConfig
59
+ }
60
+
56
61
  export interface mgNonNativePermission {
57
62
  isGranted: boolean;
58
63
  disabled: boolean;
59
64
  ungrantedNativePermissions: mgNativePermissionTitle[];
60
65
  }
61
66
 
67
+ /**
68
+ * a non-native permission state in secure store
69
+ */
62
70
  export interface mgSecureStorePermission {
63
- disabled: boolean;
71
+ disabled: boolean; // disabled permisions won't be displayed in Settings page
64
72
  isGranted: boolean;
65
73
  }
66
74
 
67
- // ORDERS OF PERMISSIONS
75
+ // ORDERS OF PERMISSIONS //////////////////////////////////
68
76
 
69
77
  export const nativePermissionsOrder: mgNativePermissionTitle[] = [
70
78
  mgNativePermissionTitle.LOCATION_FOREGROUND,