@trackunit/react-core-contexts-test 0.1.202 → 0.1.206

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
@@ -54,7 +54,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
54
54
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
55
55
  step((generator = generator.apply(thisArg, _arguments || [])).next());
56
56
  });
57
- }
57
+ }
58
+
59
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
60
+ var e = new Error(message);
61
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
62
+ };
58
63
 
59
64
  const defaultOptions = {
60
65
  mutate: {
@@ -190,6 +195,8 @@ const mockEnvironmentContext = {
190
195
  trackunitRestApiUrl: "",
191
196
  hubspotRequestAppAccessFormId: "",
192
197
  uptimeId: "",
198
+ reportAccessCallback: "",
199
+ reportAccessClientId: ""
193
200
  };
194
201
 
195
202
  const mockNavigationContext = {
@@ -211,7 +218,7 @@ const mockNavigationContext = {
211
218
  gotoCustomer: (customerId) => {
212
219
  return Promise.resolve(true);
213
220
  },
214
- gotoMyExports: () => {
221
+ gotoMyExports: (exportId) => {
215
222
  return Promise.resolve(true);
216
223
  },
217
224
  gotoAdmin: () => {
@@ -352,6 +359,9 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
352
359
  hasAccessTo: () => __awaiter(void 0, void 0, void 0, function* () {
353
360
  return true;
354
361
  }),
362
+ showMarketplace: true,
363
+ showHelpCenter: true,
364
+ showAppLibrary: true,
355
365
  client: null,
356
366
  defaultUserRoute: "/",
357
367
  isAuthenticated: true,
package/index.esm.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/index.esm2.js CHANGED
@@ -47,7 +47,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
47
47
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
48
48
  step((generator = generator.apply(thisArg, _arguments || [])).next());
49
49
  });
50
- }
50
+ }
51
+
52
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
53
+ var e = new Error(message);
54
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
55
+ };
51
56
 
52
57
  const defaultOptions = {
53
58
  mutate: {
@@ -183,6 +188,8 @@ const mockEnvironmentContext = {
183
188
  trackunitRestApiUrl: "",
184
189
  hubspotRequestAppAccessFormId: "",
185
190
  uptimeId: "",
191
+ reportAccessCallback: "",
192
+ reportAccessClientId: ""
186
193
  };
187
194
 
188
195
  const mockNavigationContext = {
@@ -204,7 +211,7 @@ const mockNavigationContext = {
204
211
  gotoCustomer: (customerId) => {
205
212
  return Promise.resolve(true);
206
213
  },
207
- gotoMyExports: () => {
214
+ gotoMyExports: (exportId) => {
208
215
  return Promise.resolve(true);
209
216
  },
210
217
  gotoAdmin: () => {
@@ -345,6 +352,9 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
345
352
  hasAccessTo: () => __awaiter(void 0, void 0, void 0, function* () {
346
353
  return true;
347
354
  }),
355
+ showMarketplace: true,
356
+ showHelpCenter: true,
357
+ showAppLibrary: true,
348
358
  client: null,
349
359
  defaultUserRoute: "/",
350
360
  isAuthenticated: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "0.1.202",
3
+ "version": "0.1.206",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
package/src/debugger.d.ts CHANGED
@@ -32,8 +32,8 @@ export declare const useDebugger: <P extends object>(propsToWatch: PropsToWatch<
32
32
  */
33
33
  export declare const Debugger: ({ id, logPropsChanges, stop, children, }: {
34
34
  children: React.ReactNode;
35
- id?: string | undefined;
36
- stop?: boolean | undefined;
37
- logPropsChanges?: {} | undefined;
35
+ id?: string;
36
+ stop?: boolean;
37
+ logPropsChanges?: {};
38
38
  }) => JSX.Element;
39
39
  export {};
@@ -30,7 +30,7 @@ type DeepPartialNullableArray<T> = DeepPartialNullable<T>[];
30
30
  * expect(screen.getByText(`Brand: ${mock.data.asset?.brand}`)).toBeInTheDocument();
31
31
  * });
32
32
  */
33
- export declare const queryFor: <TData, TVariables extends OperationVariables = OperationVariables>(document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data?: TData | null | undefined, error?: ApolloError | Error) => MockedResponse<TData, Record<string, any>> & {
33
+ export declare const queryFor: <TData, TVariables extends OperationVariables = OperationVariables>(document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data?: TData | null, error?: ApolloError | Error) => MockedResponse<TData, Record<string, any>> & {
34
34
  data: NonNullable<TData>;
35
35
  };
36
36
  type QueryReturn<TData, TVariables extends OperationVariables = OperationVariables> = ReturnType<typeof useQuery<TData, TVariables>>;
@@ -47,5 +47,5 @@ type QueryLazyReturn<TData, TVariables extends OperationVariables = OperationVar
47
47
  * @returns {MockedResponse} that can be passed to the mocked ApolloProvider.
48
48
  * @see [Testing React components using MockedProvider and associated APIs](https://www.apollographql.com/docs/react/development-testing/testing/)
49
49
  */
50
- export declare const queryForHook: <TData, TVariables extends OperationVariables = OperationVariables>(hookFn: (baseOptions: QueryHookOptions<TData, TVariables>) => import("@apollo/client").QueryResult<TData, TVariables> | import("@apollo/client").LazyQueryResultTuple<TData, TVariables>, document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data: TData | null, error?: ApolloError | Error) => MockedResponse;
50
+ export declare const queryForHook: <TData, TVariables extends OperationVariables = OperationVariables>(hookFn: (baseOptions: QueryHookOptions<TData, TVariables>) => QueryReturn<TData, TVariables> | QueryLazyReturn<TData, TVariables>, document: TypedDocumentNode<TData, TVariables>, variables: TVariables, data: TData | null, error?: ApolloError | Error) => MockedResponse;
51
51
  export {};