1 line
57 KiB
Plaintext
1 line
57 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-nav_2.entry.js"],"names":["VIEW_STATE_NEW","VIEW_STATE_ATTACHED","VIEW_STATE_DESTROYED","ViewController","component","params","state","container","element","delegate","removeViewFromDom","parentElement","remove","nav","undefined","matches","view","id","currentParams","keysA","Object","keys","keysB","length","key","convertToView","page","convertToViews","pages","map","componentProps","filter","v","navCss","Nav","hostRef","ionNavWillLoad","ionNavWillChange","ionNavDidChange","transInstr","animationEnabled","useRouter","isTransitioning","destroyed","views","animated","gesture","enable","swipeGesture","root","setRoot","rootParams","document","querySelector","el","closest","mode","getBoolean","emit","rootChanged","createSwipeBackGesture","canStart","bind","onStart","onMove","onEnd","swipeGestureChanged","_destroy","destroy","opts","done","queueTrns","insertStart","insertViews","insertIndex","insertComponents","removeStart","removeCount","indexOrViewCtrl","tiConfig","removeView","startIndex","setPages","direction","animation","active","getActiveSync","Promise","resolve","changed","promise","r","finish","commonOpts","updateURL","viewIsReady","enteringEl","mark","p","markVisible","viewController","find","popTo","assign","animationBuilder","push","tagName","index","canGoBackSync","getPreviousSync","indexOf","ti","skipIfBusy","reject","router","canTransition","nextTrns","result","fireError","hasCompleted","requiresTransition","enteringView","leavingView","navChanged","rejectReason","shift","runTransition","prepareTI","getEnteringView","Error","init","postViewInit","enteringRequiresTransition","leavingRequiresTransition","isBackDirection","transition","success","failed","viewsLength","viewControllers","removeEnd","i","destroyQueue","finalBalance","console","warn","insertViewAt","destroyView","progressCallback","progressAnimation","ani","sbAni","leavingEl","animationOpts","showGoBack","baseEl","get","transitionFinish","cleanupView","cleanup","existingIndex","splice","activeView","activeViewIndex","stepValue","progressStep","shouldComplete","dur","onFinish","oneTimeCallback","newStepValue","easing","progressEnd","style","navLink","routerDirection","routerAnimation","pop","NavLink","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;A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CAWF;AACP,mBAAQ,6DAAE,oDAAF,EAAQ;AAAEG,qBAAO,EAAE,KAAKA;AAAhB,aAAR,CAAR;AACD;AAbU;AAAA;AAAA,8BAcF;AAAE,mBAAO,6DAAW,IAAX,CAAP;AAA0B;AAd1B;;AAAA;AAAA,SAAb","file":"21-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, i as getElement, H as Host } from './index-e806d1f6.js';\nimport { b as getIonMode, c as config } from './ionic-global-9d5c8ee3.js';\nimport { k as assert } from './helpers-90f46169.js';\nimport { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-1eeeab2e.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-eea9a7a9.js';\nimport { a as attachComponent } from './framework-delegate-4584ab5a.js';\n\nconst VIEW_STATE_NEW = 1;\nconst VIEW_STATE_ATTACHED = 2;\nconst VIEW_STATE_DESTROYED = 3;\nclass ViewController {\n constructor(component, params) {\n this.component = component;\n this.params = params;\n this.state = VIEW_STATE_NEW;\n }\n async init(container) {\n this.state = VIEW_STATE_ATTACHED;\n if (!this.element) {\n const component = this.component;\n this.element = await attachComponent(this.delegate, container, component, ['ion-page', 'ion-page-invisible'], this.params);\n }\n }\n /**\n * DOM WRITE\n */\n _destroy() {\n assert(this.state !== VIEW_STATE_DESTROYED, 'view state must be ATTACHED');\n const element = this.element;\n if (element) {\n if (this.delegate) {\n this.delegate.removeViewFromDom(element.parentElement, element);\n }\n else {\n element.remove();\n }\n }\n this.nav = undefined;\n this.state = VIEW_STATE_DESTROYED;\n }\n}\nconst matches = (view, id, params) => {\n if (!view) {\n return false;\n }\n if (view.component !== id) {\n return false;\n }\n const currentParams = view.params;\n if (currentParams === params) {\n return true;\n }\n if (!currentParams && !params) {\n return true;\n }\n if (!currentParams || !params) {\n return false;\n }\n const keysA = Object.keys(currentParams);\n const keysB = Object.keys(params);\n if (keysA.length !== keysB.length) {\n return false;\n }\n // Test for A's keys different from B.\n for (const key of keysA) {\n if (currentParams[key] !== params[key]) {\n return false;\n }\n }\n return true;\n};\nconst convertToView = (page, params) => {\n if (!page) {\n return null;\n }\n if (page instanceof ViewController) {\n return page;\n }\n return new ViewController(page, params);\n};\nconst convertToViews = (pages) => {\n return pages.map(page => {\n if (page instanceof ViewController) {\n return page;\n }\n if ('component' in page) {\n /**\n * TODO Ionic 6:\n * Consider switching to just using `undefined` here\n * as well as on the public interfaces and on\n * `NavComponentWithProps`. Previously `pages` was\n * of type `any[]` so TypeScript did not catch this.\n */\n return convertToView(page.component, (page.componentProps === null) ? undefined : page.componentProps);\n }\n return convertToView(page, undefined);\n }).filter(v => v !== null);\n};\n\nconst navCss = \":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;overflow:hidden;z-index:0}\";\n\nconst Nav = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionNavWillLoad = createEvent(this, \"ionNavWillLoad\", 7);\n this.ionNavWillChange = createEvent(this, \"ionNavWillChange\", 3);\n this.ionNavDidChange = createEvent(this, \"ionNavDidChange\", 3);\n this.transInstr = [];\n this.animationEnabled = true;\n this.useRouter = false;\n this.isTransitioning = false;\n this.destroyed = false;\n this.views = [];\n /**\n * If `true`, the nav should animate the transition of components.\n */\n this.animated = true;\n }\n swipeGestureChanged() {\n if (this.gesture) {\n this.gesture.enable(this.swipeGesture === true);\n }\n }\n rootChanged() {\n if (this.root !== undefined) {\n if (!this.useRouter) {\n this.setRoot(this.root, this.rootParams);\n }\n }\n }\n componentWillLoad() {\n this.useRouter =\n !!document.querySelector('ion-router') &&\n !this.el.closest('[no-router]');\n if (this.swipeGesture === undefined) {\n const mode = getIonMode(this);\n this.swipeGesture = config.getBoolean('swipeBackEnabled', mode === 'ios');\n }\n this.ionNavWillLoad.emit();\n }\n async componentDidLoad() {\n this.rootChanged();\n this.gesture = (await import('./swipe-back-2154c9a7.js')).createSwipeBackGesture(this.el, this.canStart.bind(this), this.onStart.bind(this), this.onMove.bind(this), this.onEnd.bind(this));\n this.swipeGestureChanged();\n }\n disconnectedCallback() {\n for (const view of this.views) {\n lifecycle(view.element, LIFECYCLE_WILL_UNLOAD);\n view._destroy();\n }\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n // release swipe back gesture and transition\n this.transInstr.length = this.views.length = 0;\n this.destroyed = true;\n }\n /**\n * Push a new component onto the current navigation stack. Pass any additional\n * information along as an object. This additional information is accessible\n * through NavParams.\n *\n * @param component The component to push onto the navigation stack.\n * @param componentProps Any properties of the component.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n push(component, componentProps, opts, done) {\n return this.queueTrns({\n insertStart: -1,\n insertViews: [{ component, componentProps }],\n opts\n }, done);\n }\n /**\n * Inserts a component into the navigation stack at the specified index.\n * This is useful to add a component at any point in the navigation stack.\n *\n * @param insertIndex The index to insert the component at in the stack.\n * @param component The component to insert into the navigation stack.\n * @param componentProps Any properties of the component.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n insert(insertIndex, component, componentProps, opts, done) {\n return this.queueTrns({\n insertStart: insertIndex,\n insertViews: [{ component, componentProps }],\n opts\n }, done);\n }\n /**\n * Inserts an array of components into the navigation stack at the specified index.\n * The last component in the array will become instantiated as a view, and animate\n * in to become the active view.\n *\n * @param insertIndex The index to insert the components at in the stack.\n * @param insertComponents The components to insert into the navigation stack.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n insertPages(insertIndex, insertComponents, opts, done) {\n return this.queueTrns({\n insertStart: insertIndex,\n insertViews: insertComponents,\n opts\n }, done);\n }\n /**\n * Pop a component off of the navigation stack. Navigates back from the current\n * component.\n *\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n pop(opts, done) {\n return this.queueTrns({\n removeStart: -1,\n removeCount: 1,\n opts\n }, done);\n }\n /**\n * Pop to a specific index in the navigation stack.\n *\n * @param indexOrViewCtrl The index or view controller to pop to.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n popTo(indexOrViewCtrl, opts, done) {\n const tiConfig = {\n removeStart: -1,\n removeCount: -1,\n opts\n };\n if (typeof indexOrViewCtrl === 'object' && indexOrViewCtrl.component) {\n tiConfig.removeView = indexOrViewCtrl;\n tiConfig.removeStart = 1;\n }\n else if (typeof indexOrViewCtrl === 'number') {\n tiConfig.removeStart = indexOrViewCtrl + 1;\n }\n return this.queueTrns(tiConfig, done);\n }\n /**\n * Navigate back to the root of the stack, no matter how far back that is.\n *\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n popToRoot(opts, done) {\n return this.queueTrns({\n removeStart: 1,\n removeCount: -1,\n opts\n }, done);\n }\n /**\n * Removes a component from the navigation stack at the specified index.\n *\n * @param startIndex The number to begin removal at.\n * @param removeCount The number of components to remove.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n removeIndex(startIndex, removeCount = 1, opts, done) {\n return this.queueTrns({\n removeStart: startIndex,\n removeCount,\n opts\n }, done);\n }\n /**\n * Set the root for the current navigation stack to a component.\n *\n * @param component The component to set as the root of the navigation stack.\n * @param componentProps Any properties of the component.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n setRoot(component, componentProps, opts, done) {\n return this.setPages([{ component, componentProps }], opts, done);\n }\n /**\n * Set the views of the current navigation stack and navigate to the last view.\n * By default animations are disabled, but they can be enabled by passing options\n * to the navigation controller. Navigation parameters can also be passed to the\n * individual pages in the array.\n *\n * @param views The list of views to set as the navigation stack.\n * @param opts The navigation options.\n * @param done The transition complete function.\n */\n setPages(views, opts, done) {\n if (opts == null) {\n opts = {};\n }\n // if animation wasn't set to true then default it to NOT animate\n if (opts.animated !== true) {\n opts.animated = false;\n }\n return this.queueTrns({\n insertStart: 0,\n insertViews: views,\n removeStart: 0,\n removeCount: -1,\n opts\n }, done);\n }\n /** @internal */\n setRouteId(id, params, direction, animation) {\n const active = this.getActiveSync();\n if (matches(active, id, params)) {\n return Promise.resolve({\n changed: false,\n element: active.element\n });\n }\n let resolve;\n const promise = new Promise(r => (resolve = r));\n let finish;\n const commonOpts = {\n updateURL: false,\n viewIsReady: enteringEl => {\n let mark;\n const p = new Promise(r => (mark = r));\n resolve({\n changed: true,\n element: enteringEl,\n markVisible: async () => {\n mark();\n await finish;\n }\n });\n return p;\n }\n };\n if (direction === 'root') {\n finish = this.setRoot(id, params, commonOpts);\n }\n else {\n const viewController = this.views.find(v => matches(v, id, params));\n if (viewController) {\n finish = this.popTo(viewController, Object.assign(Object.assign({}, commonOpts), { direction: 'back', animationBuilder: animation }));\n }\n else if (direction === 'forward') {\n finish = this.push(id, params, Object.assign(Object.assign({}, commonOpts), { animationBuilder: animation }));\n }\n else if (direction === 'back') {\n finish = this.setRoot(id, params, Object.assign(Object.assign({}, commonOpts), { direction: 'back', animated: true, animationBuilder: animation }));\n }\n }\n return promise;\n }\n /** @internal */\n async getRouteId() {\n const active = this.getActiveSync();\n return active\n ? {\n id: active.element.tagName,\n params: active.params,\n element: active.element\n }\n : undefined;\n }\n /**\n * Get the active view.\n */\n getActive() {\n return Promise.resolve(this.getActiveSync());\n }\n /**\n * Get the view at the specified index.\n *\n * @param index The index of the view.\n */\n getByIndex(index) {\n return Promise.resolve(this.views[index]);\n }\n /**\n * Returns `true` if the current view can go back.\n *\n * @param view The view to check.\n */\n canGoBack(view) {\n return Promise.resolve(this.canGoBackSync(view));\n }\n /**\n * Get the previous view.\n *\n * @param view The view to get.\n */\n getPrevious(view) {\n return Promise.resolve(this.getPreviousSync(view));\n }\n getLength() {\n return this.views.length;\n }\n getActiveSync() {\n return this.views[this.views.length - 1];\n }\n canGoBackSync(view = this.getActiveSync()) {\n return !!(view && this.getPreviousSync(view));\n }\n getPreviousSync(view = this.getActiveSync()) {\n if (!view) {\n return undefined;\n }\n const views = this.views;\n const index = views.indexOf(view);\n return index > 0 ? views[index - 1] : undefined;\n }\n // _queueTrns() adds a navigation stack change to the queue and schedules it to run:\n // 1. _nextTrns(): consumes the next transition in the queue\n // 2. _viewInit(): initializes enteringView if required\n // 3. _viewTest(): ensures canLeave/canEnter Returns `true`, so the operation can continue\n // 4. _postViewInit(): add/remove the views from the navigation stack\n // 5. _transitionInit(): initializes the visual transition if required and schedules it to run\n // 6. _viewAttachToDOM(): attaches the enteringView to the DOM\n // 7. _transitionStart(): called once the transition actually starts, it initializes the Animation underneath.\n // 8. _transitionFinish(): called once the transition finishes\n // 9. _cleanup(): syncs the navigation internal state with the DOM. For example it removes the pages from the DOM or hides/show them.\n async queueTrns(ti, done) {\n if (this.isTransitioning && ti.opts != null && ti.opts.skipIfBusy) {\n return Promise.resolve(false);\n }\n const promise = new Promise((resolve, reject) => {\n ti.resolve = resolve;\n ti.reject = reject;\n });\n ti.done = done;\n /**\n * If using router, check to see if navigation hooks\n * will allow us to perform this transition. This\n * is required in order for hooks to work with\n * the ion-back-button or swipe to go back.\n */\n if (ti.opts && ti.opts.updateURL !== false && this.useRouter) {\n const router = document.querySelector('ion-router');\n if (router) {\n const canTransition = await router.canTransition();\n if (canTransition === false) {\n return Promise.resolve(false);\n }\n else if (typeof canTransition === 'string') {\n router.push(canTransition, ti.opts.direction || 'back');\n return Promise.resolve(false);\n }\n }\n }\n // Normalize empty\n if (ti.insertViews && ti.insertViews.length === 0) {\n ti.insertViews = undefined;\n }\n // Enqueue transition instruction\n this.transInstr.push(ti);\n // if there isn't a transition already happening\n // then this will kick off this transition\n this.nextTrns();\n return promise;\n }\n success(result, ti) {\n if (this.destroyed) {\n this.fireError('nav controller was destroyed', ti);\n return;\n }\n if (ti.done) {\n ti.done(result.hasCompleted, result.requiresTransition, result.enteringView, result.leavingView, result.direction);\n }\n ti.resolve(result.hasCompleted);\n if (ti.opts.updateURL !== false && this.useRouter) {\n const router = document.querySelector('ion-router');\n if (router) {\n const direction = result.direction === 'back' ? 'back' : 'forward';\n router.navChanged(direction);\n }\n }\n }\n failed(rejectReason, ti) {\n if (this.destroyed) {\n this.fireError('nav controller was destroyed', ti);\n return;\n }\n this.transInstr.length = 0;\n this.fireError(rejectReason, ti);\n }\n fireError(rejectReason, ti) {\n if (ti.done) {\n ti.done(false, false, rejectReason);\n }\n if (ti.reject && !this.destroyed) {\n ti.reject(rejectReason);\n }\n else {\n ti.resolve(false);\n }\n }\n nextTrns() {\n // this is the framework's bread 'n butta function\n // only one transition is allowed at any given time\n if (this.isTransitioning) {\n return false;\n }\n // there is no transition happening right now\n // get the next instruction\n const ti = this.transInstr.shift();\n if (!ti) {\n return false;\n }\n this.runTransition(ti);\n return true;\n }\n async runTransition(ti) {\n try {\n // set that this nav is actively transitioning\n this.ionNavWillChange.emit();\n this.isTransitioning = true;\n this.prepareTI(ti);\n const leavingView = this.getActiveSync();\n const enteringView = this.getEnteringView(ti, leavingView);\n if (!leavingView && !enteringView) {\n throw new Error('no views in the stack to be removed');\n }\n if (enteringView && enteringView.state === VIEW_STATE_NEW) {\n await enteringView.init(this.el);\n }\n this.postViewInit(enteringView, leavingView, ti);\n // Needs transition?\n const requiresTransition = (ti.enteringRequiresTransition || ti.leavingRequiresTransition) &&\n enteringView !== leavingView;\n if (requiresTransition && ti.opts && leavingView) {\n const isBackDirection = ti.opts.direction === 'back';\n /**\n * If heading back, use the entering page's animation\n * unless otherwise specified by the developer.\n */\n if (isBackDirection) {\n ti.opts.animationBuilder = ti.opts.animationBuilder || (enteringView && enteringView.animationBuilder);\n }\n leavingView.animationBuilder = ti.opts.animationBuilder;\n }\n const result = requiresTransition\n ? await this.transition(enteringView, leavingView, ti)\n : {\n // transition is not required, so we are already done!\n // they're inserting/removing the views somewhere in the middle or\n // beginning, so visually nothing needs to animate/transition\n // resolve immediately because there's no animation that's happening\n hasCompleted: true,\n requiresTransition: false\n };\n this.success(result, ti);\n this.ionNavDidChange.emit();\n }\n catch (rejectReason) {\n this.failed(rejectReason, ti);\n }\n this.isTransitioning = false;\n this.nextTrns();\n }\n prepareTI(ti) {\n const viewsLength = this.views.length;\n ti.opts = ti.opts || {};\n if (ti.opts.delegate === undefined) {\n ti.opts.delegate = this.delegate;\n }\n if (ti.removeView !== undefined) {\n assert(ti.removeStart !== undefined, 'removeView needs removeStart');\n assert(ti.removeCount !== undefined, 'removeView needs removeCount');\n const index = this.views.indexOf(ti.removeView);\n if (index < 0) {\n throw new Error('removeView was not found');\n }\n ti.removeStart += index;\n }\n if (ti.removeStart !== undefined) {\n if (ti.removeStart < 0) {\n ti.removeStart = viewsLength - 1;\n }\n if (ti.removeCount < 0) {\n ti.removeCount = viewsLength - ti.removeStart;\n }\n ti.leavingRequiresTransition =\n ti.removeCount > 0 && ti.removeStart + ti.removeCount === viewsLength;\n }\n if (ti.insertViews) {\n // allow -1 to be passed in to auto push it on the end\n // and clean up the index if it's larger then the size of the stack\n if (ti.insertStart < 0 || ti.insertStart > viewsLength) {\n ti.insertStart = viewsLength;\n }\n ti.enteringRequiresTransition = ti.insertStart === viewsLength;\n }\n const insertViews = ti.insertViews;\n if (!insertViews) {\n return;\n }\n assert(insertViews.length > 0, 'length can not be zero');\n const viewControllers = convertToViews(insertViews);\n if (viewControllers.length === 0) {\n throw new Error('invalid views to insert');\n }\n // Check all the inserted view are correct\n for (const view of viewControllers) {\n view.delegate = ti.opts.delegate;\n const nav = view.nav;\n if (nav && nav !== this) {\n throw new Error('inserted view was already inserted');\n }\n if (view.state === VIEW_STATE_DESTROYED) {\n throw new Error('inserted view was already destroyed');\n }\n }\n ti.insertViews = viewControllers;\n }\n getEnteringView(ti, leavingView) {\n const insertViews = ti.insertViews;\n if (insertViews !== undefined) {\n // grab the very last view of the views to be inserted\n // and initialize it as the new entering view\n return insertViews[insertViews.length - 1];\n }\n const removeStart = ti.removeStart;\n if (removeStart !== undefined) {\n const views = this.views;\n const removeEnd = removeStart + ti.removeCount;\n for (let i = views.length - 1; i >= 0; i--) {\n const view = views[i];\n if ((i < removeStart || i >= removeEnd) && view !== leavingView) {\n return view;\n }\n }\n }\n return undefined;\n }\n postViewInit(enteringView, leavingView, ti) {\n assert(leavingView || enteringView, 'Both leavingView and enteringView are null');\n assert(ti.resolve, 'resolve must be valid');\n assert(ti.reject, 'reject must be valid');\n const opts = ti.opts;\n const insertViews = ti.insertViews;\n const removeStart = ti.removeStart;\n const removeCount = ti.removeCount;\n let destroyQueue;\n // there are views to remove\n if (removeStart !== undefined && removeCount !== undefined) {\n assert(removeStart >= 0, 'removeStart can not be negative');\n assert(removeCount >= 0, 'removeCount can not be negative');\n destroyQueue = [];\n for (let i = 0; i < removeCount; i++) {\n const view = this.views[i + removeStart];\n if (view && view !== enteringView && view !== leavingView) {\n destroyQueue.push(view);\n }\n }\n // default the direction to \"back\"\n opts.direction = opts.direction || 'back';\n }\n const finalBalance = this.views.length +\n (insertViews !== undefined ? insertViews.length : 0) -\n (removeCount !== undefined ? removeCount : 0);\n assert(finalBalance >= 0, 'final balance can not be negative');\n if (finalBalance === 0) {\n console.warn(`You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.`, this, this.el);\n throw new Error('navigation stack needs at least one root page');\n }\n // At this point the transition can not be rejected, any throw should be an error\n // there are views to insert\n if (insertViews) {\n // add the views to the\n let insertIndex = ti.insertStart;\n for (const view of insertViews) {\n this.insertViewAt(view, insertIndex);\n insertIndex++;\n }\n if (ti.enteringRequiresTransition) {\n // default to forward if not already set\n opts.direction = opts.direction || 'forward';\n }\n }\n // if the views to be removed are in the beginning or middle\n // and there is not a view that needs to visually transition out\n // then just destroy them and don't transition anything\n // batch all of lifecycles together\n // let's make sure, callbacks are zoned\n if (destroyQueue && destroyQueue.length > 0) {\n for (const view of destroyQueue) {\n lifecycle(view.element, LIFECYCLE_WILL_LEAVE);\n lifecycle(view.element, LIFECYCLE_DID_LEAVE);\n lifecycle(view.element, LIFECYCLE_WILL_UNLOAD);\n }\n // once all lifecycle events has been delivered, we can safely detroy the views\n for (const view of destroyQueue) {\n this.destroyView(view);\n }\n }\n }\n async transition(enteringView, leavingView, ti) {\n // we should animate (duration > 0) if the pushed page is not the first one (startup)\n // or if it is a portal (modal, actionsheet, etc.)\n const opts = ti.opts;\n const progressCallback = opts.progressAnimation\n ? (ani) => this.sbAni = ani\n : undefined;\n const mode = getIonMode(this);\n const enteringEl = enteringView.element;\n const leavingEl = leavingView && leavingView.element;\n const animationOpts = Object.assign({ mode, showGoBack: this.canGoBackSync(enteringView), baseEl: this.el, animationBuilder: this.animation || opts.animationBuilder || config.get('navAnimation'), progressCallback, animated: this.animated && config.getBoolean('animated', true), enteringEl,\n leavingEl }, opts);\n const { hasCompleted } = await transition(animationOpts);\n return this.transitionFinish(hasCompleted, enteringView, leavingView, opts);\n }\n transitionFinish(hasCompleted, enteringView, leavingView, opts) {\n const cleanupView = hasCompleted ? enteringView : leavingView;\n if (cleanupView) {\n this.cleanup(cleanupView);\n }\n return {\n hasCompleted,\n requiresTransition: true,\n enteringView,\n leavingView,\n direction: opts.direction\n };\n }\n insertViewAt(view, index) {\n const views = this.views;\n const existingIndex = views.indexOf(view);\n if (existingIndex > -1) {\n // this view is already in the stack!!\n // move it to its new location\n assert(view.nav === this, 'view is not part of the nav');\n views.splice(index, 0, views.splice(existingIndex, 1)[0]);\n }\n else {\n assert(!view.nav, 'nav is used');\n // this is a new view to add to the stack\n // create the new entering view\n view.nav = this;\n // insert the entering view into the correct index in the stack\n views.splice(index, 0, view);\n }\n }\n removeView(view) {\n assert(view.state === VIEW_STATE_ATTACHED || view.state === VIEW_STATE_DESTROYED, 'view state should be loaded or destroyed');\n const views = this.views;\n const index = views.indexOf(view);\n assert(index > -1, 'view must be part of the stack');\n if (index >= 0) {\n views.splice(index, 1);\n }\n }\n destroyView(view) {\n view._destroy();\n this.removeView(view);\n }\n /**\n * DOM WRITE\n */\n cleanup(activeView) {\n // ok, cleanup time!! Destroy all of the views that are\n // INACTIVE and come after the active view\n // only do this if the views exist, though\n if (this.destroyed) {\n return;\n }\n const views = this.views;\n const activeViewIndex = views.indexOf(activeView);\n for (let i = views.length - 1; i >= 0; i--) {\n const view = views[i];\n /**\n * When inserting multiple views via insertPages\n * the last page will be transitioned to, but the\n * others will not be. As a result, a DOM element\n * will only be created for the last page inserted.\n * As a result, it is possible to have views in the\n * stack that do not have `view.element` yet.\n */\n const element = view.element;\n if (element) {\n if (i > activeViewIndex) {\n // this view comes after the active view\n // let's unload it\n lifecycle(element, LIFECYCLE_WILL_UNLOAD);\n this.destroyView(view);\n }\n else if (i < activeViewIndex) {\n // this view comes before the active view\n // and it is not a portal then ensure it is hidden\n setPageHidden(element, true);\n }\n }\n }\n }\n canStart() {\n return (!!this.swipeGesture &&\n !this.isTransitioning &&\n this.transInstr.length === 0 &&\n this.animationEnabled &&\n this.canGoBackSync());\n }\n onStart() {\n this.queueTrns({\n removeStart: -1,\n removeCount: 1,\n opts: {\n direction: 'back',\n progressAnimation: true\n }\n }, undefined);\n }\n onMove(stepValue) {\n if (this.sbAni) {\n this.sbAni.progressStep(stepValue);\n }\n }\n onEnd(shouldComplete, stepValue, dur) {\n if (this.sbAni) {\n this.animationEnabled = false;\n this.sbAni.onFinish(() => {\n this.animationEnabled = true;\n }, { oneTimeCallback: true });\n // Account for rounding errors in JS\n let newStepValue = (shouldComplete) ? -0.001 : 0.001;\n /**\n * Animation will be reversed here, so need to\n * reverse the easing curve as well\n *\n * Additionally, we need to account for the time relative\n * to the new easing curve, as `stepValue` is going to be given\n * in terms of a linear curve.\n */\n if (!shouldComplete) {\n this.sbAni.easing('cubic-bezier(1, 0, 0.68, 0.28)');\n newStepValue += getTimeGivenProgression([0, 0], [1, 0], [0.68, 0.28], [1, 1], stepValue)[0];\n }\n else {\n newStepValue += getTimeGivenProgression([0, 0], [0.32, 0.72], [0, 1], [1, 1], stepValue)[0];\n }\n this.sbAni.progressEnd(shouldComplete ? 1 : 0, newStepValue, dur);\n }\n }\n render() {\n return (h(\"slot\", null));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"swipeGesture\": [\"swipeGestureChanged\"],\n \"root\": [\"rootChanged\"]\n }; }\n};\nNav.style = navCss;\n\nconst navLink = (el, routerDirection, component, componentProps, routerAnimation) => {\n const nav = el.closest('ion-nav');\n if (nav) {\n if (routerDirection === 'forward') {\n if (component !== undefined) {\n return nav.push(component, componentProps, { skipIfBusy: true, animationBuilder: routerAnimation });\n }\n }\n else if (routerDirection === 'root') {\n if (component !== undefined) {\n return nav.setRoot(component, componentProps, { skipIfBusy: true, animationBuilder: routerAnimation });\n }\n }\n else if (routerDirection === 'back') {\n return nav.pop({ skipIfBusy: true, animationBuilder: routerAnimation });\n }\n }\n return Promise.resolve(false);\n};\n\nconst NavLink = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * The transition direction when navigating to another page.\n */\n this.routerDirection = 'forward';\n this.onClick = () => {\n return navLink(this.el, this.routerDirection, this.component, this.componentProps, this.routerAnimation);\n };\n }\n render() {\n return (h(Host, { onClick: this.onClick }));\n }\n get el() { return getElement(this); }\n};\n\nexport { Nav as ion_nav, NavLink as ion_nav_link };\n"]} |