a zip code crypto-currency system good for red ONLY

menu.js 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports", "@angular/core", "../app/app", "../backdrop/backdrop", "../../config/config", "../content/content", "../../platform/dom-controller", "../../gestures/gesture-controller", "../../util/util", "../../platform/keyboard", "./menu-gestures", "../app/menu-controller", "../nav/nav", "../../platform/platform", "../../gestures/ui-event-manager", "../split-pane/split-pane"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var app_1 = require("../app/app");
  14. var backdrop_1 = require("../backdrop/backdrop");
  15. var config_1 = require("../../config/config");
  16. var content_1 = require("../content/content");
  17. var dom_controller_1 = require("../../platform/dom-controller");
  18. var gesture_controller_1 = require("../../gestures/gesture-controller");
  19. var util_1 = require("../../util/util");
  20. var keyboard_1 = require("../../platform/keyboard");
  21. var menu_gestures_1 = require("./menu-gestures");
  22. var menu_controller_1 = require("../app/menu-controller");
  23. var nav_1 = require("../nav/nav");
  24. var platform_1 = require("../../platform/platform");
  25. var ui_event_manager_1 = require("../../gestures/ui-event-manager");
  26. var split_pane_1 = require("../split-pane/split-pane");
  27. /**
  28. * @name Menu
  29. * @description
  30. * The Menu component is a navigation drawer that slides in from the side of the current
  31. * view. By default, it slides in from the left, but the side can be overridden. The menu
  32. * will be displayed differently based on the mode, however the display type can be changed
  33. * to any of the available [menu types](#menu-types). The menu element should be a sibling
  34. * to the app's content element. There can be any number of menus attached to the content.
  35. * These can be controlled from the templates, or programmatically using the [MenuController](../../app/MenuController).
  36. *
  37. * @usage
  38. *
  39. * ```html
  40. * <ion-menu [content]="mycontent">
  41. * <ion-content>
  42. * <ion-list>
  43. * <p>some menu content, could be list items</p>
  44. * </ion-list>
  45. * </ion-content>
  46. * </ion-menu>
  47. *
  48. * <ion-nav #mycontent [root]="rootPage"></ion-nav>
  49. * ```
  50. *
  51. * To add a menu to an app, the `<ion-menu>` element should be added as a sibling to the `ion-nav` it will belongs
  52. * to. A [local variable](https://angular.io/docs/ts/latest/guide/user-input.html#local-variables)
  53. * should be added to the `ion-nav` and passed to the `ion-menu`s `content` property.
  54. *
  55. * This tells the menu what it is bound to and what element to watch for gestures.
  56. * In the below example, `content` is using [property binding](https://angular.io/docs/ts/latest/guide/template-syntax.html#!#property-binding)
  57. * because `mycontent` is a reference to the `<ion-nav>` element, and not a string.
  58. *
  59. *
  60. * ### Opening/Closing Menus
  61. *
  62. * There are several ways to open or close a menu. The menu can be **toggled** open or closed
  63. * from the template using the [MenuToggle](../MenuToggle) directive. It can also be
  64. * **closed** from the template using the [MenuClose](../MenuClose) directive. To display a menu
  65. * programmatically, inject the [MenuController](../MenuController) provider and call any of the
  66. * `MenuController` methods.
  67. *
  68. *
  69. * ### Menu Types
  70. *
  71. * The menu supports several display types: `overlay`, `reveal` and `push`. By default,
  72. * it will use the correct type based on the mode, but this can be changed. The default
  73. * type for both Material Design and Windows mode is `overlay`, and `reveal` is the default
  74. * type for iOS mode. The menu type can be changed in the app's [config](../../config/Config)
  75. * via the `menuType` property, or passed in the `type` property on the `<ion-menu>` element.
  76. * See [usage](#usage) below for examples of changing the menu type.
  77. *
  78. *
  79. * ### Navigation Bar Behavior
  80. *
  81. * If a [MenuToggle](../MenuToggle) button is added to the [Navbar](../../navbar/Navbar) of
  82. * a page, the button will only appear when the page it's in is currently a root page. The
  83. * root page is the initial page loaded in the app, or a page that has been set as the root
  84. * using the [setRoot](../../nav/NavController/#setRoot) method on the [NavController](../../nav/NavController).
  85. *
  86. * For example, say the application has two pages, `Page1` and `Page2`, and both have a
  87. * `MenuToggle` button in their navigation bars. Assume the initial page loaded into the app
  88. * is `Page1`, making it the root page. `Page1` will display the `MenuToggle` button, but once
  89. * `Page2` is pushed onto the navigation stack, the `MenuToggle` will not be displayed.
  90. *
  91. *
  92. * ### Persistent Menus
  93. *
  94. * Persistent menus display the [MenuToggle](../MenuToggle) button in the [Navbar](../../navbar/Navbar)
  95. * on all pages in the navigation stack. To make a menu persistent set `persistent` to `true` on the
  96. * `<ion-menu>` element. Note that this will only affect the `MenuToggle` button in the `Navbar` attached
  97. * to the `Menu` with `persistent` set to true, any other `MenuToggle` buttons will not be affected.
  98. * ### Menu Side
  99. *
  100. * By default, menus slide in from the left, but this can be overridden by passing `right`
  101. * to the `side` property:
  102. *
  103. * ```html
  104. * <ion-menu side="right" [content]="mycontent">...</ion-menu>
  105. * ```
  106. *
  107. *
  108. * ### Menu Type
  109. *
  110. * The menu type can be changed by passing the value to `type` on the `<ion-menu>`:
  111. *
  112. * ```html
  113. * <ion-menu type="overlay" [content]="mycontent">...</ion-menu>
  114. * ```
  115. *
  116. * It can also be set in the app's config. The below will set the menu type to
  117. * `push` for all modes, and then set the type to `overlay` for the `ios` mode.
  118. *
  119. * ```ts
  120. * // in NgModules
  121. *
  122. * imports: [
  123. * IonicModule.forRoot(MyApp,{
  124. * menuType: 'push',
  125. * platforms: {
  126. * ios: {
  127. * menuType: 'overlay',
  128. * }
  129. * }
  130. * })
  131. * ],
  132. * ```
  133. *
  134. *
  135. * ### Displaying the Menu
  136. *
  137. * To toggle a menu from the template, add a button with the `menuToggle`
  138. * directive anywhere in the page's template:
  139. *
  140. * ```html
  141. * <button ion-button menuToggle>Toggle Menu</button>
  142. * ```
  143. *
  144. * To close a menu, add the `menuClose` button. It can be added anywhere
  145. * in the content, or even the menu itself. Below it is added to the menu's
  146. * content:
  147. *
  148. * ```html
  149. * <ion-menu [content]="mycontent">
  150. * <ion-content>
  151. * <ion-list>
  152. * <ion-item menuClose detail-none>Close Menu</ion-item>
  153. * </ion-list>
  154. * </ion-content>
  155. * </ion-menu>
  156. * ```
  157. *
  158. * See the [MenuToggle](../MenuToggle) and [MenuClose](../MenuClose) docs
  159. * for more information on these directives.
  160. *
  161. * The menu can also be controlled from the Page by using the `MenuController`.
  162. * Inject the `MenuController` provider into the page and then call any of its
  163. * methods. In the below example, the `openMenu` method will open the menu
  164. * when it is called.
  165. *
  166. * ```ts
  167. * import { Component } from '@angular/core';
  168. * import { MenuController } from 'ionic-angular';
  169. *
  170. * @Component({...})
  171. * export class MyPage {
  172. * constructor(public menuCtrl: MenuController) {}
  173. *
  174. * openMenu() {
  175. * this.menuCtrl.open();
  176. * }
  177. * }
  178. * ```
  179. *
  180. * See the [MenuController](../../app/MenuController) API docs for all of the methods
  181. * and usage information.
  182. *
  183. *
  184. * @demo /docs/demos/src/menu/
  185. *
  186. * @see {@link /docs/components#menus Menu Component Docs}
  187. * @see {@link ../../app/MenuController MenuController API Docs}
  188. * @see {@link ../../nav/Nav Nav API Docs}
  189. * @see {@link ../../nav/NavController NavController API Docs}
  190. */
  191. var Menu = (function () {
  192. function Menu(_menuCtrl, _elementRef, _config, _plt, _renderer, _keyboard, _gestureCtrl, _domCtrl, _app) {
  193. this._menuCtrl = _menuCtrl;
  194. this._elementRef = _elementRef;
  195. this._config = _config;
  196. this._plt = _plt;
  197. this._renderer = _renderer;
  198. this._keyboard = _keyboard;
  199. this._gestureCtrl = _gestureCtrl;
  200. this._domCtrl = _domCtrl;
  201. this._app = _app;
  202. this._isSwipeEnabled = true;
  203. this._isAnimating = false;
  204. this._isPersistent = false;
  205. this._init = false;
  206. this._isPane = false;
  207. /**
  208. * @hidden
  209. */
  210. this.isOpen = false;
  211. /**
  212. * @hidden
  213. */
  214. this.isRightSide = false;
  215. /**
  216. * @output {event} Emitted when the menu is being dragged open.
  217. */
  218. this.ionDrag = new core_1.EventEmitter();
  219. /**
  220. * @output {event} Emitted when the menu has been opened.
  221. */
  222. this.ionOpen = new core_1.EventEmitter();
  223. /**
  224. * @output {event} Emitted when the menu has been closed.
  225. */
  226. this.ionClose = new core_1.EventEmitter();
  227. this._events = new ui_event_manager_1.UIEventManager(_plt);
  228. this._gestureBlocker = _gestureCtrl.createBlocker({
  229. disable: [gesture_controller_1.GESTURE_GO_BACK_SWIPE]
  230. });
  231. this.side = 'start';
  232. }
  233. Object.defineProperty(Menu.prototype, "enabled", {
  234. /**
  235. * @input {boolean} If true, the menu is enabled. Default `true`.
  236. */
  237. get: function () {
  238. return this._isEnabled;
  239. },
  240. set: function (val) {
  241. var isEnabled = util_1.isTrueProperty(val);
  242. this.enable(isEnabled);
  243. },
  244. enumerable: true,
  245. configurable: true
  246. });
  247. Object.defineProperty(Menu.prototype, "side", {
  248. /**
  249. * @input {string} Which side of the view the menu should be placed. Default `"left"`.
  250. */
  251. get: function () {
  252. return this._side;
  253. },
  254. set: function (val) {
  255. this.isRightSide = util_1.isRightSide(val, this._plt.isRTL);
  256. if (this.isRightSide) {
  257. this._side = 'right';
  258. }
  259. else {
  260. this._side = 'left';
  261. }
  262. },
  263. enumerable: true,
  264. configurable: true
  265. });
  266. Object.defineProperty(Menu.prototype, "swipeEnabled", {
  267. /**
  268. * @input {boolean} If true, swiping the menu is enabled. Default `true`.
  269. */
  270. get: function () {
  271. return this._isSwipeEnabled;
  272. },
  273. set: function (val) {
  274. var isEnabled = util_1.isTrueProperty(val);
  275. this.swipeEnable(isEnabled);
  276. },
  277. enumerable: true,
  278. configurable: true
  279. });
  280. Object.defineProperty(Menu.prototype, "persistent", {
  281. /**
  282. * @input {boolean} If true, the menu will persist on child pages.
  283. */
  284. get: function () {
  285. return this._isPersistent;
  286. },
  287. set: function (val) {
  288. this._isPersistent = util_1.isTrueProperty(val);
  289. },
  290. enumerable: true,
  291. configurable: true
  292. });
  293. /**
  294. * @hidden
  295. */
  296. Menu.prototype.ngOnInit = function () {
  297. var _this = this;
  298. this._init = true;
  299. var content = this.content;
  300. this._cntEle = (content instanceof Node) ? content : content && content.getNativeElement && content.getNativeElement();
  301. // requires content element
  302. if (!this._cntEle) {
  303. return console.error('Menu: must have a [content] element to listen for drag events on. Example:\n\n<ion-menu [content]="content"></ion-menu>\n\n<ion-nav #content></ion-nav>');
  304. }
  305. this.setElementAttribute('side', this._side);
  306. // normalize the "type"
  307. if (!this.type) {
  308. this.type = this._config.get('menuType');
  309. }
  310. this.setElementAttribute('type', this.type);
  311. // add the gestures
  312. this._gesture = new menu_gestures_1.MenuContentGesture(this._plt, this, this._gestureCtrl, this._domCtrl);
  313. // add menu's content classes
  314. this._cntEle.classList.add('menu-content');
  315. this._cntEle.classList.add('menu-content-' + this.type);
  316. var isEnabled = this._isEnabled;
  317. if (isEnabled === true || typeof isEnabled === 'undefined') {
  318. // check if more than one menu is on the same side
  319. isEnabled = !this._menuCtrl.getMenus().some(function (m) {
  320. return m.side === _this.side && m.enabled;
  321. });
  322. }
  323. // register this menu with the app's menu controller
  324. this._menuCtrl._register(this);
  325. // mask it as enabled / disabled
  326. this.enable(isEnabled);
  327. };
  328. /**
  329. * @hidden
  330. */
  331. Menu.prototype.onBackdropClick = function (ev) {
  332. ev.preventDefault();
  333. ev.stopPropagation();
  334. this._menuCtrl.close();
  335. };
  336. /**
  337. * @hidden
  338. */
  339. Menu.prototype._getType = function () {
  340. if (!this._type) {
  341. this._type = menu_controller_1.MenuController.create(this.type, this, this._plt);
  342. if (this._config.get('animate') === false) {
  343. this._type.ani.duration(0);
  344. }
  345. }
  346. return this._type;
  347. };
  348. /**
  349. * @hidden
  350. */
  351. Menu.prototype.setOpen = function (shouldOpen, animated) {
  352. var _this = this;
  353. if (animated === void 0) { animated = true; }
  354. // If the menu is disabled or it is currenly being animated, let's do nothing
  355. if ((shouldOpen === this.isOpen) || !this._canOpen() || this._isAnimating) {
  356. return Promise.resolve(this.isOpen);
  357. }
  358. return new Promise(function (resolve) {
  359. _this._before();
  360. _this._getType().setOpen(shouldOpen, animated, function () {
  361. _this._after(shouldOpen);
  362. resolve(_this.isOpen);
  363. });
  364. });
  365. };
  366. Menu.prototype._forceClosing = function () {
  367. var _this = this;
  368. (void 0) /* assert */;
  369. this._isAnimating = true;
  370. this._getType().setOpen(false, false, function () {
  371. _this._after(false);
  372. });
  373. };
  374. /**
  375. * @hidden
  376. */
  377. Menu.prototype.canSwipe = function () {
  378. return this._isSwipeEnabled &&
  379. !this._isAnimating &&
  380. this._canOpen() &&
  381. this._app.isEnabled();
  382. };
  383. /**
  384. * @hidden
  385. */
  386. Menu.prototype.isAnimating = function () {
  387. return this._isAnimating;
  388. };
  389. Menu.prototype._swipeBeforeStart = function () {
  390. if (!this.canSwipe()) {
  391. (void 0) /* assert */;
  392. return;
  393. }
  394. this._before();
  395. };
  396. Menu.prototype._swipeStart = function () {
  397. if (!this._isAnimating) {
  398. (void 0) /* assert */;
  399. return;
  400. }
  401. this._getType().setProgressStart(this.isOpen);
  402. };
  403. Menu.prototype._swipeProgress = function (stepValue) {
  404. if (!this._isAnimating) {
  405. (void 0) /* assert */;
  406. return;
  407. }
  408. this._getType().setProgessStep(stepValue);
  409. var ionDrag = this.ionDrag;
  410. if (ionDrag.observers.length > 0) {
  411. ionDrag.emit(stepValue);
  412. }
  413. };
  414. Menu.prototype._swipeEnd = function (shouldCompleteLeft, shouldCompleteRight, stepValue, velocity) {
  415. var _this = this;
  416. if (!this._isAnimating) {
  417. (void 0) /* assert */;
  418. return;
  419. }
  420. // user has finished dragging the menu
  421. var isRightSide = this.isRightSide;
  422. var isRTL = this._plt.isRTL;
  423. var opening = !this.isOpen;
  424. var shouldComplete = (opening)
  425. ? (isRightSide !== isRTL) ? shouldCompleteLeft : shouldCompleteRight
  426. : (isRightSide !== isRTL) ? shouldCompleteRight : shouldCompleteLeft;
  427. this._getType().setProgressEnd(shouldComplete, stepValue, velocity, function (isOpen) {
  428. (void 0) /* console.debug */;
  429. _this._after(isOpen);
  430. });
  431. };
  432. Menu.prototype._before = function () {
  433. (void 0) /* assert */;
  434. // this places the menu into the correct location before it animates in
  435. // this css class doesn't actually kick off any animations
  436. this.setElementClass('show-menu', true);
  437. this.backdrop.setElementClass('show-backdrop', true);
  438. this.resize();
  439. this._keyboard.close();
  440. this._isAnimating = true;
  441. };
  442. Menu.prototype._after = function (isOpen) {
  443. (void 0) /* assert */;
  444. this._app.setEnabled(false, 100);
  445. // keep opening/closing the menu disabled for a touch more yet
  446. // only add listeners/css if it's enabled and isOpen
  447. // and only remove listeners/css if it's not open
  448. // emit opened/closed events
  449. this.isOpen = isOpen;
  450. this._isAnimating = false;
  451. this._events.unlistenAll();
  452. if (isOpen) {
  453. // Disable swipe to go back gesture
  454. this._gestureBlocker.block();
  455. this._cntEle.classList.add('menu-content-open');
  456. var callback = this.onBackdropClick.bind(this);
  457. this._events.listen(this._cntEle, 'click', callback, { capture: true });
  458. this._events.listen(this.backdrop.getNativeElement(), 'click', callback, { capture: true });
  459. this.ionOpen.emit(true);
  460. }
  461. else {
  462. // Enable swipe to go back gesture
  463. this._gestureBlocker.unblock();
  464. this._cntEle.classList.remove('menu-content-open');
  465. this.setElementClass('show-menu', false);
  466. this.backdrop.setElementClass('show-menu', false);
  467. this.ionClose.emit(true);
  468. }
  469. };
  470. /**
  471. * @hidden
  472. */
  473. Menu.prototype.open = function () {
  474. return this.setOpen(true);
  475. };
  476. /**
  477. * @hidden
  478. */
  479. Menu.prototype.close = function () {
  480. return this.setOpen(false);
  481. };
  482. /**
  483. * @hidden
  484. */
  485. Menu.prototype.resize = function () {
  486. var content = this.menuContent
  487. ? this.menuContent
  488. : this.menuNav;
  489. content && content.resize();
  490. };
  491. /**
  492. * @hidden
  493. */
  494. Menu.prototype.toggle = function () {
  495. return this.setOpen(!this.isOpen);
  496. };
  497. Menu.prototype._canOpen = function () {
  498. return this._isEnabled && !this._isPane;
  499. };
  500. /**
  501. * @hidden
  502. */
  503. Menu.prototype._updateState = function () {
  504. var canOpen = this._canOpen();
  505. // Close menu inmediately
  506. if (!canOpen && this.isOpen) {
  507. (void 0) /* assert */;
  508. // close if this menu is open, and should not be enabled
  509. this._forceClosing();
  510. }
  511. if (this._isEnabled && this._menuCtrl) {
  512. this._menuCtrl._setActiveMenu(this);
  513. }
  514. if (!this._init) {
  515. return;
  516. }
  517. var gesture = this._gesture;
  518. // only listen/unlisten if the menu has initialized
  519. if (canOpen && this._isSwipeEnabled && !gesture.isListening) {
  520. // should listen, but is not currently listening
  521. (void 0) /* console.debug */;
  522. gesture.listen();
  523. }
  524. else if (gesture.isListening && (!canOpen || !this._isSwipeEnabled)) {
  525. // should not listen, but is currently listening
  526. (void 0) /* console.debug */;
  527. gesture.unlisten();
  528. }
  529. if (this.isOpen || (this._isPane && this._isEnabled)) {
  530. this.resize();
  531. }
  532. (void 0) /* assert */;
  533. };
  534. /**
  535. * @hidden
  536. */
  537. Menu.prototype.enable = function (shouldEnable) {
  538. this._isEnabled = shouldEnable;
  539. this.setElementClass('menu-enabled', shouldEnable);
  540. this._updateState();
  541. return this;
  542. };
  543. /**
  544. * @internal
  545. */
  546. Menu.prototype.initPane = function () {
  547. return false;
  548. };
  549. /**
  550. * @internal
  551. */
  552. Menu.prototype.paneChanged = function (isPane) {
  553. this._isPane = isPane;
  554. this._updateState();
  555. };
  556. /**
  557. * @hidden
  558. */
  559. Menu.prototype.swipeEnable = function (shouldEnable) {
  560. this._isSwipeEnabled = shouldEnable;
  561. this._updateState();
  562. return this;
  563. };
  564. /**
  565. * @hidden
  566. */
  567. Menu.prototype.getNativeElement = function () {
  568. return this._elementRef.nativeElement;
  569. };
  570. /**
  571. * @hidden
  572. */
  573. Menu.prototype.getMenuElement = function () {
  574. return this.getNativeElement().querySelector('.menu-inner');
  575. };
  576. /**
  577. * @hidden
  578. */
  579. Menu.prototype.getContentElement = function () {
  580. return this._cntEle;
  581. };
  582. /**
  583. * @hidden
  584. */
  585. Menu.prototype.getBackdropElement = function () {
  586. return this.backdrop.getNativeElement();
  587. };
  588. /**
  589. * @hidden
  590. */
  591. Menu.prototype.width = function () {
  592. return this.getMenuElement().offsetWidth;
  593. };
  594. /**
  595. * @hidden
  596. */
  597. Menu.prototype.getMenuController = function () {
  598. return this._menuCtrl;
  599. };
  600. /**
  601. * @hidden
  602. */
  603. Menu.prototype.setElementClass = function (className, add) {
  604. this._renderer.setElementClass(this._elementRef.nativeElement, className, add);
  605. };
  606. /**
  607. * @hidden
  608. */
  609. Menu.prototype.setElementAttribute = function (attributeName, value) {
  610. this._renderer.setElementAttribute(this._elementRef.nativeElement, attributeName, value);
  611. };
  612. /**
  613. * @hidden
  614. */
  615. Menu.prototype.getElementRef = function () {
  616. return this._elementRef;
  617. };
  618. /**
  619. * @hidden
  620. */
  621. Menu.prototype.ngOnDestroy = function () {
  622. this._menuCtrl._unregister(this);
  623. this._events.destroy();
  624. this._gesture && this._gesture.destroy();
  625. this._type && this._type.destroy();
  626. this._gesture = null;
  627. this._type = null;
  628. this._cntEle = null;
  629. };
  630. Menu.decorators = [
  631. { type: core_1.Component, args: [{
  632. selector: 'ion-menu',
  633. template: '<div class="menu-inner"><ng-content></ng-content></div>' +
  634. '<ion-backdrop></ion-backdrop>',
  635. host: {
  636. 'role': 'navigation'
  637. },
  638. changeDetection: core_1.ChangeDetectionStrategy.OnPush,
  639. encapsulation: core_1.ViewEncapsulation.None,
  640. providers: [{ provide: split_pane_1.RootNode, useExisting: core_1.forwardRef(function () { return Menu; }) }]
  641. },] },
  642. ];
  643. /** @nocollapse */
  644. Menu.ctorParameters = function () { return [
  645. { type: menu_controller_1.MenuController, },
  646. { type: core_1.ElementRef, },
  647. { type: config_1.Config, },
  648. { type: platform_1.Platform, },
  649. { type: core_1.Renderer, },
  650. { type: keyboard_1.Keyboard, },
  651. { type: gesture_controller_1.GestureController, },
  652. { type: dom_controller_1.DomController, },
  653. { type: app_1.App, },
  654. ]; };
  655. Menu.propDecorators = {
  656. 'backdrop': [{ type: core_1.ViewChild, args: [backdrop_1.Backdrop,] },],
  657. 'menuContent': [{ type: core_1.ContentChild, args: [content_1.Content,] },],
  658. 'menuNav': [{ type: core_1.ContentChild, args: [nav_1.Nav,] },],
  659. 'content': [{ type: core_1.Input },],
  660. 'id': [{ type: core_1.Input },],
  661. 'type': [{ type: core_1.Input },],
  662. 'enabled': [{ type: core_1.Input },],
  663. 'side': [{ type: core_1.Input },],
  664. 'swipeEnabled': [{ type: core_1.Input },],
  665. 'persistent': [{ type: core_1.Input },],
  666. 'maxEdgeStart': [{ type: core_1.Input },],
  667. 'ionDrag': [{ type: core_1.Output },],
  668. 'ionOpen': [{ type: core_1.Output },],
  669. 'ionClose': [{ type: core_1.Output },],
  670. };
  671. return Menu;
  672. }());
  673. exports.Menu = Menu;
  674. });
  675. //# sourceMappingURL=menu.js.map