@trackunit/react-core-contexts-test 1.7.84 → 1.7.86
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
|
@@ -64,7 +64,7 @@ const mockAssetSortingContext = {
|
|
|
64
64
|
/**
|
|
65
65
|
* Mocks the current user context
|
|
66
66
|
*
|
|
67
|
-
* @returns {
|
|
67
|
+
* @returns {CurrentUserState} - Returns the mocked current user context
|
|
68
68
|
*/
|
|
69
69
|
const mockCurrentUserContext = {
|
|
70
70
|
clientSideUserId: "751ea227-f199-4d00-925f-a608312c5e45",
|
|
@@ -83,6 +83,7 @@ const mockCurrentUserContext = {
|
|
|
83
83
|
isTrackunitUser: false,
|
|
84
84
|
isAssuming: false,
|
|
85
85
|
isAccountOwner: true,
|
|
86
|
+
permissions: [],
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
const mockEnvironmentContext = {
|
package/index.esm2.js
CHANGED
|
@@ -42,7 +42,7 @@ const mockAssetSortingContext = {
|
|
|
42
42
|
/**
|
|
43
43
|
* Mocks the current user context
|
|
44
44
|
*
|
|
45
|
-
* @returns {
|
|
45
|
+
* @returns {CurrentUserState} - Returns the mocked current user context
|
|
46
46
|
*/
|
|
47
47
|
const mockCurrentUserContext = {
|
|
48
48
|
clientSideUserId: "751ea227-f199-4d00-925f-a608312c5e45",
|
|
@@ -61,6 +61,7 @@ const mockCurrentUserContext = {
|
|
|
61
61
|
isTrackunitUser: false,
|
|
62
62
|
isAssuming: false,
|
|
63
63
|
isAccountOwner: true,
|
|
64
|
+
permissions: [],
|
|
64
65
|
};
|
|
65
66
|
|
|
66
67
|
const mockEnvironmentContext = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts-test",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.86",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"@apollo/client": "3.13.8",
|
|
11
11
|
"react": "19.0.0",
|
|
12
12
|
"graphql": "^16.10.0",
|
|
13
|
-
"@trackunit/react-core-hooks": "1.7.
|
|
13
|
+
"@trackunit/react-core-hooks": "1.7.86",
|
|
14
14
|
"@trackunit/shared-utils": "1.9.73",
|
|
15
15
|
"@tanstack/react-router": "1.114.29",
|
|
16
16
|
"@tanstack/router-core": "1.114.29",
|
|
17
17
|
"es-toolkit": "^1.39.10",
|
|
18
|
-
"@trackunit/iris-app-runtime-core-api": "1.7.
|
|
18
|
+
"@trackunit/iris-app-runtime-core-api": "1.7.82"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.esm.js",
|
|
21
21
|
"main": "./index.cjs.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MockedResponse } from "@apollo/client/testing";
|
|
2
2
|
import { AnyRoute } from "@tanstack/react-router";
|
|
3
3
|
import { RenderResult } from "@testing-library/react";
|
|
4
|
-
import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi,
|
|
4
|
+
import { AnalyticsRuntimeApiSync, AssetSortingState, ConfirmationDialogRuntimeApi, CurrentUserPreferenceState, CurrentUserState, EnvironmentState, ErrorHandlingContextValue, FilterBarContext, IToastContext, ITokenContext, IUserSubscriptionContext, ModalDialogRuntimeApi, NavigationRuntimeApi, OemBrandingRuntimeApi, TimeRangeContext, WidgetConfigContext } from "@trackunit/iris-app-runtime-core-api";
|
|
5
5
|
import { ExportDataContextState } from "@trackunit/react-core-hooks";
|
|
6
6
|
import { ReactElement, ReactNode } from "react";
|
|
7
7
|
import { MemoryRouterProps } from "./utils/routingUtils";
|
|
@@ -28,7 +28,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
|
|
|
28
28
|
protected selectedErrorHandler: ErrorHandlingContextValue;
|
|
29
29
|
protected selectedConfirmationDialogContext: ConfirmationDialogRuntimeApi;
|
|
30
30
|
protected selectedAssetSortingContext: AssetSortingState;
|
|
31
|
-
protected selectedCurrentUserContext:
|
|
31
|
+
protected selectedCurrentUserContext: CurrentUserState;
|
|
32
32
|
protected selectedCurrentUserPreferenceContext: CurrentUserPreferenceState;
|
|
33
33
|
protected selectedAnalyticsContext: AnalyticsRuntimeApiSync<Record<string, never>>;
|
|
34
34
|
protected selectedOemBrandingContext: OemBrandingRuntimeApi;
|
|
@@ -135,7 +135,7 @@ export declare class TrackunitProvidersMockBuilder<T extends AnyRoute> {
|
|
|
135
135
|
* ...
|
|
136
136
|
* @returns { TrackunitProvidersMockBuilder } - The builder.
|
|
137
137
|
*/
|
|
138
|
-
currentUser(currentUserContext: Partial<
|
|
138
|
+
currentUser(currentUserContext: Partial<CurrentUserState>): this;
|
|
139
139
|
/**
|
|
140
140
|
* Use this to pass in a differerent current user preference.
|
|
141
141
|
* Defaults to mockCurrentUserPreferenceContext.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CurrentUserState } from "@trackunit/iris-app-runtime-core-api";
|
|
2
2
|
/**
|
|
3
3
|
* Mocks the current user context
|
|
4
4
|
*
|
|
5
|
-
* @returns {
|
|
5
|
+
* @returns {CurrentUserState} - Returns the mocked current user context
|
|
6
6
|
*/
|
|
7
|
-
export declare const mockCurrentUserContext:
|
|
7
|
+
export declare const mockCurrentUserContext: CurrentUserState;
|