@trackunit/react-core-contexts 1.3.101 → 1.3.103
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
|
@@ -629,6 +629,13 @@ const UserSubscriptionProviderIrisApp = ({ children }) => {
|
|
|
629
629
|
return jsxRuntime.jsx(reactCoreHooks.UserSubscriptionProvider, { value: subscription, children: children });
|
|
630
630
|
};
|
|
631
631
|
|
|
632
|
+
/**
|
|
633
|
+
* This is a provider for the WidgetConfigContext.
|
|
634
|
+
*/
|
|
635
|
+
const WidgetConfigProviderIrisApp = ({ children }) => {
|
|
636
|
+
return jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: irisAppRuntimeCore.WidgetConfigRuntime, children: children });
|
|
637
|
+
};
|
|
638
|
+
|
|
632
639
|
/**
|
|
633
640
|
* This is a provider for the TrackunitDataProviders.
|
|
634
641
|
*/
|
|
@@ -637,7 +644,7 @@ const TrackunitProviders = ({ translations, children, errorHandler }) => {
|
|
|
637
644
|
i18nLibraryTranslation.registerTranslations(translations); // Register the apps translations if passed.
|
|
638
645
|
}
|
|
639
646
|
i18nLibraryTranslation.initializeTranslationsForApp(); // Initialize all registered translations
|
|
640
|
-
return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { children: jsxRuntime.jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsxRuntime.jsx(ThemeCssProviderIrisApp, { children: jsxRuntime.jsx(TokenProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserPreferenceProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserProviderIrisApp, { children: jsxRuntime.jsx(UserSubscriptionProviderIrisApp, { children: jsxRuntime.jsx(AnalyticsProviderIrisApp, { children: jsxRuntime.jsx(OemBrandingContextProviderIrisApp, { children: jsxRuntime.jsx(AssetSortingProviderIrisApp, { children: jsxRuntime.jsx(ManagerApolloProvider, { children: jsxRuntime.jsx(NavigationProviderIrisApp, { children: jsxRuntime.jsx(ToastProviderIrisApp, { children: jsxRuntime.jsx(ModalDialogContextProviderIrisApp, { children: jsxRuntime.jsx(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(TimeRangeProviderIrisApp, { children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
647
|
+
return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { children: jsxRuntime.jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsxRuntime.jsx(ThemeCssProviderIrisApp, { children: jsxRuntime.jsx(TokenProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserPreferenceProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserProviderIrisApp, { children: jsxRuntime.jsx(UserSubscriptionProviderIrisApp, { children: jsxRuntime.jsx(AnalyticsProviderIrisApp, { children: jsxRuntime.jsx(OemBrandingContextProviderIrisApp, { children: jsxRuntime.jsx(AssetSortingProviderIrisApp, { children: jsxRuntime.jsx(ManagerApolloProvider, { children: jsxRuntime.jsx(NavigationProviderIrisApp, { children: jsxRuntime.jsx(ToastProviderIrisApp, { children: jsxRuntime.jsx(ModalDialogContextProviderIrisApp, { children: jsxRuntime.jsx(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(TimeRangeProviderIrisApp, { children: jsxRuntime.jsx(WidgetConfigProviderIrisApp, { children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
641
648
|
};
|
|
642
649
|
|
|
643
650
|
exports.ManagerApolloProvider = ManagerApolloProvider;
|
package/index.esm.js
CHANGED
|
@@ -3,13 +3,13 @@ import { ApolloProvider, createHttpLink, ApolloClient, InMemoryCache, from, spli
|
|
|
3
3
|
import { setContext } from '@apollo/client/link/context';
|
|
4
4
|
import { onError } from '@apollo/client/link/error';
|
|
5
5
|
import { removeTypenameFromVariables } from '@apollo/client/link/remove-typename';
|
|
6
|
-
import { useEnvironment, useToken, useErrorHandler, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, ErrorHandlingContextProvider, FilterBarProvider, ModalDialogContextProvider, NavigationContextProvider, OemBrandingContextProvider, TimeRangeProvider, ToastProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider } from '@trackunit/react-core-hooks';
|
|
6
|
+
import { useEnvironment, useToken, useErrorHandler, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, ErrorHandlingContextProvider, FilterBarProvider, ModalDialogContextProvider, NavigationContextProvider, OemBrandingContextProvider, TimeRangeProvider, ToastProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider, WidgetConfigProvider } from '@trackunit/react-core-hooks';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { useState, useMemo, useEffect, Suspense } from 'react';
|
|
9
9
|
import '@js-temporal/polyfill';
|
|
10
10
|
import { registerTranslations, initializeTranslationsForApp } from '@trackunit/i18n-library-translation';
|
|
11
11
|
import { Spinner } from '@trackunit/react-components';
|
|
12
|
-
import { AnalyticsContextRuntime, setupHostConnector, AssetSortingRuntime, ConfirmationDialogRuntime, EnvironmentRuntime, FilterBarRuntime, AssetsFilterBarRuntime, CustomersFilterBarRuntime, SitesFilterBarRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingContextRuntime, ThemeCssRuntime, TimeRangeRuntime, ToastRuntime, TokenRuntime, CurrentUserRuntime, CurrentUserPreferenceRuntime, UserSubscriptionRuntime } from '@trackunit/iris-app-runtime-core';
|
|
12
|
+
import { AnalyticsContextRuntime, setupHostConnector, AssetSortingRuntime, ConfirmationDialogRuntime, EnvironmentRuntime, FilterBarRuntime, AssetsFilterBarRuntime, CustomersFilterBarRuntime, SitesFilterBarRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingContextRuntime, ThemeCssRuntime, TimeRangeRuntime, ToastRuntime, TokenRuntime, CurrentUserRuntime, CurrentUserPreferenceRuntime, UserSubscriptionRuntime, WidgetConfigRuntime } from '@trackunit/iris-app-runtime-core';
|
|
13
13
|
|
|
14
14
|
const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlInternalUrl, graphqlReportUrl, isDev, tracingHeaders, firstToken, errorHandler, }) => {
|
|
15
15
|
let token;
|
|
@@ -609,6 +609,13 @@ const UserSubscriptionProviderIrisApp = ({ children }) => {
|
|
|
609
609
|
return jsx(UserSubscriptionProvider, { value: subscription, children: children });
|
|
610
610
|
};
|
|
611
611
|
|
|
612
|
+
/**
|
|
613
|
+
* This is a provider for the WidgetConfigContext.
|
|
614
|
+
*/
|
|
615
|
+
const WidgetConfigProviderIrisApp = ({ children }) => {
|
|
616
|
+
return jsx(WidgetConfigProvider, { value: WidgetConfigRuntime, children: children });
|
|
617
|
+
};
|
|
618
|
+
|
|
612
619
|
/**
|
|
613
620
|
* This is a provider for the TrackunitDataProviders.
|
|
614
621
|
*/
|
|
@@ -617,7 +624,7 @@ const TrackunitProviders = ({ translations, children, errorHandler }) => {
|
|
|
617
624
|
registerTranslations(translations); // Register the apps translations if passed.
|
|
618
625
|
}
|
|
619
626
|
initializeTranslationsForApp(); // Initialize all registered translations
|
|
620
|
-
return (jsx(EnvironmentProviderIrisApp, { children: jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsx(ThemeCssProviderIrisApp, { children: jsx(TokenProviderIrisApp, { children: jsx(CurrentUserPreferenceProviderIrisApp, { children: jsx(CurrentUserProviderIrisApp, { children: jsx(UserSubscriptionProviderIrisApp, { children: jsx(AnalyticsProviderIrisApp, { children: jsx(OemBrandingContextProviderIrisApp, { children: jsx(AssetSortingProviderIrisApp, { children: jsx(ManagerApolloProvider, { children: jsx(NavigationProviderIrisApp, { children: jsx(ToastProviderIrisApp, { children: jsx(ModalDialogContextProviderIrisApp, { children: jsx(ConfirmationDialogProviderIrisApp, { children: jsx(FilterBarProviderIrisApp, { children: jsx(TimeRangeProviderIrisApp, { children: jsx(Suspense, { fallback: jsx(Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
627
|
+
return (jsx(EnvironmentProviderIrisApp, { children: jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsx(ThemeCssProviderIrisApp, { children: jsx(TokenProviderIrisApp, { children: jsx(CurrentUserPreferenceProviderIrisApp, { children: jsx(CurrentUserProviderIrisApp, { children: jsx(UserSubscriptionProviderIrisApp, { children: jsx(AnalyticsProviderIrisApp, { children: jsx(OemBrandingContextProviderIrisApp, { children: jsx(AssetSortingProviderIrisApp, { children: jsx(ManagerApolloProvider, { children: jsx(NavigationProviderIrisApp, { children: jsx(ToastProviderIrisApp, { children: jsx(ModalDialogContextProviderIrisApp, { children: jsx(ConfirmationDialogProviderIrisApp, { children: jsx(FilterBarProviderIrisApp, { children: jsx(TimeRangeProviderIrisApp, { children: jsx(WidgetConfigProviderIrisApp, { children: jsx(Suspense, { fallback: jsx(Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
621
628
|
};
|
|
622
629
|
|
|
623
630
|
export { ManagerApolloProvider, ToastProviderIrisApp, TrackunitProviders };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.103",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"react": "19.0.0",
|
|
12
12
|
"@js-temporal/polyfill": "^0.4.4",
|
|
13
13
|
"jest-fetch-mock": "^3.0.3",
|
|
14
|
-
"@trackunit/iris-app-api": "1.3.
|
|
15
|
-
"@trackunit/react-core-contexts-api": "1.4.
|
|
16
|
-
"@trackunit/react-core-hooks": "1.3.
|
|
17
|
-
"@trackunit/i18n-library-translation": "1.3.
|
|
18
|
-
"@trackunit/react-components": "1.4.
|
|
19
|
-
"@trackunit/iris-app-runtime-core": "1.4.
|
|
14
|
+
"@trackunit/iris-app-api": "1.3.79",
|
|
15
|
+
"@trackunit/react-core-contexts-api": "1.4.79",
|
|
16
|
+
"@trackunit/react-core-hooks": "1.3.81",
|
|
17
|
+
"@trackunit/i18n-library-translation": "1.3.84",
|
|
18
|
+
"@trackunit/react-components": "1.4.92",
|
|
19
|
+
"@trackunit/iris-app-runtime-core": "1.4.80"
|
|
20
20
|
},
|
|
21
21
|
"module": "./index.esm.js",
|
|
22
22
|
"main": "./index.cjs.js",
|