@trackunit/react-core-contexts-test 1.11.6 → 1.11.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "1.11.6",
3
+ "version": "1.11.8",
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.6",
13
+ "@trackunit/shared-utils": "1.13.8",
14
14
  "graphql": "^16.10.0",
15
15
  "@tanstack/router-core": "1.114.29",
16
- "@trackunit/iris-app-runtime-core-api": "1.11.6",
17
- "@trackunit/react-core-contexts-api": "1.12.6",
16
+ "@trackunit/iris-app-runtime-core-api": "1.11.8",
17
+ "@trackunit/react-core-contexts-api": "1.12.8",
18
18
  "es-toolkit": "^1.39.10"
19
19
  },
20
20
  "module": "./index.esm.js",
@@ -1,8 +1,8 @@
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, ITokenContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, UserSubscription, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
5
- import { ExportDataContextState, IToastContext } from "@trackunit/react-core-contexts-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
+ import { ExportDataContextState, ToastContextValue } from "@trackunit/react-core-contexts-api";
6
6
  import { ReactElement, ReactNode } from "react";
7
7
  import { MemoryRouterProps } from "./utils/routingUtils";
8
8
  /**
@@ -20,11 +20,11 @@ export declare class TrackunitProvidersMockBuilder<TRouterTree extends AnyRoute>
20
20
  protected selectedTimeRangeContext: TimeRangeContext;
21
21
  protected selectedWidgetConfigContext: WidgetConfigContext;
22
22
  protected selectedNavigationContext: NavigationRuntimeApi;
23
- protected selectedTokenContext: ITokenContext;
23
+ protected selectedTokenContext: TokenContext;
24
24
  protected selectedApolloMocks: Array<MockedResponse>;
25
25
  protected selectedRouterProps: MemoryRouterProps<TRouterTree> | null;
26
26
  protected selectedRootRoute: AnyRoute | null;
27
- protected selectedToastContext: IToastContext;
27
+ protected selectedToastContext: ToastContextValue;
28
28
  protected selectedErrorHandler: ErrorHandlingContextValue;
29
29
  protected selectedConfirmationDialogContext: ConfirmationDialogRuntimeApi;
30
30
  protected selectedAssetSortingContext: AssetSortingState;
@@ -296,7 +296,7 @@ export declare class TrackunitProvidersMockBuilder<TRouterTree extends AnyRoute>
296
296
  * ...
297
297
  * @param toastContext - Override the default toast context.
298
298
  */
299
- toast(toastContext: Partial<IToastContext>): this;
299
+ toast(toastContext: Partial<ToastContextValue>): this;
300
300
  /**
301
301
  * confirmationDialog
302
302
  */
@@ -1,2 +1,2 @@
1
- import { IToastContext } from "@trackunit/react-core-contexts-api";
2
- export declare const mockToastContext: IToastContext;
1
+ import { ToastContextValue } from "@trackunit/react-core-contexts-api";
2
+ export declare const mockToastContext: ToastContextValue;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- type PropsToWatch<P> = P extends object ? P : never;
2
+ type PropsToWatch<TProps> = TProps extends object ? TProps : never;
3
3
  /**
4
4
  * Logs props that have changed.
5
5
  * Use this for debugging which props force a component to re-render.
@@ -13,7 +13,7 @@ type PropsToWatch<P> = P extends object ? P : never;
13
13
  * const propsToWatch = { foo: props.foo, bar: props.bar };
14
14
  * useDebugger(propsToWatch);
15
15
  */
16
- export declare const useDebugger: <P extends object>(propsToWatch: PropsToWatch<P> | null, id?: string, dontLogReRender?: boolean) => void;
16
+ export declare const useDebugger: <TProps extends object>(propsToWatch: PropsToWatch<TProps> | null, id?: string, dontLogReRender?: boolean) => void;
17
17
  /**
18
18
  * Debugger component for debugging state changes and re-renders.
19
19
  *
@@ -1,9 +1,9 @@
1
1
  import { ApolloError, OperationVariables, QueryHookOptions, TypedDocumentNode, useLazyQuery, useQuery } from "@apollo/client";
2
2
  import { MockedResponse } from "@apollo/client/testing";
3
- export type DeepPartialNullable<T> = T extends Array<any> ? DeepPartialNullableArray<T[number]> : T extends object ? {
4
- [P in keyof T]?: DeepPartialNullable<T[P]> | null;
5
- } : T | null;
6
- type DeepPartialNullableArray<T> = Array<DeepPartialNullable<T>>;
3
+ export type DeepPartialNullable<TValue> = TValue extends Array<any> ? DeepPartialNullableArray<TValue[number]> : TValue extends object ? {
4
+ [KeyProperty in keyof TValue]?: DeepPartialNullable<TValue[KeyProperty]> | null;
5
+ } : TValue | null;
6
+ type DeepPartialNullableArray<TValue> = Array<DeepPartialNullable<TValue>>;
7
7
  /**
8
8
  *
9
9
  * @param document Document that represents the specific GQL query / mutation schema.
@@ -29,10 +29,10 @@ export interface TestRenderChildrenProps {
29
29
  * @returns {ReactNode} children component wrapped in a test root container
30
30
  */
31
31
  export declare const TestRenderChildren: ({ addTestRootContainer, children }: TestRenderChildrenProps) => import("react/jsx-runtime").JSX.Element;
32
- export interface RouterContainerProps<T extends AnyRoute = AnyRoute> {
32
+ export interface RouterContainerProps<TRoute extends AnyRoute = AnyRoute> {
33
33
  addTestRootContainer: boolean;
34
- rootRoute?: T | null;
35
- selectedRouterProps: MemoryRouterProps<T> | null;
34
+ rootRoute?: TRoute | null;
35
+ selectedRouterProps: MemoryRouterProps<TRoute> | null;
36
36
  children: ReactNode;
37
37
  }
38
38
  /**