@ionic/core 8.4.1-dev.11732033492.170e160c → 8.4.1-dev.11732214948.1e438717
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.
- package/components/index4.js +1 -0
- package/components/overlays.js +7 -15
- package/dist/cjs/{index-8e789962.js → index-b4d26770.js} +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-56ca9a8a.js → overlays-ba0f6986.js} +6 -14
- package/dist/collection/utils/menu-controller/animations/overlay.js +1 -0
- package/dist/collection/utils/overlays.js +6 -15
- package/dist/docs.json +1 -1
- package/dist/esm/{index-24b48b06.js → index-bbcb57e4.js} +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-74d44899.js → overlays-ae10d43d.js} +7 -15
- package/dist/esm-es5/index-bbcb57e4.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/overlays-ae10d43d.js +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-2ed40a5e.system.entry.js → p-0161caf9.system.entry.js} +1 -1
- package/dist/ionic/p-04fc24ee.system.js +4 -0
- package/dist/ionic/p-16426689.js +4 -0
- package/dist/ionic/{p-fd31bb04.system.js → p-1ad7aa93.system.js} +1 -1
- package/dist/ionic/{p-ffbee4f6.system.entry.js → p-1b7605a7.system.entry.js} +1 -1
- package/dist/ionic/{p-1d1121ac.system.entry.js → p-1e41f2aa.system.entry.js} +1 -1
- package/dist/ionic/{p-8b9b0e01.system.entry.js → p-2ae283ce.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-1e3784b9.entry.js → p-4a274c89.entry.js} +1 -1
- package/dist/ionic/{p-5a83c181.system.entry.js → p-5393e8bb.system.entry.js} +1 -1
- package/dist/ionic/{p-08ae4532.system.entry.js → p-5b5c1505.system.entry.js} +1 -1
- package/dist/ionic/p-5c831f49.js +4 -0
- package/dist/ionic/{p-79bdcdd5.system.entry.js → p-6734db42.system.entry.js} +1 -1
- package/dist/ionic/{p-36e4ad92.system.entry.js → p-857ca696.system.entry.js} +1 -1
- package/dist/ionic/{p-fa2cf74d.entry.js → p-9910f786.entry.js} +1 -1
- package/dist/ionic/{p-ec288b34.entry.js → p-a1051806.entry.js} +1 -1
- package/dist/ionic/{p-23745fed.entry.js → p-a1b9a163.entry.js} +1 -1
- package/dist/ionic/{p-36662b24.entry.js → p-a1dee17f.entry.js} +1 -1
- package/dist/ionic/{p-03c7b27e.entry.js → p-a34b4d94.entry.js} +1 -1
- package/dist/ionic/{p-500c02e3.entry.js → p-bbf358de.entry.js} +1 -1
- package/dist/ionic/{p-ddc18b30.system.entry.js → p-d2abae50.system.entry.js} +1 -1
- package/dist/ionic/p-d6279c39.system.js +4 -0
- package/dist/ionic/{p-43567c9d.system.entry.js → p-d7e982e7.system.entry.js} +1 -1
- package/dist/ionic/{p-f912705b.entry.js → p-e2252ad6.entry.js} +1 -1
- package/dist/ionic/{p-3cb0f90c.entry.js → p-ee7ba749.entry.js} +1 -1
- package/dist/ionic/{p-a5d0bd7c.entry.js → p-f10b70a1.entry.js} +1 -1
- package/hydrate/index.js +7 -14
- package/hydrate/index.mjs +7 -14
- package/package.json +1 -1
- package/dist/esm-es5/index-24b48b06.js +0 -4
- package/dist/esm-es5/overlays-74d44899.js +0 -4
- package/dist/ionic/p-061d4611.js +0 -4
- package/dist/ionic/p-3e5b5cf1.system.js +0 -4
- package/dist/ionic/p-b82d4cab.js +0 -4
- package/dist/ionic/p-e7ed4a7f.system.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -5397,26 +5397,18 @@ const createTriggerController = () => {
|
|
|
5397
5397
|
* If the overlay is being presented, it prevents focus rings from appearing
|
|
5398
5398
|
* in incorrect positions due to the transition (specifically `transform`
|
|
5399
5399
|
* styles), ensuring that when aria-hidden is removed, the focus rings are
|
|
5400
|
-
* correctly displayed in the final location of the elements.
|
|
5401
|
-
* applies to Android devices.
|
|
5402
|
-
*
|
|
5403
|
-
* If this solution is applied to iOS devices, then it leads to a bug where
|
|
5404
|
-
* the overlays cannot be accessed by screen readers. This is due to
|
|
5405
|
-
* VoiceOver not being able to update the accessibility tree when the
|
|
5406
|
-
* `aria-hidden` is removed.
|
|
5400
|
+
* correctly displayed in the final location of the elements.
|
|
5407
5401
|
*
|
|
5408
5402
|
* @param overlay - The overlay that is being animated.
|
|
5409
5403
|
*/
|
|
5410
5404
|
const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
5411
5405
|
if (doc === undefined)
|
|
5412
5406
|
return;
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
overlay.setAttribute('aria-hidden', 'true');
|
|
5419
|
-
}
|
|
5407
|
+
/**
|
|
5408
|
+
* Once the animation is complete, this attribute will be removed.
|
|
5409
|
+
* This is done at the end of the `present` method.
|
|
5410
|
+
*/
|
|
5411
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
5420
5412
|
};
|
|
5421
5413
|
/**
|
|
5422
5414
|
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
@@ -17139,6 +17131,7 @@ const menuOverlayAnimation = (menu) => {
|
|
|
17139
17131
|
closedX = -width + 'px';
|
|
17140
17132
|
openedX = '0px';
|
|
17141
17133
|
}
|
|
17134
|
+
menu.menuInnerEl.style.willChange = 'transform';
|
|
17142
17135
|
menuAnimation.addElement(menu.menuInnerEl).fromTo('transform', `translateX(${closedX})`, `translateX(${openedX})`);
|
|
17143
17136
|
const mode = getIonMode$1(menu);
|
|
17144
17137
|
const isIos = mode === 'ios';
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{d as doc}from"./index-a5d50daf.js";import{MENU_BACK_BUTTON_PRIORITY}from"./hardware-back-button-06ef3c3e.js";import{p as printIonWarning}from"./index-9b0d46f4.js";import{c as componentOnReady}from"./helpers-da915de8.js";import{b as getIonMode}from"./ionic-global-c81d82ab.js";import{c as createAnimation}from"./animation-eab5a4ca.js";var baseAnimation=function(n){return createAnimation().duration(n?400:300)};var menuOverlayAnimation=function(n){var r;var e;var t=n.width+8;var i=createAnimation();var a=createAnimation();if(n.isEndSide){r=t+"px";e="0px"}else{r=-t+"px";e="0px"}i.addElement(n.menuInnerEl).fromTo("transform","translateX(".concat(r,")"),"translateX(".concat(e,")"));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 r;var e;var t=getIonMode(n);var i=n.width;if(n.isEndSide){r=-i+"px";e=i+"px"}else{r=i+"px";e=-i+"px"}var a=createAnimation().addElement(n.menuInnerEl).fromTo("transform","translateX(".concat(e,")"),"translateX(0px)");var o=createAnimation().addElement(n.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(r,")"));var u=createAnimation().addElement(n.backdropEl).fromTo("opacity",.01,.32);return baseAnimation(t==="ios").addAnimation([a,o,u])};var menuRevealAnimation=function(n){var r=getIonMode(n);var e=n.width*(n.isEndSide?-1:1)+"px";var t=createAnimation().addElement(n.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(e,")"));return baseAnimation(r==="ios").addAnimation(t)};var createMenuController=function(){var n=new Map;var r=[];var e=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,c(n,true)];case 1:r=e.sent();if(r){return[2,r.open()]}return[2,false]}}))}))};var t=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,n!==undefined?c(n,true):f()];case 1:r=e.sent();if(r!==undefined){return[2,r.close()]}return[2,false]}}))}))};var i=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,c(n,true)];case 1:r=e.sent();if(r){return[2,r.toggle()]}return[2,false]}}))}))};var a=function(n,r){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:e=t.sent();if(e){e.disabled=!n}return[2,e]}}))}))};var o=function(n,r){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:e=t.sent();if(e){e.swipeGesture=n}return[2,e]}}))}))};var u=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r,r;return __generator(this,(function(e){switch(e.label){case 0:if(!(n!=null))return[3,2];return[4,c(n)];case 1:r=e.sent();return[2,r!==undefined&&r.isOpen()];case 2:return[4,f()];case 3:r=e.sent();return[2,r!==undefined]}}))}))};var s=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,c(n)];case 1:r=e.sent();if(r){return[2,!r.disabled]}return[2,false]}}))}))};var c=function(n){var e=[];for(var t=1;t<arguments.length;t++){e[t-1]=arguments[t]}return __awaiter(void 0,__spreadArray([n],e,true),void 0,(function(n,e){var t,i,a;if(e===void 0){e=false}return __generator(this,(function(o){switch(o.label){case 0:return[4,x()];case 1:o.sent();if(n==="start"||n==="end"){t=r.filter((function(r){return r.side===n&&!r.disabled}));if(t.length>=1){if(t.length>1&&e){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]}i=r.filter((function(r){return r.side===n}));if(i.length>=1){if(i.length>1&&e){printIonWarning('menuController queried for a menu on the "'.concat(n,'" side, but ').concat(i.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."),i.map((function(n){return n.el})))}return[2,i[0].el]}}else if(n!=null){return[2,b((function(r){return r.menuId===n}))]}a=b((function(n){return!n.disabled}));if(a){return[2,a]}return[2,r.length>0?r[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,x()];case 1:n.sent();return[2,w()]}}))}))};var v=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,x()];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,x()];case 1:n.sent();return[2,A()]}}))}))};var _=function(r,e){n.set(r,e)};var m=function(n){if(r.indexOf(n)<0){r.push(n)}};var l=function(n){var e=r.indexOf(n);if(e>-1){r.splice(e,1)}};var h=function(n,r,e,t){return __awaiter(void 0,void 0,void 0,(function(){var i;return __generator(this,(function(a){switch(a.label){case 0:if(A()){return[2,false]}if(!r)return[3,3];return[4,f()];case 1:i=a.sent();if(!(i&&n.el!==i))return[3,3];return[4,i.setOpen(false,false)];case 2:a.sent();a.label=3;case 3:return[2,n._setOpen(r,e,t)]}}))}))};var p=function(r,e){var t=n.get(r);if(!t){throw new Error("animation not registered")}var i=t(e);return i};var w=function(){return b((function(n){return n._isOpen}))};var g=function(){return r.map((function(n){return n.el}))};var A=function(){return r.some((function(n){return n.isAnimating}))};var b=function(n){var e=r.find(n);if(e!==undefined){return e.el}return undefined};var x=function(){return Promise.all(Array.from(document.querySelectorAll("ion-menu")).map((function(n){return new Promise((function(r){return componentOnReady(n,r)}))})))};_("reveal",menuRevealAnimation);_("push",menuPushAnimation);_("overlay",menuOverlayAnimation);doc===null||doc===void 0?void 0:doc.addEventListener("ionBackButton",(function(n){var r=w();if(r){n.detail.register(MENU_BACK_BUTTON_PRIORITY,(function(){return r.close()}))}}));return{registerAnimation:_,get:c,getMenus:v,getOpen:f,isEnabled:s,swipeGesture:o,isAnimating:d,isOpen:u,enable:a,toggle:i,close:t,open:e,_getOpenSync:w,_createAnimation:p,_register:m,_unregister:l,_setOpen:h}};var menuController=createMenuController();export{menuController as m};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{d as doc}from"./index-a5d50daf.js";import{f as focusVisibleElement,c as componentOnReady,a as addEventListener,b as removeEventListener,g as getElementRoot}from"./helpers-da915de8.js";import{OVERLAY_BACK_BUTTON_PRIORITY,shouldUseCloseWatcher}from"./hardware-back-button-06ef3c3e.js";import{b as getIonMode,c as config,a as isPlatform}from"./ionic-global-c81d82ab.js";import{C as CoreDelegate}from"./framework-delegate-63d1a679.js";import{B as BACKDROP_NO_SCROLL}from"./gesture-controller-314a54f6.js";import{p as printIonWarning}from"./index-9b0d46f4.js";var focusableQueryString='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';var focusFirstDescendant=function(e,n){var r=e.querySelector(focusableQueryString);focusElementInContext(r,n!==null&&n!==void 0?n:e)};var focusLastDescendant=function(e,n){var r=Array.from(e.querySelectorAll(focusableQueryString));var t=r.length>0?r[r.length-1]:null;focusElementInContext(t,n!==null&&n!==void 0?n:e)};var focusElementInContext=function(e,n){var r=e;var t=e===null||e===void 0?void 0:e.shadowRoot;if(t){r=t.querySelector(focusableQueryString)||e}if(r){focusVisibleElement(r)}else{n.focus()}};var lastOverlayIndex=0;var lastId=0;var activeAnimations=new WeakMap;var createController=function(e){return{create:function(n){return createOverlay(e,n)},dismiss:function(n,r,t){return dismissOverlay(document,n,r,e,t)},getTop:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,getPresentedOverlay(document,e)]}))}))}}};var alertController=createController("ion-alert");var actionSheetController=createController("ion-action-sheet");var loadingController=createController("ion-loading");var modalController=createController("ion-modal");var pickerController=createController("ion-picker-legacy");var popoverController=createController("ion-popover");var toastController=createController("ion-toast");var prepareOverlay=function(e){if(typeof document!=="undefined"){connectListeners(document)}var n=lastOverlayIndex++;e.overlayIndex=n};var setOverlayId=function(e){if(!e.hasAttribute("id")){e.id="ion-overlay-".concat(++lastId)}return e.id};var createOverlay=function(e,n){if(typeof window!=="undefined"&&typeof window.customElements!=="undefined"){return window.customElements.whenDefined(e).then((function(){var r=document.createElement(e);r.classList.add("overlay-hidden");Object.assign(r,Object.assign(Object.assign({},n),{hasController:true}));getAppRoot(document).appendChild(r);return new Promise((function(e){return componentOnReady(r,e)}))}))}return Promise.resolve()};var isOverlayHidden=function(e){return e.classList.contains("overlay-hidden")};var focusElementInOverlay=function(e,n){var r=e;var t=e===null||e===void 0?void 0:e.shadowRoot;if(t){r=t.querySelector(focusableQueryString)||e}if(r){focusVisibleElement(r)}else{n.focus()}};var trapKeyboardFocus=function(e,n){var r=getPresentedOverlay(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");var t=e.target;if(!r||!t){return}if(r.classList.contains(FOCUS_TRAP_DISABLE_CLASS)){return}var o=function(){if(r===t){r.lastFocus=undefined}else if(t.tagName==="ION-TOAST"){focusElementInOverlay(r.lastFocus,r)}else{var e=getElementRoot(r);if(!e.contains(t)){return}var o=e.querySelector(".ion-overlay-wrapper");if(!o){return}if(o.contains(t)||t===e.querySelector("ion-backdrop")){r.lastFocus=t}else{var a=r.lastFocus;focusFirstDescendant(o,r);if(a===n.activeElement){focusLastDescendant(o,r)}r.lastFocus=n.activeElement}}};var a=function(){if(r.contains(t)){r.lastFocus=t}else if(t.tagName==="ION-TOAST"){focusElementInOverlay(r.lastFocus,r)}else{var e=r.lastFocus;focusFirstDescendant(r);if(e===n.activeElement){focusLastDescendant(r)}r.lastFocus=n.activeElement}};if(r.shadowRoot){a()}else{o()}};var connectListeners=function(e){if(lastOverlayIndex===0){lastOverlayIndex=1;e.addEventListener("focus",(function(n){trapKeyboardFocus(n,e)}),true);e.addEventListener("ionBackButton",(function(n){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){n.detail.register(OVERLAY_BACK_BUTTON_PRIORITY,(function(){r.dismiss(undefined,BACKDROP)}))}}));if(!shouldUseCloseWatcher()){e.addEventListener("keydown",(function(n){if(n.key==="Escape"){var r=getPresentedOverlay(e);if(r===null||r===void 0?void 0:r.backdropDismiss){r.dismiss(undefined,BACKDROP)}}}))}}};var dismissOverlay=function(e,n,r,t,o){var a=getPresentedOverlay(e,t,o);if(!a){return Promise.reject("overlay does not exist")}return a.dismiss(n,r)};var getOverlays=function(e,n){if(n===undefined){n="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"}return Array.from(e.querySelectorAll(n)).filter((function(e){return e.overlayIndex>0}))};var getPresentedOverlays=function(e,n){return getOverlays(e,n).filter((function(e){return!isOverlayHidden(e)}))};var getPresentedOverlay=function(e,n,r){var t=getPresentedOverlays(e,n);return r===undefined?t[t.length-1]:t.find((function(e){return e.id===r}))};var setRootAriaHidden=function(e){if(e===void 0){e=false}var n=getAppRoot(document);var r=n.querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");if(!r){return}if(e){r.setAttribute("aria-hidden","true")}else{r.removeAttribute("aria-hidden")}};var present=function(e,n,r,t,o){return __awaiter(void 0,void 0,void 0,(function(){var a,i,d,s,u;return __generator(this,(function(l){switch(l.label){case 0:if(e.presented){return[2]}if(e.el.tagName!=="ION-TOAST"){setRootAriaHidden(true)}document.body.classList.add(BACKDROP_NO_SCROLL);hideUnderlyingOverlaysFromScreenReaders(e.el);hideAnimatingOverlayFromScreenReaders(e.el);e.presented=true;e.willPresent.emit();(a=e.willPresentShorthand)===null||a===void 0?void 0:a.emit();d=getIonMode(e);s=e.enterAnimation?e.enterAnimation:config.get(n,d==="ios"?r:t);return[4,overlayAnimation(e,s,e.el,o)];case 1:u=l.sent();if(u){e.didPresent.emit();(i=e.didPresentShorthand)===null||i===void 0?void 0:i.emit()}if(e.el.tagName!=="ION-TOAST"){restoreElementFocus(e.el)}if(e.keyboardClose&&(document.activeElement===null||!e.el.contains(document.activeElement))){e.el.focus()}e.el.removeAttribute("aria-hidden");return[2]}}))}))};var restoreElementFocus=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:n=document.activeElement;if(!n){return[2]}r=n===null||n===void 0?void 0:n.shadowRoot;if(r){n=r.querySelector(focusableQueryString)||n}return[4,e.onDidDismiss()];case 1:t.sent();if(document.activeElement===null||document.activeElement===document.body){n.focus()}return[2]}}))}))};var dismiss=function(e,n,r,t,o,a,i){return __awaiter(void 0,void 0,void 0,(function(){var d,s,u,l,c,v,f,m;return __generator(this,(function(O){switch(O.label){case 0:if(!e.presented){return[2,false]}u=doc!==undefined?getPresentedOverlays(doc).filter((function(e){return e.tagName!=="ION-TOAST"})):[];l=u.length===1&&u[0].id===e.el.id;if(l){setRootAriaHidden(false);document.body.classList.remove(BACKDROP_NO_SCROLL)}e.presented=false;O.label=1;case 1:O.trys.push([1,4,,5]);hideAnimatingOverlayFromScreenReaders(e.el);e.el.style.setProperty("pointer-events","none");e.willDismiss.emit({data:n,role:r});(d=e.willDismissShorthand)===null||d===void 0?void 0:d.emit({data:n,role:r});c=getIonMode(e);v=e.leaveAnimation?e.leaveAnimation:config.get(t,c==="ios"?o:a);if(!(r!==GESTURE))return[3,3];return[4,overlayAnimation(e,v,e.el,i)];case 2:O.sent();O.label=3;case 3:e.didDismiss.emit({data:n,role:r});(s=e.didDismissShorthand)===null||s===void 0?void 0:s.emit({data:n,role:r});f=activeAnimations.get(e)||[];f.forEach((function(e){return e.destroy()}));activeAnimations.delete(e);e.el.classList.add("overlay-hidden");e.el.style.removeProperty("pointer-events");if(e.el.lastFocus!==undefined){e.el.lastFocus=undefined}return[3,5];case 4:m=O.sent();console.error(m);return[3,5];case 5:e.el.remove();revealOverlaysToScreenReaders();return[2,true]}}))}))};var getAppRoot=function(e){return e.querySelector("ion-app")||e.body};var overlayAnimation=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var o,a,i;return __generator(this,(function(d){switch(d.label){case 0:r.classList.remove("overlay-hidden");o=e.el;a=n(o,t);if(!e.animated||!config.getBoolean("animated",true)){a.duration(0)}if(e.keyboardClose){a.beforeAddWrite((function(){var e=r.ownerDocument.activeElement;if(e===null||e===void 0?void 0:e.matches("input,ion-input, ion-textarea")){e.blur()}}))}i=activeAnimations.get(e)||[];activeAnimations.set(e,__spreadArray(__spreadArray([],i,true),[a],false));return[4,a.play()];case 1:d.sent();return[2,true]}}))}))};var eventMethod=function(e,n){var r;var t=new Promise((function(e){return r=e}));onceEvent(e,n,(function(e){r(e.detail)}));return t};var onceEvent=function(e,n,r){var t=function(o){removeEventListener(e,n,t);r(o)};addEventListener(e,n,t)};var isCancel=function(e){return e==="cancel"||e===BACKDROP};var defaultGate=function(e){return e()};var safeCall=function(e,n){if(typeof e==="function"){var r=config.get("_zoneGate",defaultGate);return r((function(){try{return e(n)}catch(e){throw e}}))}return undefined};var BACKDROP="backdrop";var GESTURE="gesture";var OVERLAY_GESTURE_PRIORITY=39;var createDelegateController=function(e){var n=false;var r;var t=CoreDelegate();var o=function(o){if(o===void 0){o=false}if(r&&!o){return{delegate:r,inline:n}}var a=e.el,i=e.hasController,d=e.delegate;var s=a.parentNode;n=s!==null&&!i;r=n?d||t:d;return{inline:n,delegate:r}};var a=function(n){return __awaiter(void 0,void 0,void 0,(function(){var r,t;return __generator(this,(function(a){switch(a.label){case 0:r=o(true).delegate;if(!r)return[3,2];return[4,r.attachViewToDom(e.el,n)];case 1:return[2,a.sent()];case 2:t=e.hasController;if(t&&n!==undefined){throw new Error("framework delegate is missing")}return[2,null]}}))}))};var i=function(){var n=o().delegate;if(n&&e.el!==undefined){n.removeViewFromDom(e.el.parentElement,e.el)}};return{attachViewToDom:a,removeViewFromDom:i}};var createTriggerController=function(){var e;var n=function(){if(e){e();e=undefined}};var r=function(r,t){n();var o=t!==undefined?document.getElementById(t):null;if(!o){printIonWarning('A trigger element with the ID "'.concat(t,'" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.'),r);return}var a=function(e,n){var r=function(){n.present()};e.addEventListener("click",r);return function(){e.removeEventListener("click",r)}};e=a(o,r)};return{addClickListener:r,removeClickListener:n}};var hideAnimatingOverlayFromScreenReaders=function(e){if(doc===undefined)return;if(isPlatform("android")){e.setAttribute("aria-hidden","true")}};var hideUnderlyingOverlaysFromScreenReaders=function(e){var n;if(doc===undefined)return;var r=getPresentedOverlays(doc);for(var t=r.length-1;t>=0;t--){var o=r[t];var a=(n=r[t+1])!==null&&n!==void 0?n:e;if(a.hasAttribute("aria-hidden")||a.tagName!=="ION-TOAST"){o.setAttribute("aria-hidden","true")}}};var revealOverlaysToScreenReaders=function(){if(doc===undefined)return;var e=getPresentedOverlays(doc);for(var n=e.length-1;n>=0;n--){var r=e[n];r.removeAttribute("aria-hidden");if(r.tagName!=="ION-TOAST"){break}}};var FOCUS_TRAP_DISABLE_CLASS="ion-disable-focus-trap";export{BACKDROP as B,FOCUS_TRAP_DISABLE_CLASS as F,GESTURE as G,OVERLAY_GESTURE_PRIORITY as O,alertController as a,actionSheetController as b,popoverController as c,createDelegateController as d,createTriggerController as e,present as f,dismiss as g,eventMethod as h,isCancel as i,prepareOverlay as j,setOverlayId as k,loadingController as l,modalController as m,focusFirstDescendant as n,getPresentedOverlay as o,pickerController as p,focusLastDescendant as q,safeCall as s,toastController as t};
|
package/dist/ionic/p-061d4611.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as e}from"./p-7b30edcc.js";import{f as n,c as o,a as t,b as i,g as a}from"./p-b51e4004.js";import{OVERLAY_BACK_BUTTON_PRIORITY as r,shouldUseCloseWatcher as d}from"./p-ecceeb90.js";import{b as s,c as l,a as c}from"./p-0574e87e.js";import{C as u}from"./p-3cc276f4.js";import{B as m}from"./p-9b97df10.js";import{p}from"./p-06fee233.js";const v='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',f=(e,n)=>{const o=e.querySelector(v);b(o,null!=n?n:e)},h=(e,n)=>{const o=Array.from(e.querySelectorAll(v));b(o.length>0?o[o.length-1]:null,null!=n?n:e)},b=(e,o)=>{let t=e;const i=null==e?void 0:e.shadowRoot;i&&(t=i.querySelector(v)||e),t?n(t):o.focus()};let y=0,w=0;const g=new WeakMap,O=e=>({create:n=>D(e,n),dismiss:(n,o,t)=>M(document,n,o,e,t),getTop:async()=>F(document,e)}),T=O("ion-alert"),k=O("ion-action-sheet"),x=O("ion-loading"),j=O("ion-modal"),A=O("ion-picker-legacy"),I=O("ion-popover"),N=O("ion-toast"),S=e=>{"undefined"!=typeof document&&P(document);const n=y++;e.overlayIndex=n},C=e=>(e.hasAttribute("id")||(e.id="ion-overlay-"+ ++w),e.id),D=(e,n)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(e).then((()=>{const t=document.createElement(e);return t.classList.add("overlay-hidden"),Object.assign(t,Object.assign(Object.assign({},n),{hasController:!0})),z(document).appendChild(t),new Promise((e=>o(t,e)))})):Promise.resolve(),B=(e,o)=>{let t=e;const i=null==e?void 0:e.shadowRoot;i&&(t=i.querySelector(v)||e),t?n(t):o.focus()},P=e=>{0===y&&(y=1,e.addEventListener("focus",(n=>{((e,n)=>{const o=F(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=e.target;o&&t&&(o.classList.contains(oe)||(o.shadowRoot?(()=>{if(o.contains(t))o.lastFocus=t;else if("ION-TOAST"===t.tagName)B(o.lastFocus,o);else{const e=o.lastFocus;f(o),e===n.activeElement&&h(o),o.lastFocus=n.activeElement}})():(()=>{if(o===t)o.lastFocus=void 0;else if("ION-TOAST"===t.tagName)B(o.lastFocus,o);else{const e=a(o);if(!e.contains(t))return;const i=e.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===e.querySelector("ion-backdrop"))o.lastFocus=t;else{const e=o.lastFocus;f(i,o),e===n.activeElement&&h(i,o),o.lastFocus=n.activeElement}}})()))})(n,e)}),!0),e.addEventListener("ionBackButton",(n=>{const o=F(e);(null==o?void 0:o.backdropDismiss)&&n.detail.register(r,(()=>{o.dismiss(void 0,Q)}))})),d()||e.addEventListener("keydown",(n=>{if("Escape"===n.key){const n=F(e);(null==n?void 0:n.backdropDismiss)&&n.dismiss(void 0,Q)}})))},M=(e,n,o,t,i)=>{const a=F(e,t,i);return a?a.dismiss(n,o):Promise.reject("overlay does not exist")},E=(e,n)=>((e,n)=>(void 0===n&&(n="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(e.querySelectorAll(n)).filter((e=>e.overlayIndex>0))))(e,n).filter((e=>!e.classList.contains("overlay-hidden"))),F=(e,n,o)=>{const t=E(e,n);return void 0===o?t[t.length-1]:t.find((e=>e.id===o))},G=(e=!1)=>{const n=z(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");n&&(e?n.setAttribute("aria-hidden","true"):n.removeAttribute("aria-hidden"))},L=async(e,n,o,t,i)=>{var a,r;if(e.presented)return;"ION-TOAST"!==e.el.tagName&&G(!0),document.body.classList.add(m),ee(e.el),Z(e.el),e.presented=!0,e.willPresent.emit(),null===(a=e.willPresentShorthand)||void 0===a||a.emit();const d=s(e),c=e.enterAnimation?e.enterAnimation:l.get(n,"ios"===d?o:t);await W(e,c,e.el,i)&&(e.didPresent.emit(),null===(r=e.didPresentShorthand)||void 0===r||r.emit()),"ION-TOAST"!==e.el.tagName&&V(e.el),!e.keyboardClose||null!==document.activeElement&&e.el.contains(document.activeElement)||e.el.focus(),e.el.removeAttribute("aria-hidden")},V=async e=>{let n=document.activeElement;if(!n)return;const o=null==n?void 0:n.shadowRoot;o&&(n=o.querySelector(v)||n),await e.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||n.focus()},q=async(n,o,t,i,a,r,d)=>{var c,u;if(!n.presented)return!1;const p=void 0!==e?E(e).filter((e=>"ION-TOAST"!==e.tagName)):[];1===p.length&&p[0].id===n.el.id&&(G(!1),document.body.classList.remove(m)),n.presented=!1;try{Z(n.el),n.el.style.setProperty("pointer-events","none"),n.willDismiss.emit({data:o,role:t}),null===(c=n.willDismissShorthand)||void 0===c||c.emit({data:o,role:t});const e=s(n),m=n.leaveAnimation?n.leaveAnimation:l.get(i,"ios"===e?a:r);t!==R&&await W(n,m,n.el,d),n.didDismiss.emit({data:o,role:t}),null===(u=n.didDismissShorthand)||void 0===u||u.emit({data:o,role:t}),(g.get(n)||[]).forEach((e=>e.destroy())),g.delete(n),n.el.classList.add("overlay-hidden"),n.el.style.removeProperty("pointer-events"),void 0!==n.el.lastFocus&&(n.el.lastFocus=void 0)}catch(e){console.error(e)}return n.el.remove(),ne(),!0},z=e=>e.querySelector("ion-app")||e.body,W=async(e,n,o,t)=>{o.classList.remove("overlay-hidden");const i=n(e.el,t);e.animated&&l.getBoolean("animated",!0)||i.duration(0),e.keyboardClose&&i.beforeAddWrite((()=>{const e=o.ownerDocument.activeElement;(null==e?void 0:e.matches("input,ion-input, ion-textarea"))&&e.blur()}));const a=g.get(e)||[];return g.set(e,[...a,i]),await i.play(),!0},$=(e,n)=>{let o;const t=new Promise((e=>o=e));return _(e,n,(e=>{o(e.detail)})),t},_=(e,n,o)=>{const a=t=>{i(e,n,a),o(t)};t(e,n,a)},H=e=>"cancel"===e||e===Q,J=e=>e(),K=(e,n)=>{if("function"==typeof e)return l.get("_zoneGate",J)((()=>{try{return e(n)}catch(e){throw e}}))},Q="backdrop",R="gesture",U=39,X=e=>{let n,o=!1;const t=u(),i=(i=!1)=>{if(n&&!i)return{delegate:n,inline:o};const{el:a,hasController:r,delegate:d}=e;return o=null!==a.parentNode&&!r,n=o?d||t:d,{inline:o,delegate:n}};return{attachViewToDom:async n=>{const{delegate:o}=i(!0);if(o)return await o.attachViewToDom(e.el,n);const{hasController:t}=e;if(t&&void 0!==n)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:n}=i();n&&void 0!==e.el&&n.removeViewFromDom(e.el.parentElement,e.el)}}},Y=()=>{let e;const n=()=>{e&&(e(),e=void 0)};return{addClickListener:(o,t)=>{n();const i=void 0!==t?document.getElementById(t):null;i?e=((e,n)=>{const o=()=>{n.present()};return e.addEventListener("click",o),()=>{e.removeEventListener("click",o)}})(i,o):p(`A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,o)},removeClickListener:n}},Z=n=>{void 0!==e&&c("android")&&n.setAttribute("aria-hidden","true")},ee=n=>{var o;if(void 0===e)return;const t=E(e);for(let e=t.length-1;e>=0;e--){const i=t[e],a=null!==(o=t[e+1])&&void 0!==o?o:n;(a.hasAttribute("aria-hidden")||"ION-TOAST"!==a.tagName)&&i.setAttribute("aria-hidden","true")}},ne=()=>{if(void 0===e)return;const n=E(e);for(let e=n.length-1;e>=0;e--){const o=n[e];if(o.removeAttribute("aria-hidden"),"ION-TOAST"!==o.tagName)break}},oe="ion-disable-focus-trap";export{Q as B,oe as F,R as G,U as O,T as a,k as b,I as c,X as d,Y as e,L as f,q as g,$ as h,H as i,S as j,C as k,x as l,j as m,f as n,F as o,A as p,h as q,K as s,N as t}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,r,i){function t(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,o){function a(n){try{f(i.next(n))}catch(n){o(n)}}function u(n){try{f(i["throw"](n))}catch(n){o(n)}}function f(n){n.done?r(n.value):t(n.value).then(a,u)}f((i=i.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,t,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(e){return f([n,e])}}function f(u){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(r=0)),r)try{if(i=1,t&&(o=u[0]&2?t["return"]:u[0]?t["throw"]||((o=t["return"])&&o.call(t),0):t.next)&&!(o=o.call(t,u[1])).done)return o;if(t=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;t=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(n,r)}catch(n){u=[6,n];t=0}finally{i=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,e,r){if(r||arguments.length===2)for(var i=0,t=e.length,o;i<t;i++){if(o||!(i in e)){if(!o)o=Array.prototype.slice.call(e,0,i);o[i]=e[i]}}return n.concat(o||Array.prototype.slice.call(e))};
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/System.register(["./p-792919fd.system.js","./p-3ad285e3.system.js","./p-9f3008d4.system.js","./p-a69b9fc5.system.js","./p-8635f5e6.system.js","./p-20d469d0.system.js","./p-ff4b7e40.system.js"],(function(n){"use strict";var e,r,i,t,o,a,u,f,d,c,v,s,l,h;return{setters:[function(n){e=n.d},function(n){r=n.f;i=n.c;t=n.a;o=n.b;a=n.g},function(n){u=n.OVERLAY_BACK_BUTTON_PRIORITY;f=n.shouldUseCloseWatcher},function(n){d=n.b;c=n.c;v=n.a},function(n){s=n.C},function(n){l=n.B},function(n){h=n.p}],execute:function(){var m=this;var p='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';var y=n("n",(function(n,e){var r=n.querySelector(p);b(r,e!==null&&e!==void 0?e:n)}));var w=n("q",(function(n,e){var r=Array.from(n.querySelectorAll(p));var i=r.length>0?r[r.length-1]:null;b(i,e!==null&&e!==void 0?e:n)}));var b=function(n,e){var i=n;var t=n===null||n===void 0?void 0:n.shadowRoot;if(t){i=t.querySelector(p)||n}if(i){r(i)}else{e.focus()}};var _=0;var g=0;var O=new WeakMap;var k=function(n){return{create:function(e){return B(n,e)},dismiss:function(e,r,i){return F(document,e,r,n,i)},getTop:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,q(document,n)]}))}))}}};var T=n("a",k("ion-alert"));var A=n("b",k("ion-action-sheet"));var x=n("l",k("ion-loading"));var j=n("m",k("ion-modal"));var S=n("p",k("ion-picker-legacy"));var I=n("c",k("ion-popover"));var N=n("t",k("ion-toast"));var D=n("j",(function(n){if(typeof document!=="undefined"){M(document)}var e=_++;n.overlayIndex=e}));var P=n("k",(function(n){if(!n.hasAttribute("id")){n.id="ion-overlay-".concat(++g)}return n.id}));var B=function(n,e){if(typeof window!=="undefined"&&typeof window.customElements!=="undefined"){return window.customElements.whenDefined(n).then((function(){var r=document.createElement(n);r.classList.add("overlay-hidden");Object.assign(r,Object.assign(Object.assign({},e),{hasController:true}));K(document).appendChild(r);return new Promise((function(n){return i(r,n)}))}))}return Promise.resolve()};var C=function(n){return n.classList.contains("overlay-hidden")};var E=function(n,e){var i=n;var t=n===null||n===void 0?void 0:n.shadowRoot;if(t){i=t.querySelector(p)||n}if(i){r(i)}else{e.focus()}};var G=function(n,e){var r=q(e,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");var i=n.target;if(!r||!i){return}if(r.classList.contains(fn)){return}var t=function(){if(r===i){r.lastFocus=undefined}else if(i.tagName==="ION-TOAST"){E(r.lastFocus,r)}else{var n=a(r);if(!n.contains(i)){return}var t=n.querySelector(".ion-overlay-wrapper");if(!t){return}if(t.contains(i)||i===n.querySelector("ion-backdrop")){r.lastFocus=i}else{var o=r.lastFocus;y(t,r);if(o===e.activeElement){w(t,r)}r.lastFocus=e.activeElement}}};var o=function(){if(r.contains(i)){r.lastFocus=i}else if(i.tagName==="ION-TOAST"){E(r.lastFocus,r)}else{var n=r.lastFocus;y(r);if(n===e.activeElement){w(r)}r.lastFocus=e.activeElement}};if(r.shadowRoot){o()}else{t()}};var M=function(n){if(_===0){_=1;n.addEventListener("focus",(function(e){G(e,n)}),true);n.addEventListener("ionBackButton",(function(e){var r=q(n);if(r===null||r===void 0?void 0:r.backdropDismiss){e.detail.register(u,(function(){r.dismiss(undefined,$)}))}}));if(!f()){n.addEventListener("keydown",(function(e){if(e.key==="Escape"){var r=q(n);if(r===null||r===void 0?void 0:r.backdropDismiss){r.dismiss(undefined,$)}}}))}}};var F=function(n,e,r,i,t){var o=q(n,i,t);if(!o){return Promise.reject("overlay does not exist")}return o.dismiss(e,r)};var L=function(n,e){if(e===undefined){e="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"}return Array.from(n.querySelectorAll(e)).filter((function(n){return n.overlayIndex>0}))};var V=function(n,e){return L(n,e).filter((function(n){return!C(n)}))};var q=n("o",(function(n,e,r){var i=V(n,e);return r===undefined?i[i.length-1]:i.find((function(n){return n.id===r}))}));var z=function(n){if(n===void 0){n=false}var e=K(document);var r=e.querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");if(!r){return}if(n){r.setAttribute("aria-hidden","true")}else{r.removeAttribute("aria-hidden")}};var W=n("f",(function(n,e,r,i,t){return __awaiter(m,void 0,void 0,(function(){var o,a,u,f,v;return __generator(this,(function(s){switch(s.label){case 0:if(n.presented){return[2]}if(n.el.tagName!=="ION-TOAST"){z(true)}document.body.classList.add(l);an(n.el);on(n.el);n.presented=true;n.willPresent.emit();(o=n.willPresentShorthand)===null||o===void 0?void 0:o.emit();u=d(n);f=n.enterAnimation?n.enterAnimation:c.get(e,u==="ios"?r:i);return[4,Q(n,f,n.el,t)];case 1:v=s.sent();if(v){n.didPresent.emit();(a=n.didPresentShorthand)===null||a===void 0?void 0:a.emit()}if(n.el.tagName!=="ION-TOAST"){H(n.el)}if(n.keyboardClose&&(document.activeElement===null||!n.el.contains(document.activeElement))){n.el.focus()}n.el.removeAttribute("aria-hidden");return[2]}}))}))}));var H=function(n){return __awaiter(m,void 0,void 0,(function(){var e,r;return __generator(this,(function(i){switch(i.label){case 0:e=document.activeElement;if(!e){return[2]}r=e===null||e===void 0?void 0:e.shadowRoot;if(r){e=r.querySelector(p)||e}return[4,n.onDidDismiss()];case 1:i.sent();if(document.activeElement===null||document.activeElement===document.body){e.focus()}return[2]}}))}))};var J=n("g",(function(n,r,i,t,o,a,u){return __awaiter(m,void 0,void 0,(function(){var f,v,s,h,m,p,y,w;return __generator(this,(function(b){switch(b.label){case 0:if(!n.presented){return[2,false]}s=e!==undefined?V(e).filter((function(n){return n.tagName!=="ION-TOAST"})):[];h=s.length===1&&s[0].id===n.el.id;if(h){z(false);document.body.classList.remove(l)}n.presented=false;b.label=1;case 1:b.trys.push([1,4,,5]);on(n.el);n.el.style.setProperty("pointer-events","none");n.willDismiss.emit({data:r,role:i});(f=n.willDismissShorthand)===null||f===void 0?void 0:f.emit({data:r,role:i});m=d(n);p=n.leaveAnimation?n.leaveAnimation:c.get(t,m==="ios"?o:a);if(!(i!==nn))return[3,3];return[4,Q(n,p,n.el,u)];case 2:b.sent();b.label=3;case 3:n.didDismiss.emit({data:r,role:i});(v=n.didDismissShorthand)===null||v===void 0?void 0:v.emit({data:r,role:i});y=O.get(n)||[];y.forEach((function(n){return n.destroy()}));O.delete(n);n.el.classList.add("overlay-hidden");n.el.style.removeProperty("pointer-events");if(n.el.lastFocus!==undefined){n.el.lastFocus=undefined}return[3,5];case 4:w=b.sent();console.error(w);return[3,5];case 5:n.el.remove();un();return[2,true]}}))}))}));var K=function(n){return n.querySelector("ion-app")||n.body};var Q=function(n,e,r,i){return __awaiter(m,void 0,void 0,(function(){var t,o,a;return __generator(this,(function(u){switch(u.label){case 0:r.classList.remove("overlay-hidden");t=n.el;o=e(t,i);if(!n.animated||!c.getBoolean("animated",true)){o.duration(0)}if(n.keyboardClose){o.beforeAddWrite((function(){var n=r.ownerDocument.activeElement;if(n===null||n===void 0?void 0:n.matches("input,ion-input, ion-textarea")){n.blur()}}))}a=O.get(n)||[];O.set(n,__spreadArray(__spreadArray([],a,true),[o],false));return[4,o.play()];case 1:u.sent();return[2,true]}}))}))};var R=n("h",(function(n,e){var r;var i=new Promise((function(n){return r=n}));U(n,e,(function(n){r(n.detail)}));return i}));var U=function(n,e,r){var i=function(t){o(n,e,i);r(t)};t(n,e,i)};var X=n("i",(function(n){return n==="cancel"||n===$}));var Y=function(n){return n()};var Z=n("s",(function(n,e){if(typeof n==="function"){var r=c.get("_zoneGate",Y);return r((function(){try{return n(e)}catch(n){throw n}}))}return undefined}));var $=n("B","backdrop");var nn=n("G","gesture");var en=n("O",39);var rn=n("d",(function(n){var e=false;var r;var i=s();var t=function(t){if(t===void 0){t=false}if(r&&!t){return{delegate:r,inline:e}}var o=n.el,a=n.hasController,u=n.delegate;var f=o.parentNode;e=f!==null&&!a;r=e?u||i:u;return{inline:e,delegate:r}};var o=function(e){return __awaiter(m,void 0,void 0,(function(){var r,i;return __generator(this,(function(o){switch(o.label){case 0:r=t(true).delegate;if(!r)return[3,2];return[4,r.attachViewToDom(n.el,e)];case 1:return[2,o.sent()];case 2:i=n.hasController;if(i&&e!==undefined){throw new Error("framework delegate is missing")}return[2,null]}}))}))};var a=function(){var e=t().delegate;if(e&&n.el!==undefined){e.removeViewFromDom(n.el.parentElement,n.el)}};return{attachViewToDom:o,removeViewFromDom:a}}));var tn=n("e",(function(){var n;var e=function(){if(n){n();n=undefined}};var r=function(r,i){e();var t=i!==undefined?document.getElementById(i):null;if(!t){h('A trigger element with the ID "'.concat(i,'" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.'),r);return}var o=function(n,e){var r=function(){e.present()};n.addEventListener("click",r);return function(){n.removeEventListener("click",r)}};n=o(t,r)};return{addClickListener:r,removeClickListener:e}}));var on=function(n){if(e===undefined)return;if(v("android")){n.setAttribute("aria-hidden","true")}};var an=function(n){var r;if(e===undefined)return;var i=V(e);for(var t=i.length-1;t>=0;t--){var o=i[t];var a=(r=i[t+1])!==null&&r!==void 0?r:n;if(a.hasAttribute("aria-hidden")||a.tagName!=="ION-TOAST"){o.setAttribute("aria-hidden","true")}}};var un=function(){if(e===undefined)return;var n=V(e);for(var r=n.length-1;r>=0;r--){var i=n[r];i.removeAttribute("aria-hidden");if(i.tagName!=="ION-TOAST"){break}}};var fn=n("F","ion-disable-focus-trap")}}}));
|
package/dist/ionic/p-b82d4cab.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as e}from"./p-7b30edcc.js";import{MENU_BACK_BUTTON_PRIORITY as t}from"./p-ecceeb90.js";import{p as n}from"./p-06fee233.js";import{c as r}from"./p-b51e4004.js";import{b as s}from"./p-0574e87e.js";import{c as a}from"./p-c7e16491.js";const o=e=>a().duration(e?400:300),i=e=>{let t,n;const r=e.width+8,i=a(),u=a();e.isEndSide?(t=r+"px",n="0px"):(t=-r+"px",n="0px"),i.addElement(e.menuInnerEl).fromTo("transform",`translateX(${t})`,`translateX(${n})`);const c="ios"===s(e),p=c?.2:.25;return u.addElement(e.backdropEl).fromTo("opacity",.01,p),o(c).addAnimation([i,u])},u=e=>{let t,n;const r=s(e),i=e.width;e.isEndSide?(t=-i+"px",n=i+"px"):(t=i+"px",n=-i+"px");const u=a().addElement(e.menuInnerEl).fromTo("transform",`translateX(${n})`,"translateX(0px)"),c=a().addElement(e.contentEl).fromTo("transform","translateX(0px)",`translateX(${t})`),p=a().addElement(e.backdropEl).fromTo("opacity",.01,.32);return o("ios"===r).addAnimation([u,c,p])},c=e=>{const t=s(e),n=e.width*(e.isEndSide?-1:1)+"px",r=a().addElement(e.contentEl).fromTo("transform","translateX(0px)",`translateX(${n})`);return o("ios"===t).addAnimation(r)},p=(()=>{const s=new Map,a=[],o=async(e,t=!1)=>{if(await d(),"start"===e||"end"===e){const r=a.filter((t=>t.side===e&&!t.disabled));if(r.length>=1)return r.length>1&&t&&n(`menuController queried for a menu on the "${e}" side, but ${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((e=>e.el))),r[0].el;const s=a.filter((t=>t.side===e));if(s.length>=1)return s.length>1&&t&&n(`menuController queried for a menu on the "${e}" side, but ${s.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.`,s.map((e=>e.el))),s[0].el}else if(null!=e)return w((t=>t.menuId===e));return w((e=>!e.disabled))||(a.length>0?a[0].el:void 0)},p=async()=>(await d(),f()),m=(e,t)=>{s.set(e,t)},f=()=>w((e=>e._isOpen)),l=()=>a.some((e=>e.isAnimating)),w=e=>{const t=a.find(e);if(void 0!==t)return t.el},d=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map((e=>new Promise((t=>r(e,t))))));return m("reveal",c),m("push",u),m("overlay",i),null==e||e.addEventListener("ionBackButton",(e=>{const n=f();n&&e.detail.register(t,(()=>n.close()))})),{registerAnimation:m,get:o,getMenus:async()=>(await d(),a.map((e=>e.el))),getOpen:p,isEnabled:async e=>{const t=await o(e);return!!t&&!t.disabled},swipeGesture:async(e,t)=>{const n=await o(t);return n&&(n.swipeGesture=e),n},isAnimating:async()=>(await d(),l()),isOpen:async e=>{if(null!=e){const t=await o(e);return void 0!==t&&t.isOpen()}return void 0!==await p()},enable:async(e,t)=>{const n=await o(t);return n&&(n.disabled=!e),n},toggle:async e=>{const t=await o(e,!0);return!!t&&t.toggle()},close:async e=>{const t=await(void 0!==e?o(e,!0):p());return void 0!==t&&t.close()},open:async e=>{const t=await o(e,!0);return!!t&&t.open()},_getOpenSync:f,_createAnimation:(e,t)=>{const n=s.get(e);if(!n)throw new Error("animation not registered");return n(t)},_register:e=>{a.indexOf(e)<0&&a.push(e)},_unregister:e=>{const t=a.indexOf(e);t>-1&&a.splice(t,1)},_setOpen:async(e,t,n,r)=>{if(l())return!1;if(t){const t=await p();t&&e.el!==t&&await t.setOpen(!1,!1)}return e._setOpen(t,n,r)}}})();export{p as m}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,n,t,e){function i(r){return r instanceof t?r:new t((function(n){n(r)}))}return new(t||(t=Promise))((function(t,u){function a(r){try{f(e.next(r))}catch(r){u(r)}}function o(r){try{f(e["throw"](r))}catch(r){u(r)}}function f(r){r.done?t(r.value):i(r.value).then(a,o)}f((e=e.apply(r,n||[])).next())}))};var __generator=this&&this.__generator||function(r,n){var t={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},e,i,u,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(r){return function(n){return f([r,n])}}function f(o){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(t=0)),t)try{if(e=1,i&&(u=o[0]&2?i["return"]:o[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,o[1])).done)return u;if(i=0,u)o=[o[0]&2,u.value];switch(o[0]){case 0:case 1:u=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;i=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(u=t.trys,u=u.length>0&&u[u.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!u||o[1]>u[0]&&o[1]<u[3])){t.label=o[1];break}if(o[0]===6&&t.label<u[1]){t.label=u[1];u=o;break}if(u&&t.label<u[2]){t.label=u[2];t.ops.push(o);break}if(u[2])t.ops.pop();t.trys.pop();continue}o=n.call(r,t)}catch(r){o=[6,r];i=0}finally{e=u=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,n,t){if(t||arguments.length===2)for(var e=0,i=n.length,u;e<i;e++){if(u||!(e in n)){if(!u)u=Array.prototype.slice.call(n,0,e);u[e]=n[e]}}return r.concat(u||Array.prototype.slice.call(n))};
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/System.register(["./p-792919fd.system.js","./p-9f3008d4.system.js","./p-ff4b7e40.system.js","./p-3ad285e3.system.js","./p-a69b9fc5.system.js","./p-9146695e.system.js"],(function(r){"use strict";var n,t,e,i,u,a;return{setters:[function(r){n=r.d},function(r){t=r.MENU_BACK_BUTTON_PRIORITY},function(r){e=r.p},function(r){i=r.c},function(r){u=r.b},function(r){a=r.c}],execute:function(){var o=this;var f=function(r){return a().duration(r?400:300)};var s=function(r){var n;var t;var e=r.width+8;var i=a();var o=a();if(r.isEndSide){n=e+"px";t="0px"}else{n=-e+"px";t="0px"}i.addElement(r.menuInnerEl).fromTo("transform","translateX(".concat(n,")"),"translateX(".concat(t,")"));var s=u(r);var c=s==="ios";var v=c?.2:.25;o.addElement(r.backdropEl).fromTo("opacity",.01,v);return f(c).addAnimation([i,o])};var c=function(r){var n;var t;var e=u(r);var i=r.width;if(r.isEndSide){n=-i+"px";t=i+"px"}else{n=i+"px";t=-i+"px"}var o=a().addElement(r.menuInnerEl).fromTo("transform","translateX(".concat(t,")"),"translateX(0px)");var s=a().addElement(r.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(n,")"));var c=a().addElement(r.backdropEl).fromTo("opacity",.01,.32);return f(e==="ios").addAnimation([o,s,c])};var v=function(r){var n=u(r);var t=r.width*(r.isEndSide?-1:1)+"px";var e=a().addElement(r.contentEl).fromTo("transform","translateX(0px)","translateX(".concat(t,")"));return f(n==="ios").addAnimation(e)};var d=function(){var r=new Map;var u=[];var a=function(r){return __awaiter(o,void 0,void 0,(function(){var n;return __generator(this,(function(t){switch(t.label){case 0:return[4,p(r,true)];case 1:n=t.sent();if(n){return[2,n.open()]}return[2,false]}}))}))};var f=function(r){return __awaiter(o,void 0,void 0,(function(){var n;return __generator(this,(function(t){switch(t.label){case 0:return[4,r!==undefined?p(r,true):m()];case 1:n=t.sent();if(n!==undefined){return[2,n.close()]}return[2,false]}}))}))};var d=function(r){return __awaiter(o,void 0,void 0,(function(){var n;return __generator(this,(function(t){switch(t.label){case 0:return[4,p(r,true)];case 1:n=t.sent();if(n){return[2,n.toggle()]}return[2,false]}}))}))};var _=function(r,n){return __awaiter(o,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,p(n)];case 1:t=e.sent();if(t){t.disabled=!r}return[2,t]}}))}))};var h=function(r,n){return __awaiter(o,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,p(n)];case 1:t=e.sent();if(t){t.swipeGesture=r}return[2,t]}}))}))};var l=function(r){return __awaiter(o,void 0,void 0,(function(){var n,n;return __generator(this,(function(t){switch(t.label){case 0:if(!(r!=null))return[3,2];return[4,p(r)];case 1:n=t.sent();return[2,n!==undefined&&n.isOpen()];case 2:return[4,m()];case 3:n=t.sent();return[2,n!==undefined]}}))}))};var w=function(r){return __awaiter(o,void 0,void 0,(function(){var n;return __generator(this,(function(t){switch(t.label){case 0:return[4,p(r)];case 1:n=t.sent();if(n){return[2,!n.disabled]}return[2,false]}}))}))};var p=function(r){var n=[];for(var t=1;t<arguments.length;t++){n[t-1]=arguments[t]}return __awaiter(o,__spreadArray([r],n,true),void 0,(function(r,n){var t,i,a;if(n===void 0){n=false}return __generator(this,(function(o){switch(o.label){case 0:return[4,E()];case 1:o.sent();if(r==="start"||r==="end"){t=u.filter((function(n){return n.side===r&&!n.disabled}));if(t.length>=1){if(t.length>1&&n){e('menuController queried for a menu on the "'.concat(r,'" 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(r){return r.el})))}return[2,t[0].el]}i=u.filter((function(n){return n.side===r}));if(i.length>=1){if(i.length>1&&n){e('menuController queried for a menu on the "'.concat(r,'" side, but ').concat(i.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."),i.map((function(r){return r.el})))}return[2,i[0].el]}}else if(r!=null){return[2,S((function(n){return n.menuId===r}))]}a=S((function(r){return!r.disabled}));if(a){return[2,a]}return[2,u.length>0?u[0].el:undefined]}}))}))};var m=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,E()];case 1:r.sent();return[2,k()]}}))}))};var y=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,E()];case 1:r.sent();return[2,I()]}}))}))};var g=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,E()];case 1:r.sent();return[2,O()]}}))}))};var b=function(n,t){r.set(n,t)};var x=function(r){if(u.indexOf(r)<0){u.push(r)}};var A=function(r){var n=u.indexOf(r);if(n>-1){u.splice(n,1)}};var X=function(r,n,t,e){return __awaiter(o,void 0,void 0,(function(){var i;return __generator(this,(function(u){switch(u.label){case 0:if(O()){return[2,false]}if(!n)return[3,3];return[4,m()];case 1:i=u.sent();if(!(i&&r.el!==i))return[3,3];return[4,i.setOpen(false,false)];case 2:u.sent();u.label=3;case 3:return[2,r._setOpen(n,t,e)]}}))}))};var j=function(n,t){var e=r.get(n);if(!e){throw new Error("animation not registered")}var i=e(t);return i};var k=function(){return S((function(r){return r._isOpen}))};var I=function(){return u.map((function(r){return r.el}))};var O=function(){return u.some((function(r){return r.isAnimating}))};var S=function(r){var n=u.find(r);if(n!==undefined){return n.el}return undefined};var E=function(){return Promise.all(Array.from(document.querySelectorAll("ion-menu")).map((function(r){return new Promise((function(n){return i(r,n)}))})))};b("reveal",v);b("push",c);b("overlay",s);n===null||n===void 0?void 0:n.addEventListener("ionBackButton",(function(r){var n=k();if(n){r.detail.register(t,(function(){return n.close()}))}}));return{registerAnimation:b,get:p,getMenus:y,getOpen:m,isEnabled:w,swipeGesture:h,isAnimating:g,isOpen:l,enable:_,toggle:d,close:f,open:a,_getOpenSync:k,_createAnimation:j,_register:x,_unregister:A,_setOpen:X}};var _=r("m",d())}}}));
|