@ionic/react 9.0.15 → 9.0.16-dev.11796420313.1813a3df
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 +20 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1372,6 +1372,11 @@ const IonItem = /*@__PURE__*/ createRoutingComponent('ion-item', IonItem$1);
|
|
|
1372
1372
|
const IonItemOption = /*@__PURE__*/ createRoutingComponent('ion-item-option', IonItemOption$1);
|
|
1373
1373
|
const IonBreadcrumb = /*@__PURE__*/ createRoutingComponent('ion-breadcrumb', IonBreadcrumb$1);
|
|
1374
1374
|
|
|
1375
|
+
const StackContext = React.createContext({
|
|
1376
|
+
registerIonPage: () => undefined,
|
|
1377
|
+
isInOutlet: () => false,
|
|
1378
|
+
});
|
|
1379
|
+
|
|
1375
1380
|
/**
|
|
1376
1381
|
* The @stencil/react-output-target will bind event listeners for any
|
|
1377
1382
|
* attached props that use the `on` prefix. This function will remove
|
|
@@ -1417,6 +1422,15 @@ const detachEvent = (node, eventName) => {
|
|
|
1417
1422
|
* React event-delegation root.
|
|
1418
1423
|
*/
|
|
1419
1424
|
const NestedOverlayContext = React.createContext(false);
|
|
1425
|
+
/**
|
|
1426
|
+
* Stops an `IonPage` inside the overlay from registering with the enclosing
|
|
1427
|
+
* outlet, which would mistake it for the route's page. An outlet inside the
|
|
1428
|
+
* overlay provides its own.
|
|
1429
|
+
*/
|
|
1430
|
+
const outsideOutletContext = {
|
|
1431
|
+
registerIonPage: () => undefined,
|
|
1432
|
+
isInOutlet: () => false,
|
|
1433
|
+
};
|
|
1420
1434
|
/**
|
|
1421
1435
|
* React skips `componentWillUnmount` when it destroys a subtree it had already
|
|
1422
1436
|
* hidden, so a hidden overlay watches its own marker leave the document. One
|
|
@@ -1715,7 +1729,7 @@ const createInlineOverlayComponent = (tagName, defineCustomElement, hasDelegateH
|
|
|
1715
1729
|
? createElement('div', {
|
|
1716
1730
|
ref: this.wrapperRef,
|
|
1717
1731
|
className: getWrapperClasses(),
|
|
1718
|
-
}, children)
|
|
1732
|
+
}, createElement(StackContext.Provider, { value: outsideOutletContext }, children))
|
|
1719
1733
|
: null));
|
|
1720
1734
|
// The marker sits at the JSX location on both branches and leaves the
|
|
1721
1735
|
// document only on a real unmount, which is how `componentWillUnmount`
|
|
@@ -1978,11 +1992,6 @@ class IonApp extends React.Component {
|
|
|
1978
1992
|
static displayName = 'IonApp';
|
|
1979
1993
|
}
|
|
1980
1994
|
|
|
1981
|
-
const StackContext = React.createContext({
|
|
1982
|
-
registerIonPage: () => undefined,
|
|
1983
|
-
isInOutlet: () => false,
|
|
1984
|
-
});
|
|
1985
|
-
|
|
1986
1995
|
class PageManager extends React.PureComponent {
|
|
1987
1996
|
ionLifeCycleContext;
|
|
1988
1997
|
ionPageElementRef;
|
|
@@ -2232,10 +2241,14 @@ class OutletPageManager extends React.Component {
|
|
|
2232
2241
|
* here -- after hydration -- ensures they persist until the parent
|
|
2233
2242
|
* outlet's forward animation removes ion-page-invisible, preventing
|
|
2234
2243
|
* a flash where the outlet is briefly visible at full opacity.
|
|
2244
|
+
* Outside an outlet (e.g. inside an inline overlay) nothing would
|
|
2245
|
+
* remove ion-page-invisible, so only ion-page is added there.
|
|
2235
2246
|
*/
|
|
2236
2247
|
if (!el.classList.contains('ion-page-invisible') && !el.classList.contains('ion-page-hidden')) {
|
|
2237
2248
|
el.classList.add('ion-page');
|
|
2238
|
-
|
|
2249
|
+
if (this.context.isInOutlet()) {
|
|
2250
|
+
el.classList.add('ion-page-invisible');
|
|
2251
|
+
}
|
|
2239
2252
|
}
|
|
2240
2253
|
this.context.registerIonPage(el, this.props.routeInfo);
|
|
2241
2254
|
});
|