@trackunit/react-core-contexts-test 1.12.48-alpha-c496ead6241.0 → 1.12.49

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.cjs2.js CHANGED
@@ -13663,10 +13663,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13663
13663
  defaultPendingMs: 0,
13664
13664
  defaultPendingMinMs: 0, // Add this to control minimum pending time
13665
13665
  context: {
13666
- hasAccessToHostRoute: async () => {
13667
- return true;
13668
- },
13669
- hasAccessToRoute: async () => {
13666
+ hasAccessTo: async () => {
13670
13667
  return true;
13671
13668
  },
13672
13669
  showMarketplace: true,
@@ -13679,8 +13676,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13679
13676
  });
13680
13677
  }, [rootRoute]);
13681
13678
  const context = React.useMemo(() => ({
13682
- hasAccessToHostRoute: async () => true,
13683
- hasAccessToRoute: async () => true,
13679
+ hasAccessTo: async () => true,
13684
13680
  isAuthenticated: true,
13685
13681
  client,
13686
13682
  defaultUserRoute: "/",
@@ -13963,6 +13959,7 @@ class TrackunitProvidersMockBuilder {
13963
13959
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13964
13960
  */
13965
13961
  userSubscription(userSubscription) {
13962
+ //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13966
13963
  const featuresConverted = userSubscription.features?.map(f => {
13967
13964
  if (typeof f === "string") {
13968
13965
  return { id: f, name: f };
package/index.esm2.js CHANGED
@@ -13641,10 +13641,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13641
13641
  defaultPendingMs: 0,
13642
13642
  defaultPendingMinMs: 0, // Add this to control minimum pending time
13643
13643
  context: {
13644
- hasAccessToHostRoute: async () => {
13645
- return true;
13646
- },
13647
- hasAccessToRoute: async () => {
13644
+ hasAccessTo: async () => {
13648
13645
  return true;
13649
13646
  },
13650
13647
  showMarketplace: true,
@@ -13657,8 +13654,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13657
13654
  });
13658
13655
  }, [rootRoute]);
13659
13656
  const context = useMemo(() => ({
13660
- hasAccessToHostRoute: async () => true,
13661
- hasAccessToRoute: async () => true,
13657
+ hasAccessTo: async () => true,
13662
13658
  isAuthenticated: true,
13663
13659
  client,
13664
13660
  defaultUserRoute: "/",
@@ -13941,6 +13937,7 @@ class TrackunitProvidersMockBuilder {
13941
13937
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13942
13938
  */
13943
13939
  userSubscription(userSubscription) {
13940
+ //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13944
13941
  const featuresConverted = userSubscription.features?.map(f => {
13945
13942
  if (typeof f === "string") {
13946
13943
  return { id: f, name: f };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "1.12.48-alpha-c496ead6241.0",
3
+ "version": "1.12.49",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -10,11 +10,11 @@
10
10
  "@apollo/client": "3.13.8",
11
11
  "react": "19.0.0",
12
12
  "@tanstack/react-router": "1.114.29",
13
- "@trackunit/shared-utils": "1.13.62-alpha-c496ead6241.0",
13
+ "@trackunit/shared-utils": "1.13.63",
14
14
  "graphql": "^16.10.0",
15
15
  "@tanstack/router-core": "1.114.29",
16
- "@trackunit/iris-app-runtime-core-api": "1.12.45-alpha-c496ead6241.0",
17
- "@trackunit/react-core-contexts-api": "1.13.45-alpha-c496ead6241.0",
16
+ "@trackunit/iris-app-runtime-core-api": "1.12.46",
17
+ "@trackunit/react-core-contexts-api": "1.13.46",
18
18
  "es-toolkit": "^1.39.10"
19
19
  },
20
20
  "module": "./index.esm.js",
@@ -1,7 +1,7 @@
1
1
  import { MockedResponse } from "@apollo/client/testing";
2
2
  import { AnyRoute, RegisteredRouter } from "@tanstack/react-router";
3
3
  import { RenderResult } from "@testing-library/react";
4
- import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi, CurrentUserPreferenceState, CurrentUserState, EnvironmentState, ErrorHandlingContextValue, FilterBarContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, TokenContext, UserSubscription, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
4
+ import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi, CurrentUserPreferenceState, CurrentUserState, EnvironmentState, ErrorHandlingContextValue, FilterBarContext, TokenContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, UserSubscription, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
5
5
  import { ExportDataContextState, ToastContextValue } from "@trackunit/react-core-contexts-api";
6
6
  import { ReactElement, ReactNode } from "react";
7
7
  import { MemoryRouterProps } from "./utils/routingUtils";