mgtypes 1.0.20 → 1.0.22
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 +1 -1
- package/types/Configuration.ts +118 -33
- package/types/User.ts +1 -1
package/package.json
CHANGED
package/types/Configuration.ts
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import { Position } from 'geojson';
|
|
2
2
|
import { MapSign } from './App';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Mother Config object
|
|
6
|
+
*/
|
|
4
7
|
export interface Configuration {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
specs: mgSpecs;
|
|
9
|
+
colors: mgColors;
|
|
10
|
+
fonts: mgFonts;
|
|
11
|
+
styles: mgStyles;
|
|
12
|
+
features: mgFeatures;
|
|
13
|
+
map: mgMap;
|
|
14
|
+
feed: mgFeed;
|
|
9
15
|
}
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
USER_CREATABLE_CONTENT_TYPES: { [key: string]: { [key: string]: any } };
|
|
16
|
-
USER_MAP_FILTER_OPTIONS: { [key: string]: any };
|
|
17
|
-
SERVICE_TYPES: { [key: string]: any };
|
|
18
|
-
EMERGENCY_TYPES: { [key: string]: any };
|
|
17
|
+
/**
|
|
18
|
+
* Configs for map
|
|
19
|
+
*/
|
|
20
|
+
export interface mgMap {
|
|
19
21
|
MAP_LABELS: { zoomThresholds: number[]; labels: MapSign[][] };
|
|
20
|
-
EVENT_END_DATETIME: string;
|
|
21
|
-
EVENT_START_DATETIME: string;
|
|
22
|
-
EVENT_LONGITUDE: string;
|
|
23
|
-
EVENT_LATITUDE: string;
|
|
24
|
-
EVENT_DEFAULT_MAP_BOUNDARIES: Position[];
|
|
25
|
-
EVENT_NAME: string;
|
|
26
|
-
APP_ALIAS: string;
|
|
27
22
|
MAP_STYLE_URL: string;
|
|
23
|
+
DEFAULT_MAP_BOUNDARIES: Position[];
|
|
24
|
+
MAP_FILTERS: { [key: string]: any };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Configs for feed
|
|
29
|
+
*/
|
|
30
|
+
export interface mgFeed {
|
|
28
31
|
FEED_HEADER_IMAGE_NAMES: string[];
|
|
29
32
|
FEED_HEADER_CONFIG: {
|
|
30
33
|
position:
|
|
@@ -45,12 +48,85 @@ export interface EventSpecs {
|
|
|
45
48
|
};
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Configs for event dates, locations, names, map details and feed header
|
|
53
|
+
*/
|
|
54
|
+
export interface mgSpecs {
|
|
55
|
+
EVENT_NAME: string;
|
|
56
|
+
EVENT_START_DATETIME: string;
|
|
57
|
+
EVENT_END_DATETIME: string;
|
|
58
|
+
EVENT_LONGITUDE: string;
|
|
59
|
+
EVENT_LATITUDE: string;
|
|
60
|
+
APP_ALIAS: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface PERMISSION_PROFILE {
|
|
64
|
+
CONTENT_CREATION: {
|
|
65
|
+
comment: boolean;
|
|
66
|
+
photo: boolean;
|
|
67
|
+
pin:
|
|
68
|
+
| {
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}
|
|
71
|
+
| false;
|
|
72
|
+
plan:
|
|
73
|
+
| {
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
}
|
|
76
|
+
| false;
|
|
77
|
+
route: boolean;
|
|
78
|
+
};
|
|
79
|
+
VISIBLE_FEED_TABS: {
|
|
80
|
+
main: boolean;
|
|
81
|
+
archive: boolean;
|
|
82
|
+
mine: boolean;
|
|
83
|
+
friends: boolean;
|
|
84
|
+
};
|
|
85
|
+
CAN_HAVE_FRIENDS: boolean;
|
|
86
|
+
CAN_SHARE_LOCATION: boolean;
|
|
87
|
+
CAN_SHARE_CONTENT: boolean;
|
|
88
|
+
CAN_SAVE_CONTENT: boolean;
|
|
89
|
+
CAN_VOTE: boolean;
|
|
90
|
+
CAN_ADD_TO_THREAD: boolean;
|
|
91
|
+
CAN_EMBED_CONTENT_IN_THREAD: boolean;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Configs that dictate user interactivity and determine what the configured app "is all about", so to speak
|
|
96
|
+
* @param PERMISSION_PROFILES dictates what types of content users with various roles can add through the app. A configured object for each role (GUEST, USER, etc.) is a PERMISSION_PROFILE:
|
|
97
|
+
*
|
|
98
|
+
* {
|
|
99
|
+
* CONTENT_CREATION:{
|
|
100
|
+
* comment: true,
|
|
101
|
+
* photo: false,
|
|
102
|
+
* pin: { personal: ['car', 'bicycle', 'default'] },
|
|
103
|
+
* plan: { sport: ['soccer'] },
|
|
104
|
+
* route: false
|
|
105
|
+
* }
|
|
106
|
+
* },
|
|
107
|
+
*/
|
|
108
|
+
export interface mgFeatures {
|
|
109
|
+
EVENT_TAGS: string[];
|
|
110
|
+
PIN_TYPES: { [key: string]: string[] };
|
|
111
|
+
PLAN_TYPES: { [key: string]: string[] };
|
|
112
|
+
SERVICE_TYPES: { [key: string]: any };
|
|
113
|
+
EMERGENCY_TYPES: { [key: string]: any };
|
|
114
|
+
USER_AUTH_SETTING: 'guest only' | 'account only' | 'guest or account';
|
|
115
|
+
PERMISSION_PROFILES: {
|
|
116
|
+
guest: PERMISSION_PROFILE | null;
|
|
117
|
+
user: PERMISSION_PROFILE | null;
|
|
118
|
+
};
|
|
119
|
+
IS_CONTENT_THREADED: boolean
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Configs based on React Native Paper color assignments w/ some extras
|
|
124
|
+
*/
|
|
125
|
+
export interface mgColors {
|
|
49
126
|
success: string;
|
|
50
127
|
warning: string;
|
|
51
128
|
warningUnselected: string;
|
|
52
129
|
locationPuck: string;
|
|
53
|
-
|
|
54
130
|
primary: string;
|
|
55
131
|
onPrimary: string;
|
|
56
132
|
primaryContainer: string;
|
|
@@ -94,7 +170,10 @@ export interface EventColors {
|
|
|
94
170
|
backdrop: string;
|
|
95
171
|
}
|
|
96
172
|
|
|
97
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Configs for an individual font style
|
|
175
|
+
*/
|
|
176
|
+
interface mgFontTextStyle {
|
|
98
177
|
fontFamily?: string;
|
|
99
178
|
fontWeight?: '200' | '300' | '400' | '500' | '700';
|
|
100
179
|
letterSpacing?: number;
|
|
@@ -102,19 +181,25 @@ interface MGFontTextStyle {
|
|
|
102
181
|
lineHeight?: number;
|
|
103
182
|
}
|
|
104
183
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Configs for all the app's font styles
|
|
186
|
+
*/
|
|
187
|
+
export interface mgFonts {
|
|
188
|
+
labelLarge: mgFontTextStyle;
|
|
189
|
+
labelMedium: mgFontTextStyle;
|
|
190
|
+
labelSmall: mgFontTextStyle;
|
|
191
|
+
bodyLarge: mgFontTextStyle;
|
|
192
|
+
bodyMedium: mgFontTextStyle;
|
|
193
|
+
displayMedium: mgFontTextStyle;
|
|
194
|
+
displaySmall: mgFontTextStyle;
|
|
195
|
+
headlineSmall: mgFontTextStyle;
|
|
196
|
+
default: mgFontTextStyle;
|
|
115
197
|
}
|
|
116
198
|
|
|
117
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Configs for border and shadow styles
|
|
201
|
+
*/
|
|
202
|
+
export interface mgStyles {
|
|
118
203
|
containerBorderRadius: 'none' | 'small' | 'large' | 'full';
|
|
119
204
|
containerBorderWidth: 'none' | 'thin' | 'normal' | 'thick';
|
|
120
205
|
containerShadow: 'none' | 'small' | 'large';
|
package/types/User.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface UserRole {
|
|
|
22
22
|
id: number | null;
|
|
23
23
|
createdAt: string | null;
|
|
24
24
|
updatedAt: string | null;
|
|
25
|
-
role: 'user' | 'admin' | 'medical' | 'fire' | 'security' | 'advertiser' |'
|
|
25
|
+
role: 'user' | 'admin' | 'medical' | 'fire' | 'security' | 'advertiser' |'mental_health'|'vendor';
|
|
26
26
|
userId: number | null;
|
|
27
27
|
isActiveRole: boolean;
|
|
28
28
|
}
|