@ionic/react-router 7.5.4-dev.11699300051.122a36ad → 7.5.4-dev.11699310489.151b2717

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.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/ReactRouter/IonRouteInner.tsx","../src/ReactRouter/ReactRouterViewStack.tsx","../src/ReactRouter/clonePageElement.ts","../src/ReactRouter/StackManager.tsx","../src/ReactRouter/IonRouter.tsx","../src/ReactRouter/IonReactRouter.tsx","../src/ReactRouter/IonReactMemoryRouter.tsx","../src/ReactRouter/IonReactHashRouter.tsx"],"sourcesContent":["import type { IonRouteProps } from '@ionic/react';\nimport React from 'react';\nimport { Route } from 'react-router';\n\nexport class IonRouteInner extends React.PureComponent<IonRouteProps> {\n render() {\n return (\n <Route\n path={this.props.path}\n exact={this.props.exact}\n render={this.props.render}\n {\n /**\n * `computedMatch` is a private API in react-router v5 that\n * has been removed in v6.\n *\n * This needs to be removed when we support v6.\n *\n * TODO: FW-647\n */\n ...((this.props as any).computedMatch !== undefined\n ? {\n computedMatch: (this.props as any).computedMatch,\n }\n : {})\n }\n />\n );\n }\n}\n","import type { RouteInfo, ViewItem } from '@ionic/react';\nimport { IonRoute, ViewLifeCycleManager, ViewStacks, generateId } from '@ionic/react';\nimport React from 'react';\nimport { matchPath } from 'react-router';\n\nexport class ReactRouterViewStack extends ViewStacks {\n constructor() {\n super();\n this.createViewItem = this.createViewItem.bind(this);\n this.findViewItemByRouteInfo = this.findViewItemByRouteInfo.bind(this);\n this.findLeavingViewItemByRouteInfo = this.findLeavingViewItemByRouteInfo.bind(this);\n this.getChildrenToRender = this.getChildrenToRender.bind(this);\n this.findViewItemByPathname = this.findViewItemByPathname.bind(this);\n }\n\n createViewItem(outletId: string, reactElement: React.ReactElement, routeInfo: RouteInfo, page?: HTMLElement) {\n const viewItem: ViewItem = {\n id: generateId('viewItem'),\n outletId,\n ionPageElement: page,\n reactElement,\n mount: true,\n ionRoute: false,\n };\n\n const matchProps = {\n exact: reactElement.props.exact,\n path: reactElement.props.path || reactElement.props.from,\n component: reactElement.props.component,\n };\n\n const match = matchPath(routeInfo.pathname, matchProps);\n\n if (reactElement.type === IonRoute) {\n viewItem.ionRoute = true;\n viewItem.disableIonPageManagement = reactElement.props.disableIonPageManagement;\n }\n\n viewItem.routeData = {\n match,\n childProps: reactElement.props,\n };\n\n return viewItem;\n }\n\n getChildrenToRender(outletId: string, ionRouterOutlet: React.ReactElement, routeInfo: RouteInfo) {\n const viewItems = this.getViewItemsForOutlet(outletId);\n\n // Sync latest routes with viewItems\n React.Children.forEach(ionRouterOutlet.props.children, (child: React.ReactElement) => {\n const viewItem = viewItems.find((v) => {\n return matchComponent(child, v.routeData.childProps.path || v.routeData.childProps.from);\n });\n if (viewItem) {\n viewItem.reactElement = child;\n }\n });\n\n const children = viewItems.map((viewItem) => {\n let clonedChild;\n if (viewItem.ionRoute && !viewItem.disableIonPageManagement) {\n clonedChild = (\n <ViewLifeCycleManager\n key={`view-${viewItem.id}`}\n mount={viewItem.mount}\n removeView={() => this.remove(viewItem)}\n >\n {React.cloneElement(viewItem.reactElement, {\n computedMatch: viewItem.routeData.match,\n })}\n </ViewLifeCycleManager>\n );\n } else {\n const match = matchComponent(viewItem.reactElement, routeInfo.pathname);\n clonedChild = (\n <ViewLifeCycleManager\n key={`view-${viewItem.id}`}\n mount={viewItem.mount}\n removeView={() => this.remove(viewItem)}\n >\n {React.cloneElement(viewItem.reactElement, {\n computedMatch: viewItem.routeData.match,\n })}\n </ViewLifeCycleManager>\n );\n\n if (!match && viewItem.routeData.match) {\n viewItem.routeData.match = undefined;\n viewItem.mount = false;\n }\n }\n\n return clonedChild;\n });\n return children;\n }\n\n findViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string, updateMatch?: boolean) {\n const { viewItem, match } = this.findViewItemByPath(routeInfo.pathname, outletId);\n const shouldUpdateMatch = updateMatch === undefined || updateMatch === true;\n if (shouldUpdateMatch && viewItem && match) {\n viewItem.routeData.match = match;\n }\n return viewItem;\n }\n\n findLeavingViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string, mustBeIonRoute = true) {\n const { viewItem } = this.findViewItemByPath(routeInfo.lastPathname!, outletId, false, mustBeIonRoute);\n return viewItem;\n }\n\n findViewItemByPathname(pathname: string, outletId?: string) {\n const { viewItem } = this.findViewItemByPath(pathname, outletId);\n return viewItem;\n }\n\n private findViewItemByPath(pathname: string, outletId?: string, forceExact?: boolean, mustBeIonRoute?: boolean) {\n let viewItem: ViewItem | undefined;\n let match: ReturnType<typeof matchPath> | undefined;\n let viewStack: ViewItem[];\n\n if (outletId) {\n viewStack = this.getViewItemsForOutlet(outletId);\n viewStack.some(matchView);\n if (!viewItem) {\n viewStack.some(matchDefaultRoute);\n }\n } else {\n const viewItems = this.getAllViewItems();\n viewItems.some(matchView);\n if (!viewItem) {\n viewItems.some(matchDefaultRoute);\n }\n }\n\n return { viewItem, match };\n\n function matchView(v: ViewItem) {\n if (mustBeIonRoute && !v.ionRoute) {\n return false;\n }\n const matchProps = {\n exact: forceExact ? true : v.routeData.childProps.exact,\n path: v.routeData.childProps.path || v.routeData.childProps.from,\n component: v.routeData.childProps.component,\n };\n const myMatch = matchPath(pathname, matchProps);\n if (myMatch) {\n viewItem = v;\n match = myMatch;\n return true;\n }\n return false;\n }\n\n function matchDefaultRoute(v: ViewItem) {\n // try to find a route that doesn't have a path or from prop, that will be our default route\n if (!v.routeData.childProps.path && !v.routeData.childProps.from) {\n match = {\n path: pathname,\n url: pathname,\n isExact: true,\n params: {},\n };\n viewItem = v;\n return true;\n }\n return false;\n }\n }\n}\n\nfunction matchComponent(node: React.ReactElement, pathname: string, forceExact?: boolean) {\n const matchProps = {\n exact: forceExact ? true : node.props.exact,\n path: node.props.path || node.props.from,\n component: node.props.component,\n };\n const match = matchPath(pathname, matchProps);\n\n return match;\n}\n","export function clonePageElement(leavingViewHtml: string | HTMLElement) {\n let html: string;\n if (typeof leavingViewHtml === 'string') {\n html = leavingViewHtml;\n } else {\n html = leavingViewHtml.outerHTML;\n }\n if (document) {\n const newEl = document.createElement('div');\n newEl.innerHTML = html;\n newEl.style.zIndex = '';\n // Remove an existing back button so the new element doesn't get two of them\n const ionBackButton = newEl.getElementsByTagName('ion-back-button');\n if (ionBackButton[0]) {\n ionBackButton[0].remove();\n }\n return newEl.firstChild as HTMLElement;\n }\n return undefined;\n}\n","import type { RouteInfo, StackContextState, ViewItem } from '@ionic/react';\nimport { RouteManagerContext, StackContext, generateId, getConfig } from '@ionic/react';\nimport React from 'react';\nimport { matchPath } from 'react-router-dom';\n\nimport { clonePageElement } from './clonePageElement';\n\n// TODO(FW-2959): types\n\ninterface StackManagerProps {\n routeInfo: RouteInfo;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface StackManagerState {}\n\nconst isViewVisible = (el: HTMLElement) =>\n !el.classList.contains('ion-page-invisible') && !el.classList.contains('ion-page-hidden');\n\nexport class StackManager extends React.PureComponent<StackManagerProps, StackManagerState> {\n id: string;\n context!: React.ContextType<typeof RouteManagerContext>;\n ionRouterOutlet?: React.ReactElement;\n routerOutletElement: HTMLIonRouterOutletElement | undefined;\n prevProps?: StackManagerProps;\n skipTransition: boolean;\n\n stackContextValue: StackContextState = {\n registerIonPage: this.registerIonPage.bind(this),\n isInOutlet: () => true,\n };\n\n private clearOutletTimeout: any;\n private pendingPageTransition = false;\n\n constructor(props: StackManagerProps) {\n super(props);\n this.registerIonPage = this.registerIonPage.bind(this);\n this.transitionPage = this.transitionPage.bind(this);\n this.handlePageTransition = this.handlePageTransition.bind(this);\n this.id = generateId('routerOutlet');\n this.prevProps = undefined;\n this.skipTransition = false;\n }\n\n componentDidMount() {\n if (this.clearOutletTimeout) {\n /**\n * The clearOutlet integration with React Router is a bit hacky.\n * It uses a timeout to clear the outlet after a transition.\n * In React v18, components are mounted and unmounted in development mode\n * to check for side effects.\n *\n * This clearTimeout prevents the outlet from being cleared when the component is re-mounted,\n * which should only happen in development mode and as a result of a hot reload.\n */\n clearTimeout(this.clearOutletTimeout);\n }\n if (this.routerOutletElement) {\n this.setupRouterOutlet(this.routerOutletElement);\n this.handlePageTransition(this.props.routeInfo);\n }\n }\n\n componentDidUpdate(prevProps: StackManagerProps) {\n const { pathname } = this.props.routeInfo;\n const { pathname: prevPathname } = prevProps.routeInfo;\n\n if (pathname !== prevPathname) {\n this.prevProps = prevProps;\n this.handlePageTransition(this.props.routeInfo);\n } else if (this.pendingPageTransition) {\n this.handlePageTransition(this.props.routeInfo);\n this.pendingPageTransition = false;\n }\n }\n\n componentWillUnmount() {\n this.clearOutletTimeout = this.context.clearOutlet(this.id);\n }\n\n async handlePageTransition(routeInfo: RouteInfo) {\n if (!this.routerOutletElement || !this.routerOutletElement.commit) {\n /**\n * The route outlet has not mounted yet. We need to wait for it to render\n * before we can transition the page.\n *\n * Set a flag to indicate that we should transition the page after\n * the component has updated.\n */\n this.pendingPageTransition = true;\n } else {\n let enteringViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id);\n let leavingViewItem = this.context.findLeavingViewItemByRouteInfo(routeInfo, this.id);\n\n if (!leavingViewItem && routeInfo.prevRouteLastPathname) {\n leavingViewItem = this.context.findViewItemByPathname(routeInfo.prevRouteLastPathname, this.id);\n }\n\n // Check if leavingViewItem should be unmounted\n if (leavingViewItem) {\n if (routeInfo.routeAction === 'replace') {\n leavingViewItem.mount = false;\n } else if (!(routeInfo.routeAction === 'push' && routeInfo.routeDirection === 'forward')) {\n if (routeInfo.routeDirection !== 'none' && enteringViewItem !== leavingViewItem) {\n leavingViewItem.mount = false;\n }\n } else if (routeInfo.routeOptions?.unmount) {\n leavingViewItem.mount = false;\n }\n }\n\n const enteringRoute = matchRoute(this.ionRouterOutlet?.props.children, routeInfo) as React.ReactElement;\n\n if (enteringViewItem) {\n enteringViewItem.reactElement = enteringRoute;\n } else if (enteringRoute) {\n enteringViewItem = this.context.createViewItem(this.id, enteringRoute, routeInfo);\n this.context.addViewItem(enteringViewItem);\n }\n\n if (enteringViewItem && enteringViewItem.ionPageElement) {\n /**\n * If the entering view item is the same as the leaving view item,\n * then we don't need to transition.\n */\n if (enteringViewItem === leavingViewItem) {\n /**\n * If the entering view item is the same as the leaving view item,\n * we are either transitioning using parameterized routes to the same view\n * or a parent router outlet is re-rendering as a result of React props changing.\n *\n * If the route data does not match the current path, the parent router outlet\n * is attempting to transition and we cancel the operation.\n */\n if (enteringViewItem.routeData.match.url !== routeInfo.pathname) {\n return;\n }\n }\n\n /**\n * If there isn't a leaving view item, but the route info indicates\n * that the user has routed from a previous path, then we need\n * to find the leaving view item to transition between.\n */\n if (!leavingViewItem && this.props.routeInfo.prevRouteLastPathname) {\n leavingViewItem = this.context.findViewItemByPathname(this.props.routeInfo.prevRouteLastPathname, this.id);\n }\n\n /**\n * If the entering view is already visible and the leaving view is not, the transition does not need to occur.\n */\n if (\n isViewVisible(enteringViewItem.ionPageElement) &&\n leavingViewItem !== undefined &&\n !isViewVisible(leavingViewItem.ionPageElement!)\n ) {\n return;\n }\n\n /**\n * The view should only be transitioned in the following cases:\n * 1. Performing a replace or pop action, such as a swipe to go back gesture\n * to animation the leaving view off the screen.\n *\n * 2. Navigating between top-level router outlets, such as /page-1 to /page-2;\n * or navigating within a nested outlet, such as /tabs/tab-1 to /tabs/tab-2.\n *\n * 3. The entering view is an ion-router-outlet containing a page\n * matching the current route and that hasn't already transitioned in.\n *\n * This should only happen when navigating directly to a nested router outlet\n * route or on an initial page load (i.e. refreshing). In cases when loading\n * /tabs/tab-1, we need to transition the /tabs page element into the view.\n */\n this.transitionPage(routeInfo, enteringViewItem, leavingViewItem);\n } else if (leavingViewItem && !enteringRoute && !enteringViewItem) {\n // If we have a leavingView but no entering view/route, we are probably leaving to\n // another outlet, so hide this leavingView. We do it in a timeout to give time for a\n // transition to finish.\n // setTimeout(() => {\n if (leavingViewItem.ionPageElement) {\n leavingViewItem.ionPageElement.classList.add('ion-page-hidden');\n leavingViewItem.ionPageElement.setAttribute('aria-hidden', 'true');\n }\n // }, 250);\n }\n\n this.forceUpdate();\n }\n }\n\n registerIonPage(page: HTMLElement, routeInfo: RouteInfo) {\n const foundView = this.context.findViewItemByRouteInfo(routeInfo, this.id);\n if (foundView) {\n const oldPageElement = foundView.ionPageElement;\n foundView.ionPageElement = page;\n foundView.ionRoute = true;\n\n /**\n * React 18 will unmount and remount IonPage\n * elements in development mode when using createRoot.\n * This can cause duplicate page transitions to occur.\n */\n if (oldPageElement === page) {\n return;\n }\n }\n this.handlePageTransition(routeInfo);\n }\n\n async setupRouterOutlet(routerOutlet: HTMLIonRouterOutletElement) {\n const canStart = () => {\n const config = getConfig();\n const swipeEnabled = config && config.get('swipeBackEnabled', routerOutlet.mode === 'ios');\n if (!swipeEnabled) {\n return false;\n }\n\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n\n return (\n !!enteringViewItem &&\n /**\n * The root url '/' is treated as\n * the first view item (but is never mounted),\n * so we do not want to swipe back to the\n * root url.\n */\n enteringViewItem.mount &&\n /**\n * When on the first page (whatever view\n * you land on after the root url) it\n * is possible for findViewItemByRouteInfo to\n * return the exact same view you are currently on.\n * Make sure that we are not swiping back to the same\n * instances of a view.\n */\n enteringViewItem.routeData.match.path !== routeInfo.pathname\n );\n };\n\n const onStart = async () => {\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n const leavingViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id, false);\n\n /**\n * When the gesture starts, kick off\n * a transition that is controlled\n * via a swipe gesture.\n */\n if (enteringViewItem && leavingViewItem) {\n await this.transitionPage(routeInfo, enteringViewItem, leavingViewItem, 'back', true);\n }\n\n return Promise.resolve();\n };\n const onEnd = (shouldContinue: boolean) => {\n if (shouldContinue) {\n this.skipTransition = true;\n\n this.context.goBack();\n } else {\n /**\n * In the event that the swipe\n * gesture was aborted, we should\n * re-hide the page that was going to enter.\n */\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n const leavingViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id, false);\n\n /**\n * Ionic React has a design defect where it\n * a) Unmounts the leaving view item when using parameterized routes\n * b) Considers the current view to be the entering view when using\n * parameterized routes\n *\n * As a result, we should not hide the view item here\n * as it will cause the current view to be hidden.\n */\n if (enteringViewItem !== leavingViewItem && enteringViewItem?.ionPageElement !== undefined) {\n const { ionPageElement } = enteringViewItem;\n ionPageElement.setAttribute('aria-hidden', 'true');\n ionPageElement.classList.add('ion-page-hidden');\n }\n }\n };\n\n routerOutlet.swipeHandler = {\n canStart,\n onStart,\n onEnd,\n };\n }\n\n async transitionPage(\n routeInfo: RouteInfo,\n enteringViewItem: ViewItem,\n leavingViewItem?: ViewItem,\n direction?: 'forward' | 'back',\n progressAnimation = false\n ) {\n const runCommit = async (enteringEl: HTMLElement, leavingEl?: HTMLElement) => {\n const skipTransition = this.skipTransition;\n\n /**\n * If the transition was handled\n * via the swipe to go back gesture,\n * then we do not want to perform\n * another transition.\n *\n * We skip adding ion-page or ion-page-invisible\n * because the entering view already exists in the DOM.\n * If we added the classes, there would be a flicker where\n * the view would be briefly hidden.\n */\n if (skipTransition) {\n /**\n * We need to reset skipTransition before\n * we call routerOutlet.commit otherwise\n * the transition triggered by the swipe\n * to go back gesture would reset it. In\n * that case you would see a duplicate\n * transition triggered by handlePageTransition\n * in componentDidUpdate.\n */\n this.skipTransition = false;\n } else {\n enteringEl.classList.add('ion-page');\n enteringEl.classList.add('ion-page-invisible');\n }\n\n await routerOutlet.commit(enteringEl, leavingEl, {\n duration: skipTransition || directionToUse === undefined ? 0 : undefined,\n direction: directionToUse,\n showGoBack: !!routeInfo.pushedByRoute,\n progressAnimation,\n animationBuilder: routeInfo.routeAnimation,\n });\n };\n\n const routerOutlet = this.routerOutletElement!;\n\n const routeInfoFallbackDirection =\n routeInfo.routeDirection === 'none' || routeInfo.routeDirection === 'root' ? undefined : routeInfo.routeDirection;\n const directionToUse = direction ?? routeInfoFallbackDirection;\n\n if (enteringViewItem && enteringViewItem.ionPageElement && this.routerOutletElement) {\n if (leavingViewItem && leavingViewItem.ionPageElement && enteringViewItem === leavingViewItem) {\n // If a page is transitioning to another version of itself\n // we clone it so we can have an animation to show\n\n const match = matchComponent(leavingViewItem.reactElement, routeInfo.pathname, true);\n if (match) {\n const newLeavingElement = clonePageElement(leavingViewItem.ionPageElement.outerHTML);\n if (newLeavingElement) {\n this.routerOutletElement.appendChild(newLeavingElement);\n await runCommit(enteringViewItem.ionPageElement, newLeavingElement);\n this.routerOutletElement.removeChild(newLeavingElement);\n }\n } else {\n await runCommit(enteringViewItem.ionPageElement, undefined);\n }\n } else {\n await runCommit(enteringViewItem.ionPageElement, leavingViewItem?.ionPageElement);\n if (leavingViewItem && leavingViewItem.ionPageElement && !progressAnimation) {\n leavingViewItem.ionPageElement.classList.add('ion-page-hidden');\n leavingViewItem.ionPageElement.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n render() {\n const { children } = this.props;\n const ionRouterOutlet = React.Children.only(children) as React.ReactElement;\n this.ionRouterOutlet = ionRouterOutlet;\n\n const components = this.context.getChildrenToRender(this.id, this.ionRouterOutlet, this.props.routeInfo, () => {\n this.forceUpdate();\n });\n\n return (\n <StackContext.Provider value={this.stackContextValue}>\n {React.cloneElement(\n ionRouterOutlet as any,\n {\n ref: (node: HTMLIonRouterOutletElement) => {\n if (ionRouterOutlet.props.setRef) {\n ionRouterOutlet.props.setRef(node);\n }\n if (ionRouterOutlet.props.forwardedRef) {\n ionRouterOutlet.props.forwardedRef.current = node;\n }\n this.routerOutletElement = node;\n const { ref } = ionRouterOutlet as any;\n if (typeof ref === 'function') {\n ref(node);\n }\n },\n },\n components\n )}\n </StackContext.Provider>\n );\n }\n\n static get contextType() {\n return RouteManagerContext;\n }\n}\n\nexport default StackManager;\n\nfunction matchRoute(node: React.ReactNode, routeInfo: RouteInfo) {\n let matchedNode: React.ReactNode;\n React.Children.forEach(node as React.ReactElement, (child: React.ReactElement) => {\n const matchProps = {\n exact: child.props.exact,\n path: child.props.path || child.props.from,\n component: child.props.component,\n };\n const match = matchPath(routeInfo.pathname, matchProps);\n if (match) {\n matchedNode = child;\n }\n });\n\n if (matchedNode) {\n return matchedNode;\n }\n // If we haven't found a node\n // try to find one that doesn't have a path or from prop, that will be our not found route\n React.Children.forEach(node as React.ReactElement, (child: React.ReactElement) => {\n if (!(child.props.path || child.props.from)) {\n matchedNode = child;\n }\n });\n\n return matchedNode;\n}\n\nfunction matchComponent(node: React.ReactElement, pathname: string, forceExact?: boolean) {\n const matchProps = {\n exact: forceExact ? true : node.props.exact,\n path: node.props.path || node.props.from,\n component: node.props.component,\n };\n const match = matchPath(pathname, matchProps);\n\n return match;\n}\n","import type {\n AnimationBuilder,\n RouteAction,\n RouteInfo,\n RouteManagerContextState,\n RouterDirection,\n ViewItem,\n} from '@ionic/react';\nimport { LocationHistory, NavManager, RouteManagerContext, generateId, getConfig } from '@ionic/react';\nimport type { Action as HistoryAction, Location as HistoryLocation } from 'history';\nimport React from 'react';\nimport type { RouteComponentProps } from 'react-router-dom';\nimport { withRouter } from 'react-router-dom';\n\nimport { IonRouteInner } from './IonRouteInner';\nimport { ReactRouterViewStack } from './ReactRouterViewStack';\nimport StackManager from './StackManager';\n\nexport interface LocationState {\n direction?: RouterDirection;\n routerOptions?: { as?: string; unmount?: boolean };\n}\n\ninterface IonRouteProps extends RouteComponentProps<{}, {}, LocationState> {\n registerHistoryListener: (cb: (location: HistoryLocation<any>, action: HistoryAction) => void) => void;\n}\n\ninterface IonRouteState {\n routeInfo: RouteInfo;\n}\n\nclass IonRouterInner extends React.PureComponent<IonRouteProps, IonRouteState> {\n currentTab?: string;\n exitViewFromOtherOutletHandlers: ((pathname: string) => ViewItem | undefined)[] = [];\n incomingRouteParams?: Partial<RouteInfo>;\n locationHistory = new LocationHistory();\n viewStack = new ReactRouterViewStack();\n routeMangerContextState: RouteManagerContextState = {\n canGoBack: () => this.locationHistory.canGoBack(),\n clearOutlet: this.viewStack.clear,\n findViewItemByPathname: this.viewStack.findViewItemByPathname,\n getChildrenToRender: this.viewStack.getChildrenToRender,\n goBack: () => this.handleNavigateBack(),\n createViewItem: this.viewStack.createViewItem,\n findViewItemByRouteInfo: this.viewStack.findViewItemByRouteInfo,\n findLeavingViewItemByRouteInfo: this.viewStack.findLeavingViewItemByRouteInfo,\n addViewItem: this.viewStack.add,\n unMountViewItem: this.viewStack.remove,\n };\n\n constructor(props: IonRouteProps) {\n super(props);\n\n const routeInfo = {\n id: generateId('routeInfo'),\n pathname: this.props.location.pathname,\n search: this.props.location.search,\n };\n\n this.locationHistory.add(routeInfo);\n this.handleChangeTab = this.handleChangeTab.bind(this);\n this.handleResetTab = this.handleResetTab.bind(this);\n this.handleNativeBack = this.handleNativeBack.bind(this);\n this.handleNavigate = this.handleNavigate.bind(this);\n this.handleNavigateBack = this.handleNavigateBack.bind(this);\n this.props.registerHistoryListener(this.handleHistoryChange.bind(this));\n this.handleSetCurrentTab = this.handleSetCurrentTab.bind(this);\n\n this.state = {\n routeInfo,\n };\n }\n\n handleChangeTab(tab: string, path?: string, routeOptions?: any) {\n if (!path) {\n return;\n }\n\n const routeInfo = this.locationHistory.getCurrentRouteInfoForTab(tab);\n const [pathname, search] = path.split('?');\n if (routeInfo) {\n this.incomingRouteParams = { ...routeInfo, routeAction: 'push', routeDirection: 'none' };\n if (routeInfo.pathname === pathname) {\n this.incomingRouteParams.routeOptions = routeOptions;\n this.props.history.push(routeInfo.pathname + (routeInfo.search || ''));\n } else {\n this.incomingRouteParams.pathname = pathname;\n this.incomingRouteParams.search = search ? '?' + search : undefined;\n this.incomingRouteParams.routeOptions = routeOptions;\n this.props.history.push(pathname + (search ? '?' + search : ''));\n }\n } else {\n this.handleNavigate(pathname, 'push', 'none', undefined, routeOptions, tab);\n }\n }\n\n handleHistoryChange(location: HistoryLocation<LocationState>, action: HistoryAction) {\n let leavingLocationInfo: RouteInfo;\n if (this.incomingRouteParams) {\n if (this.incomingRouteParams.routeAction === 'replace') {\n leavingLocationInfo = this.locationHistory.previous();\n } else {\n leavingLocationInfo = this.locationHistory.current();\n }\n } else {\n leavingLocationInfo = this.locationHistory.current();\n }\n\n const leavingUrl = leavingLocationInfo.pathname + leavingLocationInfo.search;\n if (leavingUrl !== location.pathname) {\n if (!this.incomingRouteParams) {\n if (action === 'REPLACE') {\n this.incomingRouteParams = {\n routeAction: 'replace',\n routeDirection: 'none',\n tab: this.currentTab,\n };\n }\n if (action === 'POP') {\n const currentRoute = this.locationHistory.current();\n if (currentRoute && currentRoute.pushedByRoute) {\n const prevInfo = this.locationHistory.findLastLocation(currentRoute);\n this.incomingRouteParams = { ...prevInfo, routeAction: 'pop', routeDirection: 'back' };\n } else {\n this.incomingRouteParams = {\n routeAction: 'pop',\n routeDirection: 'none',\n tab: this.currentTab,\n };\n }\n }\n if (!this.incomingRouteParams) {\n this.incomingRouteParams = {\n routeAction: 'push',\n routeDirection: location.state?.direction || 'forward',\n routeOptions: location.state?.routerOptions,\n tab: this.currentTab,\n };\n }\n }\n\n let routeInfo: RouteInfo;\n\n if (this.incomingRouteParams?.id) {\n routeInfo = {\n ...(this.incomingRouteParams as RouteInfo),\n lastPathname: leavingLocationInfo.pathname,\n };\n this.locationHistory.add(routeInfo);\n } else {\n const isPushed =\n this.incomingRouteParams.routeAction === 'push' && this.incomingRouteParams.routeDirection === 'forward';\n routeInfo = {\n id: generateId('routeInfo'),\n ...this.incomingRouteParams,\n lastPathname: leavingLocationInfo.pathname,\n pathname: location.pathname,\n search: location.search,\n params: this.props.match.params,\n prevRouteLastPathname: leavingLocationInfo.lastPathname,\n };\n if (isPushed) {\n routeInfo.tab = leavingLocationInfo.tab;\n routeInfo.pushedByRoute = leavingLocationInfo.pathname;\n } else if (routeInfo.routeAction === 'pop') {\n const r = this.locationHistory.findLastLocation(routeInfo);\n routeInfo.pushedByRoute = r?.pushedByRoute;\n } else if (routeInfo.routeAction === 'push' && routeInfo.tab !== leavingLocationInfo.tab) {\n // If we are switching tabs grab the last route info for the tab and use its pushedByRoute\n const lastRoute = this.locationHistory.getCurrentRouteInfoForTab(routeInfo.tab);\n routeInfo.pushedByRoute = lastRoute?.pushedByRoute;\n } else if (routeInfo.routeAction === 'replace') {\n // Make sure to set the lastPathname, etc.. to the current route so the page transitions out\n const currentRouteInfo = this.locationHistory.current();\n\n /**\n * If going from /home to /child, then replacing from\n * /child to /home, we don't want the route info to\n * say that /home was pushed by /home which is not correct.\n */\n const currentPushedBy = currentRouteInfo?.pushedByRoute;\n const pushedByRoute =\n currentPushedBy !== undefined && currentPushedBy !== routeInfo.pathname\n ? currentPushedBy\n : routeInfo.pushedByRoute;\n\n routeInfo.lastPathname = currentRouteInfo?.pathname || routeInfo.lastPathname;\n routeInfo.prevRouteLastPathname = currentRouteInfo?.lastPathname;\n routeInfo.pushedByRoute = pushedByRoute;\n routeInfo.routeDirection = currentRouteInfo?.routeDirection || routeInfo.routeDirection;\n routeInfo.routeAnimation = currentRouteInfo?.routeAnimation || routeInfo.routeAnimation;\n }\n\n this.locationHistory.add(routeInfo);\n }\n\n this.setState({\n routeInfo,\n });\n }\n\n this.incomingRouteParams = undefined;\n }\n\n /**\n * history@4.x uses goBack(), history@5.x uses back()\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just\n * assume back() is available.\n */\n handleNativeBack() {\n const history = this.props.history as any;\n const goBack = history.goBack || history.back;\n goBack();\n }\n\n handleNavigate(\n path: string,\n routeAction: RouteAction,\n routeDirection?: RouterDirection,\n routeAnimation?: AnimationBuilder,\n routeOptions?: any,\n tab?: string\n ) {\n this.incomingRouteParams = Object.assign(this.incomingRouteParams || {}, {\n routeAction,\n routeDirection,\n routeOptions,\n routeAnimation,\n tab,\n });\n\n if (routeAction === 'push') {\n this.props.history.push(path);\n } else {\n this.props.history.replace(path);\n }\n }\n\n handleNavigateBack(defaultHref: string | RouteInfo = '/', routeAnimation?: AnimationBuilder) {\n const config = getConfig();\n defaultHref = defaultHref ? defaultHref : config && config.get('backButtonDefaultHref' as any);\n const routeInfo = this.locationHistory.current();\n if (routeInfo && routeInfo.pushedByRoute) {\n const prevInfo = this.locationHistory.findLastLocation(routeInfo);\n if (prevInfo) {\n this.incomingRouteParams = {\n ...prevInfo,\n routeAction: 'pop',\n routeDirection: 'back',\n routeAnimation: routeAnimation || routeInfo.routeAnimation,\n };\n if (\n routeInfo.lastPathname === routeInfo.pushedByRoute ||\n /**\n * We need to exclude tab switches/tab\n * context changes here because tabbed\n * navigation is not linear, but router.back()\n * will go back in a linear fashion.\n */\n (prevInfo.pathname === routeInfo.pushedByRoute && routeInfo.tab === '' && prevInfo.tab === '')\n ) {\n /**\n * history@4.x uses goBack(), history@5.x uses back()\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just\n * assume back() is available.\n */\n const history = this.props.history as any;\n const goBack = history.goBack || history.back;\n goBack();\n } else {\n this.handleNavigate(prevInfo.pathname + (prevInfo.search || ''), 'pop', 'back', routeAnimation);\n }\n } else {\n this.handleNavigate(defaultHref as string, 'pop', 'back', routeAnimation);\n }\n } else {\n this.handleNavigate(defaultHref as string, 'pop', 'back', routeAnimation);\n }\n }\n\n handleResetTab(tab: string, originalHref: string, originalRouteOptions: any) {\n const routeInfo = this.locationHistory.getFirstRouteInfoForTab(tab);\n if (routeInfo) {\n const newRouteInfo = { ...routeInfo };\n newRouteInfo.pathname = originalHref;\n newRouteInfo.routeOptions = originalRouteOptions;\n this.incomingRouteParams = { ...newRouteInfo, routeAction: 'pop', routeDirection: 'back' };\n this.props.history.push(newRouteInfo.pathname + (newRouteInfo.search || ''));\n }\n }\n\n handleSetCurrentTab(tab: string) {\n this.currentTab = tab;\n const ri = { ...this.locationHistory.current() };\n if (ri.tab !== tab) {\n ri.tab = tab;\n this.locationHistory.update(ri);\n }\n }\n\n render() {\n return (\n <RouteManagerContext.Provider value={this.routeMangerContextState}>\n <NavManager\n ionRoute={IonRouteInner}\n ionRedirect={{}}\n stackManager={StackManager}\n routeInfo={this.state.routeInfo!}\n onNativeBack={this.handleNativeBack}\n onNavigateBack={this.handleNavigateBack}\n onNavigate={this.handleNavigate}\n onSetCurrentTab={this.handleSetCurrentTab}\n onChangeTab={this.handleChangeTab}\n onResetTab={this.handleResetTab}\n locationHistory={this.locationHistory}\n >\n {this.props.children}\n </NavManager>\n </RouteManagerContext.Provider>\n );\n }\n}\n\nexport const IonRouter = withRouter(IonRouterInner);\nIonRouter.displayName = 'IonRouter';\n","import type { Action as HistoryAction, History, Location as HistoryLocation } from 'history';\nimport { createBrowserHistory as createHistory } from 'history';\nimport React from 'react';\nimport type { BrowserRouterProps } from 'react-router-dom';\nimport { Router } from 'react-router-dom';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactRouterProps extends BrowserRouterProps {\n history?: History;\n}\n\nexport class IonReactRouter extends React.Component<IonReactRouterProps> {\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n history: History;\n\n constructor(props: IonReactRouterProps) {\n super(props);\n const { history, ...rest } = props;\n this.history = history || createHistory(rest);\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router history={this.history} {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n","import type { Action as HistoryAction, Location as HistoryLocation, MemoryHistory } from 'history';\nimport React from 'react';\nimport type { MemoryRouterProps } from 'react-router';\nimport { Router } from 'react-router';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactMemoryRouterProps extends MemoryRouterProps {\n history: MemoryHistory;\n}\n\nexport class IonReactMemoryRouter extends React.Component<IonReactMemoryRouterProps> {\n history: MemoryHistory;\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n\n constructor(props: IonReactMemoryRouterProps) {\n super(props);\n this.history = props.history;\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n","import type { Action as HistoryAction, History, Location as HistoryLocation } from 'history';\nimport { createHashHistory as createHistory } from 'history';\nimport React from 'react';\nimport type { BrowserRouterProps } from 'react-router-dom';\nimport { Router } from 'react-router-dom';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactHashRouterProps extends BrowserRouterProps {\n history?: History;\n}\n\nexport class IonReactHashRouter extends React.Component<IonReactHashRouterProps> {\n history: History;\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n\n constructor(props: IonReactHashRouterProps) {\n super(props);\n const { history, ...rest } = props;\n this.history = history || createHistory(rest);\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router history={this.history} {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n"],"names":["matchComponent","matchPath","createHistory","Router"],"mappings":";;;;;;;AAIa,MAAA,aAAc,SAAQ,KAAK,CAAC,aAA4B,CAAA;IACnE,MAAM,GAAA;AACJ,QAAA,QACE,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,MAAA,CAAA,MAAA,CAAA,EACJ,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAUpB,GAAE,IAAI,CAAC,KAAa,CAAC,aAAa,KAAK,SAAS;AACjD,cAAE;AACE,gBAAA,a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index.js","sources":["../src/ReactRouter/IonRouteInner.tsx","../src/ReactRouter/ReactRouterViewStack.tsx","../src/ReactRouter/clonePageElement.ts","../src/ReactRouter/StackManager.tsx","../src/ReactRouter/IonRouter.tsx","../src/ReactRouter/IonReactRouter.tsx","../src/ReactRouter/IonReactMemoryRouter.tsx","../src/ReactRouter/IonReactHashRouter.tsx"],"sourcesContent":["import type { IonRouteProps } from '@ionic/react';\nimport React from 'react';\nimport { Route } from 'react-router';\n\nexport class IonRouteInner extends React.PureComponent<IonRouteProps> {\n render() {\n return (\n <Route\n path={this.props.path}\n exact={this.props.exact}\n render={this.props.render}\n {\n /**\n * `computedMatch` is a private API in react-router v5 that\n * has been removed in v6.\n *\n * This needs to be removed when we support v6.\n *\n * TODO: FW-647\n */\n ...((this.props as any).computedMatch !== undefined\n ? {\n computedMatch: (this.props as any).computedMatch,\n }\n : {})\n }\n />\n );\n }\n}\n","import type { RouteInfo, ViewItem } from '@ionic/react';\nimport { IonRoute, ViewLifeCycleManager, ViewStacks, generateId } from '@ionic/react';\nimport React from 'react';\nimport { matchPath } from 'react-router';\n\nexport class ReactRouterViewStack extends ViewStacks {\n constructor() {\n super();\n this.createViewItem = this.createViewItem.bind(this);\n this.findViewItemByRouteInfo = this.findViewItemByRouteInfo.bind(this);\n this.findLeavingViewItemByRouteInfo = this.findLeavingViewItemByRouteInfo.bind(this);\n this.getChildrenToRender = this.getChildrenToRender.bind(this);\n this.findViewItemByPathname = this.findViewItemByPathname.bind(this);\n }\n\n createViewItem(outletId: string, reactElement: React.ReactElement, routeInfo: RouteInfo, page?: HTMLElement) {\n const viewItem: ViewItem = {\n id: generateId('viewItem'),\n outletId,\n ionPageElement: page,\n reactElement,\n mount: true,\n ionRoute: false,\n };\n\n const matchProps = {\n exact: reactElement.props.exact,\n path: reactElement.props.path || reactElement.props.from,\n component: reactElement.props.component,\n };\n\n const match = matchPath(routeInfo.pathname, matchProps);\n\n if (reactElement.type === IonRoute) {\n viewItem.ionRoute = true;\n viewItem.disableIonPageManagement = reactElement.props.disableIonPageManagement;\n }\n\n viewItem.routeData = {\n match,\n childProps: reactElement.props,\n };\n\n return viewItem;\n }\n\n getChildrenToRender(outletId: string, ionRouterOutlet: React.ReactElement, routeInfo: RouteInfo) {\n const viewItems = this.getViewItemsForOutlet(outletId);\n\n // Sync latest routes with viewItems\n React.Children.forEach(ionRouterOutlet.props.children, (child: React.ReactElement) => {\n const viewItem = viewItems.find((v) => {\n return matchComponent(child, v.routeData.childProps.path || v.routeData.childProps.from);\n });\n if (viewItem) {\n viewItem.reactElement = child;\n }\n });\n\n const children = viewItems.map((viewItem) => {\n let clonedChild;\n if (viewItem.ionRoute && !viewItem.disableIonPageManagement) {\n clonedChild = (\n <ViewLifeCycleManager\n key={`view-${viewItem.id}`}\n mount={viewItem.mount}\n removeView={() => this.remove(viewItem)}\n >\n {React.cloneElement(viewItem.reactElement, {\n computedMatch: viewItem.routeData.match,\n })}\n </ViewLifeCycleManager>\n );\n } else {\n const match = matchComponent(viewItem.reactElement, routeInfo.pathname);\n clonedChild = (\n <ViewLifeCycleManager\n key={`view-${viewItem.id}`}\n mount={viewItem.mount}\n removeView={() => this.remove(viewItem)}\n >\n {React.cloneElement(viewItem.reactElement, {\n computedMatch: viewItem.routeData.match,\n })}\n </ViewLifeCycleManager>\n );\n\n if (!match && viewItem.routeData.match) {\n viewItem.routeData.match = undefined;\n viewItem.mount = false;\n }\n }\n\n return clonedChild;\n });\n return children;\n }\n\n findViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string, updateMatch?: boolean) {\n const { viewItem, match } = this.findViewItemByPath(routeInfo.pathname, outletId);\n const shouldUpdateMatch = updateMatch === undefined || updateMatch === true;\n if (shouldUpdateMatch && viewItem && match) {\n viewItem.routeData.match = match;\n }\n return viewItem;\n }\n\n findLeavingViewItemByRouteInfo(routeInfo: RouteInfo, outletId?: string, mustBeIonRoute = true) {\n const { viewItem } = this.findViewItemByPath(routeInfo.lastPathname!, outletId, false, mustBeIonRoute);\n return viewItem;\n }\n\n findViewItemByPathname(pathname: string, outletId?: string) {\n const { viewItem } = this.findViewItemByPath(pathname, outletId);\n return viewItem;\n }\n\n private findViewItemByPath(pathname: string, outletId?: string, forceExact?: boolean, mustBeIonRoute?: boolean) {\n let viewItem: ViewItem | undefined;\n let match: ReturnType<typeof matchPath> | undefined;\n let viewStack: ViewItem[];\n\n if (outletId) {\n viewStack = this.getViewItemsForOutlet(outletId);\n viewStack.some(matchView);\n if (!viewItem) {\n viewStack.some(matchDefaultRoute);\n }\n } else {\n const viewItems = this.getAllViewItems();\n viewItems.some(matchView);\n if (!viewItem) {\n viewItems.some(matchDefaultRoute);\n }\n }\n\n return { viewItem, match };\n\n function matchView(v: ViewItem) {\n if (mustBeIonRoute && !v.ionRoute) {\n return false;\n }\n const matchProps = {\n exact: forceExact ? true : v.routeData.childProps.exact,\n path: v.routeData.childProps.path || v.routeData.childProps.from,\n component: v.routeData.childProps.component,\n };\n const myMatch = matchPath(pathname, matchProps);\n if (myMatch) {\n viewItem = v;\n match = myMatch;\n return true;\n }\n return false;\n }\n\n function matchDefaultRoute(v: ViewItem) {\n // try to find a route that doesn't have a path or from prop, that will be our default route\n if (!v.routeData.childProps.path && !v.routeData.childProps.from) {\n match = {\n path: pathname,\n url: pathname,\n isExact: true,\n params: {},\n };\n viewItem = v;\n return true;\n }\n return false;\n }\n }\n}\n\nfunction matchComponent(node: React.ReactElement, pathname: string, forceExact?: boolean) {\n const matchProps = {\n exact: forceExact ? true : node.props.exact,\n path: node.props.path || node.props.from,\n component: node.props.component,\n };\n const match = matchPath(pathname, matchProps);\n\n return match;\n}\n","export function clonePageElement(leavingViewHtml: string | HTMLElement) {\n let html: string;\n if (typeof leavingViewHtml === 'string') {\n html = leavingViewHtml;\n } else {\n html = leavingViewHtml.outerHTML;\n }\n if (document) {\n const newEl = document.createElement('div');\n newEl.innerHTML = html;\n newEl.style.zIndex = '';\n // Remove an existing back button so the new element doesn't get two of them\n const ionBackButton = newEl.getElementsByTagName('ion-back-button');\n if (ionBackButton[0]) {\n ionBackButton[0].remove();\n }\n return newEl.firstChild as HTMLElement;\n }\n return undefined;\n}\n","import type { RouteInfo, StackContextState, ViewItem } from '@ionic/react';\nimport { RouteManagerContext, StackContext, generateId, getConfig } from '@ionic/react';\nimport React from 'react';\nimport { matchPath } from 'react-router-dom';\n\nimport { clonePageElement } from './clonePageElement';\n\n// TODO(FW-2959): types\n\ninterface StackManagerProps {\n routeInfo: RouteInfo;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface StackManagerState {}\n\nconst isViewVisible = (el: HTMLElement) =>\n !el.classList.contains('ion-page-invisible') && !el.classList.contains('ion-page-hidden');\n\nexport class StackManager extends React.PureComponent<StackManagerProps, StackManagerState> {\n id: string;\n context!: React.ContextType<typeof RouteManagerContext>;\n ionRouterOutlet?: React.ReactElement;\n routerOutletElement: HTMLIonRouterOutletElement | undefined;\n prevProps?: StackManagerProps;\n skipTransition: boolean;\n\n stackContextValue: StackContextState = {\n registerIonPage: this.registerIonPage.bind(this),\n isInOutlet: () => true,\n };\n\n private clearOutletTimeout: any;\n private pendingPageTransition = false;\n\n constructor(props: StackManagerProps) {\n super(props);\n this.registerIonPage = this.registerIonPage.bind(this);\n this.transitionPage = this.transitionPage.bind(this);\n this.handlePageTransition = this.handlePageTransition.bind(this);\n this.id = generateId('routerOutlet');\n this.prevProps = undefined;\n this.skipTransition = false;\n }\n\n componentDidMount() {\n if (this.clearOutletTimeout) {\n /**\n * The clearOutlet integration with React Router is a bit hacky.\n * It uses a timeout to clear the outlet after a transition.\n * In React v18, components are mounted and unmounted in development mode\n * to check for side effects.\n *\n * This clearTimeout prevents the outlet from being cleared when the component is re-mounted,\n * which should only happen in development mode and as a result of a hot reload.\n */\n clearTimeout(this.clearOutletTimeout);\n }\n if (this.routerOutletElement) {\n this.setupRouterOutlet(this.routerOutletElement);\n this.handlePageTransition(this.props.routeInfo);\n }\n }\n\n componentDidUpdate(prevProps: StackManagerProps) {\n const { pathname } = this.props.routeInfo;\n const { pathname: prevPathname } = prevProps.routeInfo;\n\n if (pathname !== prevPathname) {\n this.prevProps = prevProps;\n this.handlePageTransition(this.props.routeInfo);\n } else if (this.pendingPageTransition) {\n this.handlePageTransition(this.props.routeInfo);\n this.pendingPageTransition = false;\n }\n }\n\n componentWillUnmount() {\n this.clearOutletTimeout = this.context.clearOutlet(this.id);\n }\n\n async handlePageTransition(routeInfo: RouteInfo) {\n if (!this.routerOutletElement || !this.routerOutletElement.commit) {\n /**\n * The route outlet has not mounted yet. We need to wait for it to render\n * before we can transition the page.\n *\n * Set a flag to indicate that we should transition the page after\n * the component has updated.\n */\n this.pendingPageTransition = true;\n } else {\n let enteringViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id);\n let leavingViewItem = this.context.findLeavingViewItemByRouteInfo(routeInfo, this.id);\n\n if (!leavingViewItem && routeInfo.prevRouteLastPathname) {\n leavingViewItem = this.context.findViewItemByPathname(routeInfo.prevRouteLastPathname, this.id);\n }\n\n // Check if leavingViewItem should be unmounted\n if (leavingViewItem) {\n if (routeInfo.routeAction === 'replace') {\n leavingViewItem.mount = false;\n } else if (!(routeInfo.routeAction === 'push' && routeInfo.routeDirection === 'forward')) {\n if (routeInfo.routeDirection !== 'none' && enteringViewItem !== leavingViewItem) {\n leavingViewItem.mount = false;\n }\n } else if (routeInfo.routeOptions?.unmount) {\n leavingViewItem.mount = false;\n }\n }\n\n const enteringRoute = matchRoute(this.ionRouterOutlet?.props.children, routeInfo) as React.ReactElement;\n\n if (enteringViewItem) {\n enteringViewItem.reactElement = enteringRoute;\n } else if (enteringRoute) {\n enteringViewItem = this.context.createViewItem(this.id, enteringRoute, routeInfo);\n this.context.addViewItem(enteringViewItem);\n }\n\n if (enteringViewItem && enteringViewItem.ionPageElement) {\n /**\n * If the entering view item is the same as the leaving view item,\n * then we don't need to transition.\n */\n if (enteringViewItem === leavingViewItem) {\n /**\n * If the entering view item is the same as the leaving view item,\n * we are either transitioning using parameterized routes to the same view\n * or a parent router outlet is re-rendering as a result of React props changing.\n *\n * If the route data does not match the current path, the parent router outlet\n * is attempting to transition and we cancel the operation.\n */\n if (enteringViewItem.routeData.match.url !== routeInfo.pathname) {\n return;\n }\n }\n\n /**\n * If there isn't a leaving view item, but the route info indicates\n * that the user has routed from a previous path, then we need\n * to find the leaving view item to transition between.\n */\n if (!leavingViewItem && this.props.routeInfo.prevRouteLastPathname) {\n leavingViewItem = this.context.findViewItemByPathname(this.props.routeInfo.prevRouteLastPathname, this.id);\n }\n\n /**\n * If the entering view is already visible and the leaving view is not, the transition does not need to occur.\n */\n if (\n isViewVisible(enteringViewItem.ionPageElement) &&\n leavingViewItem !== undefined &&\n !isViewVisible(leavingViewItem.ionPageElement!)\n ) {\n return;\n }\n\n /**\n * The view should only be transitioned in the following cases:\n * 1. Performing a replace or pop action, such as a swipe to go back gesture\n * to animation the leaving view off the screen.\n *\n * 2. Navigating between top-level router outlets, such as /page-1 to /page-2;\n * or navigating within a nested outlet, such as /tabs/tab-1 to /tabs/tab-2.\n *\n * 3. The entering view is an ion-router-outlet containing a page\n * matching the current route and that hasn't already transitioned in.\n *\n * This should only happen when navigating directly to a nested router outlet\n * route or on an initial page load (i.e. refreshing). In cases when loading\n * /tabs/tab-1, we need to transition the /tabs page element into the view.\n */\n this.transitionPage(routeInfo, enteringViewItem, leavingViewItem);\n } else if (leavingViewItem && !enteringRoute && !enteringViewItem) {\n // If we have a leavingView but no entering view/route, we are probably leaving to\n // another outlet, so hide this leavingView. We do it in a timeout to give time for a\n // transition to finish.\n // setTimeout(() => {\n if (leavingViewItem.ionPageElement) {\n leavingViewItem.ionPageElement.classList.add('ion-page-hidden');\n leavingViewItem.ionPageElement.setAttribute('aria-hidden', 'true');\n }\n // }, 250);\n }\n\n this.forceUpdate();\n }\n }\n\n registerIonPage(page: HTMLElement, routeInfo: RouteInfo) {\n const foundView = this.context.findViewItemByRouteInfo(routeInfo, this.id);\n if (foundView) {\n const oldPageElement = foundView.ionPageElement;\n foundView.ionPageElement = page;\n foundView.ionRoute = true;\n\n /**\n * React 18 will unmount and remount IonPage\n * elements in development mode when using createRoot.\n * This can cause duplicate page transitions to occur.\n */\n if (oldPageElement === page) {\n return;\n }\n }\n this.handlePageTransition(routeInfo);\n }\n\n async setupRouterOutlet(routerOutlet: HTMLIonRouterOutletElement) {\n const canStart = () => {\n const config = getConfig();\n const swipeEnabled = config && config.get('swipeBackEnabled', routerOutlet.mode === 'ios');\n if (!swipeEnabled) {\n return false;\n }\n\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n\n return (\n !!enteringViewItem &&\n /**\n * The root url '/' is treated as\n * the first view item (but is never mounted),\n * so we do not want to swipe back to the\n * root url.\n */\n enteringViewItem.mount &&\n /**\n * When on the first page (whatever view\n * you land on after the root url) it\n * is possible for findViewItemByRouteInfo to\n * return the exact same view you are currently on.\n * Make sure that we are not swiping back to the same\n * instances of a view.\n */\n enteringViewItem.routeData.match.path !== routeInfo.pathname\n );\n };\n\n const onStart = async () => {\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n const leavingViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id, false);\n\n /**\n * When the gesture starts, kick off\n * a transition that is controlled\n * via a swipe gesture.\n */\n if (enteringViewItem && leavingViewItem) {\n await this.transitionPage(routeInfo, enteringViewItem, leavingViewItem, 'back', true);\n }\n\n return Promise.resolve();\n };\n const onEnd = (shouldContinue: boolean) => {\n if (shouldContinue) {\n this.skipTransition = true;\n\n this.context.goBack();\n } else {\n /**\n * In the event that the swipe\n * gesture was aborted, we should\n * re-hide the page that was going to enter.\n */\n const { routeInfo } = this.props;\n\n const propsToUse =\n this.prevProps && this.prevProps.routeInfo.pathname === routeInfo.pushedByRoute\n ? this.prevProps.routeInfo\n : ({ pathname: routeInfo.pushedByRoute || '' } as any);\n const enteringViewItem = this.context.findViewItemByRouteInfo(propsToUse, this.id, false);\n const leavingViewItem = this.context.findViewItemByRouteInfo(routeInfo, this.id, false);\n\n /**\n * Ionic React has a design defect where it\n * a) Unmounts the leaving view item when using parameterized routes\n * b) Considers the current view to be the entering view when using\n * parameterized routes\n *\n * As a result, we should not hide the view item here\n * as it will cause the current view to be hidden.\n */\n if (enteringViewItem !== leavingViewItem && enteringViewItem?.ionPageElement !== undefined) {\n const { ionPageElement } = enteringViewItem;\n ionPageElement.setAttribute('aria-hidden', 'true');\n ionPageElement.classList.add('ion-page-hidden');\n }\n }\n };\n\n routerOutlet.swipeHandler = {\n canStart,\n onStart,\n onEnd,\n };\n }\n\n async transitionPage(\n routeInfo: RouteInfo,\n enteringViewItem: ViewItem,\n leavingViewItem?: ViewItem,\n direction?: 'forward' | 'back',\n progressAnimation = false\n ) {\n const runCommit = async (enteringEl: HTMLElement, leavingEl?: HTMLElement) => {\n const skipTransition = this.skipTransition;\n\n /**\n * If the transition was handled\n * via the swipe to go back gesture,\n * then we do not want to perform\n * another transition.\n *\n * We skip adding ion-page or ion-page-invisible\n * because the entering view already exists in the DOM.\n * If we added the classes, there would be a flicker where\n * the view would be briefly hidden.\n */\n if (skipTransition) {\n /**\n * We need to reset skipTransition before\n * we call routerOutlet.commit otherwise\n * the transition triggered by the swipe\n * to go back gesture would reset it. In\n * that case you would see a duplicate\n * transition triggered by handlePageTransition\n * in componentDidUpdate.\n */\n this.skipTransition = false;\n } else {\n enteringEl.classList.add('ion-page');\n enteringEl.classList.add('ion-page-invisible');\n }\n\n await routerOutlet.commit(enteringEl, leavingEl, {\n duration: skipTransition || directionToUse === undefined ? 0 : undefined,\n direction: directionToUse,\n showGoBack: !!routeInfo.pushedByRoute,\n progressAnimation,\n animationBuilder: routeInfo.routeAnimation,\n });\n };\n\n const routerOutlet = this.routerOutletElement!;\n\n const routeInfoFallbackDirection =\n routeInfo.routeDirection === 'none' || routeInfo.routeDirection === 'root' ? undefined : routeInfo.routeDirection;\n const directionToUse = direction ?? routeInfoFallbackDirection;\n\n if (enteringViewItem && enteringViewItem.ionPageElement && this.routerOutletElement) {\n if (leavingViewItem && leavingViewItem.ionPageElement && enteringViewItem === leavingViewItem) {\n // If a page is transitioning to another version of itself\n // we clone it so we can have an animation to show\n\n const match = matchComponent(leavingViewItem.reactElement, routeInfo.pathname, true);\n if (match) {\n const newLeavingElement = clonePageElement(leavingViewItem.ionPageElement.outerHTML);\n if (newLeavingElement) {\n this.routerOutletElement.appendChild(newLeavingElement);\n await runCommit(enteringViewItem.ionPageElement, newLeavingElement);\n this.routerOutletElement.removeChild(newLeavingElement);\n }\n } else {\n await runCommit(enteringViewItem.ionPageElement, undefined);\n }\n } else {\n await runCommit(enteringViewItem.ionPageElement, leavingViewItem?.ionPageElement);\n if (leavingViewItem && leavingViewItem.ionPageElement && !progressAnimation) {\n leavingViewItem.ionPageElement.classList.add('ion-page-hidden');\n leavingViewItem.ionPageElement.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n\n render() {\n const { children } = this.props;\n const ionRouterOutlet = React.Children.only(children) as React.ReactElement;\n this.ionRouterOutlet = ionRouterOutlet;\n\n const components = this.context.getChildrenToRender(this.id, this.ionRouterOutlet, this.props.routeInfo, () => {\n this.forceUpdate();\n });\n\n return (\n <StackContext.Provider value={this.stackContextValue}>\n {React.cloneElement(\n ionRouterOutlet as any,\n {\n ref: (node: HTMLIonRouterOutletElement) => {\n if (ionRouterOutlet.props.setRef) {\n ionRouterOutlet.props.setRef(node);\n }\n if (ionRouterOutlet.props.forwardedRef) {\n ionRouterOutlet.props.forwardedRef.current = node;\n }\n this.routerOutletElement = node;\n const { ref } = ionRouterOutlet as any;\n if (typeof ref === 'function') {\n ref(node);\n }\n },\n },\n components\n )}\n </StackContext.Provider>\n );\n }\n\n static get contextType() {\n return RouteManagerContext;\n }\n}\n\nexport default StackManager;\n\nfunction matchRoute(node: React.ReactNode, routeInfo: RouteInfo) {\n let matchedNode: React.ReactNode;\n React.Children.forEach(node as React.ReactElement, (child: React.ReactElement) => {\n const matchProps = {\n exact: child.props.exact,\n path: child.props.path || child.props.from,\n component: child.props.component,\n };\n const match = matchPath(routeInfo.pathname, matchProps);\n if (match) {\n matchedNode = child;\n }\n });\n\n if (matchedNode) {\n return matchedNode;\n }\n // If we haven't found a node\n // try to find one that doesn't have a path or from prop, that will be our not found route\n React.Children.forEach(node as React.ReactElement, (child: React.ReactElement) => {\n if (!(child.props.path || child.props.from)) {\n matchedNode = child;\n }\n });\n\n return matchedNode;\n}\n\nfunction matchComponent(node: React.ReactElement, pathname: string, forceExact?: boolean) {\n const matchProps = {\n exact: forceExact ? true : node.props.exact,\n path: node.props.path || node.props.from,\n component: node.props.component,\n };\n const match = matchPath(pathname, matchProps);\n\n return match;\n}\n","import type {\n AnimationBuilder,\n RouteAction,\n RouteInfo,\n RouteManagerContextState,\n RouterDirection,\n ViewItem,\n} from '@ionic/react';\nimport { LocationHistory, NavManager, RouteManagerContext, generateId, getConfig } from '@ionic/react';\nimport type { Action as HistoryAction, Location as HistoryLocation } from 'history';\nimport React from 'react';\nimport type { RouteComponentProps } from 'react-router-dom';\nimport { withRouter } from 'react-router-dom';\n\nimport { IonRouteInner } from './IonRouteInner';\nimport { ReactRouterViewStack } from './ReactRouterViewStack';\nimport StackManager from './StackManager';\n\nexport interface LocationState {\n direction?: RouterDirection;\n routerOptions?: { as?: string; unmount?: boolean };\n}\n\ninterface IonRouteProps extends RouteComponentProps<{}, {}, LocationState> {\n registerHistoryListener: (cb: (location: HistoryLocation<any>, action: HistoryAction) => void) => void;\n}\n\ninterface IonRouteState {\n routeInfo: RouteInfo;\n}\n\nclass IonRouterInner extends React.PureComponent<IonRouteProps, IonRouteState> {\n currentTab?: string;\n exitViewFromOtherOutletHandlers: ((pathname: string) => ViewItem | undefined)[] = [];\n incomingRouteParams?: Partial<RouteInfo>;\n locationHistory = new LocationHistory();\n viewStack = new ReactRouterViewStack();\n routeMangerContextState: RouteManagerContextState = {\n canGoBack: () => this.locationHistory.canGoBack(),\n clearOutlet: this.viewStack.clear,\n findViewItemByPathname: this.viewStack.findViewItemByPathname,\n getChildrenToRender: this.viewStack.getChildrenToRender,\n goBack: () => this.handleNavigateBack(),\n createViewItem: this.viewStack.createViewItem,\n findViewItemByRouteInfo: this.viewStack.findViewItemByRouteInfo,\n findLeavingViewItemByRouteInfo: this.viewStack.findLeavingViewItemByRouteInfo,\n addViewItem: this.viewStack.add,\n unMountViewItem: this.viewStack.remove,\n };\n\n constructor(props: IonRouteProps) {\n super(props);\n\n const routeInfo = {\n id: generateId('routeInfo'),\n pathname: this.props.location.pathname,\n search: this.props.location.search,\n };\n\n this.locationHistory.add(routeInfo);\n this.handleChangeTab = this.handleChangeTab.bind(this);\n this.handleResetTab = this.handleResetTab.bind(this);\n this.handleNativeBack = this.handleNativeBack.bind(this);\n this.handleNavigate = this.handleNavigate.bind(this);\n this.handleNavigateBack = this.handleNavigateBack.bind(this);\n this.props.registerHistoryListener(this.handleHistoryChange.bind(this));\n this.handleSetCurrentTab = this.handleSetCurrentTab.bind(this);\n\n this.state = {\n routeInfo,\n };\n }\n\n handleChangeTab(tab: string, path?: string, routeOptions?: any) {\n if (!path) {\n return;\n }\n\n const routeInfo = this.locationHistory.getCurrentRouteInfoForTab(tab);\n const [pathname, search] = path.split('?');\n if (routeInfo) {\n this.incomingRouteParams = { ...routeInfo, routeAction: 'push', routeDirection: 'none' };\n if (routeInfo.pathname === pathname) {\n this.incomingRouteParams.routeOptions = routeOptions;\n this.props.history.push(routeInfo.pathname + (routeInfo.search || ''));\n } else {\n this.incomingRouteParams.pathname = pathname;\n this.incomingRouteParams.search = search ? '?' + search : undefined;\n this.incomingRouteParams.routeOptions = routeOptions;\n this.props.history.push(pathname + (search ? '?' + search : ''));\n }\n } else {\n this.handleNavigate(pathname, 'push', 'none', undefined, routeOptions, tab);\n }\n }\n\n handleHistoryChange(location: HistoryLocation<LocationState>, action: HistoryAction) {\n let leavingLocationInfo: RouteInfo;\n if (this.incomingRouteParams) {\n if (this.incomingRouteParams.routeAction === 'replace') {\n leavingLocationInfo = this.locationHistory.previous();\n } else {\n leavingLocationInfo = this.locationHistory.current();\n }\n } else {\n leavingLocationInfo = this.locationHistory.current();\n }\n\n const leavingUrl = leavingLocationInfo.pathname + leavingLocationInfo.search;\n if (leavingUrl !== location.pathname) {\n if (!this.incomingRouteParams) {\n if (action === 'REPLACE') {\n this.incomingRouteParams = {\n routeAction: 'replace',\n routeDirection: 'none',\n tab: this.currentTab,\n };\n }\n if (action === 'POP') {\n const currentRoute = this.locationHistory.current();\n if (currentRoute && currentRoute.pushedByRoute) {\n const prevInfo = this.locationHistory.findLastLocation(currentRoute);\n this.incomingRouteParams = { ...prevInfo, routeAction: 'pop', routeDirection: 'back' };\n } else {\n this.incomingRouteParams = {\n routeAction: 'pop',\n routeDirection: 'none',\n tab: this.currentTab,\n };\n }\n }\n if (!this.incomingRouteParams) {\n this.incomingRouteParams = {\n routeAction: 'push',\n routeDirection: location.state?.direction || 'forward',\n routeOptions: location.state?.routerOptions,\n tab: this.currentTab,\n };\n }\n }\n\n let routeInfo: RouteInfo;\n\n if (this.incomingRouteParams?.id) {\n routeInfo = {\n ...(this.incomingRouteParams as RouteInfo),\n lastPathname: leavingLocationInfo.pathname,\n };\n this.locationHistory.add(routeInfo);\n } else {\n const isPushed =\n this.incomingRouteParams.routeAction === 'push' && this.incomingRouteParams.routeDirection === 'forward';\n routeInfo = {\n id: generateId('routeInfo'),\n ...this.incomingRouteParams,\n lastPathname: leavingLocationInfo.pathname,\n pathname: location.pathname,\n search: location.search,\n params: this.props.match.params,\n prevRouteLastPathname: leavingLocationInfo.lastPathname,\n };\n if (isPushed) {\n routeInfo.tab = leavingLocationInfo.tab;\n routeInfo.pushedByRoute = leavingLocationInfo.pathname;\n } else if (routeInfo.routeAction === 'pop') {\n const r = this.locationHistory.findLastLocation(routeInfo);\n routeInfo.pushedByRoute = r?.pushedByRoute;\n } else if (routeInfo.routeAction === 'push' && routeInfo.tab !== leavingLocationInfo.tab) {\n // If we are switching tabs grab the last route info for the tab and use its pushedByRoute\n const lastRoute = this.locationHistory.getCurrentRouteInfoForTab(routeInfo.tab);\n routeInfo.pushedByRoute = lastRoute?.pushedByRoute;\n } else if (routeInfo.routeAction === 'replace') {\n // Make sure to set the lastPathname, etc.. to the current route so the page transitions out\n const currentRouteInfo = this.locationHistory.current();\n\n /**\n * If going from /home to /child, then replacing from\n * /child to /home, we don't want the route info to\n * say that /home was pushed by /home which is not correct.\n */\n const currentPushedBy = currentRouteInfo?.pushedByRoute;\n const pushedByRoute =\n currentPushedBy !== undefined && currentPushedBy !== routeInfo.pathname\n ? currentPushedBy\n : routeInfo.pushedByRoute;\n\n routeInfo.lastPathname = currentRouteInfo?.pathname || routeInfo.lastPathname;\n routeInfo.prevRouteLastPathname = currentRouteInfo?.lastPathname;\n routeInfo.pushedByRoute = pushedByRoute;\n routeInfo.routeDirection = currentRouteInfo?.routeDirection || routeInfo.routeDirection;\n routeInfo.routeAnimation = currentRouteInfo?.routeAnimation || routeInfo.routeAnimation;\n }\n\n this.locationHistory.add(routeInfo);\n }\n\n this.setState({\n routeInfo,\n });\n }\n\n this.incomingRouteParams = undefined;\n }\n\n /**\n * history@4.x uses goBack(), history@5.x uses back()\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just\n * assume back() is available.\n */\n handleNativeBack() {\n const history = this.props.history as any;\n const goBack = history.goBack || history.back;\n goBack();\n }\n\n handleNavigate(\n path: string,\n routeAction: RouteAction,\n routeDirection?: RouterDirection,\n routeAnimation?: AnimationBuilder,\n routeOptions?: any,\n tab?: string\n ) {\n this.incomingRouteParams = Object.assign(this.incomingRouteParams || {}, {\n routeAction,\n routeDirection,\n routeOptions,\n routeAnimation,\n tab,\n });\n\n if (routeAction === 'push') {\n this.props.history.push(path);\n } else {\n this.props.history.replace(path);\n }\n }\n\n handleNavigateBack(defaultHref: string | RouteInfo = '/', routeAnimation?: AnimationBuilder) {\n const config = getConfig();\n defaultHref = defaultHref ? defaultHref : config && config.get('backButtonDefaultHref' as any);\n const routeInfo = this.locationHistory.current();\n if (routeInfo && routeInfo.pushedByRoute) {\n const prevInfo = this.locationHistory.findLastLocation(routeInfo);\n if (prevInfo) {\n this.incomingRouteParams = {\n ...prevInfo,\n routeAction: 'pop',\n routeDirection: 'back',\n routeAnimation: routeAnimation || routeInfo.routeAnimation,\n };\n if (\n routeInfo.lastPathname === routeInfo.pushedByRoute ||\n /**\n * We need to exclude tab switches/tab\n * context changes here because tabbed\n * navigation is not linear, but router.back()\n * will go back in a linear fashion.\n */\n (prevInfo.pathname === routeInfo.pushedByRoute && routeInfo.tab === '' && prevInfo.tab === '')\n ) {\n /**\n * history@4.x uses goBack(), history@5.x uses back()\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just\n * assume back() is available.\n */\n const history = this.props.history as any;\n const goBack = history.goBack || history.back;\n goBack();\n } else {\n this.handleNavigate(prevInfo.pathname + (prevInfo.search || ''), 'pop', 'back', routeAnimation);\n }\n } else {\n this.handleNavigate(defaultHref as string, 'pop', 'back', routeAnimation);\n }\n } else {\n this.handleNavigate(defaultHref as string, 'pop', 'back', routeAnimation);\n }\n }\n\n handleResetTab(tab: string, originalHref: string, originalRouteOptions: any) {\n const routeInfo = this.locationHistory.getFirstRouteInfoForTab(tab);\n if (routeInfo) {\n const newRouteInfo = { ...routeInfo };\n newRouteInfo.pathname = originalHref;\n newRouteInfo.routeOptions = originalRouteOptions;\n this.incomingRouteParams = { ...newRouteInfo, routeAction: 'pop', routeDirection: 'back' };\n this.props.history.push(newRouteInfo.pathname + (newRouteInfo.search || ''));\n }\n }\n\n handleSetCurrentTab(tab: string) {\n this.currentTab = tab;\n const ri = { ...this.locationHistory.current() };\n if (ri.tab !== tab) {\n ri.tab = tab;\n this.locationHistory.update(ri);\n }\n }\n\n render() {\n return (\n <RouteManagerContext.Provider value={this.routeMangerContextState}>\n <NavManager\n ionRoute={IonRouteInner}\n ionRedirect={{}}\n stackManager={StackManager}\n routeInfo={this.state.routeInfo!}\n onNativeBack={this.handleNativeBack}\n onNavigateBack={this.handleNavigateBack}\n onNavigate={this.handleNavigate}\n onSetCurrentTab={this.handleSetCurrentTab}\n onChangeTab={this.handleChangeTab}\n onResetTab={this.handleResetTab}\n locationHistory={this.locationHistory}\n >\n {this.props.children}\n </NavManager>\n </RouteManagerContext.Provider>\n );\n }\n}\n\nexport const IonRouter = withRouter(IonRouterInner);\nIonRouter.displayName = 'IonRouter';\n","import type { Action as HistoryAction, History, Location as HistoryLocation } from 'history';\nimport { createBrowserHistory as createHistory } from 'history';\nimport React from 'react';\nimport type { BrowserRouterProps } from 'react-router-dom';\nimport { Router } from 'react-router-dom';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactRouterProps extends BrowserRouterProps {\n history?: History;\n}\n\nexport class IonReactRouter extends React.Component<IonReactRouterProps> {\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n history: History;\n\n constructor(props: IonReactRouterProps) {\n super(props);\n const { history, ...rest } = props;\n this.history = history || createHistory(rest);\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router history={this.history} {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n","import type { Action as HistoryAction, Location as HistoryLocation, MemoryHistory } from 'history';\nimport React from 'react';\nimport type { MemoryRouterProps } from 'react-router';\nimport { Router } from 'react-router';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactMemoryRouterProps extends MemoryRouterProps {\n history: MemoryHistory;\n}\n\nexport class IonReactMemoryRouter extends React.Component<IonReactMemoryRouterProps> {\n history: MemoryHistory;\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n\n constructor(props: IonReactMemoryRouterProps) {\n super(props);\n this.history = props.history;\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n","import type { Action as HistoryAction, History, Location as HistoryLocation } from 'history';\nimport { createHashHistory as createHistory } from 'history';\nimport React from 'react';\nimport type { BrowserRouterProps } from 'react-router-dom';\nimport { Router } from 'react-router-dom';\n\nimport { IonRouter } from './IonRouter';\n\ninterface IonReactHashRouterProps extends BrowserRouterProps {\n history?: History;\n}\n\nexport class IonReactHashRouter extends React.Component<IonReactHashRouterProps> {\n history: History;\n historyListenHandler?: (location: HistoryLocation, action: HistoryAction) => void;\n\n constructor(props: IonReactHashRouterProps) {\n super(props);\n const { history, ...rest } = props;\n this.history = history || createHistory(rest);\n this.history.listen(this.handleHistoryChange.bind(this));\n this.registerHistoryListener = this.registerHistoryListener.bind(this);\n }\n\n /**\n * history@4.x passes separate location and action\n * params. history@5.x passes location and action\n * together as a single object.\n * TODO: If support for React Router <=5 is dropped\n * this logic is no longer needed. We can just assume\n * a single object with both location and action.\n */\n handleHistoryChange(location: HistoryLocation, action: HistoryAction) {\n const locationValue = (location as any).location || location;\n const actionValue = (location as any).action || action;\n if (this.historyListenHandler) {\n this.historyListenHandler(locationValue, actionValue);\n }\n }\n\n registerHistoryListener(cb: (location: HistoryLocation, action: HistoryAction) => void) {\n this.historyListenHandler = cb;\n }\n\n render() {\n const { children, ...props } = this.props;\n return (\n <Router history={this.history} {...props}>\n <IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>\n </Router>\n );\n }\n}\n"],"names":["matchComponent","matchPath","createHistory","Router"],"mappings":";;;;;;;MAIa,aAAc,SAAQ,KAAK,CAAC,aAA4B;IACnE,MAAM;QACJ,QACE,oBAAC,KAAK,kBACJ,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,KAUlB,IAAI,CAAC,KAAa,CAAC,aAAa,KAAK,SAAS;cAC/C;gBACE,aAAa,EAAG,IAAI,CAAC,KAAa,CAAC,aAAa;aACjD;cACD,EAAE,GAER,EACF;KACH;;;MCvBU,oBAAqB,SAAQ,UAAU;IAClD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAA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,EAAE,MAAqB;QAClE,MAAM,aAAa,GAAI,QAAgB,CAAC,QAAQ,IAAI,QAAQ,CAAC;QAC7D,MAAM,WAAW,GAAI,QAAgB,CAAC,MAAM,IAAI,MAAM,CAAC;QACvD,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC7B,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;SACvD;KACF;IAED,uBAAuB,CAAC,EAA8D;QACpF,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;KAChC;IAED,MAAM;QACJ,MAAM,KAAyB,IAAI,CAAC,KAAK,EAAnC,EAAE,QAAQ,OAAyB,EAApB,KAAK,cAApB,YAAsB,CAAa,CAAC;QAC1C,QACE,oBAAC,MAAM,kBAAC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAM,KAAK;YACtC,oBAAC,SAAS,IAAC,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,IAAG,QAAQ,CAAa,CACjF,EACT;KACH;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/react-router",
3
- "version": "7.5.4-dev.11699300051.122a36ad",
3
+ "version": "7.5.4-dev.11699310489.151b2717",
4
4
  "description": "React Router wrapper for @ionic/react",
5
5
  "keywords": [
6
6
  "ionic",
@@ -35,7 +35,7 @@
35
35
  "dist/"
36
36
  ],
37
37
  "dependencies": {
38
- "@ionic/react": "7.5.4-dev.11699300051.122a36ad",
38
+ "@ionic/react": "7.5.4-dev.11699310489.151b2717",
39
39
  "tslib": "*"
40
40
  },
41
41
  "peerDependencies": {
@@ -47,6 +47,7 @@
47
47
  "devDependencies": {
48
48
  "@ionic/eslint-config": "^0.3.0",
49
49
  "@ionic/prettier-config": "^2.0.0",
50
+ "@rollup/plugin-node-resolve": "^8.1.0",
50
51
  "@rollup/plugin-typescript": "^11.1.5",
51
52
  "@types/node": "^14.0.14",
52
53
  "@types/react": "16.14.0",
@@ -62,7 +63,8 @@
62
63
  "react-router": "^5.0.1",
63
64
  "react-router-dom": "^5.0.1",
64
65
  "rimraf": "^3.0.2",
65
- "rollup": "^4.2.0",
66
+ "rollup": "^2.26.4",
67
+ "rollup-plugin-sourcemaps": "^0.6.2",
66
68
  "typescript": "^4.0.5"
67
69
  },
68
70
  "prettier": "@ionic/prettier-config"