@trackunit/react-core-contexts-api 0.2.58 → 0.2.59

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,6 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
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
+
5
15
  /**
6
16
  * Takes an event type and a description and returns an event
7
17
  *
@@ -95,6 +105,8 @@ const UserSubscriptionPackage = {
95
105
  NONE: "NONE",
96
106
  };
97
107
 
108
+ exports.SystemOfMeasurement = SystemOfMeasurement;
109
+ exports.TimeZonePreference = TimeZonePreference;
98
110
  exports.UserSubscriptionPackage = UserSubscriptionPackage;
99
111
  exports.createEvent = createEvent;
100
112
  exports.validateStringAsAssetSortByProperty = validateStringAsAssetSortByProperty;
package/index.esm.js CHANGED
@@ -1,3 +1,13 @@
1
+ const SystemOfMeasurement = {
2
+ Si: "SI",
3
+ UsCustomary: "US_CUSTOMARY",
4
+ };
5
+ const TimeZonePreference = {
6
+ CustomTimeZone: "CUSTOM_TIME_ZONE",
7
+ LocalTimeZone: "LOCAL_TIME_ZONE",
8
+ MachineTimeZone: "MACHINE_TIME_ZONE",
9
+ };
10
+
1
11
  /**
2
12
  * Takes an event type and a description and returns an event
3
13
  *
@@ -91,4 +101,4 @@ const UserSubscriptionPackage = {
91
101
  NONE: "NONE",
92
102
  };
93
103
 
94
- export { AssetSortByProperty, SortOrder, UserSubscriptionPackage, createEvent, validateStringAsAssetSortByProperty };
104
+ export { AssetSortByProperty, SortOrder, SystemOfMeasurement, TimeZonePreference, UserSubscriptionPackage, createEvent, validateStringAsAssetSortByProperty };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-api",
3
- "version": "0.2.58",
3
+ "version": "0.2.59",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -0,0 +1,19 @@
1
+ export declare const SystemOfMeasurement: {
2
+ readonly Si: "SI";
3
+ readonly UsCustomary: "US_CUSTOMARY";
4
+ };
5
+ export declare const TimeZonePreference: {
6
+ readonly CustomTimeZone: "CUSTOM_TIME_ZONE";
7
+ readonly LocalTimeZone: "LOCAL_TIME_ZONE";
8
+ readonly MachineTimeZone: "MACHINE_TIME_ZONE";
9
+ };
10
+ export type SystemOfMeasurementType = (typeof SystemOfMeasurement)[keyof typeof SystemOfMeasurement];
11
+ export type TimeZonePreferenceType = (typeof TimeZonePreference)[keyof typeof TimeZonePreference];
12
+ export interface IUserPreferencesContext {
13
+ language?: string;
14
+ setLanguage?: (language: string) => void;
15
+ timeZonePreference?: TimeZonePreferenceType;
16
+ setTimeZonePreference?: (timeZonePreference: TimeZonePreferenceType) => void;
17
+ systemOfMeasurement?: SystemOfMeasurementType;
18
+ setSystemOfMeasurement?: (systemOfMeasurement: SystemOfMeasurementType) => void;
19
+ }
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./IUserPreferencesContext";
1
2
  export * from "./analyticsContext";
2
3
  export * from "./assetSortingContext";
3
4
  export * from "./currentUserContext";