@trackunit/react-core-contexts-api 0.2.116 → 0.2.118
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 +1 -88
- package/index.esm.js +2 -87
- package/package.json +1 -1
- package/src/index.d.ts +0 -2
- package/src/navigationContext.d.ts +2 -1
- package/src/contactSortingContext.d.ts +0 -15
- package/src/siteSortingContext.d.ts +0 -26
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",
|
@@ -141,6 +110,7 @@ const assetHomePageIds = [
|
|
141
110
|
"specification",
|
142
111
|
"telematics",
|
143
112
|
"activity-timeline",
|
113
|
+
"customers",
|
144
114
|
];
|
145
115
|
const siteHomePageIds = ["overview", "assets", "asset-visibility"];
|
146
116
|
/**
|
@@ -156,61 +126,6 @@ const isIrisOptions = (options) => {
|
|
156
126
|
("extensionId") in options);
|
157
127
|
};
|
158
128
|
|
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
129
|
const UserSubscriptionPackage = {
|
215
130
|
EXPLORE_FLEET_OWNER: "Explore (Fleet Owner)",
|
216
131
|
EVOLVE_FLEET_OWNER: "Evolve (Fleet Owner)",
|
@@ -238,5 +153,3 @@ exports.createEvent = createEvent;
|
|
238
153
|
exports.isIrisOptions = isIrisOptions;
|
239
154
|
exports.siteHomePageIds = siteHomePageIds;
|
240
155
|
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",
|
@@ -137,6 +106,7 @@ const assetHomePageIds = [
|
|
137
106
|
"specification",
|
138
107
|
"telematics",
|
139
108
|
"activity-timeline",
|
109
|
+
"customers",
|
140
110
|
];
|
141
111
|
const siteHomePageIds = ["overview", "assets", "asset-visibility"];
|
142
112
|
/**
|
@@ -152,61 +122,6 @@ const isIrisOptions = (options) => {
|
|
152
122
|
("extensionId") in options);
|
153
123
|
};
|
154
124
|
|
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
125
|
const UserSubscriptionPackage = {
|
211
126
|
EXPLORE_FLEET_OWNER: "Explore (Fleet Owner)",
|
212
127
|
EVOLVE_FLEET_OWNER: "Evolve (Fleet Owner)",
|
@@ -226,4 +141,4 @@ const UserSubscriptionPackage = {
|
|
226
141
|
LEAP: "Leap",
|
227
142
|
};
|
228
143
|
|
229
|
-
export { AssetSortByProperty,
|
144
|
+
export { AssetSortByProperty, SortOrder, SystemOfMeasurement, TimeZonePreference, UserSubscriptionPackage, assetHomePageIds, createEvent, isIrisOptions, siteHomePageIds, validateStringAsAssetSortByProperty };
|
package/package.json
CHANGED
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";
|
@@ -27,7 +27,7 @@ export type IrisAppOptions = {
|
|
27
27
|
declare const mainApps: readonly ["fleet/list", "reports", "sites"];
|
28
28
|
export type MainFleetApp = (typeof mainApps)[number];
|
29
29
|
export type FleetAppStandardOptions = Page<MainFleetApp> & NeverIrisApp;
|
30
|
-
export declare const assetHomePageIds: readonly ["status", "movement", "events", "insights", "specification", "telematics", "activity-timeline"];
|
30
|
+
export declare const assetHomePageIds: readonly ["status", "movement", "events", "insights", "specification", "telematics", "activity-timeline", "customers"];
|
31
31
|
export type AssetHomePageId = (typeof assetHomePageIds)[number];
|
32
32
|
export type AssetHomeStandardOptions = Page<AssetHomePageId> & NeverIrisApp;
|
33
33
|
export declare const siteHomePageIds: readonly ["overview", "assets", "asset-visibility"];
|
@@ -47,5 +47,6 @@ export interface INavigationContext {
|
|
47
47
|
gotoSiteHome: (siteId: string, options?: IrisAppOptions | SiteHomeStandardOptions) => Promise<boolean>;
|
48
48
|
gotoAppLibrary: (irisAppId?: string) => Promise<boolean>;
|
49
49
|
gotoFleetApp: (options: IrisAppOptions | FleetAppStandardOptions) => Promise<boolean>;
|
50
|
+
gotoCustomer: (customerId?: string) => Promise<boolean>;
|
50
51
|
}
|
51
52
|
export {};
|
@@ -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;
|