@trackunit/react-core-contexts 0.4.419 → 0.4.423

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
@@ -14,7 +14,6 @@ require('@js-temporal/polyfill');
14
14
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
15
15
  var reactComponents = require('@trackunit/react-components');
16
16
  var irisAppRuntimeCore = require('@trackunit/iris-app-runtime-core');
17
- var reactRouterDom = require('react-router-dom');
18
17
 
19
18
  function _interopNamespace(e) {
20
19
  if (e && e.__esModule) return e;
@@ -416,19 +415,6 @@ const TokenProviderIrisApp = ({ children }) => {
416
415
  return jsxRuntime.jsx(reactCoreHooks.TokenProvider, { value: tokenContext, children: children });
417
416
  };
418
417
 
419
- const HostNavigator = ({ children }) => {
420
- reactCoreHooks.useURLSynchronization();
421
- // eslint-disable-next-line react/jsx-no-useless-fragment
422
- return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
423
- };
424
- /**
425
- * This is a router for the Trackunit app.
426
- */
427
- const TrackunitRouterIrisApp = ({ children }) => {
428
- var _a;
429
- return (jsxRuntime.jsx(reactRouterDom.BrowserRouter, { basename: `${((_a = document.getElementById("baseHref")) === null || _a === void 0 ? void 0 : _a.getAttribute("href")) || "<missing baseHref>"}${global.module}`, children: jsxRuntime.jsx(HostNavigator, { children: children }) }));
430
- };
431
-
432
418
  /**
433
419
  * This is a provider for the CurrentUserContext.
434
420
  */
@@ -497,7 +483,7 @@ const TrackunitProviders = ({ translations, children }) => {
497
483
  i18nLibraryTranslation.registerTranslations(translations); // Register the apps translations if passed.
498
484
  }
499
485
  i18nLibraryTranslation.initializeTranslationsForApp(); // Initialize all registered translations
500
- return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { 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(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(React__namespace.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered" }), children: jsxRuntime.jsx(TrackunitRouterIrisApp, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
486
+ return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { 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(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(React__namespace.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }));
501
487
  };
502
488
 
503
489
  exports.ManagerApolloProvider = ManagerApolloProvider;
package/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsx, Fragment } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { ApolloProvider, ApolloClient, InMemoryCache, from, split } from '@apollo/client';
3
3
  import { setContext } from '@apollo/client/link/context';
4
4
  import { onError } from '@apollo/client/link/error';
5
5
  import * as Sentry from '@sentry/browser';
6
- import { useEnvironment, useToken, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, FilterBarProvider, NavigationContextProvider, OemBrandingContextProvider, ToastProvider, TokenProvider, useURLSynchronization, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider } from '@trackunit/react-core-hooks';
6
+ import { useEnvironment, useToken, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, FilterBarProvider, NavigationContextProvider, OemBrandingContextProvider, ToastProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider } from '@trackunit/react-core-hooks';
7
7
  import { createUploadLink } from 'apollo-upload-client';
8
8
  import * as React from 'react';
9
9
  import { useRef, useMemo, useEffect, useState } from 'react';
@@ -11,7 +11,6 @@ import '@js-temporal/polyfill';
11
11
  import { registerTranslations, initializeTranslationsForApp } from '@trackunit/i18n-library-translation';
12
12
  import { Spinner } from '@trackunit/react-components';
13
13
  import { AnalyticsContextRuntime, setupHostConnector, AssetSortingRuntime, ConfirmationDialogRuntime, EnvironmentRuntime, FilterBarRuntime, NavigationRuntime, OemBrandingContextRuntime, ToastRuntime, TokenRuntime, CurrentUserRuntime, CurrentUserPreferenceRuntime, UserSubscriptionRuntime } from '@trackunit/iris-app-runtime-core';
14
- import { BrowserRouter } from 'react-router-dom';
15
14
 
16
15
  /******************************************************************************
17
16
  Copyright (c) Microsoft Corporation.
@@ -392,19 +391,6 @@ const TokenProviderIrisApp = ({ children }) => {
392
391
  return jsx(TokenProvider, { value: tokenContext, children: children });
393
392
  };
394
393
 
395
- const HostNavigator = ({ children }) => {
396
- useURLSynchronization();
397
- // eslint-disable-next-line react/jsx-no-useless-fragment
398
- return jsx(Fragment, { children: children });
399
- };
400
- /**
401
- * This is a router for the Trackunit app.
402
- */
403
- const TrackunitRouterIrisApp = ({ children }) => {
404
- var _a;
405
- return (jsx(BrowserRouter, { basename: `${((_a = document.getElementById("baseHref")) === null || _a === void 0 ? void 0 : _a.getAttribute("href")) || "<missing baseHref>"}${global.module}`, children: jsx(HostNavigator, { children: children }) }));
406
- };
407
-
408
394
  /**
409
395
  * This is a provider for the CurrentUserContext.
410
396
  */
@@ -473,7 +459,7 @@ const TrackunitProviders = ({ translations, children }) => {
473
459
  registerTranslations(translations); // Register the apps translations if passed.
474
460
  }
475
461
  initializeTranslationsForApp(); // Initialize all registered translations
476
- return (jsx(EnvironmentProviderIrisApp, { 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(ConfirmationDialogProviderIrisApp, { children: jsx(FilterBarProviderIrisApp, { children: jsx(React.Suspense, { fallback: jsx(Spinner, { centering: "centered" }), children: jsx(TrackunitRouterIrisApp, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
462
+ return (jsx(EnvironmentProviderIrisApp, { 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(ConfirmationDialogProviderIrisApp, { children: jsx(FilterBarProviderIrisApp, { children: jsx(React.Suspense, { fallback: jsx(Spinner, { centering: "centered" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }));
477
463
  };
478
464
 
479
465
  export { ManagerApolloProvider, ToastProviderIrisApp, TrackunitProviders };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "0.4.419",
3
+ "version": "0.4.423",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,7 +14,6 @@
14
14
  "apollo-upload-client": "^17.0.0",
15
15
  "react": "^18.2.0",
16
16
  "@js-temporal/polyfill": "^0.4.4",
17
- "react-router-dom": "6.18.0",
18
17
  "@trackunit/iris-app-runtime-core": "*",
19
18
  "jest-fetch-mock": "^3.0.3",
20
19
  "@trackunit/i18n-library-translation": "*",
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * This is a router for the Trackunit app.
4
- */
5
- export declare const TrackunitRouterIrisApp: ({ children }: {
6
- children?: React.ReactNode;
7
- }) => JSX.Element;