@trackunit/react-core-contexts-api 1.4.69 → 1.4.70

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
@@ -2,16 +2,6 @@
2
2
 
3
3
  var sharedUtils = require('@trackunit/shared-utils');
4
4
 
5
- const SystemOfMeasurement = {
6
- Si: "SI",
7
- UsCustomary: "US_CUSTOMARY",
8
- };
9
- const TimeZonePreference = {
10
- CustomTimeZone: "CUSTOM_TIME_ZONE",
11
- LocalTimeZone: "LOCAL_TIME_ZONE",
12
- MachineTimeZone: "MACHINE_TIME_ZONE",
13
- };
14
-
15
5
  /**
16
6
  * Takes an event type and a description and returns an event
17
7
  *
@@ -102,6 +92,16 @@ exports.SortOrder = void 0;
102
92
  SortOrder["Desc"] = "DESC";
103
93
  })(exports.SortOrder || (exports.SortOrder = {}));
104
94
 
95
+ const SystemOfMeasurement = {
96
+ Si: "SI",
97
+ UsCustomary: "US_CUSTOMARY",
98
+ };
99
+ const TimeZonePreference = {
100
+ CustomTimeZone: "CUSTOM_TIME_ZONE",
101
+ LocalTimeZone: "LOCAL_TIME_ZONE",
102
+ MachineTimeZone: "MACHINE_TIME_ZONE",
103
+ };
104
+
105
105
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
106
106
  const assetHomePageIds = [
107
107
  "status",
package/index.esm.js CHANGED
@@ -1,15 +1,5 @@
1
1
  import { isUUID } from '@trackunit/shared-utils';
2
2
 
3
- const SystemOfMeasurement = {
4
- Si: "SI",
5
- UsCustomary: "US_CUSTOMARY",
6
- };
7
- const TimeZonePreference = {
8
- CustomTimeZone: "CUSTOM_TIME_ZONE",
9
- LocalTimeZone: "LOCAL_TIME_ZONE",
10
- MachineTimeZone: "MACHINE_TIME_ZONE",
11
- };
12
-
13
3
  /**
14
4
  * Takes an event type and a description and returns an event
15
5
  *
@@ -100,6 +90,16 @@ var SortOrder;
100
90
  SortOrder["Desc"] = "DESC";
101
91
  })(SortOrder || (SortOrder = {}));
102
92
 
93
+ const SystemOfMeasurement = {
94
+ Si: "SI",
95
+ UsCustomary: "US_CUSTOMARY",
96
+ };
97
+ const TimeZonePreference = {
98
+ CustomTimeZone: "CUSTOM_TIME_ZONE",
99
+ LocalTimeZone: "LOCAL_TIME_ZONE",
100
+ MachineTimeZone: "MACHINE_TIME_ZONE",
101
+ };
102
+
103
103
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
104
104
  const assetHomePageIds = [
105
105
  "status",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-api",
3
- "version": "1.4.69",
3
+ "version": "1.4.70",
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
@@ -1,4 +1,3 @@
1
- export * from "./IUserPreferencesContext";
2
1
  export * from "./analyticsContext";
3
2
  export * from "./assetSortingContext";
4
3
  export * from "./confirmationDialogContext";
@@ -6,9 +5,11 @@ export * from "./currentUserContext";
6
5
  export * from "./environmentContext";
7
6
  export * from "./errorHandlingContext";
8
7
  export * from "./filterBarContext";
8
+ export * from "./IUserPreferencesContext";
9
9
  export * from "./modalDialogContext";
10
10
  export * from "./navigationContext";
11
11
  export * from "./oemBrandingContext";
12
+ export * from "./timeRangeContext";
12
13
  export * from "./toastContext";
13
14
  export * from "./tokenContext";
14
15
  export * from "./userSubscriptionContext";
@@ -0,0 +1,12 @@
1
+ export type TimeRange = {
2
+ startMsInEpoch: number;
3
+ endMsInEpoch: number;
4
+ };
5
+ export interface TimeRangeContext {
6
+ /**
7
+ * Gets the current time range.
8
+ *
9
+ * @returns the current time range
10
+ */
11
+ timeRange: TimeRange | null;
12
+ }