@trackunit/react-date-and-time-hooks 1.7.95 → 1.7.98
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 +3 -3
- package/index.esm.js +1 -1
- package/package.json +8 -10
package/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ var polyfill = require('@js-temporal/polyfill');
|
|
|
4
4
|
var dateAndTimeUtils = require('@trackunit/date-and-time-utils');
|
|
5
5
|
var sharedUtils = require('@trackunit/shared-utils');
|
|
6
6
|
var react = require('react');
|
|
7
|
-
var
|
|
7
|
+
var irisAppRuntimeCoreApi = require('@trackunit/iris-app-runtime-core-api');
|
|
8
8
|
var reactCoreHooks = require('@trackunit/react-core-hooks');
|
|
9
9
|
var reactGraphqlHooks = require('@trackunit/react-graphql-hooks');
|
|
10
10
|
var zod = require('zod');
|
|
@@ -129,13 +129,13 @@ const useTimezone = ({ assetId } = {}) => {
|
|
|
129
129
|
}, [timeZoneData?.asset?.locations?.latest?.properties?.timeZone]);
|
|
130
130
|
const current = react.useMemo(() => {
|
|
131
131
|
const id = polyfill.Temporal.Now.timeZoneId();
|
|
132
|
-
if (timeZonePreference ===
|
|
132
|
+
if (timeZonePreference === irisAppRuntimeCoreApi.TimeZonePreference.CustomTimeZone && customTimezone) {
|
|
133
133
|
return dateAndTimeUtils.getTimeZone(customTimezone);
|
|
134
134
|
}
|
|
135
135
|
return dateAndTimeUtils.getTimeZone(id);
|
|
136
136
|
}, [customTimezone, timeZonePreference]);
|
|
137
137
|
const preferred = react.useMemo(() => {
|
|
138
|
-
if (timeZonePreference ===
|
|
138
|
+
if (timeZonePreference === irisAppRuntimeCoreApi.TimeZonePreference.MachineTimeZone && assetTimeZone) {
|
|
139
139
|
return assetTimeZone;
|
|
140
140
|
}
|
|
141
141
|
return current;
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Temporal } from '@js-temporal/polyfill';
|
|
|
2
2
|
import { getTimeZone, toZonedDateTimeUtil, toDateUtil, formatDateUtil, formatRangeUtil, subtractYearsUtil, subtractMonthsUtil, subtractWeeksUtil, subtractDaysUtil, subtractHoursUtil, subtractMinutesUtil, addYearsUtil, addMonthsUtil, addWeeksUtil, addDaysUtil, addHoursUtil, addMinutesUtil, startOfMonthUtil, startOfWeekUtil, startOfDayUtil, startOfHourUtil, startOfMinuteUtil, endOfMonthUtil, endOfWeekUtil, endOfDayUtil, endOfHourUtil, endOfMinuteUtil, differenceInYearsUtil, differenceInMonthsUtil, differenceInWeeksUtil, differenceInDaysUtil, differenceInHoursUtil, differenceInMinutesUtil, differenceInSecondsUtil, isBetweenUtil, isTodayUtil, isFutureUtil, isPastUtil, isSameYearUtil, isSameMonthUtil, isSameWeekUtil, isSameDayUtil, timeSinceInYears, timeSinceInMonths, timeSinceInDays, timeSinceInHours, timeSinceInMinutes, timeSinceInSeconds, timeSinceAuto, toDuration, getDurationFormat, convertMillisecondsUtil, convertSecondsUtil, convertMinutesUtil, convertHoursUtil, dayNameUtil, daysUtil, monthNameUtil, monthsUtil, getUTCFromTimeZonedUtil, isEqualUtil } from '@trackunit/date-and-time-utils';
|
|
3
3
|
import { exhaustiveCheck } from '@trackunit/shared-utils';
|
|
4
4
|
import { useMemo, useCallback } from 'react';
|
|
5
|
-
import { TimeZonePreference } from '@trackunit/
|
|
5
|
+
import { TimeZonePreference } from '@trackunit/iris-app-runtime-core-api';
|
|
6
6
|
import { useCurrentUserTimeZonePreference, useLocalStorage } from '@trackunit/react-core-hooks';
|
|
7
7
|
import { useQuery } from '@trackunit/react-graphql-hooks';
|
|
8
8
|
import { z } from 'zod';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-date-and-time-hooks",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.98",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -13,16 +13,14 @@
|
|
|
13
13
|
"@apollo/client": "3.13.8",
|
|
14
14
|
"react": "19.0.0",
|
|
15
15
|
"zod": "^3.23.8",
|
|
16
|
-
"@trackunit/iris-app-
|
|
17
|
-
"@trackunit/
|
|
18
|
-
"@trackunit/
|
|
19
|
-
"@trackunit/
|
|
20
|
-
"@trackunit/
|
|
21
|
-
"@trackunit/react-core-contexts-api": "1.8.74",
|
|
22
|
-
"@trackunit/react-core-hooks": "1.7.79",
|
|
23
|
-
"@trackunit/react-test-setup": "1.4.69",
|
|
16
|
+
"@trackunit/iris-app-api": "1.9.10",
|
|
17
|
+
"@trackunit/react-core-contexts-test": "1.7.82",
|
|
18
|
+
"@trackunit/date-and-time-utils": "1.7.72",
|
|
19
|
+
"@trackunit/shared-utils": "1.9.72",
|
|
20
|
+
"@trackunit/react-core-hooks": "1.7.82",
|
|
24
21
|
"@js-temporal/polyfill": "^0.5.1",
|
|
25
|
-
"@trackunit/react-graphql-hooks": "1.7.
|
|
22
|
+
"@trackunit/react-graphql-hooks": "1.7.104",
|
|
23
|
+
"@trackunit/iris-app-runtime-core-api": "1.7.78"
|
|
26
24
|
},
|
|
27
25
|
"module": "./index.esm.js",
|
|
28
26
|
"main": "./index.cjs.js",
|