UNPKG

test-isc

Version:

An Ionic component similar to Ionic Select, that allows to search items, including async search, group, add, edit, delete items, and much more.

1 lines 2.41 kB
import{w as i,B as a}from"./p-aa742337.js";const e="ionViewWillLeave",n="ionViewDidLeave",o="ionViewWillUnload",s=a=>new Promise((e,n)=>{i(()=>{t(a),c(a).then(i=>{i.animation&&i.animation.destroy(),r(a),e(i)},i=>{r(a),n(i)})})}),t=i=>{const a=i.enteringEl,e=i.leavingEl;f(a,e,i.direction),i.showGoBack?a.classList.add("can-go-back"):a.classList.remove("can-go-back"),V(a,!1),e&&V(e,!1)},c=async i=>{const e=await l(i);return e&&a.isBrowser?d(e,i):w(i)},r=i=>{const a=i.leavingEl;i.enteringEl.classList.remove("ion-page-invisible"),void 0!==a&&a.classList.remove("ion-page-invisible")},l=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await __sc_import_ionic_selectable("./p-7781e61d.js")).iosTransitionAnimation:(await __sc_import_ionic_selectable("./p-56dc5d97.js")).mdTransitionAnimation},d=async(i,a)=>{await p(a,!0);const e=i(a.baseEl,a);u(a.enteringEl,a.leavingEl);const n=await m(e,a);return a.progressCallback&&a.progressCallback(void 0),n&&v(a.enteringEl,a.leavingEl),{hasCompleted:n,animation:e}},w=async i=>{const a=i.enteringEl,e=i.leavingEl;return await p(i,!1),u(a,e),v(a,e),{hasCompleted:!0}},p=async(i,a)=>{const e=(void 0!==i.deepWait?i.deepWait:a)?[y(i.enteringEl),y(i.leavingEl)]:[g(i.enteringEl),g(i.leavingEl)];await Promise.all(e),await b(i.viewIsReady,i.enteringEl)},b=async(i,a)=>{i&&await i(a)},m=(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},u=(i,a)=>{_(a,"ionViewWillLeave"),_(i,"ionViewWillEnter")},v=(i,a)=>{_(i,"ionViewDidEnter"),_(a,"ionViewDidLeave")},_=(i,a)=>{if(i){const e=new CustomEvent(a,{bubbles:!1,cancelable:!1});i.dispatchEvent(e)}},g=i=>i&&i.componentOnReady?i.componentOnReady():Promise.resolve(),y=async i=>{const a=i;if(a){if(null!=a.componentOnReady&&null!=await a.componentOnReady())return;await Promise.all(Array.from(a.children).map(y))}},V=(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"))},f=(i,a,e)=>{void 0!==i&&(i.style.zIndex="back"===e?"99":"101"),void 0!==a&&(a.style.zIndex="100")},h=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{o as L,e as a,n as b,y as d,h as g,_ as l,V as s,s as t}