mgtypes 1.0.21 → 1.0.23

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.21",
3
+ "version": "1.0.23",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,32 +4,30 @@ import { MapSign } from './App';
4
4
  /**
5
5
  * Mother Config object
6
6
  */
7
- export interface Configuration {
8
- specs: mgSpecs;
9
- colors: mgColors;
10
- fonts: mgFonts;
11
- styles: mgStyles;
12
- features: mgFeatures;
13
- map: mgMap;
14
- feed: mgFeed;
7
+ export interface mgConfiguration {
8
+ specs: mgSpecsConfig;
9
+ colors: mgColorsConfig;
10
+ fonts: mgFontsConfig;
11
+ styles: mgStylesConfig;
12
+ features: mgFeaturesConfig;
13
+ map: mgMapConfig;
14
+ feed: mgFeedConfig;
15
15
  }
16
16
 
17
-
18
17
  /**
19
18
  * Configs for map
20
19
  */
21
- export interface mgMap {
20
+ export interface mgMapConfig {
22
21
  MAP_LABELS: { zoomThresholds: number[]; labels: MapSign[][] };
23
22
  MAP_STYLE_URL: string;
24
23
  DEFAULT_MAP_BOUNDARIES: Position[];
25
24
  MAP_FILTERS: { [key: string]: any };
26
25
  }
27
26
 
28
-
29
27
  /**
30
28
  * Configs for feed
31
29
  */
32
- export interface mgFeed {
30
+ export interface mgFeedConfig {
33
31
  FEED_HEADER_IMAGE_NAMES: string[];
34
32
  FEED_HEADER_CONFIG: {
35
33
  position:
@@ -53,7 +51,7 @@ export interface mgFeed {
53
51
  /**
54
52
  * Configs for event dates, locations, names, map details and feed header
55
53
  */
56
- export interface mgSpecs {
54
+ export interface mgSpecsConfig {
57
55
  EVENT_NAME: string;
58
56
  EVENT_START_DATETIME: string;
59
57
  EVENT_END_DATETIME: string;
@@ -63,19 +61,34 @@ export interface mgSpecs {
63
61
  }
64
62
 
65
63
  interface PERMISSION_PROFILE {
66
- comment: boolean;
67
- photo: boolean;
68
- pin:
69
- | {
70
- [key: string]: any;
71
- }
72
- | false;
73
- plan:
74
- | {
75
- [key: string]: any;
76
- }
77
- | false;
78
- route: boolean;
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;
79
92
  }
80
93
 
81
94
  /**
@@ -83,14 +96,16 @@ interface PERMISSION_PROFILE {
83
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:
84
97
  *
85
98
  * {
86
- * comment: true,
87
- * photo: false,
88
- * pin: { personal: ['car', 'bicycle', 'default'] },
89
- * plan: { sport: ['soccer'] },
90
- * route: false
91
- },
99
+ * CONTENT_CREATION:{
100
+ * comment: true,
101
+ * photo: false,
102
+ * pin: { personal: ['car', 'bicycle', 'default'] },
103
+ * plan: { sport: ['soccer'] },
104
+ * route: false
105
+ * }
106
+ * },
92
107
  */
93
- export interface mgFeatures {
108
+ export interface mgFeaturesConfig {
94
109
  EVENT_TAGS: string[];
95
110
  PIN_TYPES: { [key: string]: string[] };
96
111
  PLAN_TYPES: { [key: string]: string[] };
@@ -98,15 +113,16 @@ export interface mgFeatures {
98
113
  EMERGENCY_TYPES: { [key: string]: any };
99
114
  USER_AUTH_SETTING: 'guest only' | 'account only' | 'guest or account';
100
115
  PERMISSION_PROFILES: {
101
- GUEST: PERMISSION_PROFILE;
102
- USER: PERMISSION_PROFILE;
116
+ guest: PERMISSION_PROFILE | null;
117
+ user: PERMISSION_PROFILE | null;
103
118
  };
119
+ IS_CONTENT_THREADED: boolean
104
120
  }
105
121
 
106
122
  /**
107
123
  * Configs based on React Native Paper color assignments w/ some extras
108
124
  */
109
- export interface mgColors {
125
+ export interface mgColorsConfig {
110
126
  success: string;
111
127
  warning: string;
112
128
  warningUnselected: string;
@@ -168,7 +184,7 @@ interface mgFontTextStyle {
168
184
  /**
169
185
  * Configs for all the app's font styles
170
186
  */
171
- export interface mgFonts {
187
+ export interface mgFontsConfig {
172
188
  labelLarge: mgFontTextStyle;
173
189
  labelMedium: mgFontTextStyle;
174
190
  labelSmall: mgFontTextStyle;
@@ -183,7 +199,7 @@ export interface mgFonts {
183
199
  /**
184
200
  * Configs for border and shadow styles
185
201
  */
186
- export interface mgStyles {
202
+ export interface mgStylesConfig {
187
203
  containerBorderRadius: 'none' | 'small' | 'large' | 'full';
188
204
  containerBorderWidth: 'none' | 'thin' | 'normal' | 'thick';
189
205
  containerShadow: 'none' | 'small' | 'large';