@trackunit/react-core-contexts-api 0.0.1-alpha-d61feec588.0 → 0.0.1-alpha-a2aba2c20d.0
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/assetSortingContext.d.ts +33 -0
- package/environmentContext.d.ts +1 -0
- package/globalSelectionContext.d.ts +18 -0
- package/index.d.ts +2 -0
- package/index.js +30 -1
- package/package.json +1 -1
@@ -0,0 +1,33 @@
|
|
1
|
+
export interface IAssetSortingContext {
|
2
|
+
sortingState: SortingState;
|
3
|
+
setSortBy: (sortBy: AssetSortByProperty, order?: SortOrder) => void;
|
4
|
+
}
|
5
|
+
export interface SortingState {
|
6
|
+
/** The property to sort by. */
|
7
|
+
sortBy: AssetSortByProperty;
|
8
|
+
/** The property to sort by. */
|
9
|
+
order: SortOrder;
|
10
|
+
}
|
11
|
+
export declare enum AssetSortByProperty {
|
12
|
+
Activity = "ACTIVITY",
|
13
|
+
Brand = "BRAND",
|
14
|
+
Category = "CATEGORY",
|
15
|
+
Criticality = "CRITICALITY",
|
16
|
+
ExternalReference = "EXTERNAL_REFERENCE",
|
17
|
+
Location = "LOCATION",
|
18
|
+
LocationUpdatedAt = "LOCATION_UPDATED_AT",
|
19
|
+
Model = "MODEL",
|
20
|
+
Name = "NAME",
|
21
|
+
OwnerAccountName = "OWNER_ACCOUNT_NAME",
|
22
|
+
ProductionYear = "PRODUCTION_YEAR",
|
23
|
+
SerialNumber = "SERIAL_NUMBER",
|
24
|
+
ServicePlanAssignmentStatus = "SERVICE_PLAN_ASSIGNMENT_STATUS",
|
25
|
+
ServicePlanOverdueness = "SERVICE_PLAN_OVERDUENESS",
|
26
|
+
ServicePlanStatus = "SERVICE_PLAN_STATUS",
|
27
|
+
TelematicsDeviceSerialNumber = "TELEMATICS_DEVICE_SERIAL_NUMBER",
|
28
|
+
Type = "TYPE"
|
29
|
+
}
|
30
|
+
export declare enum SortOrder {
|
31
|
+
Asc = "ASC",
|
32
|
+
Desc = "DESC"
|
33
|
+
}
|
package/environmentContext.d.ts
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
export interface IGlobalSelectionContext {
|
2
|
+
/**
|
3
|
+
* Details about the globally selected entity and its type
|
4
|
+
* returns `null` if no selection currently.
|
5
|
+
*/
|
6
|
+
selection: Readonly<JobSiteSelection | GroupSelection> | null;
|
7
|
+
}
|
8
|
+
export interface JobSiteSelection extends TypedSelection<"job-site"> {
|
9
|
+
jobSiteId: string;
|
10
|
+
}
|
11
|
+
export interface GroupSelection extends TypedSelection<"group"> {
|
12
|
+
groupId: string;
|
13
|
+
}
|
14
|
+
interface TypedSelection<Type extends string> {
|
15
|
+
type: Type;
|
16
|
+
displayName: string;
|
17
|
+
}
|
18
|
+
export {};
|
package/index.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
export * from "./assetSortingContext";
|
1
2
|
export * from "./currentUserContext";
|
2
3
|
export * from "./developerSettingsContext";
|
3
4
|
export * from "./environmentContext";
|
5
|
+
export * from "./globalSelectionContext";
|
4
6
|
export * from "./toastContext";
|
5
7
|
export * from "./tokenContext";
|
6
8
|
export * from "./userSubscriptionContext";
|
package/index.js
CHANGED
@@ -1,3 +1,32 @@
|
|
1
|
+
var AssetSortByProperty;
|
2
|
+
|
3
|
+
(function (AssetSortByProperty) {
|
4
|
+
AssetSortByProperty["Activity"] = "ACTIVITY";
|
5
|
+
AssetSortByProperty["Brand"] = "BRAND";
|
6
|
+
AssetSortByProperty["Category"] = "CATEGORY";
|
7
|
+
AssetSortByProperty["Criticality"] = "CRITICALITY";
|
8
|
+
AssetSortByProperty["ExternalReference"] = "EXTERNAL_REFERENCE";
|
9
|
+
AssetSortByProperty["Location"] = "LOCATION";
|
10
|
+
AssetSortByProperty["LocationUpdatedAt"] = "LOCATION_UPDATED_AT";
|
11
|
+
AssetSortByProperty["Model"] = "MODEL";
|
12
|
+
AssetSortByProperty["Name"] = "NAME";
|
13
|
+
AssetSortByProperty["OwnerAccountName"] = "OWNER_ACCOUNT_NAME";
|
14
|
+
AssetSortByProperty["ProductionYear"] = "PRODUCTION_YEAR";
|
15
|
+
AssetSortByProperty["SerialNumber"] = "SERIAL_NUMBER";
|
16
|
+
AssetSortByProperty["ServicePlanAssignmentStatus"] = "SERVICE_PLAN_ASSIGNMENT_STATUS";
|
17
|
+
AssetSortByProperty["ServicePlanOverdueness"] = "SERVICE_PLAN_OVERDUENESS";
|
18
|
+
AssetSortByProperty["ServicePlanStatus"] = "SERVICE_PLAN_STATUS";
|
19
|
+
AssetSortByProperty["TelematicsDeviceSerialNumber"] = "TELEMATICS_DEVICE_SERIAL_NUMBER";
|
20
|
+
AssetSortByProperty["Type"] = "TYPE";
|
21
|
+
})(AssetSortByProperty || (AssetSortByProperty = {}));
|
22
|
+
|
23
|
+
var SortOrder;
|
24
|
+
|
25
|
+
(function (SortOrder) {
|
26
|
+
SortOrder["Asc"] = "ASC";
|
27
|
+
SortOrder["Desc"] = "DESC";
|
28
|
+
})(SortOrder || (SortOrder = {}));
|
29
|
+
|
1
30
|
var UserSubscriptionPackageType;
|
2
31
|
|
3
32
|
(function (UserSubscriptionPackageType) {
|
@@ -11,4 +40,4 @@ var UserSubscriptionPackageType;
|
|
11
40
|
UserSubscriptionPackageType["None"] = "NONE";
|
12
41
|
})(UserSubscriptionPackageType || (UserSubscriptionPackageType = {}));
|
13
42
|
|
14
|
-
export { UserSubscriptionPackageType };
|
43
|
+
export { AssetSortByProperty, SortOrder, UserSubscriptionPackageType };
|
package/package.json
CHANGED