@ionic/react 8.7.12-dev.11765219790.17cbe2e9 → 8.7.12-dev.11765231260.1def96ab
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/dist/index.js +4 -14
- package/dist/index.js.map +1 -1
- package/dist/types/components/IonRoute.d.ts +2 -1
- package/dist/types/components/IonRouterOutlet.d.ts +0 -1
- package/dist/types/routing/OutletPageManager.d.ts +0 -1
- package/dist/types/routing/RouteManagerContext.d.ts +0 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1331,10 +1331,10 @@ class OutletPageManager extends React.Component {
|
|
|
1331
1331
|
this.ionLifeCycleContext.ionViewDidLeave();
|
|
1332
1332
|
}
|
|
1333
1333
|
render() {
|
|
1334
|
-
const { StackManager, children, routeInfo,
|
|
1334
|
+
const { StackManager, children, routeInfo, ...props } = this.props;
|
|
1335
1335
|
return (jsx(IonLifeCycleContext.Consumer, { children: (context) => {
|
|
1336
1336
|
this.ionLifeCycleContext = context;
|
|
1337
|
-
return (jsx(StackManager, { routeInfo: routeInfo,
|
|
1337
|
+
return (jsx(StackManager, { routeInfo: routeInfo, children: jsx(IonRouterOutletInner, { setRef: (val) => (this.ionRouterOutlet = val), ...props, children: children }) }));
|
|
1338
1338
|
} }));
|
|
1339
1339
|
}
|
|
1340
1340
|
static get contextType() {
|
|
@@ -1345,13 +1345,11 @@ class OutletPageManager extends React.Component {
|
|
|
1345
1345
|
class IonRouterOutletContainer extends React.Component {
|
|
1346
1346
|
constructor(props) {
|
|
1347
1347
|
super(props);
|
|
1348
|
-
this.outletId = props.id ?? `routerOutlet-${generateId('routerOutlet')}`;
|
|
1349
1348
|
}
|
|
1350
1349
|
render() {
|
|
1351
1350
|
const StackManager = this.context.getStackManager();
|
|
1352
1351
|
const { children, forwardedRef, ...props } = this.props;
|
|
1353
|
-
|
|
1354
|
-
return this.context.hasIonicRouter() ? (props.ionPage ? (jsx(OutletPageManager, { StackManager: StackManager, routeInfo: this.context.routeInfo, ...props, children: children })) : (jsx(StackManager, { routeInfo: this.context.routeInfo, id: outletId, children: jsx(IonRouterOutletInner, { ...props, id: outletId, forwardedRef: forwardedRef, children: children }) }))) : (jsx(IonRouterOutletInner, { ref: forwardedRef, ...this.props, children: this.props.children }));
|
|
1352
|
+
return this.context.hasIonicRouter() ? (props.ionPage ? (jsx(OutletPageManager, { StackManager: StackManager, routeInfo: this.context.routeInfo, ...props, children: children })) : (jsx(StackManager, { routeInfo: this.context.routeInfo, children: jsx(IonRouterOutletInner, { ...props, forwardedRef: forwardedRef, children: children }) }))) : (jsx(IonRouterOutletInner, { ref: forwardedRef, ...this.props, children: this.props.children }));
|
|
1355
1353
|
}
|
|
1356
1354
|
static get contextType() {
|
|
1357
1355
|
return NavContext;
|
|
@@ -2230,7 +2228,6 @@ const RouteManagerContext = /*@__PURE__*/ React.createContext({
|
|
|
2230
2228
|
findLeavingViewItemByRouteInfo: () => undefined,
|
|
2231
2229
|
findViewItemByRouteInfo: () => undefined,
|
|
2232
2230
|
getChildrenToRender: () => undefined,
|
|
2233
|
-
getViewItemsForOutlet: () => [],
|
|
2234
2231
|
goBack: () => undefined,
|
|
2235
2232
|
unMountViewItem: () => undefined,
|
|
2236
2233
|
});
|
|
@@ -2349,14 +2346,7 @@ class LocationHistory {
|
|
|
2349
2346
|
_replace(routeInfo) {
|
|
2350
2347
|
const routeInfos = this._getRouteInfosByKey(routeInfo.tab);
|
|
2351
2348
|
routeInfos && routeInfos.pop();
|
|
2352
|
-
|
|
2353
|
-
const currentRoute = this.locationHistory[this.locationHistory.length - 1];
|
|
2354
|
-
// Only pop from global history if we're replacing in the same outlet context.
|
|
2355
|
-
// Don't pop if we're entering a nested outlet (current route has no tab, new route has a tab)
|
|
2356
|
-
const isEnteringNestedOutlet = currentRoute && !currentRoute.tab && !!routeInfo.tab;
|
|
2357
|
-
if (!isEnteringNestedOutlet) {
|
|
2358
|
-
this.locationHistory.pop();
|
|
2359
|
-
}
|
|
2349
|
+
this.locationHistory.pop();
|
|
2360
2350
|
this._add(routeInfo);
|
|
2361
2351
|
}
|
|
2362
2352
|
_clear() {
|