1 line
61 KiB
Plaintext
1 line
61 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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D;AAGH;;AAVQ;AAAA;AAAA,mCAWA;AACL,mBAAQ,6DAAE,oDAAF,EAAQ;AAAEG,qBAAO,EAAE,KAAKA;AAAhB,aAAR,CAAR;AACH;AAbQ;AAAA;AAAA,8BAcA;AAAE,mBAAO,6DAAW,IAAX,CAAP;AAA0B;AAd5B;;AAAA;AAAA,SAAb","file":"21-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, i as getElement, H as Host } from './index-92848855.js';\nimport { b as getIonMode, c as config } from './ionic-global-23e7365a.js';\nimport { b as assert } from './helpers-5c745fbd.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-9b2fc761.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-685f606a.js';\nimport { a as attachComponent } from './framework-delegate-d1eb6504.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-0a6a44c8.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"]} |