@trackunit/react-core-contexts-api 0.2.18 → 0.2.20-alpha-0b53b6cf53.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/index.cjs +44 -0
- package/package.json +2 -2
- package/src/toastContext.d.ts +7 -8
package/index.cjs
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
exports.AssetSortByProperty = void 0;
|
6
|
+
(function (AssetSortByProperty) {
|
7
|
+
AssetSortByProperty["Activity"] = "ACTIVITY";
|
8
|
+
AssetSortByProperty["Brand"] = "BRAND";
|
9
|
+
AssetSortByProperty["Category"] = "CATEGORY";
|
10
|
+
AssetSortByProperty["Criticality"] = "CRITICALITY";
|
11
|
+
AssetSortByProperty["ExternalReference"] = "EXTERNAL_REFERENCE";
|
12
|
+
AssetSortByProperty["Location"] = "LOCATION";
|
13
|
+
AssetSortByProperty["LocationUpdatedAt"] = "LOCATION_UPDATED_AT";
|
14
|
+
AssetSortByProperty["Model"] = "MODEL";
|
15
|
+
AssetSortByProperty["Name"] = "NAME";
|
16
|
+
AssetSortByProperty["OwnerAccountName"] = "OWNER_ACCOUNT_NAME";
|
17
|
+
AssetSortByProperty["ProductionYear"] = "PRODUCTION_YEAR";
|
18
|
+
AssetSortByProperty["SerialNumber"] = "SERIAL_NUMBER";
|
19
|
+
AssetSortByProperty["ServicePlanAssignmentStatus"] = "SERVICE_PLAN_ASSIGNMENT_STATUS";
|
20
|
+
AssetSortByProperty["ServicePlanOverdueness"] = "SERVICE_PLAN_OVERDUENESS";
|
21
|
+
AssetSortByProperty["ServicePlanStatus"] = "SERVICE_PLAN_STATUS";
|
22
|
+
AssetSortByProperty["TelematicsDeviceSerialNumber"] = "TELEMATICS_DEVICE_SERIAL_NUMBER";
|
23
|
+
AssetSortByProperty["Type"] = "TYPE";
|
24
|
+
})(exports.AssetSortByProperty || (exports.AssetSortByProperty = {}));
|
25
|
+
exports.SortOrder = void 0;
|
26
|
+
(function (SortOrder) {
|
27
|
+
SortOrder["Asc"] = "ASC";
|
28
|
+
SortOrder["Desc"] = "DESC";
|
29
|
+
})(exports.SortOrder || (exports.SortOrder = {}));
|
30
|
+
|
31
|
+
const UserSubscriptionPackage = {
|
32
|
+
EXPLORE_FLEET_OWNER: "Explore (Fleet Owner)",
|
33
|
+
EVOLVE_FLEET_OWNER: "Evolve (Fleet Owner)",
|
34
|
+
EXPAND_FLEET_OWNER: "Expand (Fleet Owner)",
|
35
|
+
EXPLORE_OEM: "Explore (OEM)",
|
36
|
+
EVOLVE_OEM: "Evolve (OEM)",
|
37
|
+
EXPAND_OEM: "Expand (OEM)",
|
38
|
+
COLLECT: "COLLECT",
|
39
|
+
INSIGHT: "INSIGHT",
|
40
|
+
VIEW: "VIEW",
|
41
|
+
NONE: "NONE",
|
42
|
+
};
|
43
|
+
|
44
|
+
exports.UserSubscriptionPackage = UserSubscriptionPackage;
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trackunit/react-core-contexts-api",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.20-alpha-0b53b6cf53.0",
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"module": "./index.js",
|
7
|
-
"main": "./index.
|
7
|
+
"main": "./index.cjs",
|
8
8
|
"type": "module",
|
9
9
|
"types": "./src/index.d.ts"
|
10
10
|
}
|
package/src/toastContext.d.ts
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export type
|
3
|
-
export type
|
2
|
+
export type ToastColors = "info" | "warning" | "danger" | "success";
|
3
|
+
export type ToastAction = {
|
4
4
|
label: string;
|
5
5
|
onClick: () => void;
|
6
6
|
loading?: boolean;
|
7
7
|
};
|
8
8
|
export interface Toast {
|
9
|
-
|
10
|
-
intent:
|
9
|
+
id?: string;
|
10
|
+
intent: ToastColors;
|
11
11
|
title: string;
|
12
12
|
description?: string;
|
13
|
-
primaryAction?:
|
14
|
-
secondaryAction?:
|
13
|
+
primaryAction?: ToastAction;
|
14
|
+
secondaryAction?: ToastAction;
|
15
15
|
duration?: number;
|
16
16
|
}
|
17
|
-
export type AddToast = (toast: Toast) => void;
|
18
17
|
export interface IToastContext {
|
19
|
-
addToast:
|
18
|
+
addToast: (toast: Toast) => Promise<void | "primaryAction" | "secondaryAction">;
|
20
19
|
setIsManifestError?: React.Dispatch<React.SetStateAction<boolean>>;
|
21
20
|
}
|