@trackunit/react-core-contexts 1.9.149 → 1.9.152

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
@@ -11,6 +11,7 @@ var graphql = require('graphql');
11
11
  var graphqlSse = require('graphql-sse');
12
12
  var react = require('react');
13
13
  var irisAppRuntimeCore = require('@trackunit/iris-app-runtime-core');
14
+ var reactCoreContextsApi = require('@trackunit/react-core-contexts-api');
14
15
  require('@js-temporal/polyfill');
15
16
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
16
17
  var reactComponents = require('@trackunit/react-components');
@@ -237,7 +238,7 @@ const ManagerApolloProvider = ({ children }) => {
237
238
  */
238
239
  const ToastProviderIrisApp = ({ children }) => {
239
240
  const value = react.useMemo(() => ({ addToast: irisAppRuntimeCore.ToastRuntime.addToast, removeToast: irisAppRuntimeCore.ToastRuntime.removeToast }), []);
240
- return jsxRuntime.jsx(reactCoreHooks.ToastProvider, { value: value, children: children });
241
+ return jsxRuntime.jsx(reactCoreContextsApi.ToastProvider, { value: value, children: children });
241
242
  };
242
243
 
243
244
  /**
@@ -258,7 +259,7 @@ const AnalyticsProviderIrisApp = ({ children }) => {
258
259
  void irisAppRuntimeCore.AnalyticsRuntime().setUserProperty(name, value);
259
260
  },
260
261
  }), []);
261
- return jsxRuntime.jsx(reactCoreHooks.AnalyticsContextProvider, { value: contextValue, children: children });
262
+ return jsxRuntime.jsx(reactCoreContextsApi.AnalyticsContextProvider, { value: contextValue, children: children });
262
263
  };
263
264
 
264
265
  /**
@@ -299,7 +300,7 @@ const AssetSortingProviderIrisApp = ({ children }) => {
299
300
  if (!assetSortingState) {
300
301
  return null;
301
302
  }
302
- return jsxRuntime.jsx(reactCoreHooks.AssetSortingProvider, { value: contextValue, children: children });
303
+ return jsxRuntime.jsx(reactCoreContextsApi.AssetSortingProvider, { value: contextValue, children: children });
303
304
  };
304
305
 
305
306
  /**
@@ -307,7 +308,7 @@ const AssetSortingProviderIrisApp = ({ children }) => {
307
308
  */
308
309
  const ConfirmationDialogProviderIrisApp = ({ children }) => {
309
310
  const value = react.useMemo(() => ({ confirm: irisAppRuntimeCore.ConfirmationDialogRuntime.confirm }), []);
310
- return jsxRuntime.jsx(reactCoreHooks.ConfirmationDialogProvider, { value: value, children: children });
311
+ return jsxRuntime.jsx(reactCoreContextsApi.ConfirmationDialogProvider, { value: value, children: children });
311
312
  };
312
313
 
313
314
  /**
@@ -331,7 +332,7 @@ const EnvironmentProviderIrisApp = ({ children }) => {
331
332
  if (!environment) {
332
333
  return null;
333
334
  }
334
- return jsxRuntime.jsx(reactCoreHooks.EnvironmentContextProvider, { value: environment, children: children });
335
+ return jsxRuntime.jsx(reactCoreContextsApi.EnvironmentContextProvider, { value: environment, children: children });
335
336
  };
336
337
 
337
338
  /**
@@ -350,7 +351,7 @@ const ErrorHandlingProviderIrisApp = ({ children, errorHandler }) => {
350
351
  // do nothing
351
352
  },
352
353
  }), []);
353
- return (jsxRuntime.jsx(reactCoreHooks.ErrorHandlingContextProvider, { value: errorHandler || defaultContextValue, children: children }));
354
+ return (jsxRuntime.jsx(reactCoreContextsApi.ErrorHandlingContextProvider, { value: errorHandler || defaultContextValue, children: children }));
354
355
  };
355
356
 
356
357
  /**
@@ -365,7 +366,7 @@ const ExportDataProviderIrisApp = ({ children }) => {
365
366
  exportData,
366
367
  };
367
368
  }, [exportData]);
368
- return jsxRuntime.jsx(reactCoreHooks.ExportDataContext, { value: value, children: children });
369
+ return jsxRuntime.jsx(reactCoreContextsApi.ExportDataContext, { value: value, children: children });
369
370
  };
370
371
 
371
372
  /**
@@ -413,7 +414,7 @@ const FilterBarProviderIrisApp = ({ children }) => {
413
414
  sitesFilterBarValues: sitesFilterBarValues ?? null,
414
415
  isLoading,
415
416
  }), [assetsFilterBarValues, customersFilterBarValues, sitesFilterBarValues, isLoading]);
416
- return jsxRuntime.jsx(reactCoreHooks.FilterBarProvider, { value: filterBarContext, children: children });
417
+ return jsxRuntime.jsx(reactCoreContextsApi.FilterBarProvider, { value: filterBarContext, children: children });
417
418
  };
418
419
 
419
420
  /**
@@ -421,7 +422,7 @@ const FilterBarProviderIrisApp = ({ children }) => {
421
422
  */
422
423
  const ModalDialogContextProviderIrisApp = ({ children }) => {
423
424
  const value = react.useMemo(() => ({ openModal: irisAppRuntimeCore.ModalDialogRuntime.openModal, closeModal: irisAppRuntimeCore.ModalDialogRuntime.closeModal }), []);
424
- return jsxRuntime.jsx(reactCoreHooks.ModalDialogContextProvider, { value: value, children: children });
425
+ return jsxRuntime.jsx(reactCoreContextsApi.ModalDialogContextProvider, { value: value, children: children });
425
426
  };
426
427
 
427
428
  /**
@@ -431,14 +432,14 @@ const NavigationProviderIrisApp = ({ children }) => {
431
432
  const environment = react.useMemo(() => {
432
433
  return irisAppRuntimeCore.NavigationRuntime;
433
434
  }, []);
434
- return jsxRuntime.jsx(reactCoreHooks.NavigationContextProvider, { value: environment, children: children });
435
+ return jsxRuntime.jsx(reactCoreContextsApi.NavigationContextProvider, { value: environment, children: children });
435
436
  };
436
437
 
437
438
  /**
438
439
  * This is a provider for the OemBrandingContext.
439
440
  */
440
441
  const OemBrandingContextProviderIrisApp = ({ children }) => {
441
- return jsxRuntime.jsx(reactCoreHooks.OemBrandingContextProvider, { value: irisAppRuntimeCore.OemBrandingRuntime, children: children });
442
+ return jsxRuntime.jsx(reactCoreContextsApi.OemBrandingContextProvider, { value: irisAppRuntimeCore.OemBrandingRuntime, children: children });
442
443
  };
443
444
 
444
445
  /**
@@ -484,7 +485,7 @@ const TimeRangeProviderIrisApp = ({ children }) => {
484
485
  if (!timeRangeContext) {
485
486
  return null;
486
487
  }
487
- return jsxRuntime.jsx(reactCoreHooks.TimeRangeProvider, { value: timeRangeContext, children: children });
488
+ return jsxRuntime.jsx(reactCoreContextsApi.TimeRangeProvider, { value: timeRangeContext, children: children });
488
489
  };
489
490
 
490
491
  /**
@@ -514,7 +515,7 @@ const TokenProviderIrisApp = ({ children }) => {
514
515
  if (!tokenContext) {
515
516
  return null;
516
517
  }
517
- return jsxRuntime.jsx(reactCoreHooks.TokenProvider, { value: tokenContext, children: children });
518
+ return jsxRuntime.jsx(reactCoreContextsApi.TokenProvider, { value: tokenContext, children: children });
518
519
  };
519
520
 
520
521
  /**
@@ -540,7 +541,7 @@ const CurrentUserProviderIrisApp = ({ children }) => {
540
541
  if (!currentuserContext) {
541
542
  return null;
542
543
  }
543
- return jsxRuntime.jsx(reactCoreHooks.CurrentUserProvider, { value: currentuserContext, children: children });
544
+ return jsxRuntime.jsx(reactCoreContextsApi.CurrentUserProvider, { value: currentuserContext, children: children });
544
545
  };
545
546
 
546
547
  /**
@@ -578,7 +579,7 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
578
579
  if (!language) {
579
580
  return null;
580
581
  }
581
- return (jsxRuntime.jsx(reactCoreHooks.CurrentUserPreferenceProvider, { value: { language, systemOfMeasurement, timeZonePreference }, children: children }));
582
+ return (jsxRuntime.jsx(reactCoreContextsApi.CurrentUserPreferenceProvider, { value: { language, systemOfMeasurement, timeZonePreference }, children: children }));
582
583
  };
583
584
 
584
585
  /**
@@ -594,7 +595,7 @@ const UserSubscriptionProviderIrisApp = ({ children }) => {
594
595
  if (!subscription) {
595
596
  return null;
596
597
  }
597
- return jsxRuntime.jsx(reactCoreHooks.UserSubscriptionProvider, { value: subscription, children: children });
598
+ return jsxRuntime.jsx(reactCoreContextsApi.UserSubscriptionProvider, { value: subscription, children: children });
598
599
  };
599
600
 
600
601
  /**
@@ -620,7 +621,7 @@ const WidgetConfigProviderIrisApp = ({ children }) => {
620
621
  setLoadingState: irisAppRuntimeCore.WidgetConfigRuntime.setLoadingState,
621
622
  pollInterval,
622
623
  }), [pollInterval]);
623
- return jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: widgetConfigContextValue, children: children });
624
+ return jsxRuntime.jsx(reactCoreContextsApi.WidgetConfigProvider, { value: widgetConfigContextValue, children: children });
624
625
  };
625
626
 
626
627
  /**
package/index.esm.js CHANGED
@@ -4,11 +4,12 @@ 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
6
  import { getMainDefinition, Observable } from '@apollo/client/utilities';
7
- import { useEnvironment, useToken, useErrorHandler, ToastProvider, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, ErrorHandlingContextProvider, ExportDataContext, FilterBarProvider, ModalDialogContextProvider, NavigationContextProvider, OemBrandingContextProvider, TimeRangeProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider, WidgetConfigProvider } from '@trackunit/react-core-hooks';
7
+ import { useEnvironment, useToken, useErrorHandler } from '@trackunit/react-core-hooks';
8
8
  import { print } from 'graphql';
9
9
  import { createClient } from 'graphql-sse';
10
10
  import { useState, useMemo, useEffect, useCallback, Suspense } from 'react';
11
11
  import { ToastRuntime, AnalyticsRuntime, setupHostConnector, AssetSortingRuntime, ConfirmationDialogRuntime, EnvironmentRuntime, ExportDataRuntime, AssetsFilterBarRuntime, CustomersFilterBarRuntime, SitesFilterBarRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingRuntime, ThemeCssRuntime, TimeRangeRuntime, TokenRuntime, CurrentUserRuntime, CurrentUserPreferenceRuntime, UserSubscriptionRuntime, WidgetConfigRuntime } from '@trackunit/iris-app-runtime-core';
12
+ import { ToastProvider, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, ErrorHandlingContextProvider, ExportDataContext, FilterBarProvider, ModalDialogContextProvider, NavigationContextProvider, OemBrandingContextProvider, TimeRangeProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider, WidgetConfigProvider } from '@trackunit/react-core-contexts-api';
12
13
  import '@js-temporal/polyfill';
13
14
  import { registerTranslations, initializeTranslationsForApp } from '@trackunit/i18n-library-translation';
14
15
  import { Spinner } from '@trackunit/react-components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "1.9.149",
3
+ "version": "1.9.152",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,15 +9,16 @@
9
9
  "dependencies": {
10
10
  "@apollo/client": "3.13.8",
11
11
  "react": "19.0.0",
12
- "@trackunit/iris-app-api": "1.10.0",
13
- "@trackunit/iris-app-runtime-core-api": "1.7.117",
14
- "@trackunit/react-core-hooks": "1.7.121",
15
- "@trackunit/i18n-library-translation": "1.7.128",
16
- "@trackunit/react-components": "1.10.83",
17
- "@trackunit/iris-app-runtime-core": "1.8.117",
12
+ "@trackunit/iris-app-api": "1.10.3",
13
+ "@trackunit/iris-app-runtime-core-api": "1.7.120",
14
+ "@trackunit/react-core-hooks": "1.7.124",
15
+ "@trackunit/i18n-library-translation": "1.7.131",
16
+ "@trackunit/react-components": "1.10.86",
17
+ "@trackunit/iris-app-runtime-core": "1.8.120",
18
18
  "graphql": "^16.10.0",
19
19
  "graphql-sse": "^2.5.4",
20
- "@js-temporal/polyfill": "^0.5.1"
20
+ "@js-temporal/polyfill": "^0.5.1",
21
+ "@trackunit/react-core-contexts-api": "1.8.79"
21
22
  },
22
23
  "module": "./index.esm.js",
23
24
  "main": "./index.cjs.js",