@trackunit/react-core-contexts-api 0.2.116 → 0.2.117

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/index.cjs.js CHANGED
@@ -102,37 +102,6 @@ exports.SortOrder = void 0;
102
102
  SortOrder["Desc"] = "DESC";
103
103
  })(exports.SortOrder || (exports.SortOrder = {}));
104
104
 
105
- /** The property to sort by. */
106
- exports.ContactSortByProperty = void 0;
107
- (function (ContactSortByProperty) {
108
- ContactSortByProperty["Name"] = "NAME";
109
- ContactSortByProperty["Email"] = "EMAIL";
110
- ContactSortByProperty["Fax"] = "FAX";
111
- ContactSortByProperty["Phone"] = "PHONE";
112
- ContactSortByProperty["Title"] = "TITLE";
113
- })(exports.ContactSortByProperty || (exports.ContactSortByProperty = {}));
114
- /**
115
- * Ensures that a string is a valid ContactSortByProperty enum value
116
- *
117
- * @param input A string to test against ContactSortByProperty
118
- * @returns {ContactSortByProperty.Name} The ContactSortByProperty enum value or the default value (ContactSortByProperty.Name)
119
- */
120
- const validateStringAsContactSortByProperty = (input) => {
121
- switch (input) {
122
- case exports.ContactSortByProperty.Email:
123
- return exports.ContactSortByProperty.Email;
124
- case exports.ContactSortByProperty.Fax:
125
- return exports.ContactSortByProperty.Fax;
126
- case exports.ContactSortByProperty.Phone:
127
- return exports.ContactSortByProperty.Phone;
128
- case exports.ContactSortByProperty.Title:
129
- return exports.ContactSortByProperty.Title;
130
- case exports.ContactSortByProperty.Name:
131
- default:
132
- return exports.ContactSortByProperty.Name;
133
- }
134
- };
135
-
136
105
  const assetHomePageIds = [
137
106
  "status",
138
107
  "movement",
@@ -156,61 +125,6 @@ const isIrisOptions = (options) => {
156
125
  ("extensionId") in options);
157
126
  };
158
127
 
159
- /** The property to sort by. */
160
- exports.SiteSortByProperty = void 0;
161
- (function (SiteSortByProperty) {
162
- SiteSortByProperty["Area"] = "AREA";
163
- SiteSortByProperty["CenterLatitude"] = "CENTER_LATITUDE";
164
- SiteSortByProperty["CenterLongitude"] = "CENTER_LONGITUDE";
165
- SiteSortByProperty["City"] = "CITY";
166
- SiteSortByProperty["Country"] = "COUNTRY";
167
- SiteSortByProperty["CreatedDate"] = "CREATED_DATE";
168
- SiteSortByProperty["Description"] = "DESCRIPTION";
169
- SiteSortByProperty["EndDate"] = "END_DATE";
170
- SiteSortByProperty["LastModifiedDate"] = "LAST_MODIFIED_DATE";
171
- SiteSortByProperty["Name"] = "NAME";
172
- SiteSortByProperty["StartDate"] = "START_DATE";
173
- SiteSortByProperty["Status"] = "STATUS";
174
- SiteSortByProperty["StreetAddress"] = "STREET_ADDRESS";
175
- SiteSortByProperty["Type"] = "TYPE";
176
- SiteSortByProperty["ZipCode"] = "ZIP_CODE";
177
- SiteSortByProperty["ZoneId"] = "ZONE_ID";
178
- })(exports.SiteSortByProperty || (exports.SiteSortByProperty = {}));
179
- /**
180
- * Ensures that a string is a valid SiteSortByProperty enum value
181
- *
182
- * @param input A string to test against SiteSortByProperty
183
- * @returns {SiteSortByProperty.Name} The SiteSortByProperty enum value or the default value (SiteSortByProperty.Name)
184
- */
185
- const validateStringAsSiteSortByProperty = (input) => {
186
- const fallback = exports.SiteSortByProperty.Name;
187
- if (!input) {
188
- return fallback;
189
- }
190
- switch (input) {
191
- case exports.SiteSortByProperty.Area:
192
- return exports.SiteSortByProperty.Area;
193
- case exports.SiteSortByProperty.EndDate:
194
- return exports.SiteSortByProperty.EndDate;
195
- case exports.SiteSortByProperty.Name:
196
- return exports.SiteSortByProperty.Name;
197
- case exports.SiteSortByProperty.StartDate:
198
- return exports.SiteSortByProperty.StartDate;
199
- case exports.SiteSortByProperty.Status:
200
- return exports.SiteSortByProperty.Status;
201
- case exports.SiteSortByProperty.Type:
202
- return exports.SiteSortByProperty.Type;
203
- case exports.SiteSortByProperty.City:
204
- return exports.SiteSortByProperty.City;
205
- case exports.SiteSortByProperty.Country:
206
- return exports.SiteSortByProperty.Country;
207
- case exports.SiteSortByProperty.ZipCode:
208
- return exports.SiteSortByProperty.ZipCode;
209
- default:
210
- return fallback;
211
- }
212
- };
213
-
214
128
  const UserSubscriptionPackage = {
215
129
  EXPLORE_FLEET_OWNER: "Explore (Fleet Owner)",
216
130
  EVOLVE_FLEET_OWNER: "Evolve (Fleet Owner)",
@@ -238,5 +152,3 @@ exports.createEvent = createEvent;
238
152
  exports.isIrisOptions = isIrisOptions;
239
153
  exports.siteHomePageIds = siteHomePageIds;
240
154
  exports.validateStringAsAssetSortByProperty = validateStringAsAssetSortByProperty;
241
- exports.validateStringAsContactSortByProperty = validateStringAsContactSortByProperty;
242
- exports.validateStringAsSiteSortByProperty = validateStringAsSiteSortByProperty;
package/index.esm.js CHANGED
@@ -98,37 +98,6 @@ var SortOrder;
98
98
  SortOrder["Desc"] = "DESC";
99
99
  })(SortOrder || (SortOrder = {}));
100
100
 
101
- /** The property to sort by. */
102
- var ContactSortByProperty;
103
- (function (ContactSortByProperty) {
104
- ContactSortByProperty["Name"] = "NAME";
105
- ContactSortByProperty["Email"] = "EMAIL";
106
- ContactSortByProperty["Fax"] = "FAX";
107
- ContactSortByProperty["Phone"] = "PHONE";
108
- ContactSortByProperty["Title"] = "TITLE";
109
- })(ContactSortByProperty || (ContactSortByProperty = {}));
110
- /**
111
- * Ensures that a string is a valid ContactSortByProperty enum value
112
- *
113
- * @param input A string to test against ContactSortByProperty
114
- * @returns {ContactSortByProperty.Name} The ContactSortByProperty enum value or the default value (ContactSortByProperty.Name)
115
- */
116
- const validateStringAsContactSortByProperty = (input) => {
117
- switch (input) {
118
- case ContactSortByProperty.Email:
119
- return ContactSortByProperty.Email;
120
- case ContactSortByProperty.Fax:
121
- return ContactSortByProperty.Fax;
122
- case ContactSortByProperty.Phone:
123
- return ContactSortByProperty.Phone;
124
- case ContactSortByProperty.Title:
125
- return ContactSortByProperty.Title;
126
- case ContactSortByProperty.Name:
127
- default:
128
- return ContactSortByProperty.Name;
129
- }
130
- };
131
-
132
101
  const assetHomePageIds = [
133
102
  "status",
134
103
  "movement",
@@ -152,61 +121,6 @@ const isIrisOptions = (options) => {
152
121
  ("extensionId") in options);
153
122
  };
154
123
 
155
- /** The property to sort by. */
156
- var SiteSortByProperty;
157
- (function (SiteSortByProperty) {
158
- SiteSortByProperty["Area"] = "AREA";
159
- SiteSortByProperty["CenterLatitude"] = "CENTER_LATITUDE";
160
- SiteSortByProperty["CenterLongitude"] = "CENTER_LONGITUDE";
161
- SiteSortByProperty["City"] = "CITY";
162
- SiteSortByProperty["Country"] = "COUNTRY";
163
- SiteSortByProperty["CreatedDate"] = "CREATED_DATE";
164
- SiteSortByProperty["Description"] = "DESCRIPTION";
165
- SiteSortByProperty["EndDate"] = "END_DATE";
166
- SiteSortByProperty["LastModifiedDate"] = "LAST_MODIFIED_DATE";
167
- SiteSortByProperty["Name"] = "NAME";
168
- SiteSortByProperty["StartDate"] = "START_DATE";
169
- SiteSortByProperty["Status"] = "STATUS";
170
- SiteSortByProperty["StreetAddress"] = "STREET_ADDRESS";
171
- SiteSortByProperty["Type"] = "TYPE";
172
- SiteSortByProperty["ZipCode"] = "ZIP_CODE";
173
- SiteSortByProperty["ZoneId"] = "ZONE_ID";
174
- })(SiteSortByProperty || (SiteSortByProperty = {}));
175
- /**
176
- * Ensures that a string is a valid SiteSortByProperty enum value
177
- *
178
- * @param input A string to test against SiteSortByProperty
179
- * @returns {SiteSortByProperty.Name} The SiteSortByProperty enum value or the default value (SiteSortByProperty.Name)
180
- */
181
- const validateStringAsSiteSortByProperty = (input) => {
182
- const fallback = SiteSortByProperty.Name;
183
- if (!input) {
184
- return fallback;
185
- }
186
- switch (input) {
187
- case SiteSortByProperty.Area:
188
- return SiteSortByProperty.Area;
189
- case SiteSortByProperty.EndDate:
190
- return SiteSortByProperty.EndDate;
191
- case SiteSortByProperty.Name:
192
- return SiteSortByProperty.Name;
193
- case SiteSortByProperty.StartDate:
194
- return SiteSortByProperty.StartDate;
195
- case SiteSortByProperty.Status:
196
- return SiteSortByProperty.Status;
197
- case SiteSortByProperty.Type:
198
- return SiteSortByProperty.Type;
199
- case SiteSortByProperty.City:
200
- return SiteSortByProperty.City;
201
- case SiteSortByProperty.Country:
202
- return SiteSortByProperty.Country;
203
- case SiteSortByProperty.ZipCode:
204
- return SiteSortByProperty.ZipCode;
205
- default:
206
- return fallback;
207
- }
208
- };
209
-
210
124
  const UserSubscriptionPackage = {
211
125
  EXPLORE_FLEET_OWNER: "Explore (Fleet Owner)",
212
126
  EVOLVE_FLEET_OWNER: "Evolve (Fleet Owner)",
@@ -226,4 +140,4 @@ const UserSubscriptionPackage = {
226
140
  LEAP: "Leap",
227
141
  };
228
142
 
229
- export { AssetSortByProperty, ContactSortByProperty, SiteSortByProperty, SortOrder, SystemOfMeasurement, TimeZonePreference, UserSubscriptionPackage, assetHomePageIds, createEvent, isIrisOptions, siteHomePageIds, validateStringAsAssetSortByProperty, validateStringAsContactSortByProperty, validateStringAsSiteSortByProperty };
143
+ export { AssetSortByProperty, SortOrder, SystemOfMeasurement, TimeZonePreference, UserSubscriptionPackage, assetHomePageIds, createEvent, isIrisOptions, siteHomePageIds, validateStringAsAssetSortByProperty };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-api",
3
- "version": "0.2.116",
3
+ "version": "0.2.117",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/index.d.ts CHANGED
@@ -2,13 +2,11 @@ export * from "./IUserPreferencesContext";
2
2
  export * from "./analyticsContext";
3
3
  export * from "./assetSortingContext";
4
4
  export * from "./confirmationDialogContext";
5
- export * from "./contactSortingContext";
6
5
  export * from "./currentUserContext";
7
6
  export * from "./environmentContext";
8
7
  export * from "./filterBarContext";
9
8
  export * from "./navigationContext";
10
9
  export * from "./oemBrandingContext";
11
- export * from "./siteSortingContext";
12
10
  export * from "./toastContext";
13
11
  export * from "./tokenContext";
14
12
  export * from "./userSubscriptionContext";
@@ -1,15 +0,0 @@
1
- /** The property to sort by. */
2
- export declare enum ContactSortByProperty {
3
- Name = "NAME",
4
- Email = "EMAIL",
5
- Fax = "FAX",
6
- Phone = "PHONE",
7
- Title = "TITLE"
8
- }
9
- /**
10
- * Ensures that a string is a valid ContactSortByProperty enum value
11
- *
12
- * @param input A string to test against ContactSortByProperty
13
- * @returns {ContactSortByProperty.Name} The ContactSortByProperty enum value or the default value (ContactSortByProperty.Name)
14
- */
15
- export declare const validateStringAsContactSortByProperty: (input?: string) => ContactSortByProperty;
@@ -1,26 +0,0 @@
1
- /** The property to sort by. */
2
- export declare enum SiteSortByProperty {
3
- Area = "AREA",
4
- CenterLatitude = "CENTER_LATITUDE",
5
- CenterLongitude = "CENTER_LONGITUDE",
6
- City = "CITY",
7
- Country = "COUNTRY",
8
- CreatedDate = "CREATED_DATE",
9
- Description = "DESCRIPTION",
10
- EndDate = "END_DATE",
11
- LastModifiedDate = "LAST_MODIFIED_DATE",
12
- Name = "NAME",
13
- StartDate = "START_DATE",
14
- Status = "STATUS",
15
- StreetAddress = "STREET_ADDRESS",
16
- Type = "TYPE",
17
- ZipCode = "ZIP_CODE",
18
- ZoneId = "ZONE_ID"
19
- }
20
- /**
21
- * Ensures that a string is a valid SiteSortByProperty enum value
22
- *
23
- * @param input A string to test against SiteSortByProperty
24
- * @returns {SiteSortByProperty.Name} The SiteSortByProperty enum value or the default value (SiteSortByProperty.Name)
25
- */
26
- export declare const validateStringAsSiteSortByProperty: (input?: string) => SiteSortByProperty;