@trackunit/react-core-contexts-test 1.12.61 → 1.12.63
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 +10 -6
- package/index.esm2.js +10 -6
- package/package.json +2 -2
package/index.cjs2.js
CHANGED
|
@@ -13561,6 +13561,9 @@ const TestRenderChildren = ({ addTestRootContainer, children }) => {
|
|
|
13561
13561
|
"--tw-scale-y": "0.99",
|
|
13562
13562
|
}, children: children })) : (jsxRuntime.jsx("div", { children: children }));
|
|
13563
13563
|
};
|
|
13564
|
+
const TestErrorComponent = ({ error }) => {
|
|
13565
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["UNCAUGHT ERROR IN TEST: ", error instanceof Error ? error.message : error] });
|
|
13566
|
+
};
|
|
13564
13567
|
/**
|
|
13565
13568
|
* This component is used to wrap the children of the RouterContainer to add a test root container.
|
|
13566
13569
|
*
|
|
@@ -13613,12 +13616,16 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
|
|
|
13613
13616
|
});
|
|
13614
13617
|
if (pathsToRoute.__root__) {
|
|
13615
13618
|
pathsToRoute.__root__.options.component = RootRouteDebugger;
|
|
13616
|
-
pathsToRoute.__root__.options.beforeLoad = () => {
|
|
13619
|
+
pathsToRoute.__root__.options.beforeLoad = () => {
|
|
13620
|
+
/* noop */
|
|
13621
|
+
};
|
|
13617
13622
|
pathsToRoute.__root__.lazyFn = undefined;
|
|
13618
13623
|
}
|
|
13619
13624
|
if (pathsToRoute["/"]) {
|
|
13620
13625
|
// This ensures / is not redirecting to default home route
|
|
13621
|
-
pathsToRoute["/"].options.beforeLoad = () => {
|
|
13626
|
+
pathsToRoute["/"].options.beforeLoad = () => {
|
|
13627
|
+
/* noop */
|
|
13628
|
+
};
|
|
13622
13629
|
}
|
|
13623
13630
|
if ((initialEntriesRef.current?.length || 0) > 0) {
|
|
13624
13631
|
initialEntriesRef.current?.forEach(entry => {
|
|
@@ -13694,10 +13701,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
|
|
|
13694
13701
|
defaultUserRoute: "/",
|
|
13695
13702
|
...(selectedRouterProps?.context || {}),
|
|
13696
13703
|
}), [client, selectedRouterProps?.context]);
|
|
13697
|
-
|
|
13698
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["UNCAUGHT ERROR IN TEST: ", error instanceof Error ? error.message : error] });
|
|
13699
|
-
};
|
|
13700
|
-
return jsxRuntime.jsx(reactRouter.RouterProvider, { context: context, defaultErrorComponent: ErrorComponent, router: router });
|
|
13704
|
+
return jsxRuntime.jsx(reactRouter.RouterProvider, { context: context, defaultErrorComponent: TestErrorComponent, router: router });
|
|
13701
13705
|
};
|
|
13702
13706
|
|
|
13703
13707
|
/**
|
package/index.esm2.js
CHANGED
|
@@ -13539,6 +13539,9 @@ const TestRenderChildren = ({ addTestRootContainer, children }) => {
|
|
|
13539
13539
|
"--tw-scale-y": "0.99",
|
|
13540
13540
|
}, children: children })) : (jsx("div", { children: children }));
|
|
13541
13541
|
};
|
|
13542
|
+
const TestErrorComponent = ({ error }) => {
|
|
13543
|
+
return jsxs(Fragment, { children: ["UNCAUGHT ERROR IN TEST: ", error instanceof Error ? error.message : error] });
|
|
13544
|
+
};
|
|
13542
13545
|
/**
|
|
13543
13546
|
* This component is used to wrap the children of the RouterContainer to add a test root container.
|
|
13544
13547
|
*
|
|
@@ -13591,12 +13594,16 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
|
|
|
13591
13594
|
});
|
|
13592
13595
|
if (pathsToRoute.__root__) {
|
|
13593
13596
|
pathsToRoute.__root__.options.component = RootRouteDebugger;
|
|
13594
|
-
pathsToRoute.__root__.options.beforeLoad = () => {
|
|
13597
|
+
pathsToRoute.__root__.options.beforeLoad = () => {
|
|
13598
|
+
/* noop */
|
|
13599
|
+
};
|
|
13595
13600
|
pathsToRoute.__root__.lazyFn = undefined;
|
|
13596
13601
|
}
|
|
13597
13602
|
if (pathsToRoute["/"]) {
|
|
13598
13603
|
// This ensures / is not redirecting to default home route
|
|
13599
|
-
pathsToRoute["/"].options.beforeLoad = () => {
|
|
13604
|
+
pathsToRoute["/"].options.beforeLoad = () => {
|
|
13605
|
+
/* noop */
|
|
13606
|
+
};
|
|
13600
13607
|
}
|
|
13601
13608
|
if ((initialEntriesRef.current?.length || 0) > 0) {
|
|
13602
13609
|
initialEntriesRef.current?.forEach(entry => {
|
|
@@ -13672,10 +13679,7 @@ const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute,
|
|
|
13672
13679
|
defaultUserRoute: "/",
|
|
13673
13680
|
...(selectedRouterProps?.context || {}),
|
|
13674
13681
|
}), [client, selectedRouterProps?.context]);
|
|
13675
|
-
|
|
13676
|
-
return jsxs(Fragment, { children: ["UNCAUGHT ERROR IN TEST: ", error instanceof Error ? error.message : error] });
|
|
13677
|
-
};
|
|
13678
|
-
return jsx(RouterProvider, { context: context, defaultErrorComponent: ErrorComponent, router: router });
|
|
13682
|
+
return jsx(RouterProvider, { context: context, defaultErrorComponent: TestErrorComponent, router: router });
|
|
13679
13683
|
};
|
|
13680
13684
|
|
|
13681
13685
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts-test",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.63",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"graphql": "^16.10.0",
|
|
15
15
|
"@tanstack/router-core": "1.114.29",
|
|
16
16
|
"@trackunit/iris-app-runtime-core-api": "1.12.56",
|
|
17
|
-
"@trackunit/react-core-contexts-api": "1.13.
|
|
17
|
+
"@trackunit/react-core-contexts-api": "1.13.57",
|
|
18
18
|
"es-toolkit": "^1.39.10"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.esm.js",
|