@ionic/react-router 7.6.7-dev.11706551083.17301493 → 7.6.7-dev.11706551842.118ce6e0

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 CHANGED
@@ -1,43 +1,10 @@
1
+ import { __rest } from 'tslib';
1
2
  import { createBrowserHistory, createHashHistory } from 'history';
2
3
  import React from 'react';
3
4
  import { withRouter, Router } from 'react-router-dom';
4
5
  import { ViewStacks, generateId, IonRoute, ViewLifeCycleManager, StackContext, RouteManagerContext, getConfig, LocationHistory, NavManager } from '@ionic/react';
5
6
  import { Route, matchPath as matchPath$1, Router as Router$1 } from 'react-router';
6
7
 
7
- /******************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise, SuppressedError, Symbol */
22
-
23
-
24
- function __rest(s, e) {
25
- var t = {};
26
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
27
- t[p] = s[p];
28
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
29
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
30
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
31
- t[p[i]] = s[p[i]];
32
- }
33
- return t;
34
- }
35
-
36
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
37
- var e = new Error(message);
38
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
39
- };
40
-
41
8
  class IonRouteInner extends React.PureComponent {
42
9
  render() {
43
10
  return (React.createElement(Route, Object.assign({ path: this.props.path, exact: this.props.exact, render: this.props.render }, (this.props.computedMatch !== undefined
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../src/ReactRouter/IonRouteInner.tsx","../src/ReactRouter/utils/matchPath.ts","../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":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","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 { matchPath as reactRouterMatchPath } from 'react-router';\n\ninterface MatchPathOptions {\n /**\n * The pathname to match against.\n */\n pathname: string;\n /**\n * The props to match against, they are identical to the matching props `Route` accepts.\n */\n componentProps: {\n path?: string;\n from?: string;\n component?: any;\n exact?: boolean;\n };\n}\n\n/**\n * @see https://v5.reactrouter.com/web/api/matchPath\n */\nexport const matchPath = ({\n pathname,\n componentProps,\n}: MatchPathOptions): false | ReturnType<typeof reactRouterMatchPath> => {\n const { exact, component } = componentProps;\n\n const path = componentProps.path || componentProps.from;\n /***\n * The props to match against, they are identical\n * to the matching props `Route` accepts. It could also be a string\n * or an array of strings as shortcut for `{ path }`.\n */\n const matchProps = {\n exact,\n path,\n component,\n };\n\n const match = reactRouterMatchPath(pathname, matchProps);\n\n if (!match) {\n return false;\n }\n\n return match;\n};\n","import type { RouteInfo, ViewItem } from '@ionic/react';\nimport { IonRoute, ViewLifeCycleManager, ViewStacks, generateId } from '@ionic/react';\nimport React from 'react';\n\nimport { matchPath } from './utils/matchPath';\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 if (reactElement.type === IonRoute) {\n viewItem.ionRoute = true;\n viewItem.disableIonPageManagement = reactElement.props.disableIonPageManagement;\n }\n\n viewItem.routeData = {\n match: matchPath({\n pathname: routeInfo.pathname,\n componentProps: reactElement.props,\n }),\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, 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 /**\n * Returns the matching view item and the match result for a given pathname.\n */\n private findViewItemByPath(pathname: string, outletId?: string, 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\n match = matchPath({\n pathname,\n componentProps: v.routeData.childProps,\n });\n\n if (match) {\n /**\n * Even though we have a match from react-router, we do not know if the match\n * is for this specific view item.\n *\n * To validate this, we need to check if the path and url match the view item's route data.\n */\n const hasParameter = match.path.includes(':');\n if (!hasParameter || (hasParameter && match.url === v.routeData?.match?.url)) {\n viewItem = v;\n return true;\n }\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) {\n return matchPath({\n pathname,\n componentProps: node.props,\n });\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';\n\nimport { clonePageElement } from './clonePageElement';\nimport { matchPath } from './utils/matchPath';\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 match = matchPath({\n pathname: routeInfo.pathname,\n componentProps: child.props,\n });\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 return matchPath({\n pathname,\n componentProps: {\n ...node.props,\n exact: forceExact,\n },\n });\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\n /**\n * When replacing routes we should still prefer\n * any custom direction/animation that the developer\n * has specified when navigating first instead of relying\n * on previously used directions/animations.\n */\n routeInfo.routeDirection = routeInfo.routeDirection || currentRouteInfo?.routeDirection;\n routeInfo.routeAnimation = routeInfo.routeAnimation || currentRouteInfo?.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 /**\n * This needs to be passed to handleNavigate\n * otherwise incomingRouteParams.routeAnimation\n * will be overridden.\n */\n const incomingAnimation = routeAnimation || routeInfo.routeAnimation;\n this.incomingRouteParams = {\n ...prevInfo,\n routeAction: 'pop',\n routeDirection: 'back',\n routeAnimation: incomingAnimation,\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', incomingAnimation);\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":["reactRouterMatchPath","matchComponent","createHistory","Router"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA0BA;AACO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;AAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;AACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChF,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAA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AAqB,EAAA;AAClE,QAAA,MAAM,aAAa,GAAI,QAAgB,CAAC,QAAQ,IAAI,QAAQ,CAAC;AAC7D,QAAA,MAAM,WAAW,GAAI,QAAgB,CAAC,MAAM,IAAI,MAAM,CAAC;QACvD,IAAI,IAAI,CAAC,oBAAoB,EAAE;AAC7B,YAAA,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AACvD,SAAA;KACF;AAED,IAAA,uBAAuB,CAAC,EAA8D,EAAA;AACpF,QAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;KAChC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,EAAyB,GAAA,IAAI,CAAC,KAAK,EAAnC,EAAE,QAAQ,EAAA,GAAA,EAAyB,EAApB,KAAK,GAApB,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,CAAsB,CAAa,CAAC;QAC1C,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAA,EAAM,KAAK,CAAA;AACtC,YAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EAAA,EAAG,QAAQ,CAAa,CACjF,EACT;KACH;AACF;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../src/ReactRouter/IonRouteInner.tsx","../src/ReactRouter/utils/matchPath.ts","../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 { matchPath as reactRouterMatchPath } from 'react-router';\n\ninterface MatchPathOptions {\n /**\n * The pathname to match against.\n */\n pathname: string;\n /**\n * The props to match against, they are identical to the matching props `Route` accepts.\n */\n componentProps: {\n path?: string;\n from?: string;\n component?: any;\n exact?: boolean;\n };\n}\n\n/**\n * @see https://v5.reactrouter.com/web/api/matchPath\n */\nexport const matchPath = ({\n pathname,\n componentProps,\n}: MatchPathOptions): false | ReturnType<typeof reactRouterMatchPath> => {\n const { exact, component } = componentProps;\n\n const path = componentProps.path || componentProps.from;\n /***\n * The props to match against, they are identical\n * to the matching props `Route` accepts. It could also be a string\n * or an array of strings as shortcut for `{ path }`.\n */\n const matchProps = {\n exact,\n path,\n component,\n };\n\n const match = reactRouterMatchPath(pathname, matchProps);\n\n if (!match) {\n return false;\n }\n\n return match;\n};\n","import type { RouteInfo, ViewItem } from '@ionic/react';\nimport { IonRoute, ViewLifeCycleManager, ViewStacks, generateId } from '@ionic/react';\nimport React from 'react';\n\nimport { matchPath } from './utils/matchPath';\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 if (reactElement.type === IonRoute) {\n viewItem.ionRoute = true;\n viewItem.disableIonPageManagement = reactElement.props.disableIonPageManagement;\n }\n\n viewItem.routeData = {\n match: matchPath({\n pathname: routeInfo.pathname,\n componentProps: reactElement.props,\n }),\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, 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 /**\n * Returns the matching view item and the match result for a given pathname.\n */\n private findViewItemByPath(pathname: string, outletId?: string, 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\n match = matchPath({\n pathname,\n componentProps: v.routeData.childProps,\n });\n\n if (match) {\n /**\n * Even though we have a match from react-router, we do not know if the match\n * is for this specific view item.\n *\n * To validate this, we need to check if the path and url match the view item's route data.\n */\n const hasParameter = match.path.includes(':');\n if (!hasParameter || (hasParameter && match.url === v.routeData?.match?.url)) {\n viewItem = v;\n return true;\n }\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) {\n return matchPath({\n pathname,\n componentProps: node.props,\n });\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';\n\nimport { clonePageElement } from './clonePageElement';\nimport { matchPath } from './utils/matchPath';\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 match = matchPath({\n pathname: routeInfo.pathname,\n componentProps: child.props,\n });\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 return matchPath({\n pathname,\n componentProps: {\n ...node.props,\n exact: forceExact,\n },\n });\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\n /**\n * When replacing routes we should still prefer\n * any custom direction/animation that the developer\n * has specified when navigating first instead of relying\n * on previously used directions/animations.\n */\n routeInfo.routeDirection = routeInfo.routeDirection || currentRouteInfo?.routeDirection;\n routeInfo.routeAnimation = routeInfo.routeAnimation || currentRouteInfo?.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 /**\n * This needs to be passed to handleNavigate\n * otherwise incomingRouteParams.routeAnimation\n * will be overridden.\n */\n const incomingAnimation = routeAnimation || routeInfo.routeAnimation;\n this.incomingRouteParams = {\n ...prevInfo,\n routeAction: 'pop',\n routeDirection: 'back',\n routeAnimation: incomingAnimation,\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', incomingAnimation);\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":["reactRouterMatchPath","matchComponent","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,gBAA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9C,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACxE;AAED;;;;;;;AAOG;IACH,mBAAmB,CAAC,QAAyB,EAAE,MAAqB,EAAA;AAClE,QAAA,MAAM,aAAa,GAAI,QAAgB,CAAC,QAAQ,IAAI,QAAQ,CAAC;AAC7D,QAAA,MAAM,WAAW,GAAI,QAAgB,CAAC,MAAM,IAAI,MAAM,CAAC;QACvD,IAAI,IAAI,CAAC,oBAAoB,EAAE;AAC7B,YAAA,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AACvD,SAAA;KACF;AAED,IAAA,uBAAuB,CAAC,EAA8D,EAAA;AACpF,QAAA,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;KAChC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,EAAyB,GAAA,IAAI,CAAC,KAAK,EAAnC,EAAE,QAAQ,EAAA,GAAA,EAAyB,EAApB,KAAK,GAApB,MAAA,CAAA,EAAA,EAAA,CAAA,UAAA,CAAsB,CAAa,CAAC;QAC1C,QACE,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,OAAO,EAAE,IAAI,CAAC,OAAO,EAAA,EAAM,KAAK,CAAA;AACtC,YAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,EAAA,EAAG,QAAQ,CAAa,CACjF,EACT;KACH;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/react-router",
3
- "version": "7.6.7-dev.11706551083.17301493",
3
+ "version": "7.6.7-dev.11706551842.118ce6e0",
4
4
  "description": "React Router wrapper for @ionic/react",
5
5
  "keywords": [
6
6
  "ionic",
@@ -36,7 +36,7 @@
36
36
  "dist/"
37
37
  ],
38
38
  "dependencies": {
39
- "@ionic/react": "7.6.7-dev.11706551083.17301493",
39
+ "@ionic/react": "7.6.7-dev.11706551842.118ce6e0",
40
40
  "tslib": "*"
41
41
  },
42
42
  "peerDependencies": {