@trackunit/react-core-contexts-test 1.12.49 → 1.12.50-alpha-6c7c4fa43b0.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,13 @@ 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 () => {
13670
+ return true;
13671
+ },
13672
+ hasFeatureFlag: async () => {
13667
13673
  return true;
13668
13674
  },
13669
13675
  showMarketplace: true,
@@ -13676,7 +13682,9 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13676
13682
  });
13677
13683
  }, [rootRoute]);
13678
13684
  const context = React.useMemo(() => ({
13679
- hasAccessTo: async () => true,
13685
+ hasAccessToHostRoute: async () => true,
13686
+ hasAccessToRoute: async () => true,
13687
+ hasFeatureFlag: async () => true,
13680
13688
  isAuthenticated: true,
13681
13689
  client,
13682
13690
  defaultUserRoute: "/",
@@ -13959,7 +13967,6 @@ class TrackunitProvidersMockBuilder {
13959
13967
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13960
13968
  */
13961
13969
  userSubscription(userSubscription) {
13962
- //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13963
13970
  const featuresConverted = userSubscription.features?.map(f => {
13964
13971
  if (typeof f === "string") {
13965
13972
  return { id: f, name: f };
package/index.esm2.js CHANGED
@@ -13641,7 +13641,13 @@ 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 () => {
13648
+ return true;
13649
+ },
13650
+ hasFeatureFlag: async () => {
13645
13651
  return true;
13646
13652
  },
13647
13653
  showMarketplace: true,
@@ -13654,7 +13660,9 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
13654
13660
  });
13655
13661
  }, [rootRoute]);
13656
13662
  const context = useMemo(() => ({
13657
- hasAccessTo: async () => true,
13663
+ hasAccessToHostRoute: async () => true,
13664
+ hasAccessToRoute: async () => true,
13665
+ hasFeatureFlag: async () => true,
13658
13666
  isAuthenticated: true,
13659
13667
  client,
13660
13668
  defaultUserRoute: "/",
@@ -13937,7 +13945,6 @@ class TrackunitProvidersMockBuilder {
13937
13945
  * @returns { TrackunitProvidersMockBuilder } - The builder.
13938
13946
  */
13939
13947
  userSubscription(userSubscription) {
13940
- //TODO DON'T SUPPORT THE WEIRD WAY OF PASSING FEATURES
13941
13948
  const featuresConverted = userSubscription.features?.map(f => {
13942
13949
  if (typeof f === "string") {
13943
13950
  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.49",
3
+ "version": "1.12.50-alpha-6c7c4fa43b0.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.63",
13
+ "@trackunit/shared-utils": "1.13.64-alpha-6c7c4fa43b0.0",
14
14
  "graphql": "^16.10.0",
15
15
  "@tanstack/router-core": "1.114.29",
16
- "@trackunit/iris-app-runtime-core-api": "1.12.46",
17
- "@trackunit/react-core-contexts-api": "1.13.46",
16
+ "@trackunit/iris-app-runtime-core-api": "1.12.47-alpha-6c7c4fa43b0.0",
17
+ "@trackunit/react-core-contexts-api": "1.13.47-alpha-6c7c4fa43b0.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";