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

1 line
8.7 KiB
Plaintext

{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-tab_2.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6G;AACrC;;AAExE,mCAAmC,wBAAwB;;AAE3D;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yEAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,4FAA4F,IAAI;AACzH;AACA;AACA,aAAa,EAAE,EAAE,4DAAC;AAClB;AACA,cAAc,QAAQ,4DAAU,OAAO;AACvC,2BAA2B;AAC3B;AACA,MAAM;AACN;AACA;;AAEA,uBAAuB,OAAO,QAAQ,MAAM,SAAS,oBAAoB,aAAa,kBAAkB,0BAA0B,sBAAsB,WAAW,YAAY,0BAA0B,UAAU,YAAY,kBAAkB,WAAW,OAAO,0BAA0B;;AAE7R;AACA;AACA,QAAQ,4DAAgB;AACxB,8BAA8B,4DAAW;AACzC,iCAAiC,4DAAW;AAC5C,gCAAgC,4DAAW;AAC3C;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uCAAuC;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,yCAAyC,EAAE,4DAAC,UAAU,cAAc,GAAG,4DAAC,SAAS,sBAAsB,EAAE,4DAAC,iBAAiB,4DAAC,UAAU,iBAAiB;AAChL;AACA,cAAc,QAAQ,4DAAU,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,MAAM;AAC7C;AACA;AACA;AACA;;AAE4C","file":"37-es2015.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"],"sourceRoot":"webpack:///"}