This repository was archived by the owner on Feb 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path131.655144f5e37888731a4a.js
More file actions
1 lines (1 loc) · 15.4 KB
/
131.655144f5e37888731a4a.js
File metadata and controls
1 lines (1 loc) · 15.4 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{RFXQ:function(t,e,o){"use strict";o.r(e),o.d(e,"IonTab",function(){return a}),o.d(e,"IonTabBar",function(){return l}),o.d(e,"IonTabButton",function(){return s}),o.d(e,"IonTabs",function(){return c});var n=o("B5Ai"),i=o("cBjU"),r=o("HHlg"),a=function(){function t(){this.loaded=!1,this.active=!1}return t.prototype.componentWillLoad=function(){},t.prototype.setActive=function(){return n.a(this,void 0,void 0,function(){return n.c(this,function(t){switch(t.label){case 0:return[4,this.prepareLazyLoaded()];case 1:return t.sent(),this.active=!0,[2]}})})},t.prototype.prepareLazyLoaded=function(){return this.loaded||null==this.component?Promise.resolve():(this.loaded=!0,Object(r.a)(this.delegate,this.el,this.component,["ion-page"]))},t.prototype.hostData=function(){var t=this.tab,e=this.active;return{role:"tabpanel","aria-hidden":e?null:"true","aria-labelledby":"tab-button-"+t,id:"tab-view-"+t,class:{"ion-page":void 0===this.component,"tab-hidden":!e}}},t.prototype.render=function(){return Object(i.b)("slot",null)},Object.defineProperty(t,"is",{get:function(){return"ion-tab"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{active:{type:Boolean,attr:"active",mutable:!0},component:{type:String,attr:"component"},delegate:{type:"Any",attr:"delegate"},el:{elementRef:!0},setActive:{method:!0},tab:{type:String,attr:"tab"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host(.tab-hidden){display:none!important}"},enumerable:!0,configurable:!0}),t}(),l=function(){function t(){this.keyboardVisible=!1,this.layout="icon-top",this.translucent=!1}return t.prototype.selectedTabChanged=function(){this.ionTabBarChanged.emit({tab:this.selectedTab})},t.prototype.onKeyboardWillHide=function(){var t=this;setTimeout(function(){return t.keyboardVisible=!1},50)},t.prototype.onKeyboardWillShow=function(){"bottom"===this.el.getAttribute("slot")&&(this.keyboardVisible=!0)},t.prototype.componentWillLoad=function(){this.selectedTabChanged()},t.prototype.hostData=function(){var t=this.translucent,e=this.keyboardVisible;return{role:"tablist","aria-hidden":e?"true":null,class:Object.assign({},Object(r.h)(this.color),{"tabbar-translucent":t,"tabbar-hidden":e})}},t.prototype.render=function(){return Object(i.b)("slot",null)},Object.defineProperty(t,"is",{get:function(){return"ion-tab-bar"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{color:{type:String,attr:"color"},doc:{context:"document"},el:{elementRef:!0},keyboardVisible:{state:!0},layout:{type:String,attr:"layout"},mode:{type:String,attr:"mode"},queue:{context:"queue"},selectedTab:{type:String,attr:"selected-tab",watchCallbacks:["selectedTabChanged"]},translucent:{type:Boolean,attr:"translucent"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionTabBarChanged",method:"ionTabBarChanged",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"body:keyboardWillHide",method:"onKeyboardWillHide"},{name:"body:keyboardWillShow",method:"onKeyboardWillShow"}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;background:var(--background);color:var(--color);text-align:center;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10;-webkit-box-sizing:content-box!important;box-sizing:content-box!important}:host(.ion-color){--background:var(--ion-color-base)}:host(.ion-color) ::slotted(ion-tab-button){--color:rgba(var(--ion-color-contrast-rgb),0.7);--color-selected:var(--ion-color-contrast);--background-focused:var(--ion-color-shade)}:host([slot=top]){border-bottom:var(--border)}:host([slot=bottom]){padding-bottom:var(--ion-safe-area-bottom,0);border-top:var(--border)}:host(.tabbar-hidden){display:none!important}:host{--background:var(--ion-tab-bar-background,#f8f8f8);--border:0.55px solid var(--ion-tab-bar-border-color,var(--ion-border-color,rgba(0,0,0,0.2)));height:50px}:host(.tabbar-translucent){background-color:rgba(var(--ion-color-base-rgb),.8);-webkit-backdrop-filter:saturate(210%) blur(20px);backdrop-filter:saturate(210%) blur(20px)}"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"styleMode",{get:function(){return"ios"},enumerable:!0,configurable:!0}),t}(),s=function(){function t(){this.selected=!1,this.layout="icon-top",this.disabled=!1}return t.prototype.onTabbarChanged=function(t){this.selected=this.tab===t.detail.tab},t.prototype.onClick=function(t){this.disabled||this.ionTabButtonClick.emit({tab:this.tab,href:this.href}),t.preventDefault()},t.prototype.componentWillLoad=function(){void 0===this.tab&&console.warn('ion-tab-button needs a tab name, so it can be selected.\n <ion-tab-button tab="TAB_NAME">')},Object.defineProperty(t.prototype,"hasLabel",{get:function(){return!!this.el.querySelector("ion-label")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasIcon",{get:function(){return!!this.el.querySelector("ion-icon")},enumerable:!0,configurable:!0}),t.prototype.hostData=function(){var t,e=this,o=e.tab,n=e.selected,i=e.layout,a=e.disabled,l=e.hasLabel,s=e.hasIcon;return{role:"tab","ion-activatable":!0,"aria-selected":n?"true":null,id:"tab-button-"+o,"aria-controls":"tab-view-"+o,class:Object.assign({},Object(r.h)(e.color),(t={"tab-selected":n,"tab-disabled":a,"tab-has-label":l,"tab-has-icon":s,"tab-has-label-only":l&&!s,"tab-has-icon-only":s&&!l},t["tab-layout-"+i]=!0,t))}},t.prototype.render=function(){var t=this.mode;return Object(i.b)("a",{href:this.href||"#"},Object(i.b)("slot",null),"md"===t&&Object(i.b)("ion-ripple-effect",null))},Object.defineProperty(t,"is",{get:function(){return"ion-tab-button"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{color:{type:String,attr:"color"},disabled:{type:Boolean,attr:"disabled"},doc:{context:"document"},el:{elementRef:!0},href:{type:String,attr:"href"},layout:{type:String,attr:"layout"},mode:{type:String,attr:"mode"},queue:{context:"queue"},selected:{state:!0},tab:{type:String,attr:"tab"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionTabButtonClick",method:"ionTabButtonClick",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"parent:ionTabBarChanged",method:"onTabbarChanged"},{name:"click",method:"onClick"}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{--badge-end:4%;-ms-flex:1;flex:1;color:var(--color)}:host,a{height:100%}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin:0;padding:var(--padding-top) var(--padding-end) var(--padding-bottom) var(--padding-start);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;width:100%;border:0;outline:none;background:var(--background);text-decoration:none;cursor:pointer;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-drag:none}a:focus-visible{background:var(--background-focused)}@media (any-hover:hover){a:hover{color:var(--color-selected)}}:host(.tab-selected){color:var(--color-selected)}:host(.tab-hidden){display:none!important}:host(.tab-disabled){pointer-events:none;opacity:.4}::slotted(ion-label){-ms-flex-order:0;order:0}::slotted(ion-icon){-ms-flex-order:-1;order:-1;height:1em}::slotted(ion-icon),::slotted(ion-label){display:block;-ms-flex-item-align:center;align-self:center;min-width:26px;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.tab-has-label-only) ::slotted(ion-label){white-space:normal}::slotted(ion-badge){right:var(--badge-end);padding:1px 6px;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:auto;font-size:12px;line-height:16px}:host(.tab-layout-icon-start) a{-ms-flex-direction:row;flex-direction:row}:host(.tab-layout-icon-end) a{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.tab-layout-icon-bottom) a{-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.tab-has-icon-only) a,:host(.tab-has-label-only) a,:host(.tab-layout-icon-end) a,:host(.tab-layout-icon-hide) a,:host(.tab-layout-icon-start) a,:host(.tab-layout-label-hide) a{-ms-flex-pack:center;justify-content:center}:host(.tab-layout-icon-hide) ::slotted(ion-icon),:host(.tab-layout-label-hide) ::slotted(ion-label){display:none}:host(.tab-has-icon-only),:host(.tab-layout-icon-bottom),:host(.tab-layout-icon-only),:host(.tab-layout-icon-top),:host(.tab-layout-label-hide){--badge-end:calc(50% - 30px)}:host(.tab-has-label-only),:host(.tab-layout-icon-end),:host(.tab-layout-icon-hide),:host(.tab-layout-icon-start){--badge-end:calc(50% - 50px)}:host{--padding-top:0;--padding-end:2px;--padding-bottom:0;--padding-start:2px;--color:var(--ion-tab-bar-color,var(--ion-text-color-step-550,#8c8c8c));--color-selected:var(--ion-tab-bar-color-activated,var(--ion-color-primary,#3880ff));--background:transparent;--background-focused:var(--ion-tab-bar-background-focused,#dadada);max-width:240px;font-size:10px}:host(.tab-has-label-only) ::slotted(ion-label){margin:2px 0;font-size:12px;font-size:14px;line-height:1.1}::slotted(ion-label){margin-top:0;margin-bottom:1px;min-height:11px}::slotted(ion-icon){margin-top:4px;font-size:30px}::slotted(ion-icon:before){vertical-align:top}:host(.tab-layout-icon-end) ::slotted(ion-label),:host(.tab-layout-icon-hide) ::slotted(ion-label),:host(.tab-layout-icon-start) ::slotted(ion-label){margin-top:2px;margin-bottom:2px;font-size:14px;line-height:1.1}:host(.tab-layout-icon-end) ::slotted(ion-icon),:host(.tab-layout-icon-start) ::slotted(ion-icon){min-width:24px;height:26px;margin-top:2px;margin-bottom:1px;font-size:24px}:host(.tab-layout-label-hide) ::slotted(ion-icon){margin:0}"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"styleMode",{get:function(){return"ios"},enumerable:!0,configurable:!0}),t}(),c=function(){function t(){this.transitioning=!1,this.useRouter=!1,this.tabs=[]}return t.prototype.componentWillLoad=function(){return n.a(this,void 0,void 0,function(){return n.c(this,function(t){return this.useRouter=!!this.doc.querySelector("ion-router")&&!this.el.closest("[no-router]"),this.tabs=Array.from(this.el.querySelectorAll("ion-tab")),this.ionNavWillLoad.emit(),this.componentWillUpdate(),[2]})})},t.prototype.componentDidLoad=function(){this.initSelect()},t.prototype.componentDidUnload=function(){this.tabs.length=0,this.selectedTab=this.leavingTab=void 0},t.prototype.componentWillUpdate=function(){var t=this.el.querySelector("ion-tab-bar");t&&(t.selectedTab=this.selectedTab?this.selectedTab.tab:void 0)},t.prototype.onTabClicked=function(t){var e=t.detail,o=e.href,n=e.tab,i=this.tabs.find(function(t){return t.tab===n});if(this.useRouter&&void 0!==o){var r=this.doc.querySelector("ion-router");r&&r.push(o)}else i&&this.select(i)},t.prototype.select=function(t){return n.a(this,void 0,void 0,function(){var e;return n.c(this,function(o){switch(o.label){case 0:return[4,this.getTab(t)];case 1:return e=o.sent(),this.shouldSwitch(e)?[4,this.setActive(e)]:[2,!1];case 2:return o.sent(),[4,this.notifyRouter()];case 3:return o.sent(),this.tabSwitch(),[2,!0]}})})},t.prototype.setRouteId=function(t){return n.a(this,void 0,void 0,function(){var e,o=this;return n.c(this,function(n){switch(n.label){case 0:return[4,this.getTab(t)];case 1:return e=n.sent(),this.shouldSwitch(e)?[4,this.setActive(e)]:[2,{changed:!1,element:this.selectedTab}];case 2:return n.sent(),[2,{changed:!0,element:this.selectedTab,markVisible:function(){return o.tabSwitch()}}]}})})},t.prototype.getRouteId=function(){return n.a(this,void 0,void 0,function(){var t;return n.c(this,function(e){return[2,void 0!==(t=this.selectedTab&&this.selectedTab.tab)?{id:t,element:this.selectedTab}:void 0]})})},t.prototype.getTab=function(t){return n.a(this,void 0,void 0,function(){var e;return n.c(this,function(o){return(e="string"==typeof t?this.tabs.find(function(e){return e.tab===t}):t)||console.error('tab with id: "'+e+'" does not exist'),[2,e]})})},t.prototype.getSelected=function(){return Promise.resolve(this.selectedTab)},t.prototype.initSelect=function(){return n.a(this,void 0,void 0,function(){return n.c(this,function(t){switch(t.label){case 0:return this.useRouter?[2]:[4,Promise.all(this.tabs.map(function(t){return t.componentOnReady()}))];case 1:return t.sent(),[4,this.select(this.tabs[0])];case 2:return t.sent(),[2]}})})},t.prototype.setActive=function(t){return this.transitioning?Promise.reject("transitioning already happening"):(this.transitioning=!0,this.leavingTab=this.selectedTab,this.selectedTab=t,this.ionNavWillChange.emit(),t.setActive())},t.prototype.tabSwitch=function(){var t=this.selectedTab,e=this.leavingTab;this.leavingTab=void 0,this.transitioning=!1,t&&e!==t&&(e&&(e.active=!1),this.ionChange.emit({tab:t}),this.ionNavDidChange.emit())},t.prototype.notifyRouter=function(){if(this.useRouter){var t=this.doc.querySelector("ion-router");if(t)return t.navChanged(1)}return Promise.resolve(!1)},t.prototype.shouldSwitch=function(t){return void 0!==t&&t!==this.selectedTab&&!this.transitioning},t.prototype.render=function(){return[Object(i.b)("slot",{name:"top"}),Object(i.b)("div",{class:"tabs-inner"},Object(i.b)("slot",null)),Object(i.b)("slot",{name:"bottom"})]},Object.defineProperty(t,"is",{get:function(){return"ion-tabs"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{config:{context:"config"},doc:{context:"document"},el:{elementRef:!0},getRouteId:{method:!0},getSelected:{method:!0},getTab:{method:!0},select:{method:!0},selectedTab:{state:!0},setRouteId:{method:!0},tabs:{state:!0}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"ionChange",method:"ionChange",bubbles:!0,cancelable:!0,composed:!0},{name:"ionNavWillLoad",method:"ionNavWillLoad",bubbles:!0,cancelable:!0,composed:!0},{name:"ionNavWillChange",method:"ionNavWillChange",bubbles:!0,cancelable:!0,composed:!0},{name:"ionNavDidChange",method:"ionNavDidChange",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"ionTabButtonClick",method:"onTabClicked"}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":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%;z-index:0}.tabs-inner,:host{contain:layout size style}.tabs-inner{position:relative;-ms-flex:1;flex:1}"},enumerable:!0,configurable:!0}),t}()}}]);