@ionic/core 7.4.3-dev.11696365694.156f41d3 → 7.4.3-dev.11696514206.1c9669de

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/components/index4.js +14 -15
  2. package/components/ion-header.js +1 -1
  3. package/components/ion-menu.js +0 -12
  4. package/dist/cjs/{index-5121bb90.js → index-7c1ae0f0.js} +14 -15
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -16
  8. package/dist/collection/components/header/header.ios.css +0 -18
  9. package/dist/collection/components/menu/menu.js +0 -12
  10. package/dist/collection/components/menu/test/multiple/menu.e2e.js +56 -0
  11. package/dist/collection/utils/menu-controller/index.js +14 -15
  12. package/dist/docs.json +1 -1
  13. package/dist/esm/{index-61bddc90.js → index-c6640d16.js} +14 -15
  14. package/dist/esm/index.js +2 -2
  15. package/dist/esm/ion-app_8.entry.js +1 -1
  16. package/dist/esm/ion-menu_3.entry.js +3 -14
  17. package/dist/esm-es5/index-c6640d16.js +4 -0
  18. package/dist/esm-es5/index.js +1 -1
  19. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  20. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  21. package/dist/ionic/index.esm.js +1 -1
  22. package/dist/ionic/ionic.esm.js +1 -1
  23. package/dist/ionic/{p-47cb95be.system.entry.js → p-048d7153.system.entry.js} +1 -1
  24. package/dist/ionic/p-1406c382.system.entry.js +4 -0
  25. package/dist/ionic/p-6edbc09b.system.js +1 -1
  26. package/dist/ionic/p-7cea4407.js +4 -0
  27. package/dist/ionic/{p-b098f738.system.js → p-95e6d10b.system.js} +1 -1
  28. package/dist/ionic/p-ad90d46b.system.js +4 -0
  29. package/dist/ionic/p-b3462f01.entry.js +4 -0
  30. package/dist/ionic/{p-605b085a.entry.js → p-f547e62f.entry.js} +1 -1
  31. package/dist/types/components/menu/menu-interface.d.ts +0 -1
  32. package/dist/types/utils/menu-controller/index.d.ts +0 -1
  33. package/hydrate/index.js +14 -27
  34. package/package.json +1 -1
  35. package/dist/esm-es5/index-61bddc90.js +0 -4
  36. package/dist/ionic/p-40e16caa.system.entry.js +0 -4
  37. package/dist/ionic/p-b95fd3c6.entry.js +0 -4
  38. package/dist/ionic/p-d4cea1ba.system.js +0 -4
  39. package/dist/ionic/p-f978ccd1.js +0 -4
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { p as printIonWarning } from './index6.js';
4
5
  import { MENU_BACK_BUTTON_PRIORITY } from './hardware-back-button.js';
5
6
  import { c as componentOnReady } from './helpers.js';
6
7
  import { b as getIonMode } from './ionic-global.js';
@@ -155,13 +156,22 @@ const createMenuController = () => {
155
156
  if (menu === 'start' || menu === 'end') {
156
157
  // there could be more than one menu on the same side
157
158
  // so first try to get the enabled one
158
- const menuRef = find((m) => m.side === menu && !m.disabled);
159
- if (menuRef) {
160
- return menuRef;
159
+ const menuRefs = menus.filter((m) => m.side === menu && !m.disabled);
160
+ if (menuRefs.length >= 1) {
161
+ if (menuRefs.length > 1) {
162
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${menuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, menuRefs.map((m) => m.el));
163
+ }
164
+ return menuRefs[0].el;
161
165
  }
162
166
  // didn't find a menu side that is enabled
163
167
  // so try to get the first menu side found
164
- return find((m) => m.side === menu);
168
+ const sideMenuRefs = menus.filter((m) => m.side === menu);
169
+ if (sideMenuRefs.length >= 1) {
170
+ if (sideMenuRefs.length > 1) {
171
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${sideMenuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, sideMenuRefs.map((m) => m.el));
172
+ }
173
+ return sideMenuRefs[0].el;
174
+ }
165
175
  }
166
176
  else if (menu != null) {
167
177
  // the menuId was not left or right
@@ -203,9 +213,6 @@ const createMenuController = () => {
203
213
  };
204
214
  const _register = (menu) => {
205
215
  if (menus.indexOf(menu) < 0) {
206
- if (!menu.disabled) {
207
- _setActiveMenu(menu);
208
- }
209
216
  menus.push(menu);
210
217
  }
211
218
  };
@@ -215,13 +222,6 @@ const createMenuController = () => {
215
222
  menus.splice(index, 1);
216
223
  }
217
224
  };
218
- const _setActiveMenu = (menu) => {
219
- // if this menu should be enabled
220
- // then find all the other menus on this same side
221
- // and automatically disable other same side menus
222
- const side = menu.side;
223
- menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
224
- };
225
225
  const _setOpen = async (menu, shouldOpen, animated) => {
226
226
  if (isAnimatingSync()) {
227
227
  return false;
@@ -293,7 +293,6 @@ const createMenuController = () => {
293
293
  _register,
294
294
  _unregister,
295
295
  _setOpen,
296
- _setActiveMenu,
297
296
  };
298
297
  };
299
298
  const menuController = /*@__PURE__*/ createMenuController();
@@ -183,7 +183,7 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
183
183
  });
184
184
  };
185
185
 
186
- const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header:not(.header-collapse-main):has(~ion-content ion-header[collapse=condense]){opacity:0}";
186
+ const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}";
187
187
 
188
188
  const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
189
189
 
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';
5
5
  import { g as getTimeGivenProgression } from './cubic-bezier.js';
6
- import { d as doc } from './index5.js';
7
6
  import { G as GESTURE_CONTROLLER } from './gesture-controller.js';
8
7
  import { o as isEndSide, i as inheritAriaAttributes, p as assert, m as clamp } from './helpers.js';
9
8
  import { m as menuController } from './index4.js';
@@ -549,17 +548,6 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
549
548
  // close if this menu is open, and should not be enabled
550
549
  this.forceClosing();
551
550
  }
552
- if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
553
- /**
554
- * Only set the active menu if the menu element is
555
- * present in the DOM. Otherwise if it was destructively
556
- * re-hydrated (through Angular Universal), then ignore
557
- * setting the removed node as the active menu.
558
- */
559
- if (!this.disabled) {
560
- menuController._setActiveMenu(this);
561
- }
562
- }
563
551
  assert(!this.isAnimating, 'can not be animating');
564
552
  }
565
553
  forceClosing() {
@@ -3,6 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
+ const index = require('./index-cc7dfb7c.js');
6
7
  const hardwareBackButton = require('./hardware-back-button-b67c8e75.js');
7
8
  const helpers = require('./helpers-ea4ccbcb.js');
8
9
  const ionicGlobal = require('./ionic-global-14a0604b.js');
@@ -157,13 +158,22 @@ const createMenuController = () => {
157
158
  if (menu === 'start' || menu === 'end') {
158
159
  // there could be more than one menu on the same side
159
160
  // so first try to get the enabled one
160
- const menuRef = find((m) => m.side === menu && !m.disabled);
161
- if (menuRef) {
162
- return menuRef;
161
+ const menuRefs = menus.filter((m) => m.side === menu && !m.disabled);
162
+ if (menuRefs.length >= 1) {
163
+ if (menuRefs.length > 1) {
164
+ index.printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${menuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, menuRefs.map((m) => m.el));
165
+ }
166
+ return menuRefs[0].el;
163
167
  }
164
168
  // didn't find a menu side that is enabled
165
169
  // so try to get the first menu side found
166
- return find((m) => m.side === menu);
170
+ const sideMenuRefs = menus.filter((m) => m.side === menu);
171
+ if (sideMenuRefs.length >= 1) {
172
+ if (sideMenuRefs.length > 1) {
173
+ index.printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${sideMenuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, sideMenuRefs.map((m) => m.el));
174
+ }
175
+ return sideMenuRefs[0].el;
176
+ }
167
177
  }
168
178
  else if (menu != null) {
169
179
  // the menuId was not left or right
@@ -205,9 +215,6 @@ const createMenuController = () => {
205
215
  };
206
216
  const _register = (menu) => {
207
217
  if (menus.indexOf(menu) < 0) {
208
- if (!menu.disabled) {
209
- _setActiveMenu(menu);
210
- }
211
218
  menus.push(menu);
212
219
  }
213
220
  };
@@ -217,13 +224,6 @@ const createMenuController = () => {
217
224
  menus.splice(index, 1);
218
225
  }
219
226
  };
220
- const _setActiveMenu = (menu) => {
221
- // if this menu should be enabled
222
- // then find all the other menus on this same side
223
- // and automatically disable other same side menus
224
- const side = menu.side;
225
- menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
226
- };
227
227
  const _setOpen = async (menu, shouldOpen, animated) => {
228
228
  if (isAnimatingSync()) {
229
229
  return false;
@@ -295,7 +295,6 @@ const createMenuController = () => {
295
295
  _register,
296
296
  _unregister,
297
297
  _setOpen,
298
- _setActiveMenu,
299
298
  };
300
299
  };
301
300
  const menuController = /*@__PURE__*/ createMenuController();
@@ -14,14 +14,14 @@ const index$1 = require('./index-0ee995e4.js');
14
14
  const ionicGlobal = require('./ionic-global-14a0604b.js');
15
15
  const helpers = require('./helpers-ea4ccbcb.js');
16
16
  const config = require('./config-d5882735.js');
17
- const index$2 = require('./index-5121bb90.js');
17
+ const index$2 = require('./index-7c1ae0f0.js');
18
18
  const overlays = require('./overlays-d3a13e61.js');
19
19
  require('./index-306a7476.js');
20
20
  require('./index-6f887430.js');
21
21
  require('./gesture-controller-b46721be.js');
22
+ require('./index-cc7dfb7c.js');
22
23
  require('./hardware-back-button-b67c8e75.js');
23
24
  require('./framework-delegate-c0873a6f.js');
24
- require('./index-cc7dfb7c.js');
25
25
 
26
26
  const IonicSlides = (opts) => {
27
27
  const { swiper, extendParams } = opts;
@@ -788,7 +788,7 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
788
788
  });
789
789
  };
790
790
 
791
- const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header:not(.header-collapse-main):has(~ion-content ion-header[collapse=condense]){opacity:0}";
791
+ const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}";
792
792
 
793
793
  const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
794
794
 
@@ -7,18 +7,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-6f887430.js');
9
9
  const cubicBezier = require('./cubic-bezier-6b9222ad.js');
10
- const index$2 = require('./index-306a7476.js');
11
10
  const gestureController = require('./gesture-controller-b46721be.js');
12
11
  const helpers = require('./helpers-ea4ccbcb.js');
13
- const index$1 = require('./index-5121bb90.js');
12
+ const index$1 = require('./index-7c1ae0f0.js');
14
13
  const overlays = require('./overlays-d3a13e61.js');
15
14
  const ionicGlobal = require('./ionic-global-14a0604b.js');
16
15
  const theme = require('./theme-fbc56b3b.js');
17
- const index$3 = require('./index-d8d1fc0b.js');
16
+ const index$2 = require('./index-d8d1fc0b.js');
17
+ require('./index-cc7dfb7c.js');
18
18
  require('./hardware-back-button-b67c8e75.js');
19
19
  require('./animation-2bb33618.js');
20
+ require('./index-306a7476.js');
20
21
  require('./framework-delegate-c0873a6f.js');
21
- require('./index-cc7dfb7c.js');
22
22
 
23
23
  const menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";
24
24
 
@@ -553,17 +553,6 @@ const Menu = class {
553
553
  // close if this menu is open, and should not be enabled
554
554
  this.forceClosing();
555
555
  }
556
- if (index$2.doc === null || index$2.doc === void 0 ? void 0 : index$2.doc.contains(this.el)) {
557
- /**
558
- * Only set the active menu if the menu element is
559
- * present in the DOM. Otherwise if it was destructively
560
- * re-hydrated (through Angular Universal), then ignore
561
- * setting the removed node as the active menu.
562
- */
563
- if (!this.disabled) {
564
- index$1.menuController._setActiveMenu(this);
565
- }
566
- }
567
556
  helpers.assert(!this.isAnimating, 'can not be animating');
568
557
  }
569
558
  forceClosing() {
@@ -647,7 +636,7 @@ const MenuButton = class {
647
636
  render() {
648
637
  const { color, disabled, inheritedAttributes } = this;
649
638
  const mode = ionicGlobal.getIonMode(this);
650
- const menuIcon = ionicGlobal.config.get('menuIcon', mode === 'ios' ? index$3.menuOutline : index$3.menuSharp);
639
+ const menuIcon = ionicGlobal.config.get('menuIcon', mode === 'ios' ? index$2.menuOutline : index$2.menuSharp);
651
640
  const hidden = this.autoHide && !this.visible;
652
641
  const attrs = {
653
642
  type: this.type,
@@ -103,22 +103,4 @@ ion-header ion-toolbar:first-of-type {
103
103
  .header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,
104
104
  .header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse {
105
105
  visibility: hidden;
106
- }
107
-
108
- /**
109
- * The main header is only hidden once the collapsible large
110
- * title is configured. As a result, if the main header loads
111
- * before the collapsible large title is configured then the
112
- * main header will be visible briefly before being hidden
113
- * by the collapsible large title.
114
- *
115
- * The following selector ensures that any main header
116
- * on a page with a collapsible large title is hidden
117
- * before the collapsible large title is configured.
118
- * Once the collapsible large title is configured the main
119
- * header will have the ".header-collapse-main" class, and
120
- * this selector will no longer apply.
121
- */
122
- ion-header:not(.header-collapse-main):has(~ ion-content ion-header[collapse=condense]) {
123
- opacity: 0;
124
106
  }
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { Build, Host, h } from "@stencil/core";
5
5
  import { getTimeGivenProgression } from "../../utils/animation/cubic-bezier";
6
- import { doc } from "../../utils/browser/index";
7
6
  import { GESTURE_CONTROLLER } from "../../utils/gesture/index";
8
7
  import { inheritAriaAttributes, assert, clamp, isEndSide as isEnd } from "../../utils/helpers";
9
8
  import { menuController } from "../../utils/menu-controller/index";
@@ -540,17 +539,6 @@ export class Menu {
540
539
  // close if this menu is open, and should not be enabled
541
540
  this.forceClosing();
542
541
  }
543
- if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
544
- /**
545
- * Only set the active menu if the menu element is
546
- * present in the DOM. Otherwise if it was destructively
547
- * re-hydrated (through Angular Universal), then ignore
548
- * setting the removed node as the active menu.
549
- */
550
- if (!this.disabled) {
551
- menuController._setActiveMenu(this);
552
- }
553
- }
554
542
  assert(!this.isAnimating, 'can not be animating');
555
543
  }
556
544
  forceClosing() {
@@ -0,0 +1,56 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { expect } from "@playwright/test";
5
+ import { configs, test } from "../../../../utils/test/playwright/index";
6
+ /**
7
+ * This behavior does not vary across modes/directions
8
+ */
9
+ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
10
+ test.describe(title('menu: multiple'), () => {
11
+ test.beforeEach(async ({ page }) => {
12
+ await page.goto(`/src/components/menu/test/multiple`, config);
13
+ });
14
+ test('should present each menu on the same side individually', async ({ page }) => {
15
+ const primaryMenu = page.locator('ion-menu#primary-menu');
16
+ const secondaryMenu = page.locator('ion-menu#secondary-menu');
17
+ await primaryMenu.evaluate((el) => el.open());
18
+ await expect(primaryMenu).toBeVisible();
19
+ await primaryMenu.evaluate((el) => el.close());
20
+ await expect(primaryMenu).toBeHidden();
21
+ await secondaryMenu.evaluate((el) => el.open());
22
+ await expect(secondaryMenu).toBeVisible();
23
+ await secondaryMenu.evaluate((el) => el.close());
24
+ await expect(secondaryMenu).toBeHidden();
25
+ });
26
+ test('should close first menu when showing another menu on same side', async ({ page }) => {
27
+ const primaryMenu = page.locator('ion-menu#primary-menu');
28
+ const secondaryMenu = page.locator('ion-menu#secondary-menu');
29
+ await primaryMenu.evaluate((el) => el.open());
30
+ await expect(primaryMenu).toBeVisible();
31
+ await secondaryMenu.evaluate((el) => el.open());
32
+ await expect(primaryMenu).toBeHidden();
33
+ await expect(secondaryMenu).toBeVisible();
34
+ });
35
+ test('passing side to the menuController when multiple menus have that side should result in a warning', async ({ page, }) => {
36
+ const logs = [];
37
+ page.on('console', (msg) => {
38
+ if (msg.type() === 'warning') {
39
+ logs.push(msg.text());
40
+ }
41
+ });
42
+ await page.evaluate(() => window.menuController.open('start'));
43
+ expect(logs.length).toBe(1);
44
+ });
45
+ test('passing side to the menuController when multiple disabled menus have that side should result in a warning', async ({ page, }) => {
46
+ const logs = [];
47
+ page.on('console', (msg) => {
48
+ if (msg.type() === 'warning') {
49
+ logs.push(msg.text());
50
+ }
51
+ });
52
+ await page.evaluate(() => window.menuController.open('end'));
53
+ expect(logs.length).toBe(1);
54
+ });
55
+ });
56
+ });
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { printIonWarning } from "../logging/index";
4
5
  import { MENU_BACK_BUTTON_PRIORITY } from "../hardware-back-button";
5
6
  import { componentOnReady } from "../helpers";
6
7
  import { menuOverlayAnimation } from "./animations/overlay";
@@ -67,13 +68,22 @@ const createMenuController = () => {
67
68
  if (menu === 'start' || menu === 'end') {
68
69
  // there could be more than one menu on the same side
69
70
  // so first try to get the enabled one
70
- const menuRef = find((m) => m.side === menu && !m.disabled);
71
- if (menuRef) {
72
- return menuRef;
71
+ const menuRefs = menus.filter((m) => m.side === menu && !m.disabled);
72
+ if (menuRefs.length >= 1) {
73
+ if (menuRefs.length > 1) {
74
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${menuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, menuRefs.map((m) => m.el));
75
+ }
76
+ return menuRefs[0].el;
73
77
  }
74
78
  // didn't find a menu side that is enabled
75
79
  // so try to get the first menu side found
76
- return find((m) => m.side === menu);
80
+ const sideMenuRefs = menus.filter((m) => m.side === menu);
81
+ if (sideMenuRefs.length >= 1) {
82
+ if (sideMenuRefs.length > 1) {
83
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${sideMenuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, sideMenuRefs.map((m) => m.el));
84
+ }
85
+ return sideMenuRefs[0].el;
86
+ }
77
87
  }
78
88
  else if (menu != null) {
79
89
  // the menuId was not left or right
@@ -115,9 +125,6 @@ const createMenuController = () => {
115
125
  };
116
126
  const _register = (menu) => {
117
127
  if (menus.indexOf(menu) < 0) {
118
- if (!menu.disabled) {
119
- _setActiveMenu(menu);
120
- }
121
128
  menus.push(menu);
122
129
  }
123
130
  };
@@ -127,13 +134,6 @@ const createMenuController = () => {
127
134
  menus.splice(index, 1);
128
135
  }
129
136
  };
130
- const _setActiveMenu = (menu) => {
131
- // if this menu should be enabled
132
- // then find all the other menus on this same side
133
- // and automatically disable other same side menus
134
- const side = menu.side;
135
- menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
136
- };
137
137
  const _setOpen = async (menu, shouldOpen, animated) => {
138
138
  if (isAnimatingSync()) {
139
139
  return false;
@@ -205,7 +205,6 @@ const createMenuController = () => {
205
205
  _register,
206
206
  _unregister,
207
207
  _setOpen,
208
- _setActiveMenu,
209
208
  };
210
209
  };
211
210
  export const menuController = /*@__PURE__*/ createMenuController();
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-10-03T20:44:38",
2
+ "timestamp": "2023-10-05T13:59:07",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.3.0",
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
+ import { p as printIonWarning } from './index-595d62c9.js';
4
5
  import { MENU_BACK_BUTTON_PRIORITY } from './hardware-back-button-39299f84.js';
5
6
  import { c as componentOnReady } from './helpers-3379ba19.js';
6
7
  import { b as getIonMode } from './ionic-global-b3fc28dd.js';
@@ -155,13 +156,22 @@ const createMenuController = () => {
155
156
  if (menu === 'start' || menu === 'end') {
156
157
  // there could be more than one menu on the same side
157
158
  // so first try to get the enabled one
158
- const menuRef = find((m) => m.side === menu && !m.disabled);
159
- if (menuRef) {
160
- return menuRef;
159
+ const menuRefs = menus.filter((m) => m.side === menu && !m.disabled);
160
+ if (menuRefs.length >= 1) {
161
+ if (menuRefs.length > 1) {
162
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${menuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, menuRefs.map((m) => m.el));
163
+ }
164
+ return menuRefs[0].el;
161
165
  }
162
166
  // didn't find a menu side that is enabled
163
167
  // so try to get the first menu side found
164
- return find((m) => m.side === menu);
168
+ const sideMenuRefs = menus.filter((m) => m.side === menu);
169
+ if (sideMenuRefs.length >= 1) {
170
+ if (sideMenuRefs.length > 1) {
171
+ printIonWarning(`menuController queried for a menu on the "${menu}" side, but ${sideMenuRefs.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, sideMenuRefs.map((m) => m.el));
172
+ }
173
+ return sideMenuRefs[0].el;
174
+ }
165
175
  }
166
176
  else if (menu != null) {
167
177
  // the menuId was not left or right
@@ -203,9 +213,6 @@ const createMenuController = () => {
203
213
  };
204
214
  const _register = (menu) => {
205
215
  if (menus.indexOf(menu) < 0) {
206
- if (!menu.disabled) {
207
- _setActiveMenu(menu);
208
- }
209
216
  menus.push(menu);
210
217
  }
211
218
  };
@@ -215,13 +222,6 @@ const createMenuController = () => {
215
222
  menus.splice(index, 1);
216
223
  }
217
224
  };
218
- const _setActiveMenu = (menu) => {
219
- // if this menu should be enabled
220
- // then find all the other menus on this same side
221
- // and automatically disable other same side menus
222
- const side = menu.side;
223
- menus.filter((m) => m.side === side && m !== menu).forEach((m) => (m.disabled = true));
224
- };
225
225
  const _setOpen = async (menu, shouldOpen, animated) => {
226
226
  if (isAnimatingSync()) {
227
227
  return false;
@@ -293,7 +293,6 @@ const createMenuController = () => {
293
293
  _register,
294
294
  _unregister,
295
295
  _setOpen,
296
- _setActiveMenu,
297
296
  };
298
297
  };
299
298
  const menuController = /*@__PURE__*/ createMenuController();
package/dist/esm/index.js CHANGED
@@ -10,14 +10,14 @@ export { createGesture } from './index-ff313b19.js';
10
10
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-b3fc28dd.js';
11
11
  export { c as componentOnReady } from './helpers-3379ba19.js';
12
12
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-96c9ace3.js';
13
- export { m as menuController } from './index-61bddc90.js';
13
+ export { m as menuController } from './index-c6640d16.js';
14
14
  export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-8fc6656c.js';
15
15
  import './index-7a14ecec.js';
16
16
  import './index-2d388930.js';
17
17
  import './gesture-controller-0fa396c4.js';
18
+ import './index-595d62c9.js';
18
19
  import './hardware-back-button-39299f84.js';
19
20
  import './framework-delegate-aa433dea.js';
20
- import './index-595d62c9.js';
21
21
 
22
22
  const IonicSlides = (opts) => {
23
23
  const { swiper, extendParams } = opts;
@@ -784,7 +784,7 @@ const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
784
784
  });
785
785
  };
786
786
 
787
- const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header:not(.header-collapse-main):has(~ion-content ion-header[collapse=condense]){opacity:0}";
787
+ const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:1px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}";
788
788
 
789
789
  const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}";
790
790
 
@@ -3,18 +3,18 @@
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-2d388930.js';
5
5
  import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
6
- import { d as doc } from './index-7a14ecec.js';
7
6
  import { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
8
7
  import { p as isEndSide, i as inheritAriaAttributes, o as assert, l as clamp } from './helpers-3379ba19.js';
9
- import { m as menuController } from './index-61bddc90.js';
8
+ import { m as menuController } from './index-c6640d16.js';
10
9
  import { q as getPresentedOverlay } from './overlays-8fc6656c.js';
11
10
  import { c as config, b as getIonMode } from './ionic-global-b3fc28dd.js';
12
11
  import { c as createColorClasses, h as hostContext } from './theme-17531cdf.js';
13
12
  import { u as menuOutline, v as menuSharp } from './index-ecfc2c9f.js';
13
+ import './index-595d62c9.js';
14
14
  import './hardware-back-button-39299f84.js';
15
15
  import './animation-a1d9e088.js';
16
+ import './index-7a14ecec.js';
16
17
  import './framework-delegate-aa433dea.js';
17
- import './index-595d62c9.js';
18
18
 
19
19
  const menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";
20
20
 
@@ -549,17 +549,6 @@ const Menu = class {
549
549
  // close if this menu is open, and should not be enabled
550
550
  this.forceClosing();
551
551
  }
552
- if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
553
- /**
554
- * Only set the active menu if the menu element is
555
- * present in the DOM. Otherwise if it was destructively
556
- * re-hydrated (through Angular Universal), then ignore
557
- * setting the removed node as the active menu.
558
- */
559
- if (!this.disabled) {
560
- menuController._setActiveMenu(this);
561
- }
562
- }
563
552
  assert(!this.isAnimating, 'can not be animating');
564
553
  }
565
554
  forceClosing() {
@@ -0,0 +1,4 @@
1
+ import{__awaiter,__generator}from"tslib";
2
+ /*!
3
+ * (C) Ionic http://ionicframework.com - MIT License
4
+ */import{p as printIonWarning}from"./index-595d62c9.js";import{MENU_BACK_BUTTON_PRIORITY}from"./hardware-back-button-39299f84.js";import{c as componentOnReady}from"./helpers-3379ba19.js";import{b as getIonMode}from"./ionic-global-b3fc28dd.js";import{c as createAnimation}from"./animation-a1d9e088.js";var baseAnimation=function(n){return createAnimation().duration(n?400:300)};var menuOverlayAnimation=function(n){var e;var r;var t=n.width+8;var i=createAnimation();var a=createAnimation();if(n.isEndSide){e=t+"px";r="0px"}else{e=-t+"px";r="0px"}i.addElement(n.menuInnerEl).fromTo("transform","translateX(".concat(e,")"),"translateX(".concat(r,")"));var o=getIonMode(n);var u=o==="ios";var s=u?.2:.25;a.addElement(n.backdropEl).fromTo("opacity",.01,s);return baseAnimation(u).addAnimation([i,a])};var menuPushAnimation=function(n){var e;var r;var t=getIonMode(n);var i=n.width;if(n.isEndSide){e=-i+"px";r=i+"px"}else{e=i+"px";r=-i+"px"}var a=createAnimation().addElement(n.menuInnerEl).fromTo("transform","translateX(".concat(r,")"),"translateX(0px)");var o=createAnimation().addElement(n.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(e,")"));var u=createAnimation().addElement(n.backdropEl).fromTo("opacity",.01,.32);return baseAnimation(t==="ios").addAnimation([a,o,u])};var menuRevealAnimation=function(n){var e=getIonMode(n);var r=n.width*(n.isEndSide?-1:1)+"px";var t=createAnimation().addElement(n.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(r,")"));return baseAnimation(e==="ios").addAnimation(t)};var createMenuController=function(){var n=new Map;var e=[];var r=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,c(n)];case 1:e=r.sent();if(e){return[2,e.open()]}return[2,false]}}))}))};var t=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,n!==undefined?c(n):f()];case 1:e=r.sent();if(e!==undefined){return[2,e.close()]}return[2,false]}}))}))};var i=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,c(n)];case 1:e=r.sent();if(e){return[2,e.toggle()]}return[2,false]}}))}))};var a=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,c(e)];case 1:r=t.sent();if(r){r.disabled=!n}return[2,r]}}))}))};var o=function(n,e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:return[4,c(e)];case 1:r=t.sent();if(r){r.swipeGesture=n}return[2,r]}}))}))};var u=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e,e;return __generator(this,(function(r){switch(r.label){case 0:if(!(n!=null))return[3,2];return[4,c(n)];case 1:e=r.sent();return[2,e!==undefined&&e.isOpen()];case 2:return[4,f()];case 3:e=r.sent();return[2,e!==undefined]}}))}))};var s=function(n){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,c(n)];case 1:e=r.sent();if(e){return[2,!e.disabled]}return[2,false]}}))}))};var c=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r,t,i;return __generator(this,(function(a){switch(a.label){case 0:return[4,E()];case 1:a.sent();if(n==="start"||n==="end"){r=e.filter((function(e){return e.side===n&&!e.disabled}));if(r.length>=1){if(r.length>1){printIonWarning('menuController queried for a menu on the "'.concat(n,'" side, but ').concat(r.length," menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side."),r.map((function(n){return n.el})))}return[2,r[0].el]}t=e.filter((function(e){return e.side===n}));if(t.length>=1){if(t.length>1){printIonWarning('menuController queried for a menu on the "'.concat(n,'" side, but ').concat(t.length," menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side."),t.map((function(n){return n.el})))}return[2,t[0].el]}}else if(n!=null){return[2,A((function(e){return e.menuId===n}))]}i=A((function(n){return!n.disabled}));if(i){return[2,i]}return[2,e.length>0?e[0].el:undefined]}}))}))};var f=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,E()];case 1:n.sent();return[2,g()]}}))}))};var d=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,E()];case 1:n.sent();return[2,w()]}}))}))};var l=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,E()];case 1:n.sent();return[2,b()]}}))}))};var v=function(e,r){n.set(e,r)};var m=function(n){if(e.indexOf(n)<0){e.push(n)}};var _=function(n){var r=e.indexOf(n);if(r>-1){e.splice(r,1)}};var h=function(n,e,r){return __awaiter(void 0,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:if(b()){return[2,false]}if(!e)return[3,3];return[4,f()];case 1:t=i.sent();if(!(t&&n.el!==t))return[3,3];return[4,t.setOpen(false,false)];case 2:i.sent();i.label=3;case 3:return[2,n._setOpen(e,r)]}}))}))};var p=function(e,r){var t=n.get(e);if(!t){throw new Error("animation not registered")}var i=t(r);return i};var g=function(){return A((function(n){return n._isOpen}))};var w=function(){return e.map((function(n){return n.el}))};var b=function(){return e.some((function(n){return n.isAnimating}))};var A=function(n){var r=e.find(n);if(r!==undefined){return r.el}return undefined};var E=function(){return Promise.all(Array.from(document.querySelectorAll("ion-menu")).map((function(n){return new Promise((function(e){return componentOnReady(n,e)}))})))};v("reveal",menuRevealAnimation);v("push",menuPushAnimation);v("overlay",menuOverlayAnimation);if(typeof document!=="undefined"){document.addEventListener("ionBackButton",(function(n){var e=g();if(e){n.detail.register(MENU_BACK_BUTTON_PRIORITY,(function(){return e.close()}))}}))}return{registerAnimation:v,get:c,getMenus:d,getOpen:f,isEnabled:s,swipeGesture:o,isAnimating:l,isOpen:u,enable:a,toggle:i,close:t,open:r,_getOpenSync:g,_createAnimation:p,_register:m,_unregister:_,_setOpen:h}};var menuController=createMenuController();export{menuController as m};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- export{c as createAnimation}from"./animation-a1d9e088.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-87684bba.js";export{iosTransitionAnimation}from"./ios.transition-81e1aed6.js";export{mdTransitionAnimation}from"./md.transition-5becd8b5.js";export{g as getTimeGivenProgression}from"./cubic-bezier-66542bc5.js";export{createGesture}from"./index-ff313b19.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-b3fc28dd.js";export{c as componentOnReady}from"./helpers-3379ba19.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-96c9ace3.js";export{m as menuController}from"./index-61bddc90.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-8fc6656c.js";import"./index-7a14ecec.js";import"./index-2d388930.js";import"./gesture-controller-0fa396c4.js";import"./hardware-back-button-39299f84.js";import"./framework-delegate-aa433dea.js";import"./index-595d62c9.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};
4
+ export{c as createAnimation}from"./animation-a1d9e088.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-87684bba.js";export{iosTransitionAnimation}from"./ios.transition-81e1aed6.js";export{mdTransitionAnimation}from"./md.transition-5becd8b5.js";export{g as getTimeGivenProgression}from"./cubic-bezier-66542bc5.js";export{createGesture}from"./index-ff313b19.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-b3fc28dd.js";export{c as componentOnReady}from"./helpers-3379ba19.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-96c9ace3.js";export{m as menuController}from"./index-c6640d16.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-8fc6656c.js";import"./index-7a14ecec.js";import"./index-2d388930.js";import"./gesture-controller-0fa396c4.js";import"./index-595d62c9.js";import"./hardware-back-button-39299f84.js";import"./framework-delegate-aa433dea.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};