UNPKG

forms-reactive

Version:

Reactive Form Web Component

6 lines 1.64 kB
import{d as t}from"./p-c1432a35.js"; /*! * (C) Ionic http://ionicframework.com - MIT License */ const e=async(e,o,n,i,r,s)=>{var a;if(e){return e.attachViewToDom(o,n,r,i)}if(!s&&typeof n!=="string"&&!(n instanceof HTMLElement)){throw new Error("framework delegate is missing")}const c=typeof n==="string"?(a=o.ownerDocument)===null||a===void 0?void 0:a.createElement(n):n;if(i){i.forEach((t=>c.classList.add(t)))}if(r){Object.assign(c,r)}o.appendChild(c);await new Promise((e=>t(c,e)));return c};const o=(t,e)=>{if(e){if(t){const o=e.parentElement;return t.removeViewFromDom(o,e)}e.remove()}return Promise.resolve()};const n=()=>{let e;let o;const n=async(n,i,r={},s=[])=>{var a,c;e=n;let l;if(i){const o=typeof i==="string"?(a=e.ownerDocument)===null||a===void 0?void 0:a.createElement(i):i;s.forEach((t=>o.classList.add(t)));Object.assign(o,r);e.appendChild(o);l=o;await new Promise((e=>t(o,e)))}else if(e.children.length>0&&(e.tagName==="ION-MODAL"||e.tagName==="ION-POPOVER")){const t=l=e.children[0];if(!t.classList.contains("ion-delegate-host")){const t=(c=e.ownerDocument)===null||c===void 0?void 0:c.createElement("div");t.classList.add("ion-delegate-host");s.forEach((e=>t.classList.add(e)));t.append(...e.children);e.appendChild(t);l=t}}const d=document.querySelector("ion-app")||document.body;o=document.createComment("ionic teleport");e.parentNode.insertBefore(o,e);d.appendChild(e);return l!==null&&l!==void 0?l:e};const i=()=>{if(e&&o){o.parentNode.insertBefore(e,o);o.remove()}return Promise.resolve()};return{attachViewToDom:n,removeViewFromDom:i}};export{n as C,e as a,o as d}; //# sourceMappingURL=p-f9482dbc.js.map