@trackunit/react-core-contexts 2.1.16-alpha-27ad777c16e.0 → 2.1.18
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 +7 -0
- package/index.esm.js +7 -0
- package/package.json +8 -8
package/index.cjs.js
CHANGED
|
@@ -815,6 +815,8 @@ const preferenceReducer = (state, action) => {
|
|
|
815
815
|
return { ...state, timeZonePreference: action.timeZonePreference };
|
|
816
816
|
case "customTimezoneResolved":
|
|
817
817
|
return { ...state, customTimezone: action.customTimezone };
|
|
818
|
+
case "timeFormatResolved":
|
|
819
|
+
return { ...state, timeFormat: action.timeFormat };
|
|
818
820
|
case "error":
|
|
819
821
|
return { ...state, error: true };
|
|
820
822
|
default:
|
|
@@ -826,6 +828,7 @@ const INITIAL_STATE = {
|
|
|
826
828
|
systemOfMeasurement: undefined,
|
|
827
829
|
timeZonePreference: undefined,
|
|
828
830
|
customTimezone: undefined,
|
|
831
|
+
timeFormat: undefined,
|
|
829
832
|
error: false,
|
|
830
833
|
};
|
|
831
834
|
/**
|
|
@@ -852,6 +855,9 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
|
|
|
852
855
|
void irisAppRuntimeCore.CurrentUserPreferenceRuntime.getCurrentUserCustomTimezone()
|
|
853
856
|
.catch(() => undefined)
|
|
854
857
|
.then(customTimezone => dispatch({ type: "customTimezoneResolved", customTimezone }));
|
|
858
|
+
void irisAppRuntimeCore.CurrentUserPreferenceRuntime.getCurrentUserTimeFormat()
|
|
859
|
+
.catch(() => undefined)
|
|
860
|
+
.then(timeFormat => dispatch({ type: "timeFormatResolved", timeFormat }));
|
|
855
861
|
}, []);
|
|
856
862
|
if (state.error) {
|
|
857
863
|
throw new Error("Language context is invalid");
|
|
@@ -864,6 +870,7 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
|
|
|
864
870
|
systemOfMeasurement: state.systemOfMeasurement,
|
|
865
871
|
timeZonePreference: state.timeZonePreference,
|
|
866
872
|
customTimezone: state.customTimezone,
|
|
873
|
+
timeFormat: state.timeFormat,
|
|
867
874
|
}, children: children }));
|
|
868
875
|
};
|
|
869
876
|
|
package/index.esm.js
CHANGED
|
@@ -813,6 +813,8 @@ const preferenceReducer = (state, action) => {
|
|
|
813
813
|
return { ...state, timeZonePreference: action.timeZonePreference };
|
|
814
814
|
case "customTimezoneResolved":
|
|
815
815
|
return { ...state, customTimezone: action.customTimezone };
|
|
816
|
+
case "timeFormatResolved":
|
|
817
|
+
return { ...state, timeFormat: action.timeFormat };
|
|
816
818
|
case "error":
|
|
817
819
|
return { ...state, error: true };
|
|
818
820
|
default:
|
|
@@ -824,6 +826,7 @@ const INITIAL_STATE = {
|
|
|
824
826
|
systemOfMeasurement: undefined,
|
|
825
827
|
timeZonePreference: undefined,
|
|
826
828
|
customTimezone: undefined,
|
|
829
|
+
timeFormat: undefined,
|
|
827
830
|
error: false,
|
|
828
831
|
};
|
|
829
832
|
/**
|
|
@@ -850,6 +853,9 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
|
|
|
850
853
|
void CurrentUserPreferenceRuntime.getCurrentUserCustomTimezone()
|
|
851
854
|
.catch(() => undefined)
|
|
852
855
|
.then(customTimezone => dispatch({ type: "customTimezoneResolved", customTimezone }));
|
|
856
|
+
void CurrentUserPreferenceRuntime.getCurrentUserTimeFormat()
|
|
857
|
+
.catch(() => undefined)
|
|
858
|
+
.then(timeFormat => dispatch({ type: "timeFormatResolved", timeFormat }));
|
|
853
859
|
}, []);
|
|
854
860
|
if (state.error) {
|
|
855
861
|
throw new Error("Language context is invalid");
|
|
@@ -862,6 +868,7 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
|
|
|
862
868
|
systemOfMeasurement: state.systemOfMeasurement,
|
|
863
869
|
timeZonePreference: state.timeZonePreference,
|
|
864
870
|
customTimezone: state.customTimezone,
|
|
871
|
+
timeFormat: state.timeFormat,
|
|
865
872
|
}, children: children }));
|
|
866
873
|
};
|
|
867
874
|
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.18",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/iris-app-api": "2.0.
|
|
11
|
-
"@trackunit/iris-app-runtime-core-api": "1.16.
|
|
12
|
-
"@trackunit/react-core-hooks": "1.17.
|
|
13
|
-
"@trackunit/i18n-library-translation": "2.0.
|
|
14
|
-
"@trackunit/react-components": "2.1.
|
|
15
|
-
"@trackunit/iris-app-runtime-core": "1.17.
|
|
10
|
+
"@trackunit/iris-app-api": "2.0.18",
|
|
11
|
+
"@trackunit/iris-app-runtime-core-api": "1.16.28",
|
|
12
|
+
"@trackunit/react-core-hooks": "1.17.32",
|
|
13
|
+
"@trackunit/i18n-library-translation": "2.0.20",
|
|
14
|
+
"@trackunit/react-components": "2.1.18",
|
|
15
|
+
"@trackunit/iris-app-runtime-core": "1.17.28",
|
|
16
16
|
"graphql-sse": "^2.5.4",
|
|
17
|
-
"@trackunit/react-core-contexts-api": "1.17.
|
|
17
|
+
"@trackunit/react-core-contexts-api": "1.17.28"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@apollo/client": "^3.13.8",
|