voyager-ionic-core 7.5.0 → 7.5.1
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/ion-title.js +1 -1
- package/components/ios.transition.js +209 -41
- package/dist/cjs/{index-d93fb71d.js → index-eccba000.js} +2 -2
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-a4d545dd.js → ios.transition-5af5991e.js} +210 -42
- package/dist/cjs/{md.transition-80bb961b.js → md.transition-1e740a6a.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/title/title.ios.css +9 -0
- package/dist/collection/utils/transition/ios.transition.js +209 -41
- package/dist/docs.json +2 -2
- package/dist/esm/{index-7d2b2808.js → index-a09eac70.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-app_8.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-a86d7bbe.js → ios.transition-4d1322d6.js} +210 -42
- package/dist/esm/{md.transition-365ef6b6.js → md.transition-66b425d0.js} +1 -1
- package/dist/esm-es5/index-a09eac70.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ios.transition-4d1322d6.js +4 -0
- package/dist/esm-es5/md.transition-66b425d0.js +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/p-091c8792.system.js +4 -0
- package/dist/ionic/p-2a8eeef7.system.js +4 -0
- package/dist/ionic/p-61b192a4.system.entry.js +4 -0
- package/dist/ionic/{p-15decbec.entry.js → p-7423746f.entry.js} +1 -1
- package/dist/ionic/{p-5c3e72a8.system.js → p-755b2917.system.js} +1 -1
- package/dist/ionic/{p-e42aaa8b.entry.js → p-8209372c.entry.js} +1 -1
- package/dist/ionic/{p-a7f8dc42.entry.js → p-9e106f58.entry.js} +1 -1
- package/dist/ionic/p-bb055450.system.entry.js +4 -0
- package/dist/ionic/{p-e38a5f77.js → p-c44fe9fd.js} +1 -1
- package/dist/ionic/p-c575a7b8.system.entry.js +4 -0
- package/dist/ionic/p-de68588d.js +4 -0
- package/dist/ionic/p-e028178a.system.js +4 -0
- package/dist/ionic/{p-ced41304.system.js → p-e0f0d55f.system.js} +1 -1
- package/dist/ionic/{p-f34f001c.entry.js → p-e25cb483.entry.js} +1 -1
- package/dist/ionic/p-eb7d0922.js +4 -0
- package/dist/ionic/p-eb8dc56f.system.entry.js +4 -0
- package/dist/types/components/menu/menu-interface.d.ts +15 -4
- package/dist/types/stencil-public-runtime.d.ts +19 -0
- package/dist/types/utils/menu-controller/index.d.ts +2 -21
- package/hydrate/index.js +220 -44
- package/package.json +5 -5
- package/dist/esm-es5/index-7d2b2808.js +0 -4
- package/dist/esm-es5/ios.transition-a86d7bbe.js +0 -4
- package/dist/esm-es5/md.transition-365ef6b6.js +0 -4
- package/dist/ionic/p-128a98e8.system.js +0 -4
- package/dist/ionic/p-16e44585.js +0 -4
- package/dist/ionic/p-2bbf3ac4.system.entry.js +0 -4
- package/dist/ionic/p-95817276.system.entry.js +0 -4
- package/dist/ionic/p-9b9dcc3e.system.entry.js +0 -4
- package/dist/ionic/p-b9047b05.system.js +0 -4
- package/dist/ionic/p-c05315f5.system.entry.js +0 -4
- package/dist/ionic/p-c994fff0.system.js +0 -4
- package/dist/ionic/p-e2bb634f.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,d as o,w as i,h as a,H as r,f as e}from"./p-06ac429a.js";import{f as s,i as n,d,r as p,a as h,p as l}from"./p-b24aa895.js";import{C as c,a as m,d as b}from"./p-b287ab05.js";import{g as f,l as u,r as w,k as v,m as x}from"./p-63eb0acd.js";import{c as g}from"./p-53b2a46f.js";import{p as k}from"./p-1b8e1d03.js";import{g as y}from"./p-cc196b34.js";import{G as A,e as D,B,j as Y,k as j,f as M,n as E,g as C,h as S}from"./p-cf62e1c8.js";import{g as O}from"./p-1d072d3d.js";import{e as P,w as $}from"./p-e2bb634f.js";import{b as T,c as z}from"./p-76378400.js";import{KEYBOARD_DID_OPEN as I}from"./p-8cf94fc1.js";import{c as W}from"./p-446230d7.js";import{g as L}from"./p-7c2bac85.js";import{createGesture as R}from"./p-8b1be026.js";import{w as N}from"./p-b347cfd1.js";import"./p-185e427e.js";import"./p-419eb426.js";import"./p-e0b06b65.js";var K;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(K||(K={}));const V={getEngine(){const t=y();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},supportsDefaultStatusBarStyle(){const t=y();return!!(null==t?void 0:t.PluginHeaders)},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return K.Default;const{style:o}=await t.getInfo();return o}},Z=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},F=()=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:K.Dark})},G=(t=K.Default)=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:t})},_=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,A)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},H=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,U=.93,q=(t,o)=>u(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=void 0===i||i<o,r=a?`calc(var(--backdrop-opacity) * ${o})`:"0",e=W("backdropAnimation").fromTo("opacity",0,r);return a&&e.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:e}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${Z(o,i)})`,r=[{offset:0,opacity:a},{offset:1,opacity:0}],e=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=W("backdropAnimation").keyframes(0!==i?e:r);return{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},X=(t,o)=>{const{presentingEl:i,currentBreakpoint:a}=o,r=f(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==a?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().fromTo("transform","translateY(100vh)","translateY(0vh)")};s.addElement(r.querySelector("ion-backdrop")),e.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const n=W("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(e);if(i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=f(i),r=W().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),d=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.93)`;r.afterStyles({transform:a}).beforeAddWrite((()=>d.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),n.addAnimation(r)}else if(n.addAnimation(s),o){const t=`translateY(-10px) scale(${o?U:1})`;r.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=W().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);n.addAnimation([r,i])}else e.fromTo("opacity","0","1")}else n.addAnimation(s);return n},tt=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:r}=o,e=f(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==r?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=W("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=f(a),r=W().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(e.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&e.style.setProperty("background-color",""))})),e=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.93)`;r.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(r)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?U:1})`;r.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=W().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([r,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ot=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([e,r])},it=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([e,r])},at=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=g(),this.triggerController=D(),this.coreDelegate=c(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}},this.presented=!1,this.hasController=!1,this.overlayIndex=void 0,this.delegate=void 0,this.keyboardClose=!0,this.enterAnimation=void 0,this.leaveAnimation=void 0,this.breakpoints=void 0,this.initialBreakpoint=void 0,this.backdropBreakpoint=0,this.handle=void 0,this.handleBehavior="none",this.component=void 0,this.componentProps=void 0,this.cssClass=void 0,this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.presentingElement=void 0,this.htmlAttributes=void 0,this.isOpen=!1,this.trigger=void 0,this.keepContentsMounted=!1,this.canDismiss=!0}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;Y(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:o,el:i}=this,a=this.isSheetModal=void 0!==t&&void 0!==o;this.inheritedAttributes=v(i,["aria-label","role"]),a&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===o||t.includes(o)||k("Your breakpoints array must include the initialBreakpoint value."),j(i)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints)}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:a}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:r,delegate:e}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await m(e,a,this.component,["ion-page"],this.componentProps,r),x(a)?await P(this.usersElement):this.keepContentsMounted||await $(),i((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===T(this)&&(this.statusBarStyle=await V.getStyle(),F()),await M(this,"modalEnter",X,ot,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==T(this))return;const{el:o}=this,i=this.leaveAnimation||z.get("modalLeave",tt),a=this.animation=i(o,{presentingEl:this.presentingElement});if(!h(o))return void l(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:K.Default;this.gesture=((t,o,i,a)=>{const r=.5,e=t.offsetHeight;let h=!1,l=!1,c=null,m=null,b=!0,w=0;const v=R({el:t,gestureName:"modalSwipeToClose",gesturePriority:39,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=s(o),c){if(n(c)){const t=f(c);m=t.querySelector(".inner-scroll")}else m=c;return!c.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;b=!c||!n(c)||c.scrollY,l=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&c&&d(c),o.progressStart(!0,h?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&c&&d(c);const s=t.deltaY/e,n=s>=0&&l,p=n?.2:.9999,h=n?H(s/p):s,m=u(1e-4,h,p);o.progressStep(m),m>=r&&w<r?G(i):m<r&&w>=r&&F(),w=m},onEnd:i=>{const s=i.velocityY,n=i.deltaY/e,d=n>=0&&l,m=d?.2:.9999,f=d?H(n/m):n,w=u(1e-4,f,m),x=!d&&(i.deltaY+1e3*s)/e>=r;let g=x?-.001:.001;x?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],w)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],w)[0]);const k=q(x?n*e:(1-w)*e,s);h=x,v.enable(!1),c&&p(c,b),o.onFinish((()=>{x||v.enable(!0)})).progressEnd(x?1:0,g,k),d&&w>m/4?_(t,o):x&&a()}});return v})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,G(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,A),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||z.get("modalEnter",X),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i});r.progressStart(!0,1);const{gesture:e,moveSheetToBreakpoint:s}=((t,o,i,a,r,e,s=[],n,d,p)=>{const h={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==r?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-r,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}]},l=t.querySelector("ion-content"),c=i.clientHeight;let m=a,b=0,f=!1;const v=e.childAnimations.find((t=>"wrapperAnimation"===t.id)),x=e.childAnimations.find((t=>"backdropAnimation"===t.id)),g=s[s.length-1],k=s[0],y=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove("ion-disable-focus-trap")},A=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add("ion-disable-focus-trap")};v&&x&&(v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-m),m>r?y():A()),l&&m!==g&&(l.scrollY=!1);const D=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:n,animated:c}=o,b=a&&0===i,f=b?m:i,u=0!==f;return m=0,v&&x&&(v.keyframes([{offset:0,transform:`translateY(${100*n}%)`},{offset:1,transform:`translateY(${100*(1-f)}%)`}]),x.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-n,r)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(f,r)})`}]),e.progressStep(0)),B.enable(!1),b?_(t,e):u||d(),new Promise((t=>{e.onFinish((()=>{u?v&&x?w((()=>{v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-f),m=f,p(m),l&&m===s[s.length-1]&&(l.scrollY=!0),m>r?y():A(),B.enable(!0),t()})):(B.enable(!0),t()):t()}),{oneTimeCallback:!0}).progressEnd(1,0,c?500:0)}))},B=R({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=t.event.target.closest("ion-content");return m=n(),1!==m||!o},onStart:()=>{f=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===k,l&&(l.scrollY=!1),w((()=>{t.focus()})),e.progressStart(!0,1-m)},onMove:t=>{const o=s.length>1?1-s[1]:void 0,i=1-m+t.deltaY/c,a=void 0!==o&&i>=o&&f,r=a?.95:.9999,n=a&&void 0!==o?o+H((i-o)/(r-o)):i;b=u(1e-4,n,r),e.progressStep(b)},onEnd:t=>{const o=m-(t.deltaY+350*t.velocityY)/c,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));D({breakpoint:i,breakpointOffset:b,canDismiss:f,animated:!0})}});return{gesture:B,moveSheetToBreakpoint:D}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));this.gesture=e,this.moveSheetToBreakpoint=s,this.gesture.enable(!0)}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,A),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var a;if(this.gestureAnimationDismissing&&o!==A)return!1;const r=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return r(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===T(this)&&G(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=E.get(this)||[],n=await C(this,t,o,"modalLeave",tt,it,{presentingEl:e,currentBreakpoint:null!==(a=this.currentBreakpoint)&&void 0!==a?a:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint});if(n){const{delegate:t}=this.getDelegate();await b(t,this.usersElement),i((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),s.forEach((t=>t.destroy()))}return this.currentBreakpoint=void 0,this.animation=void 0,r(),n}onDidDismiss(){return S(this.el,"ionModalDidDismiss")}onWillDismiss(){return S(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void k("setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void k(`Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:i,canDismiss:a,breakpoints:r,animated:e}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===r[0],animated:e}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),r=i[(a+1)%i.length];return await this.setCurrentBreakpoint(r),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:e,handleBehavior:s,inheritedAttributes:n}=this,d=!1!==t&&o,p=T(this),h=void 0!==i&&"ios"===p,l="cycle"===s;return a(r,Object.assign({"no-router":!0,tabindex:"-1"},e,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!h&&!o,"modal-card":h,"modal-sheet":o,"overlay-hidden":!0},O(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),a("ion-backdrop",{ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&a("div",{class:"modal-shadow"}),a("div",Object.assign({role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),d&&a("button",{class:"modal-handle",tabIndex:l?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:l?this.onHandleClick:void 0,part:"handle"}),a("slot",null)))}get el(){return e(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};at.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{at as ion_modal}
|
|
4
|
+
import{r as t,d as o,w as i,h as a,H as r,f as e}from"./p-06ac429a.js";import{f as s,i as n,d,r as p,a as h,p as l}from"./p-b24aa895.js";import{C as c,a as m,d as b}from"./p-b287ab05.js";import{g as f,l as u,r as w,k as v,m as x}from"./p-63eb0acd.js";import{c as g}from"./p-53b2a46f.js";import{p as k}from"./p-1b8e1d03.js";import{g as y}from"./p-cc196b34.js";import{G as A,e as D,B,j as Y,k as j,f as M,n as E,g as C,h as S}from"./p-cf62e1c8.js";import{g as O}from"./p-1d072d3d.js";import{e as P,w as $}from"./p-eb7d0922.js";import{b as T,c as z}from"./p-76378400.js";import{KEYBOARD_DID_OPEN as I}from"./p-8cf94fc1.js";import{c as W}from"./p-446230d7.js";import{g as L}from"./p-7c2bac85.js";import{createGesture as R}from"./p-8b1be026.js";import{w as N}from"./p-b347cfd1.js";import"./p-185e427e.js";import"./p-419eb426.js";import"./p-e0b06b65.js";var K;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(K||(K={}));const V={getEngine(){const t=y();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},supportsDefaultStatusBarStyle(){const t=y();return!!(null==t?void 0:t.PluginHeaders)},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return K.Default;const{style:o}=await t.getInfo();return o}},Z=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},F=()=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:K.Dark})},G=(t=K.Default)=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:t})},_=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,A)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},H=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,U=.93,q=(t,o)=>u(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=void 0===i||i<o,r=a?`calc(var(--backdrop-opacity) * ${o})`:"0",e=W("backdropAnimation").fromTo("opacity",0,r);return a&&e.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:e}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${Z(o,i)})`,r=[{offset:0,opacity:a},{offset:1,opacity:0}],e=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=W("backdropAnimation").keyframes(0!==i?e:r);return{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},X=(t,o)=>{const{presentingEl:i,currentBreakpoint:a}=o,r=f(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==a?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().fromTo("transform","translateY(100vh)","translateY(0vh)")};s.addElement(r.querySelector("ion-backdrop")),e.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const n=W("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(e);if(i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=f(i),r=W().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),d=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.93)`;r.afterStyles({transform:a}).beforeAddWrite((()=>d.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),n.addAnimation(r)}else if(n.addAnimation(s),o){const t=`translateY(-10px) scale(${o?U:1})`;r.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=W().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);n.addAnimation([r,i])}else e.fromTo("opacity","0","1")}else n.addAnimation(s);return n},tt=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:r}=o,e=f(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==r?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=W("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=f(a),r=W().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(e.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&e.style.setProperty("background-color",""))})),e=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.93)`;r.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(r)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?U:1})`;r.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=W().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([r,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ot=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([e,r])},it=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([e,r])},at=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=g(),this.triggerController=D(),this.coreDelegate=c(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,B)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}},this.presented=!1,this.hasController=!1,this.overlayIndex=void 0,this.delegate=void 0,this.keyboardClose=!0,this.enterAnimation=void 0,this.leaveAnimation=void 0,this.breakpoints=void 0,this.initialBreakpoint=void 0,this.backdropBreakpoint=0,this.handle=void 0,this.handleBehavior="none",this.component=void 0,this.componentProps=void 0,this.cssClass=void 0,this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.presentingElement=void 0,this.htmlAttributes=void 0,this.isOpen=!1,this.trigger=void 0,this.keepContentsMounted=!1,this.canDismiss=!0}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;Y(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:o,el:i}=this,a=this.isSheetModal=void 0!==t&&void 0!==o;this.inheritedAttributes=v(i,["aria-label","role"]),a&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===o||t.includes(o)||k("Your breakpoints array must include the initialBreakpoint value."),j(i)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints)}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:a}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:r,delegate:e}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await m(e,a,this.component,["ion-page"],this.componentProps,r),x(a)?await P(this.usersElement):this.keepContentsMounted||await $(),i((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===T(this)&&(this.statusBarStyle=await V.getStyle(),F()),await M(this,"modalEnter",X,ot,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==T(this))return;const{el:o}=this,i=this.leaveAnimation||z.get("modalLeave",tt),a=this.animation=i(o,{presentingEl:this.presentingElement});if(!h(o))return void l(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:K.Default;this.gesture=((t,o,i,a)=>{const r=.5,e=t.offsetHeight;let h=!1,l=!1,c=null,m=null,b=!0,w=0;const v=R({el:t,gestureName:"modalSwipeToClose",gesturePriority:39,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=s(o),c){if(n(c)){const t=f(c);m=t.querySelector(".inner-scroll")}else m=c;return!c.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;b=!c||!n(c)||c.scrollY,l=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&c&&d(c),o.progressStart(!0,h?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&c&&d(c);const s=t.deltaY/e,n=s>=0&&l,p=n?.2:.9999,h=n?H(s/p):s,m=u(1e-4,h,p);o.progressStep(m),m>=r&&w<r?G(i):m<r&&w>=r&&F(),w=m},onEnd:i=>{const s=i.velocityY,n=i.deltaY/e,d=n>=0&&l,m=d?.2:.9999,f=d?H(n/m):n,w=u(1e-4,f,m),x=!d&&(i.deltaY+1e3*s)/e>=r;let g=x?-.001:.001;x?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],w)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],w)[0]);const k=q(x?n*e:(1-w)*e,s);h=x,v.enable(!1),c&&p(c,b),o.onFinish((()=>{x||v.enable(!0)})).progressEnd(x?1:0,g,k),d&&w>m/4?_(t,o):x&&a()}});return v})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,G(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,A),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||z.get("modalEnter",X),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i});r.progressStart(!0,1);const{gesture:e,moveSheetToBreakpoint:s}=((t,o,i,a,r,e,s=[],n,d,p)=>{const h={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==r?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-r,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}]},l=t.querySelector("ion-content"),c=i.clientHeight;let m=a,b=0,f=!1;const v=e.childAnimations.find((t=>"wrapperAnimation"===t.id)),x=e.childAnimations.find((t=>"backdropAnimation"===t.id)),g=s[s.length-1],k=s[0],y=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove("ion-disable-focus-trap")},A=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add("ion-disable-focus-trap")};v&&x&&(v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-m),m>r?y():A()),l&&m!==g&&(l.scrollY=!1);const D=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:n,animated:c}=o,b=a&&0===i,f=b?m:i,u=0!==f;return m=0,v&&x&&(v.keyframes([{offset:0,transform:`translateY(${100*n}%)`},{offset:1,transform:`translateY(${100*(1-f)}%)`}]),x.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-n,r)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(f,r)})`}]),e.progressStep(0)),B.enable(!1),b?_(t,e):u||d(),new Promise((t=>{e.onFinish((()=>{u?v&&x?w((()=>{v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-f),m=f,p(m),l&&m===s[s.length-1]&&(l.scrollY=!0),m>r?y():A(),B.enable(!0),t()})):(B.enable(!0),t()):t()}),{oneTimeCallback:!0}).progressEnd(1,0,c?500:0)}))},B=R({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=t.event.target.closest("ion-content");return m=n(),1!==m||!o},onStart:()=>{f=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===k,l&&(l.scrollY=!1),w((()=>{t.focus()})),e.progressStart(!0,1-m)},onMove:t=>{const o=s.length>1?1-s[1]:void 0,i=1-m+t.deltaY/c,a=void 0!==o&&i>=o&&f,r=a?.95:.9999,n=a&&void 0!==o?o+H((i-o)/(r-o)):i;b=u(1e-4,n,r),e.progressStep(b)},onEnd:t=>{const o=m-(t.deltaY+350*t.velocityY)/c,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));D({breakpoint:i,breakpointOffset:b,canDismiss:f,animated:!0})}});return{gesture:B,moveSheetToBreakpoint:D}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));this.gesture=e,this.moveSheetToBreakpoint=s,this.gesture.enable(!0)}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,A),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var a;if(this.gestureAnimationDismissing&&o!==A)return!1;const r=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return r(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===T(this)&&G(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=E.get(this)||[],n=await C(this,t,o,"modalLeave",tt,it,{presentingEl:e,currentBreakpoint:null!==(a=this.currentBreakpoint)&&void 0!==a?a:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint});if(n){const{delegate:t}=this.getDelegate();await b(t,this.usersElement),i((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),s.forEach((t=>t.destroy()))}return this.currentBreakpoint=void 0,this.animation=void 0,r(),n}onDidDismiss(){return S(this.el,"ionModalDidDismiss")}onWillDismiss(){return S(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void k("setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void k(`Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:i,canDismiss:a,breakpoints:r,animated:e}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===r[0],animated:e}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),r=i[(a+1)%i.length];return await this.setCurrentBreakpoint(r),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:e,handleBehavior:s,inheritedAttributes:n}=this,d=!1!==t&&o,p=T(this),h=void 0!==i&&"ios"===p,l="cycle"===s;return a(r,Object.assign({"no-router":!0,tabindex:"-1"},e,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!h&&!o,"modal-card":h,"modal-sheet":o,"overlay-hidden":!0},O(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),a("ion-backdrop",{ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&a("div",{class:"modal-shadow"}),a("div",Object.assign({role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),d&&a("button",{class:"modal-handle",tabIndex:l?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:l?this.onHandleClick:void 0,part:"handle"}),a("slot",null)))}get el(){return e(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};at.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, #c0c0be);cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{at as ion_modal}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{w as i,B as a}from"./p-06ac429a.js";import{r as e}from"./p-63eb0acd.js";const n="ionViewWillEnter",o="ionViewDidEnter",s="ionViewWillLeave",t="ionViewDidLeave",r="ionViewWillUnload",c=a=>new Promise(((e,n)=>{i((()=>{d(a),p(a).then((i=>{i.animation&&i.animation.destroy(),w(a),e(i)}),(i=>{w(a),n(i)}))}))})),d=i=>{const a=i.enteringEl,e=i.leavingEl;k(a,e,i.direction),i.showGoBack?a.classList.add("can-go-back"):a.classList.remove("can-go-back"),j(a,!1),a.style.setProperty("pointer-events","none"),e&&(j(e,!1),e.style.setProperty("pointer-events","none"))},p=async i=>{const e=await l(i);return e&&a.isBrowser?m(e,i):v(i)},w=i=>{const a=i.enteringEl,e=i.leavingEl;a.classList.remove("ion-page-invisible"),a.style.removeProperty("pointer-events"),void 0!==e&&(e.classList.remove("ion-page-invisible"),e.style.removeProperty("pointer-events"))},l=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await import("./p-de68588d.js")).iosTransitionAnimation:(await import("./p-c44fe9fd.js")).mdTransitionAnimation},m=async(i,a)=>{await u(a,!0);const e=i(a.baseEl,a);g(a.enteringEl,a.leavingEl);const n=await f(e,a);return a.progressCallback&&a.progressCallback(void 0),n&&y(a.enteringEl,a.leavingEl),{hasCompleted:n,animation:e}},v=async i=>{const a=i.enteringEl,e=i.leavingEl;return await u(i,!1),g(a,e),y(a,e),{hasCompleted:!0}},u=async(i,a)=>{(void 0!==i.deepWait?i.deepWait:a)&&await Promise.all([V(i.enteringEl),V(i.leavingEl)]),await b(i.viewIsReady,i.enteringEl)},b=async(i,a)=>{i&&await i(a)},f=(i,a)=>{const e=a.progressCallback,n=new Promise((a=>{i.onFinish((i=>a(1===i)))}));return e?(i.progressStart(!0),e(i)):i.play(),n},g=(i,a)=>{h(a,s),h(i,n)},y=(i,a)=>{h(i,o),h(a,t)},h=(i,a)=>{if(i){const e=new CustomEvent(a,{bubbles:!1,cancelable:!1});i.dispatchEvent(e)}},P=()=>new Promise((i=>e((()=>e((()=>i())))))),V=async i=>{const a=i;if(a){if(null!=a.componentOnReady){if(null!=await a.componentOnReady())return}else if(null!=a.__registerHost){const i=new Promise((i=>e(i)));return void await i}await Promise.all(Array.from(a.children).map(V))}},j=(i,a)=>{a?(i.setAttribute("aria-hidden","true"),i.classList.add("ion-page-hidden")):(i.hidden=!1,i.removeAttribute("aria-hidden"),i.classList.remove("ion-page-hidden"))},k=(i,a,e)=>{void 0!==i&&(i.style.zIndex="back"===e?"99":"101"),void 0!==a&&(a.style.zIndex="100")},C=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{n as L,o as a,s as b,t as c,r as d,V as e,C as g,h as l,j as s,c as t,P as w}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function u(t){try{a(n.next(t))}catch(t){s(t)}}function o(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?e(t.value):r(t.value).then(u,o)}a((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,u;return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(t){return function(i){return a([t,i])}}function a(o){if(n)throw new TypeError("Generator is already executing.");while(u&&(u=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=i.call(t,e)}catch(t){o=[6,t];r=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
|
+
/*!
|
|
3
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
+
*/System.register(["./p-629aa3fd.system.js","./p-c4f2dce7.system.js","./p-815c2fba.system.js","./p-e028178a.system.js","./p-939e0fa1.system.js","./p-613d4042.system.js"],(function(t,i){"use strict";var e,n,r,s,u,o,a,f,h,c,d,v,l,w,m,b,_;return{setters:[function(t){e=t.r;n=t.d;r=t.h;s=t.f;u=t.H},function(t){o=t.g},function(t){a=t.o;f=t.s},function(t){h=t.l;c=t.t;d=t.s;v=t.d;l=t.b;w=t.c},function(t){m=t.b;b=t.c},function(t){_=t.a}],execute:function(){var p=1;var g=2;var y=3;var k=function(){function t(t,i){this.component=t;this.params=i;this.state=p}t.prototype.init=function(t){return __awaiter(this,void 0,void 0,(function(){var i,e;return __generator(this,(function(n){switch(n.label){case 0:this.state=g;if(!!this.element)return[3,2];i=this.component;e=this;return[4,_(this.delegate,t,i,["ion-page","ion-page-invisible"],this.params)];case 1:e.element=n.sent();n.label=2;case 2:return[2]}}))}))};t.prototype._destroy=function(){a(this.state!==y,"view state must be ATTACHED");var t=this.element;if(t){if(this.delegate){this.delegate.removeViewFromDom(t.parentElement,t)}else{t.remove()}}this.nav=undefined;this.state=y};return t}();var j=function(t,i,e){if(!t){return false}if(t.component!==i){return false}return f(t.params,e)};var C=function(t,i){if(!t){return null}if(t instanceof k){return t}return new k(t,i)};var B=function(t){return t.map((function(t){if(t instanceof k){return t}if("component"in t){return C(t.component,t.componentProps===null?undefined:t.componentProps)}return C(t,undefined)})).filter((function(t){return t!==null}))};var E=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";var O=t("ion_nav",function(){function t(t){e(this,t);this.ionNavWillLoad=n(this,"ionNavWillLoad",7);this.ionNavWillChange=n(this,"ionNavWillChange",3);this.ionNavDidChange=n(this,"ionNavDidChange",3);this.transInstr=[];this.gestureOrAnimationInProgress=false;this.useRouter=false;this.isTransitioning=false;this.destroyed=false;this.views=[];this.didLoad=false;this.delegate=undefined;this.swipeGesture=undefined;this.animated=true;this.animation=undefined;this.rootParams=undefined;this.root=undefined}t.prototype.swipeGestureChanged=function(){if(this.gesture){this.gesture.enable(this.swipeGesture===true)}};t.prototype.rootChanged=function(){if(this.root===undefined){return}if(this.didLoad===false){return}if(!this.useRouter){if(this.root!==undefined){this.setRoot(this.root,this.rootParams)}}};t.prototype.componentWillLoad=function(){this.useRouter=document.querySelector("ion-router")!==null&&this.el.closest("[no-router]")===null;if(this.swipeGesture===undefined){var t=m(this);this.swipeGesture=b.getBoolean("swipeBackEnabled",t==="ios")}this.ionNavWillLoad.emit()};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.didLoad=true;this.rootChanged();t=this;return[4,i.import("./p-b912e055.system.js")];case 1:t.gesture=e.sent().createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this));this.swipeGestureChanged();return[2]}}))}))};t.prototype.connectedCallback=function(){this.destroyed=false};t.prototype.disconnectedCallback=function(){for(var t=0,i=this.views;t<i.length;t++){var e=i[t];h(e.element,v);e._destroy()}if(this.gesture){this.gesture.destroy();this.gesture=undefined}this.transInstr.length=0;this.views.length=0;this.destroyed=true};t.prototype.push=function(t,i,e,n){return this.insert(-1,t,i,e,n)};t.prototype.insert=function(t,i,e,n,r){return this.insertPages(t,[{component:i,componentProps:e}],n,r)};t.prototype.insertPages=function(t,i,e,n){return this.queueTrns({insertStart:t,insertViews:i,opts:e},n)};t.prototype.pop=function(t,i){return this.removeIndex(-1,1,t,i)};t.prototype.popTo=function(t,i,e){var n={removeStart:-1,removeCount:-1,opts:i};if(typeof t==="object"&&t.component){n.removeView=t;n.removeStart=1}else if(typeof t==="number"){n.removeStart=t+1}return this.queueTrns(n,e)};t.prototype.popToRoot=function(t,i){return this.removeIndex(1,-1,t,i)};t.prototype.removeIndex=function(t,i,e,n){if(i===void 0){i=1}return this.queueTrns({removeStart:t,removeCount:i,opts:e},n)};t.prototype.setRoot=function(t,i,e,n){return this.setPages([{component:t,componentProps:i}],e,n)};t.prototype.setPages=function(t,i,e){i!==null&&i!==void 0?i:i={};if(i.animated!==true){i.animated=false}return this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:i},e)};t.prototype.setRouteId=function(t,i,e,n){var r=this;var s=this.getActiveSync();if(j(s,t,i)){return Promise.resolve({changed:false,element:s.element})}var u;var o=new Promise((function(t){return u=t}));var a;var f={updateURL:false,viewIsReady:function(t){var i;var e=new Promise((function(t){return i=t}));u({changed:true,element:t,markVisible:function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:i();return[4,a];case 1:t.sent();return[2]}}))}))}});return e}};if(e==="root"){a=this.setRoot(t,i,f)}else{var h=this.views.find((function(e){return j(e,t,i)}));if(h){a=this.popTo(h,Object.assign(Object.assign({},f),{direction:"back",animationBuilder:n}))}else if(e==="forward"){a=this.push(t,i,Object.assign(Object.assign({},f),{animationBuilder:n}))}else if(e==="back"){a=this.setRoot(t,i,Object.assign(Object.assign({},f),{direction:"back",animated:true,animationBuilder:n}))}}return o};t.prototype.getRouteId=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){t=this.getActiveSync();if(t){return[2,{id:t.element.tagName,params:t.params,element:t.element}]}return[2,undefined]}))}))};t.prototype.getActive=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.getActiveSync()]}))}))};t.prototype.getByIndex=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.views[t]]}))}))};t.prototype.canGoBack=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.canGoBackSync(t)]}))}))};t.prototype.getPrevious=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){return[2,this.getPreviousSync(t)]}))}))};t.prototype.getLength=function(){return this.views.length};t.prototype.getActiveSync=function(){return this.views[this.views.length-1]};t.prototype.canGoBackSync=function(t){if(t===void 0){t=this.getActiveSync()}return!!(t&&this.getPreviousSync(t))};t.prototype.getPreviousSync=function(t){if(t===void 0){t=this.getActiveSync()}if(!t){return undefined}var i=this.views;var e=i.indexOf(t);return e>0?i[e-1]:undefined};t.prototype.queueTrns=function(t,i){return __awaiter(this,void 0,void 0,(function(){var e,n,r,s,u;return __generator(this,(function(o){switch(o.label){case 0:if(this.isTransitioning&&((e=t.opts)===null||e===void 0?void 0:e.skipIfBusy)){return[2,false]}r=new Promise((function(i,e){t.resolve=i;t.reject=e}));t.done=i;if(!(t.opts&&t.opts.updateURL!==false&&this.useRouter))return[3,2];s=document.querySelector("ion-router");if(!s)return[3,2];return[4,s.canTransition()];case 1:u=o.sent();if(u===false){return[2,false]}if(typeof u==="string"){s.push(u,t.opts.direction||"back");return[2,false]}o.label=2;case 2:if(((n=t.insertViews)===null||n===void 0?void 0:n.length)===0){t.insertViews=undefined}this.transInstr.push(t);this.nextTrns();return[2,r]}}))}))};t.prototype.success=function(t,i){if(this.destroyed){this.fireError("nav controller was destroyed",i);return}if(i.done){i.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction)}i.resolve(t.hasCompleted);if(i.opts.updateURL!==false&&this.useRouter){var e=document.querySelector("ion-router");if(e){var n=t.direction==="back"?"back":"forward";e.navChanged(n)}}};t.prototype.failed=function(t,i){if(this.destroyed){this.fireError("nav controller was destroyed",i);return}this.transInstr.length=0;this.fireError(t,i)};t.prototype.fireError=function(t,i){if(i.done){i.done(false,false,t)}if(i.reject&&!this.destroyed){i.reject(t)}else{i.resolve(false)}};t.prototype.nextTrns=function(){if(this.isTransitioning){return false}var t=this.transInstr.shift();if(!t){return false}this.runTransition(t);return true};t.prototype.runTransition=function(t){return __awaiter(this,void 0,void 0,(function(){var i,e,n,r,s,u;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,6,,7]);this.ionNavWillChange.emit();this.isTransitioning=true;this.prepareTI(t);i=this.getActiveSync();e=this.getEnteringView(t,i);if(!i&&!e){throw new Error("no views in the stack to be removed")}if(!(e&&e.state===p))return[3,2];return[4,e.init(this.el)];case 1:o.sent();o.label=2;case 2:this.postViewInit(e,i,t);n=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&e!==i;if(n&&t.opts&&i){r=t.opts.direction==="back";if(r){t.opts.animationBuilder=t.opts.animationBuilder||(e===null||e===void 0?void 0:e.animationBuilder)}i.animationBuilder=t.opts.animationBuilder}s=void 0;if(!n)return[3,4];return[4,this.transition(e,i,t)];case 3:s=o.sent();return[3,5];case 4:s={hasCompleted:true,requiresTransition:false};o.label=5;case 5:this.success(s,t);this.ionNavDidChange.emit();return[3,7];case 6:u=o.sent();this.failed(u,t);return[3,7];case 7:this.isTransitioning=false;this.nextTrns();return[2]}}))}))};t.prototype.prepareTI=function(t){var i,e;var n;var r=this.views.length;(i=t.opts)!==null&&i!==void 0?i:t.opts={};(e=(n=t.opts).delegate)!==null&&e!==void 0?e:n.delegate=this.delegate;if(t.removeView!==undefined){a(t.removeStart!==undefined,"removeView needs removeStart");a(t.removeCount!==undefined,"removeView needs removeCount");var s=this.views.indexOf(t.removeView);if(s<0){throw new Error("removeView was not found")}t.removeStart+=s}if(t.removeStart!==undefined){if(t.removeStart<0){t.removeStart=r-1}if(t.removeCount<0){t.removeCount=r-t.removeStart}t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===r}if(t.insertViews){if(t.insertStart<0||t.insertStart>r){t.insertStart=r}t.enteringRequiresTransition=t.insertStart===r}var u=t.insertViews;if(!u){return}a(u.length>0,"length can not be zero");var o=B(u);if(o.length===0){throw new Error("invalid views to insert")}for(var f=0,h=o;f<h.length;f++){var c=h[f];c.delegate=t.opts.delegate;var d=c.nav;if(d&&d!==this){throw new Error("inserted view was already inserted")}if(c.state===y){throw new Error("inserted view was already destroyed")}}t.insertViews=o};t.prototype.getEnteringView=function(t,i){var e=t.insertViews;if(e!==undefined){return e[e.length-1]}var n=t.removeStart;if(n!==undefined){var r=this.views;var s=n+t.removeCount;for(var u=r.length-1;u>=0;u--){var o=r[u];if((u<n||u>=s)&&o!==i){return o}}}return undefined};t.prototype.postViewInit=function(t,i,e){var n,r,s;a(i||t,"Both leavingView and enteringView are null");a(e.resolve,"resolve must be valid");a(e.reject,"reject must be valid");var u=e.opts;var o=e.insertViews,f=e.removeStart,c=e.removeCount;var d;if(f!==undefined&&c!==undefined){a(f>=0,"removeStart can not be negative");a(c>=0,"removeCount can not be negative");d=[];for(var m=f;m<f+c;m++){var b=this.views[m];if(b!==undefined&&b!==t&&b!==i){d.push(b)}}(n=u.direction)!==null&&n!==void 0?n:u.direction="back"}var _=this.views.length+((r=o===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)-(c!==null&&c!==void 0?c:0);a(_>=0,"final balance can not be negative");if(_===0){console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el);throw new Error("navigation stack needs at least one root page")}if(o){var p=e.insertStart;for(var g=0,y=o;g<y.length;g++){var b=y[g];this.insertViewAt(b,p);p++}if(e.enteringRequiresTransition){(s=u.direction)!==null&&s!==void 0?s:u.direction="forward"}}if(d&&d.length>0){for(var k=0,j=d;k<j.length;k++){var b=j[k];h(b.element,l);h(b.element,w);h(b.element,v)}for(var C=0,B=d;C<B.length;C++){var b=B[C];this.destroyView(b)}}};t.prototype.transition=function(t,i,e){return __awaiter(this,void 0,void 0,(function(){var n,r,s,u,o,a,f;var h=this;return __generator(this,(function(d){switch(d.label){case 0:n=e.opts;r=n.progressAnimation?function(t){if(t!==undefined&&!h.gestureOrAnimationInProgress){h.gestureOrAnimationInProgress=true;t.onFinish((function(){h.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});t.progressEnd(0,0,0)}else{h.sbAni=t}}:undefined;s=m(this);u=t.element;o=i&&i.element;a=Object.assign(Object.assign({mode:s,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:r,animated:this.animated&&b.getBoolean("animated",true),enteringEl:u,leavingEl:o},n),{animationBuilder:n.animationBuilder||this.animation||b.get("navAnimation")});return[4,c(a)];case 1:f=d.sent().hasCompleted;return[2,this.transitionFinish(f,t,i,n)]}}))}))};t.prototype.transitionFinish=function(t,i,e,n){var r=t?i:e;if(r){this.unmountInactiveViews(r)}return{hasCompleted:t,requiresTransition:true,enteringView:i,leavingView:e,direction:n.direction}};t.prototype.insertViewAt=function(t,i){var e=this.views;var n=e.indexOf(t);if(n>-1){a(t.nav===this,"view is not part of the nav");e.splice(n,1);e.splice(i,0,t)}else{a(!t.nav,"nav is used");t.nav=this;e.splice(i,0,t)}};t.prototype.removeView=function(t){a(t.state===g||t.state===y,"view state should be loaded or destroyed");var i=this.views;var e=i.indexOf(t);a(e>-1,"view must be part of the stack");if(e>=0){i.splice(e,1)}};t.prototype.destroyView=function(t){t._destroy();this.removeView(t)};t.prototype.unmountInactiveViews=function(t){if(this.destroyed){return}var i=this.views;var e=i.indexOf(t);for(var n=i.length-1;n>=0;n--){var r=i[n];var s=r.element;if(s){if(n>e){h(s,v);this.destroyView(r)}else if(n<e){d(s,true)}}}};t.prototype.canStart=function(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&this.transInstr.length===0&&this.canGoBackSync()};t.prototype.onStart=function(){this.gestureOrAnimationInProgress=true;this.pop({direction:"back",progressAnimation:true})};t.prototype.onMove=function(t){if(this.sbAni){this.sbAni.progressStep(t)}};t.prototype.onEnd=function(t,i,e){var n=this;if(this.sbAni){this.sbAni.onFinish((function(){n.gestureOrAnimationInProgress=false}),{oneTimeCallback:true});var r=t?-.001:.001;if(!t){this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)");r+=o([0,0],[1,0],[.68,.28],[1,1],i)[0]}else{r+=o([0,0],[.32,.72],[0,1],[1,1],i)[0]}this.sbAni.progressEnd(t?1:0,r,e)}else{this.gestureOrAnimationInProgress=false}};t.prototype.render=function(){return r("slot",null)};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{swipeGesture:["swipeGestureChanged"],root:["rootChanged"]}},enumerable:false,configurable:true});return t}());O.style=E;var S=function(t,i,e,n,r){var s=t.closest("ion-nav");if(s){if(i==="forward"){if(e!==undefined){return s.push(e,n,{skipIfBusy:true,animationBuilder:r})}}else if(i==="root"){if(e!==undefined){return s.setRoot(e,n,{skipIfBusy:true,animationBuilder:r})}}else if(i==="back"){return s.pop({skipIfBusy:true,animationBuilder:r})}}return Promise.resolve(false)};var V=t("ion_nav_link",function(){function t(t){var i=this;e(this,t);this.onClick=function(){return S(i.el,i.routerDirection,i.component,i.componentProps,i.routerAnimation)};this.component=undefined;this.componentProps=undefined;this.routerDirection="forward";this.routerAnimation=undefined}t.prototype.render=function(){return r(u,{onClick:this.onClick})};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}())}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Animation } from
|
|
1
|
+
import type { Animation, AnimationBuilder } from "../../utils/animation/animation-interface";
|
|
2
2
|
export type Side = 'start' | 'end';
|
|
3
3
|
export interface MenuI {
|
|
4
4
|
el: HTMLIonMenuElement;
|
|
@@ -21,12 +21,23 @@ export interface MenuI {
|
|
|
21
21
|
_setOpen(shouldOpen: boolean, animated?: boolean): Promise<boolean>;
|
|
22
22
|
}
|
|
23
23
|
export interface MenuControllerI {
|
|
24
|
+
registerAnimation(name: string, animation: AnimationBuilder): void;
|
|
25
|
+
get(menu?: string | null, logOnMultipleSideMenus?: boolean): Promise<HTMLIonMenuElement | undefined>;
|
|
26
|
+
getMenus(): Promise<HTMLIonMenuElement[]>;
|
|
27
|
+
getOpen(): Promise<HTMLIonMenuElement | undefined>;
|
|
28
|
+
isEnabled(menu?: string | null): Promise<boolean>;
|
|
29
|
+
swipeGesture(shouldEnable: boolean, menu?: string | null): Promise<HTMLIonMenuElement | undefined>;
|
|
30
|
+
isAnimating(): Promise<boolean>;
|
|
31
|
+
isOpen(menu?: string | null): Promise<boolean>;
|
|
32
|
+
enable(shouldEnable: boolean, menu?: string | null): Promise<HTMLIonMenuElement | undefined>;
|
|
33
|
+
toggle(menu?: string | null): Promise<boolean>;
|
|
34
|
+
close(menu?: string | null): Promise<boolean>;
|
|
35
|
+
open(menu?: string | null): Promise<boolean>;
|
|
36
|
+
_getOpenSync(): HTMLIonMenuElement | undefined;
|
|
24
37
|
_createAnimation(type: string, menuCmp: MenuI): Promise<Animation>;
|
|
25
|
-
_setOpen(menu: MenuI, shouldOpen: boolean, animated: boolean): Promise<boolean>;
|
|
26
38
|
_register(menu: MenuI): void;
|
|
27
39
|
_unregister(menu: MenuI): void;
|
|
28
|
-
|
|
29
|
-
getOpenSync(): HTMLIonMenuElement | undefined;
|
|
40
|
+
_setOpen(menu: MenuI, shouldOpen: boolean, animated: boolean): Promise<boolean>;
|
|
30
41
|
}
|
|
31
42
|
export interface MenuChangeEventDetail {
|
|
32
43
|
disabled: boolean;
|
|
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
|
|
|
3
3
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
4
|
}
|
|
5
5
|
export interface ComponentOptions {
|
|
6
|
+
/**
|
|
7
|
+
* When set to `true` this component will be form-associated. See
|
|
8
|
+
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
9
|
+
* build form-associated Stencil components that integrate into forms like
|
|
10
|
+
* native browser elements such as `<input>` and `<textarea>`.
|
|
11
|
+
*
|
|
12
|
+
* The {@link AttachInternals} decorator allows for access to the
|
|
13
|
+
* `ElementInternals` object to modify the associated form.
|
|
14
|
+
*/
|
|
15
|
+
formAssociated?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
8
18
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -107,6 +117,9 @@ export interface EventOptions {
|
|
|
107
117
|
*/
|
|
108
118
|
composed?: boolean;
|
|
109
119
|
}
|
|
120
|
+
export interface AttachInternalsDecorator {
|
|
121
|
+
(): PropertyDecorator;
|
|
122
|
+
}
|
|
110
123
|
export interface ListenDecorator {
|
|
111
124
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
112
125
|
}
|
|
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
|
|
|
175
188
|
* https://stenciljs.com/docs/events
|
|
176
189
|
*/
|
|
177
190
|
export declare const Event: EventDecorator;
|
|
191
|
+
/**
|
|
192
|
+
* If the `formAssociated` option is set in options passed to the
|
|
193
|
+
* `@Component()` decorator then this decorator may be used to get access to the
|
|
194
|
+
* `ElementInternals` instance associated with the component.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AttachInternals: AttachInternalsDecorator;
|
|
178
197
|
/**
|
|
179
198
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
180
199
|
* dispatched from `@Events()`.
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const menuController: {
|
|
4
|
-
registerAnimation: (name: string, animation: AnimationBuilder) => void;
|
|
5
|
-
get: (menu?: string | null, logOnMultipleSideMenus?: boolean) => Promise<HTMLIonMenuElement | undefined>;
|
|
6
|
-
getMenus: () => Promise<HTMLIonMenuElement[]>;
|
|
7
|
-
getOpen: () => Promise<HTMLIonMenuElement | undefined>;
|
|
8
|
-
isEnabled: (menu?: string | null) => Promise<boolean>;
|
|
9
|
-
swipeGesture: (shouldEnable: boolean, menu?: string | null) => Promise<HTMLIonMenuElement | undefined>;
|
|
10
|
-
isAnimating: () => Promise<boolean>;
|
|
11
|
-
isOpen: (menu?: string | null) => Promise<boolean>;
|
|
12
|
-
enable: (shouldEnable: boolean, menu?: string | null) => Promise<HTMLIonMenuElement | undefined>;
|
|
13
|
-
toggle: (menu?: string | null) => Promise<boolean>;
|
|
14
|
-
close: (menu?: string | null) => Promise<boolean>;
|
|
15
|
-
open: (menu?: string | null) => Promise<boolean>;
|
|
16
|
-
_getOpenSync: () => HTMLIonMenuElement | undefined;
|
|
17
|
-
_createAnimation: (type: string, menuCmp: MenuI) => any;
|
|
18
|
-
_register: (menu: MenuI) => void;
|
|
19
|
-
_unregister: (menu: MenuI) => void;
|
|
20
|
-
_setOpen: (menu: MenuI, shouldOpen: boolean, animated: boolean) => Promise<boolean>;
|
|
21
|
-
};
|
|
1
|
+
import type { MenuControllerI } from '../../components/menu/menu-interface';
|
|
2
|
+
export declare const menuController: MenuControllerI;
|