aiber-martin/www/37-es5.js.map
Martin Donnelly a4b8625d0f init
2020-12-17 16:23:12 +00:00

1 line
14 KiB
Plaintext

{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-tab_2.entry.js"],"names":["tabCss","Tab","hostRef","loaded","active","setActive","prepareLazyLoaded","isActive","component","delegate","el","e","console","error","Promise","resolve","undefined","tab","role","style","tabsCss","Tabs","ionNavWillLoad","ionTabsWillChange","ionTabsDidChange","transitioning","useRouter","onTabClicked","ev","detail","href","router","document","querySelector","push","select","closest","tabs","length","emit","tabBar","selectedTab","getTab","shouldSwitch","notifyRouter","tabSwitch","id","changed","element","markVisible","tabId","reject","leavingTab","navChanged","onIonTabButtonClick","name","Array","from","querySelectorAll","tabEl","find","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAGA,UAAMA,MAAM,GAAG,6CAAf;;AAEA,UAAMC,GAAG;AACL,qBAAYC,OAAZ,EAAqB;AAAA;;AACjB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA,eAAKC,MAAL,GAAc,KAAd;AACA;;AACA,eAAKC,MAAL,GAAc,KAAd;AACH;;AANI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAQG,KAAKA,MARR;AAAA;AAAA;AAAA;;AAAA;AAAA,6BASS,KAAKC,SAAL,EATT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAYL;;AAZK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAcK,KAAKC,iBAAL,EAdL;;AAAA;AAeD,2BAAKF,MAAL,GAAc,IAAd;;AAfC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;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E6B,iCAAmB,EAAE,KAAK3B;AAA5B,aAAR,EAAoD,6DAAE,MAAF,EAAU;AAAE4B,kBAAI,EAAE;AAAR,aAAV,CAApD,EAAgF,6DAAE,KAAF,EAAS;AAAE,uBAAO;AAAT,aAAT,EAAkC,6DAAE,MAAF,EAAU,IAAV,CAAlC,CAAhF,EAAoI,6DAAE,MAAF,EAAU;AAAEA,kBAAI,EAAE;AAAR,aAAV,CAApI,CAAR;AACH;AApIK;AAAA;AAAA,8BA+HK;AACP,mBAAOC,KAAK,CAACC,IAAN,CAAW,KAAK/C,EAAL,CAAQgD,gBAAR,CAAyB,SAAzB,CAAX,CAAP;AACH;AAjIK;AAAA;AAAA,8BAqIG;AAAE,mBAAO,6DAAW,IAAX,CAAP;AAA0B;AArI/B;;AAAA;AAAA,SAAV;;AAuIA,UAAMhB,OAAM,GAAG,SAATA,OAAS,CAACL,IAAD,EAAOpB,GAAP,EAAe;AAC1B,YAAM0C,KAAK,GAAI,OAAO1C,GAAP,KAAe,QAAhB,GACRoB,IAAI,CAACuB,IAAL,CAAU,UAAAC,CAAC;AAAA,iBAAIA,CAAC,CAAC5C,GAAF,KAAUA,GAAd;AAAA,SAAX,CADQ,GAERA,GAFN;;AAGA,YAAI,CAAC0C,KAAL,EAAY;AACR/C,iBAAO,CAACC,KAAR,0BAA+B8C,KAA/B;AACH;;AACD,eAAOA,KAAP;AACH,OARD;;AASAtC,UAAI,CAACF,KAAL,GAAaC,OAAb","file":"37-es5.js","sourcesContent":["import { r as registerInstance, h, H as Host, i as getElement, e as createEvent } from './index-92848855.js';\nimport { a as attachComponent } from './framework-delegate-d1eb6504.js';\n\nconst tabCss = \":host(.tab-hidden){display:none !important}\";\n\nconst Tab = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.loaded = false;\n /** @internal */\n this.active = false;\n }\n async componentWillLoad() {\n if (this.active) {\n await this.setActive();\n }\n }\n /** Set the active component for the tab */\n async setActive() {\n await this.prepareLazyLoaded();\n this.active = true;\n }\n changeActive(isActive) {\n if (isActive) {\n this.prepareLazyLoaded();\n }\n }\n prepareLazyLoaded() {\n if (!this.loaded && this.component != null) {\n this.loaded = true;\n try {\n return attachComponent(this.delegate, this.el, this.component, ['ion-page']);\n }\n catch (e) {\n console.error(e);\n }\n }\n return Promise.resolve(undefined);\n }\n render() {\n const { tab, active, component } = this;\n return (h(Host, { role: \"tabpanel\", \"aria-hidden\": !active ? 'true' : null, \"aria-labelledby\": `tab-button-${tab}`, class: {\n 'ion-page': component === undefined,\n 'tab-hidden': !active\n } }, h(\"slot\", null)));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"active\": [\"changeActive\"]\n }; }\n};\nTab.style = tabCss;\n\nconst tabsCss = \":host{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;contain:layout size style;z-index:0}.tabs-inner{position:relative;-ms-flex:1;flex:1;contain:layout size style}\";\n\nconst Tabs = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionNavWillLoad = createEvent(this, \"ionNavWillLoad\", 7);\n this.ionTabsWillChange = createEvent(this, \"ionTabsWillChange\", 3);\n this.ionTabsDidChange = createEvent(this, \"ionTabsDidChange\", 3);\n this.transitioning = false;\n /** @internal */\n this.useRouter = false;\n this.onTabClicked = (ev) => {\n const { href, tab } = ev.detail;\n if (this.useRouter && href !== undefined) {\n const router = document.querySelector('ion-router');\n if (router) {\n router.push(href);\n }\n }\n else {\n this.select(tab);\n }\n };\n }\n async componentWillLoad() {\n if (!this.useRouter) {\n this.useRouter = !!document.querySelector('ion-router') && !this.el.closest('[no-router]');\n }\n if (!this.useRouter) {\n const tabs = this.tabs;\n if (tabs.length > 0) {\n await this.select(tabs[0]);\n }\n }\n this.ionNavWillLoad.emit();\n }\n componentWillRender() {\n const tabBar = this.el.querySelector('ion-tab-bar');\n if (tabBar) {\n const tab = this.selectedTab ? this.selectedTab.tab : undefined;\n tabBar.selectedTab = tab;\n }\n }\n /**\n * Select a tab by the value of its `tab` property or an element reference.\n *\n * @param tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property.\n */\n async select(tab) {\n const selectedTab = getTab(this.tabs, tab);\n if (!this.shouldSwitch(selectedTab)) {\n return false;\n }\n await this.setActive(selectedTab);\n await this.notifyRouter();\n this.tabSwitch();\n return true;\n }\n /**\n * Get a specific tab by the value of its `tab` property or an element reference.\n *\n * @param tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property.\n */\n async getTab(tab) {\n return getTab(this.tabs, tab);\n }\n /**\n * Get the currently selected tab.\n */\n getSelected() {\n return Promise.resolve(this.selectedTab ? this.selectedTab.tab : undefined);\n }\n /** @internal */\n async setRouteId(id) {\n const selectedTab = getTab(this.tabs, id);\n if (!this.shouldSwitch(selectedTab)) {\n return { changed: false, element: this.selectedTab };\n }\n await this.setActive(selectedTab);\n return {\n changed: true,\n element: this.selectedTab,\n markVisible: () => this.tabSwitch(),\n };\n }\n /** @internal */\n async getRouteId() {\n const tabId = this.selectedTab && this.selectedTab.tab;\n return tabId !== undefined ? { id: tabId, element: this.selectedTab } : undefined;\n }\n setActive(selectedTab) {\n if (this.transitioning) {\n return Promise.reject('transitioning already happening');\n }\n this.transitioning = true;\n this.leavingTab = this.selectedTab;\n this.selectedTab = selectedTab;\n this.ionTabsWillChange.emit({ tab: selectedTab.tab });\n selectedTab.active = true;\n return Promise.resolve();\n }\n tabSwitch() {\n const selectedTab = this.selectedTab;\n const leavingTab = this.leavingTab;\n this.leavingTab = undefined;\n this.transitioning = false;\n if (!selectedTab) {\n return;\n }\n if (leavingTab !== selectedTab) {\n if (leavingTab) {\n leavingTab.active = false;\n }\n this.ionTabsDidChange.emit({ tab: selectedTab.tab });\n }\n }\n notifyRouter() {\n if (this.useRouter) {\n const router = document.querySelector('ion-router');\n if (router) {\n return router.navChanged('forward');\n }\n }\n return Promise.resolve(false);\n }\n shouldSwitch(selectedTab) {\n const leavingTab = this.selectedTab;\n return selectedTab !== undefined && selectedTab !== leavingTab && !this.transitioning;\n }\n get tabs() {\n return Array.from(this.el.querySelectorAll('ion-tab'));\n }\n render() {\n return (h(Host, { onIonTabButtonClick: this.onTabClicked }, h(\"slot\", { name: \"top\" }), h(\"div\", { class: \"tabs-inner\" }, h(\"slot\", null)), h(\"slot\", { name: \"bottom\" })));\n }\n get el() { return getElement(this); }\n};\nconst getTab = (tabs, tab) => {\n const tabEl = (typeof tab === 'string')\n ? tabs.find(t => t.tab === tab)\n : tab;\n if (!tabEl) {\n console.error(`tab with id: \"${tabEl}\" does not exist`);\n }\n return tabEl;\n};\nTabs.style = tabsCss;\n\nexport { Tab as ion_tab, Tabs as ion_tabs };\n"]}