@trackunit/iris-app-runtime-core-api 1.16.26-alpha-27ad777c16e.0 → 1.16.29
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 +13 -0
- package/index.esm.js +13 -1
- package/package.json +3 -3
- package/src/CurrentUserPreferenceRuntime.d.ts +16 -0
package/index.cjs.js
CHANGED
|
@@ -163,6 +163,18 @@ const TimeZonePreference = {
|
|
|
163
163
|
LocalTimeZone: "LOCAL_TIME_ZONE",
|
|
164
164
|
MachineTimeZone: "MACHINE_TIME_ZONE",
|
|
165
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* The user's preferred clock format for displaying times.
|
|
168
|
+
*
|
|
169
|
+
* - `LanguageDefault`: derive 12H/24H from the active language/locale (default).
|
|
170
|
+
* - `TwelveHour`: always display times using a 12-hour clock (AM/PM).
|
|
171
|
+
* - `TwentyFourHour`: always display times using a 24-hour clock.
|
|
172
|
+
*/
|
|
173
|
+
const TimeFormat = {
|
|
174
|
+
LanguageDefault: "LANGUAGE_DEFAULT",
|
|
175
|
+
TwelveHour: "TWELVE_HOUR",
|
|
176
|
+
TwentyFourHour: "TWENTY_FOUR_HOUR",
|
|
177
|
+
};
|
|
166
178
|
|
|
167
179
|
const UnitOfMeasurement = {
|
|
168
180
|
NEWTON: "NEWTON",
|
|
@@ -383,6 +395,7 @@ const UserSubscriptionPackage = {
|
|
|
383
395
|
|
|
384
396
|
exports.Channels = Channels;
|
|
385
397
|
exports.SystemOfMeasurement = SystemOfMeasurement;
|
|
398
|
+
exports.TimeFormat = TimeFormat;
|
|
386
399
|
exports.TimeZonePreference = TimeZonePreference;
|
|
387
400
|
exports.UnitOfMeasurement = UnitOfMeasurement;
|
|
388
401
|
exports.UnitSi = UnitSi;
|
package/index.esm.js
CHANGED
|
@@ -161,6 +161,18 @@ const TimeZonePreference = {
|
|
|
161
161
|
LocalTimeZone: "LOCAL_TIME_ZONE",
|
|
162
162
|
MachineTimeZone: "MACHINE_TIME_ZONE",
|
|
163
163
|
};
|
|
164
|
+
/**
|
|
165
|
+
* The user's preferred clock format for displaying times.
|
|
166
|
+
*
|
|
167
|
+
* - `LanguageDefault`: derive 12H/24H from the active language/locale (default).
|
|
168
|
+
* - `TwelveHour`: always display times using a 12-hour clock (AM/PM).
|
|
169
|
+
* - `TwentyFourHour`: always display times using a 24-hour clock.
|
|
170
|
+
*/
|
|
171
|
+
const TimeFormat = {
|
|
172
|
+
LanguageDefault: "LANGUAGE_DEFAULT",
|
|
173
|
+
TwelveHour: "TWELVE_HOUR",
|
|
174
|
+
TwentyFourHour: "TWENTY_FOUR_HOUR",
|
|
175
|
+
};
|
|
164
176
|
|
|
165
177
|
const UnitOfMeasurement = {
|
|
166
178
|
NEWTON: "NEWTON",
|
|
@@ -379,4 +391,4 @@ const UserSubscriptionPackage = {
|
|
|
379
391
|
CUSTOMER_PORTAL: "Customer Portal",
|
|
380
392
|
};
|
|
381
393
|
|
|
382
|
-
export { AggregationPeriod, AssetSortByProperty, BodyType, Channels, SortOrder, SystemOfMeasurement, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
|
|
394
|
+
export { AggregationPeriod, AssetSortByProperty, BodyType, Channels, SortOrder, SystemOfMeasurement, TimeFormat, TimeZonePreference, UnitOfMeasurement, UnitSi, UnitUs, UserSubscriptionPackage, allPages, assetHomePageIds, createEvent, customerHomePageIds, groupHomePageIds, isAssetHomeOptions, isCustomerHomeOptions, isFleetAppStandardOptions, isGroupHomeOptions, isIrisOptions, isSiteHomeOptions, mainApps, siteHomePageIds, validateStringAsAssetSortByProperty };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-runtime-core-api",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.29",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
11
|
-
"@trackunit/shared-utils": "1.15.
|
|
12
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
11
|
+
"@trackunit/shared-utils": "1.15.27",
|
|
12
|
+
"@trackunit/geo-json-utils": "1.14.28"
|
|
13
13
|
},
|
|
14
14
|
"module": "./index.esm.js",
|
|
15
15
|
"main": "./index.cjs.js",
|
|
@@ -7,8 +7,21 @@ export declare const TimeZonePreference: {
|
|
|
7
7
|
readonly LocalTimeZone: "LOCAL_TIME_ZONE";
|
|
8
8
|
readonly MachineTimeZone: "MACHINE_TIME_ZONE";
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* The user's preferred clock format for displaying times.
|
|
12
|
+
*
|
|
13
|
+
* - `LanguageDefault`: derive 12H/24H from the active language/locale (default).
|
|
14
|
+
* - `TwelveHour`: always display times using a 12-hour clock (AM/PM).
|
|
15
|
+
* - `TwentyFourHour`: always display times using a 24-hour clock.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TimeFormat: {
|
|
18
|
+
readonly LanguageDefault: "LANGUAGE_DEFAULT";
|
|
19
|
+
readonly TwelveHour: "TWELVE_HOUR";
|
|
20
|
+
readonly TwentyFourHour: "TWENTY_FOUR_HOUR";
|
|
21
|
+
};
|
|
10
22
|
export type SystemOfMeasurementType = (typeof SystemOfMeasurement)[keyof typeof SystemOfMeasurement];
|
|
11
23
|
export type TimeZonePreferenceType = (typeof TimeZonePreference)[keyof typeof TimeZonePreference];
|
|
24
|
+
export type TimeFormatType = (typeof TimeFormat)[keyof typeof TimeFormat];
|
|
12
25
|
export interface CurrentUserPreferenceState {
|
|
13
26
|
language?: string;
|
|
14
27
|
setLanguage?: (language: string) => void;
|
|
@@ -17,10 +30,13 @@ export interface CurrentUserPreferenceState {
|
|
|
17
30
|
customTimezone?: string | null;
|
|
18
31
|
systemOfMeasurement?: SystemOfMeasurementType;
|
|
19
32
|
setSystemOfMeasurement?: (systemOfMeasurement: SystemOfMeasurementType) => void;
|
|
33
|
+
timeFormat?: TimeFormatType;
|
|
34
|
+
setTimeFormat?: (timeFormat: TimeFormatType) => void;
|
|
20
35
|
}
|
|
21
36
|
export interface CurrentUserPreferenceRuntimeApi {
|
|
22
37
|
getCurrentUserLanguage: () => Promise<string>;
|
|
23
38
|
getCurrentUserTimeZonePreference: () => Promise<TimeZonePreferenceType>;
|
|
24
39
|
getCurrentUserCustomTimezone: () => Promise<string | null>;
|
|
25
40
|
getCurrentUserSystemOfMeasurement: () => Promise<SystemOfMeasurementType>;
|
|
41
|
+
getCurrentUserTimeFormat: () => Promise<TimeFormatType>;
|
|
26
42
|
}
|