@trackunit/react-core-contexts-test 1.12.47 → 1.12.48-alpha-c496ead6241.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.cjs2.js CHANGED
@@ -13663,7 +13663,10 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13663
13663
  defaultPendingMs: 0,
13664
13664
  defaultPendingMinMs: 0, // Add this to control minimum pending time
13665
13665
  context: {
13666
- hasAccessTo: async () => {
13666
+ hasAccessToHostRoute: async () => {
13667
+ return true;
13668
+ },
13669
+ hasAccessToRoute: async () => {
13667
13670
  return true;
13668
13671
  },
13669
13672
  showMarketplace: true,
@@ -13676,7 +13679,8 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13676
13679
  });
13677
13680
  }, [rootRoute]);
13678
13681
  const context = React.useMemo(() => ({
13679
- hasAccessTo: async () => true,
13682
+ hasAccessToHostRoute: async () => true,
13683
+ hasAccessToRoute: async () => true,
13680
13684
  isAuthenticated: true,
13681
13685
  client,
13682
13686
  defaultUserRoute: "/",
@@ -13959,7 +13963,6 @@ class TrackunitProvidersMockBuilder {
13959
13963
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13960
13964
  */
13961
13965
  userSubscription(userSubscription) {
13962
- //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13963
13966
  const featuresConverted = userSubscription.features?.map(f => {
13964
13967
  if (typeof f === "string") {
13965
13968
  return { id: f, name: f };
package/index.esm2.js CHANGED
@@ -13641,7 +13641,10 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13641
13641
  defaultPendingMs: 0,
13642
13642
  defaultPendingMinMs: 0, // Add this to control minimum pending time
13643
13643
  context: {
13644
- hasAccessTo: async () => {
13644
+ hasAccessToHostRoute: async () => {
13645
+ return true;
13646
+ },
13647
+ hasAccessToRoute: async () => {
13645
13648
  return true;
13646
13649
  },
13647
13650
  showMarketplace: true,
@@ -13654,7 +13657,8 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13654
13657
  });
13655
13658
  }, [rootRoute]);
13656
13659
  const context = useMemo(() => ({
13657
- hasAccessTo: async () => true,
13660
+ hasAccessToHostRoute: async () => true,
13661
+ hasAccessToRoute: async () => true,
13658
13662
  isAuthenticated: true,
13659
13663
  client,
13660
13664
  defaultUserRoute: "/",
@@ -13937,7 +13941,6 @@ class TrackunitProvidersMockBuilder {
13937
13941
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13938
13942
  */
13939
13943
  userSubscription(userSubscription) {
13940
- //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13941
13944
  const featuresConverted = userSubscription.features?.map(f => {
13942
13945
  if (typeof f === "string") {
13943
13946
  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.47",
3
+ "version": "1.12.48-alpha-c496ead6241.0",
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.61",
13
+ "@trackunit/shared-utils": "1.13.62-alpha-c496ead6241.0",
14
14
  "graphql": "^16.10.0",
15
15
  "@tanstack/router-core": "1.114.29",
16
- "@trackunit/iris-app-runtime-core-api": "1.12.44",
17
- "@trackunit/react-core-contexts-api": "1.13.44",
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",
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, TokenContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, UserSubscription, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
4
+ import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi, CurrentUserPreferenceState, CurrentUserState, EnvironmentState, ErrorHandlingContextValue, FilterBarContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, TokenContext, 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";