Files
doneit-web/.angular/cache/14.2.12/babel-webpack/87879a87a5e13dc63b0f2bb65bb90923.json
T

1 line
21 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { r as registerInstance, h, H as Host, i as getElement, e as createEvent } from './index-7a8b7a1c.js';\nimport { a as attachComponent } from './framework-delegate-94e770cc.js';\nimport './helpers-1457892a.js';\nconst tabCss = \":host(.tab-hidden){display:none !important}\";\nconst Tab = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.loaded = false;\n /** @internal */\n this.active = false;\n }\n componentWillLoad() {\n var _this = this;\n return _asyncToGenerator(function* () {\n if (_this.active) {\n yield _this.setActive();\n }\n })();\n }\n /** Set the active component for the tab */\n setActive() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n yield _this2.prepareLazyLoaded();\n _this2.active = true;\n })();\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 } catch (e) {\n console.error(e);\n }\n }\n return Promise.resolve(undefined);\n }\n render() {\n const {\n tab,\n active,\n component\n } = this;\n return h(Host, {\n role: \"tabpanel\",\n \"aria-hidden\": !active ? 'true' : null,\n \"aria-labelledby\": `tab-button-${tab}`,\n class: {\n 'ion-page': component === undefined,\n 'tab-hidden': !active\n }\n }, h(\"slot\", null));\n }\n get el() {\n return getElement(this);\n }\n static get watchers() {\n return {\n \"active\": [\"changeActive\"]\n };\n }\n};\nTab.style = tabCss;\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}\";\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 {\n href,\n tab\n } = ev.detail;\n if (this.useRouter && href !== undefined) {\n const router = document.querySelector('ion-router');\n if (router) {\n router.push(href);\n }\n } else {\n this.select(tab);\n }\n };\n }\n componentWillLoad() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n if (!_this3.useRouter) {\n _this3.useRouter = !!document.querySelector('ion-router') && !_this3.el.closest('[no-router]');\n }\n if (!_this3.useRouter) {\n const tabs = _this3.tabs;\n if (tabs.length > 0) {\n yield _this3.select(tabs[0]);\n }\n }\n _this3.ionNavWillLoad.emit();\n })();\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 select(tab) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n const selectedTab = getTab(_this4.tabs, tab);\n if (!_this4.shouldSwitch(selectedTab)) {\n return false;\n }\n yie