mgtypes 1.0.83 → 1.0.85

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.83",
3
+ "version": "1.0.85",
4
4
  "description": "types for mg development",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,19 +4,29 @@ import { mgMapBillboards } from '../Content';
4
4
  * Mother Config object
5
5
  */
6
6
  export interface mgClientConfiguration {
7
- specs: mgSpecsConfig;
8
- colors: mgColorsConfig;
9
- fonts: mgFontsConfig;
10
- styles: mgStylesConfig;
11
- features: mgFeaturesConfig;
12
- map: mgMapConfig;
13
- feed: mgFeedConfig;
14
- profiles: mgProfilesConfig;
15
- lists: mgListsConfig;
16
- navigation: mgNavigationConfig;
17
- calendar: mgCalendarConfig;
18
- authentication: mgAuthenticationConfig;
19
- content: mgContentConfig;
7
+ SPECS: mgSpecsConfig;
8
+ COLORS: mgColorsConfig;
9
+ FONTS: mgFontsConfig;
10
+ STYLES: mgStylesConfig;
11
+ FEATURES: mgFeaturesConfig;
12
+ MAP: mgMapConfig;
13
+ PROFILES: mgProfilesConfig;
14
+ CONTENT: mgContentConfig;
15
+ PLACEHOLDERS: mgPlaceholdersConfig;
16
+ }
17
+
18
+ export interface mgPlaceholdersConfig {
19
+ networkFailureMessage: string;
20
+ FEED_NOTIFICATION: {
21
+ MAIN_TAB: {
22
+ searchMode: (numberOfHits: number) => string;
23
+ browseMode: string;
24
+ };
25
+ friendsTab: string;
26
+ archiveTab: string;
27
+ userTab: string;
28
+ };
29
+ stickySearchBar: string;
20
30
  }
21
31
 
22
32
  /**
@@ -24,41 +34,20 @@ export interface mgClientConfiguration {
24
34
  */
25
35
  export interface mgMapConfig {
26
36
  MAP_BILLBOARDS: mgMapBillboards;
27
- MAP_STYLE_URL: string;
28
- DEFAULT_MAP_BOUNDARIES: { latitude: number; longitude: number }[];
29
- EVENT_CENTER_COORDINATES: {latitude: number, longitude:number}
30
- }
31
-
32
- /**
33
- * Configs for feed
34
- */
35
- export interface mgFeedConfig {
36
- SHOW_NETWORK_INDICATOR: boolean; // TODO: delete, not used, just have a popup when network fails
37
- }
38
-
39
- /**
40
- * Configs for lists
41
- */
42
- export interface mgListsConfig {
43
- THIS_INTERFACE_HAS_NO_PROPERTIES: undefined;
44
- }
45
-
46
- /**
47
- * Configs for calendars
48
- */
49
- export interface mgCalendarConfig {
50
- THIS_INTERFACE_HAS_NO_PROPERTIES: undefined;
37
+ DEFAULT_MAP_BOUNDARIES: { latitude: number; longitude: number }[] | null;
38
+ EVENT_CENTER_COORDINATES: { latitude: number; longitude: number } | null;
39
+ mapStyleURL: string | null;
51
40
  }
52
41
 
53
42
  /**
54
43
  * Configs for event dates, locations, names, map details and feed header
55
44
  */
56
45
  export interface mgSpecsConfig {
57
- EVENT_NAME: string;
58
- APP_ALIAS: string;
59
- PRESENTING_ORGANIZATION: string | null;
60
- EVENT_START_DATETIME: string | null;
61
- EVENT_END_DATETIME: string | null;
46
+ eventName: string;
47
+ appAlias: string;
48
+ presentingOrganization: string | null;
49
+ eventStartDateTime: string | null;
50
+ eventEndDateTime: string | null;
62
51
  }
63
52
 
64
53
  /**
@@ -74,26 +63,51 @@ export enum mgNavButton {
74
63
  SETTINGS = 'settings',
75
64
  }
76
65
 
77
- /**
78
- * Configs for nav, like bottom nav buttons
79
- * @property bottomNavButtons.primary: buttons that show on bottom nav, listed in order they're displayed
80
- * @property bottomNavButtons.secondary: buttons that show in 'MORE' menu
81
- */
82
- export interface mgNavigationConfig {
83
- bottomNavButtons: {
84
- primary: ('feed'|'map'|'create'|'list'|'calendar'|'help'|'settings')[];
85
- secondary: ('feed'|'map'|'create'|'list'|'calendar'|'help'|'settings')[];
86
- };
87
- homePage: 'Settings' | 'Map' | 'Feed' | 'Calendar' | 'Lists';
88
- }
89
-
90
66
  /**
91
67
  * Configs that dictate user interactivity
92
68
  */
93
69
  export interface mgFeaturesConfig {
94
- IS_CONTENT_THREADED: boolean;
95
- VOTING_MODE: 'none' | 'up only' | 'up and down'
96
- SHOW_CONTENT_CREATION_DATE: boolean
70
+ CONTENT: {
71
+ isContentThreaded: boolean;
72
+ votingMode: 'none' | 'up only' | 'up and down';
73
+ showContentCreationDate: boolean;
74
+ };
75
+ PAGES: {
76
+ FEED: {
77
+ isEnabled: boolean;
78
+ };
79
+ MAP: {
80
+ isEnabled: boolean;
81
+ };
82
+ LISTS: {
83
+ isEnabled: boolean;
84
+ };
85
+ CALENDAR: {
86
+ isEnabled: boolean;
87
+ };
88
+ SETTINGS: {
89
+ isEnabled: boolean;
90
+ };
91
+ };
92
+ NAV: {
93
+ homePage: 'settings' | 'map' | 'feed' | 'calendar' | 'lists';
94
+ primaryButtons: 'settings' | 'map' | 'feed' | 'calendar' | 'lists'[]; // | 'create' | 'help'
95
+ secondaryButtons: 'settings' | 'map' | 'feed' | 'calendar' | 'lists'[]; // | 'create' | 'help'
96
+ };
97
+ AUTH: {
98
+ userAuthMode: 'guest only' | 'account only' | 'guest or account';
99
+ AUTH_PAGE: {
100
+ displayMode: 'never' | 'interval' | 'always';
101
+ interval:
102
+ | null
103
+ | '10 minutes'
104
+ | '30 minutes'
105
+ | '1 hour'
106
+ | '1 day'
107
+ | '1 week'
108
+ | '1 month';
109
+ };
110
+ };
97
111
  }
98
112
 
99
113
  /**
@@ -107,7 +121,7 @@ export interface mgFeaturesConfig {
107
121
  *
108
122
  */
109
123
  export interface mgContentConfig {
110
- TAGS: string[];
124
+ tags: string[];
111
125
  PINS: {
112
126
  art?: string[]; // painting, sculpture, etc... same as "plans-art"
113
127
  default: ['pin'];
@@ -152,22 +166,6 @@ export interface mgContentConfig {
152
166
  EMERGENCIES?: ('mental health' | 'security' | 'fire' | 'medical')[];
153
167
  }
154
168
 
155
- // ** AUTH **
156
- export interface mgAuthenticationConfig {
157
- USER_AUTH_MODE: 'guest only' | 'account only' | 'guest or account';
158
- AUTH_PAGE: {
159
- DISPLAY_MODE: 'never' | 'interval' | 'always';
160
- INTERVAL:
161
- | null
162
- | '10 minutes'
163
- | '30 minutes'
164
- | '1 hour'
165
- | '1 day'
166
- | '1 week'
167
- | '1 month';
168
- };
169
- }
170
-
171
169
  // ** COLORS **
172
170
  /**
173
171
  * Configs based on React Native Paper color assignments w/ some extras
@@ -201,7 +199,7 @@ export interface mgColorsConfig {
201
199
  lightNeutral: string;
202
200
  darkNeutral: string;
203
201
  dark: string;
204
- sunkSurface:string;
202
+ sunkSurface: string;
205
203
  success: string;
206
204
  warning: string;
207
205
  locationPuck: string;
@@ -1,5 +1,5 @@
1
- import { ReactElement } from 'react';
2
-
1
+ // COMPONENT DIMENSIONS
2
+ // VALUES ARE NUMBER ONLY!
3
3
  export interface mgComponentConfiguration {
4
4
  authentication: mgAuthenticationComponentConfig;
5
5
  feed: mgFeedComponentConfig;
@@ -7,25 +7,32 @@ export interface mgComponentConfiguration {
7
7
  other: mgOtherComponentConfig;
8
8
  }
9
9
 
10
- export interface mgMapComponentConfig{
11
- mapIconButtonSize:number;
10
+ export interface mgMapComponentConfig {
11
+ mapIconButtonSize: number;
12
12
  }
13
13
  export interface mgAuthenticationComponentConfig {
14
- THIS_INTERFACE_HAS_NO_PROPERTIES: undefined;
14
+ THIS_INTERFACE_HAS_NO_PROPERTIES: undefined;
15
15
  }
16
16
 
17
17
  export interface mgFeedComponentConfig {
18
- HEADER: { height: number; graphicPadding:{top:number, right:number, bottom:number, left:number} };
18
+ HEADER: {
19
+ height: number;
20
+ graphicPadding: {
21
+ top: number;
22
+ right: number;
23
+ bottom: number;
24
+ left: number;
25
+ };
26
+ };
19
27
  NOTIFICATION: {
20
28
  height: number;
21
- fallbackText: string; // what's displayed if server doesn't work
22
29
  };
23
30
  }
24
31
 
25
32
  export interface mgOtherComponentConfig {
26
33
  STICKY: {
27
34
  height: number;
28
- SEARCH_BAR: { fontSize: number; height: number; placeholder: string };
35
+ SEARCH_BAR: { fontSize: number; height: number; };
29
36
  BOTTOM: { height: number };
30
37
  };
31
38
  CARD: {