@trackunit/react-core-contexts-api 1.13.58 → 1.14.0
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 +10 -0
- package/index.esm.js +9 -1
- package/package.json +2 -2
- package/src/geolocation/GeolocationContext.d.ts +23 -0
- package/src/index.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -45,6 +45,14 @@ const FilterBarContext = react.createContext(null);
|
|
|
45
45
|
*/
|
|
46
46
|
const FilterBarProvider = (props) => jsxRuntime.jsx(FilterBarContext.Provider, { ...props });
|
|
47
47
|
|
|
48
|
+
const GeolocationContext = react.createContext(null);
|
|
49
|
+
/**
|
|
50
|
+
* Provider for the GeolocationContext.
|
|
51
|
+
*/
|
|
52
|
+
const GeolocationProvider = (props) => {
|
|
53
|
+
return jsxRuntime.jsx(GeolocationContext.Provider, { ...props });
|
|
54
|
+
};
|
|
55
|
+
|
|
48
56
|
const ModalDialogContext = react.createContext(null);
|
|
49
57
|
/**
|
|
50
58
|
* This is a provider for the ModalDialogContext.
|
|
@@ -136,6 +144,8 @@ exports.FeatureFlagContext = FeatureFlagContext;
|
|
|
136
144
|
exports.FeatureFlagContextProvider = FeatureFlagContextProvider;
|
|
137
145
|
exports.FilterBarContext = FilterBarContext;
|
|
138
146
|
exports.FilterBarProvider = FilterBarProvider;
|
|
147
|
+
exports.GeolocationContext = GeolocationContext;
|
|
148
|
+
exports.GeolocationProvider = GeolocationProvider;
|
|
139
149
|
exports.ModalDialogContext = ModalDialogContext;
|
|
140
150
|
exports.ModalDialogContextProvider = ModalDialogContextProvider;
|
|
141
151
|
exports.NavigationContext = NavigationContext;
|
package/index.esm.js
CHANGED
|
@@ -43,6 +43,14 @@ const FilterBarContext = createContext(null);
|
|
|
43
43
|
*/
|
|
44
44
|
const FilterBarProvider = (props) => jsx(FilterBarContext.Provider, { ...props });
|
|
45
45
|
|
|
46
|
+
const GeolocationContext = createContext(null);
|
|
47
|
+
/**
|
|
48
|
+
* Provider for the GeolocationContext.
|
|
49
|
+
*/
|
|
50
|
+
const GeolocationProvider = (props) => {
|
|
51
|
+
return jsx(GeolocationContext.Provider, { ...props });
|
|
52
|
+
};
|
|
53
|
+
|
|
46
54
|
const ModalDialogContext = createContext(null);
|
|
47
55
|
/**
|
|
48
56
|
* This is a provider for the ModalDialogContext.
|
|
@@ -115,4 +123,4 @@ const WidgetConfigContext = createContext(null);
|
|
|
115
123
|
*/
|
|
116
124
|
const WidgetConfigProvider = (props) => jsx(WidgetConfigContext.Provider, { ...props });
|
|
117
125
|
|
|
118
|
-
export { AnalyticsContext, AnalyticsContextProvider, AssetSortingContext, AssetSortingProvider, ConfirmationDialogContext, ConfirmationDialogProvider, CurrentUserContext, CurrentUserPreferenceContext, CurrentUserPreferenceProvider, CurrentUserProvider, EnvironmentContext, EnvironmentContextProvider, ErrorHandlingContext, ErrorHandlingContextProvider, ExportDataContext, FeatureFlagContext, FeatureFlagContextProvider, FilterBarContext, FilterBarProvider, ModalDialogContext, ModalDialogContextProvider, NavigationContext, NavigationContextProvider, OEMBrandingService as OemBrandingContext, OemBrandingContextProvider, TimeRangeContext, TimeRangeProvider, ToastContext, ToastProvider, TokenContext, TokenProvider, UserSubscriptionContext, UserSubscriptionProvider, WidgetConfigContext, WidgetConfigProvider };
|
|
126
|
+
export { AnalyticsContext, AnalyticsContextProvider, AssetSortingContext, AssetSortingProvider, ConfirmationDialogContext, ConfirmationDialogProvider, CurrentUserContext, CurrentUserPreferenceContext, CurrentUserPreferenceProvider, CurrentUserProvider, EnvironmentContext, EnvironmentContextProvider, ErrorHandlingContext, ErrorHandlingContextProvider, ExportDataContext, FeatureFlagContext, FeatureFlagContextProvider, FilterBarContext, FilterBarProvider, GeolocationContext, GeolocationProvider, ModalDialogContext, ModalDialogContextProvider, NavigationContext, NavigationContextProvider, OEMBrandingService as OemBrandingContext, OemBrandingContextProvider, TimeRangeContext, TimeRangeProvider, ToastContext, ToastProvider, TokenContext, TokenProvider, UserSubscriptionContext, UserSubscriptionProvider, WidgetConfigContext, WidgetConfigProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/iris-app-runtime-core-api": "1.
|
|
11
|
+
"@trackunit/iris-app-runtime-core-api": "1.13.0"
|
|
12
12
|
},
|
|
13
13
|
"module": "./index.esm.js",
|
|
14
14
|
"main": "./index.cjs.js",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GeoJsonPosition } from "@trackunit/iris-app-runtime-core-api";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export type GeolocationContextValue = Readonly<{
|
|
4
|
+
readonly position: GeoJsonPosition | null;
|
|
5
|
+
readonly getPosition: (options?: Readonly<{
|
|
6
|
+
prompt?: boolean;
|
|
7
|
+
}>) => Promise<GeoJsonPosition | null>;
|
|
8
|
+
}>;
|
|
9
|
+
declare const GeolocationContext: import("react").Context<Readonly<{
|
|
10
|
+
readonly position: GeoJsonPosition | null;
|
|
11
|
+
readonly getPosition: (options?: Readonly<{
|
|
12
|
+
prompt?: boolean;
|
|
13
|
+
}>) => Promise<GeoJsonPosition | null>;
|
|
14
|
+
}> | null>;
|
|
15
|
+
type GeolocationProviderProps = Readonly<{
|
|
16
|
+
value: GeolocationContextValue;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Provider for the GeolocationContext.
|
|
21
|
+
*/
|
|
22
|
+
export declare const GeolocationProvider: (props: GeolocationProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { GeolocationContext };
|
package/src/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./errorHandling/ErrorHandlingContext";
|
|
|
6
6
|
export * from "./exportData/ExportDataContext";
|
|
7
7
|
export * from "./featureFlags/FeatureFlagContext";
|
|
8
8
|
export * from "./filterBar/FilterBarContext";
|
|
9
|
+
export * from "./geolocation/GeolocationContext";
|
|
9
10
|
export * from "./modalDialog/ModalDialogContext";
|
|
10
11
|
export * from "./navigation/NavigationContext";
|
|
11
12
|
export * from "./oemBranding/OemBrandingContext";
|