test-isc
Version:
An Ionic component similar to Ionic Select, that allows to search items, including async search, group, add, edit, delete items, and much more.
48 lines (42 loc) • 1.63 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-366d4dde.js');
const ionicGlobal = require('./ionic-global-53907587.js');
require('./helpers-41dfb43a.js');
require('./animation-34a434a2.js');
require('./hardware-back-button-8c2f48d2.js');
const index$3 = require('./index-1ceca8b8.js');
const menuToggleUtil = require('./menu-toggle-util-d46aef42.js');
const menuToggleCss = ":host(.menu-toggle-hidden){display:none}";
const MenuToggle = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.visible = false;
/**
* Automatically hides the content when the corresponding menu is not active.
*
* By default, it's `true`. Change it to `false` in order to
* keep `ion-menu-toggle` always visible regardless the state of the menu.
*/
this.autoHide = true;
this.onClick = () => {
return index$3.menuController.toggle(this.menu);
};
}
connectedCallback() {
this.visibilityChanged();
}
async visibilityChanged() {
this.visible = await menuToggleUtil.updateVisibility(this.menu);
}
render() {
const mode = ionicGlobal.getIonMode(this);
const hidden = this.autoHide && !this.visible;
return (index.h(index.Host, { onClick: this.onClick, "aria-hidden": hidden ? 'true' : null, class: {
[mode]: true,
'menu-toggle-hidden': hidden,
} }, index.h("slot", null)));
}
};
MenuToggle.style = menuToggleCss;
exports.ion_menu_toggle = MenuToggle;