aiber-test/www/input-shims-bc550f99-js-es5.js.map
2020-12-18 09:30:04 +00:00

1 line
29 KiB
Plaintext

{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/input-shims-bc550f99.js"],"names":["cloneMap","WeakMap","relocateInput","componentEl","inputEl","shouldRelocate","inputRelativeY","has","addClone","removeClone","isFocused","input","getRootNode","activeElement","parentEl","parentNode","clonedEl","cloneNode","classList","add","tabIndex","appendChild","set","doc","ownerDocument","tx","dir","style","pointerEvents","transform","clone","get","remove","enableHideCaretOnScroll","scrollEl","scrollHideCaret","shouldHideCaret","onBlur","hideCaret","showCaret","addEventListener","SKIP_SELECTOR","enableInputBlurring","focused","didScroll","document","onScroll","onFocusin","onTouchend","ev","active","matches","tapped","target","closest","setTimeout","blur","removeEventListener","SCROLL_ASSIST_SPEED","getScrollData","contentEl","keyboardHeight","itemEl","calcScrollData","getBoundingClientRect","defaultView","innerHeight","inputRect","contentRect","platformHeight","inputTop","top","inputBottom","bottom","visibleAreaTop","visibleAreaBottom","Math","min","safeAreaTop","safeAreaBottom","distanceToBottom","distanceToTop","desiredScrollAmount","round","scrollAmount","distance","abs","duration","scrollDuration","max","scrollPadding","inputSafeY","enableScrollAssist","footerEl","coord","touchStart","touchEnd","endCoord","hasPointerMoved","preventDefault","stopPropagation","jsSetFocus","scrollData","focus","window","scrollContent","scrollContentTimeout","undefined","clearTimeout","doubleKeyboardEventListener","scrollByPoint","getScrollElement","totalScrollAmount","scrollHeight","clientHeight","scrollTop","type","threshold","startCoord","deltaX","x","deltaY","y","PADDING_TIMER_KEY","enableScrollPadding","setScrollPadding","onFocusout","tagName","parentElement","el","timer","setProperty","INPUT_BLURRING","SCROLL_PADDING","startInputShims","config","getNumber","scrollAssist","getBoolean","inputBlurring","inputs","Array","from","querySelectorAll","hideCaretMap","scrollAssistMap","registerInput","componentOnReady","inputRoot","shadowRoot","querySelector","rmFn","unregisterInput","fn","detail"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AA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AlBA,eAAkB,CAACrJ,WAAD,EAAiB;AACvC,cAAKmC,SAAL,EAAgB;AACd,gBAAMmH,EAAE,GAAGT,YAAY,CAACjH,GAAb,CAAiB5B,WAAjB,CAAX;;AACA,gBAAIsJ,EAAJ,EAAQ;AACNA,gBAAE;AACH;;AACDT,wBAAY,UAAZ,CAAoB7I,WAApB;AACD;;AACD,cAAKsI,YAAL,EAAmB;AACjB,gBAAMgB,GAAE,GAAGR,eAAe,CAAClH,GAAhB,CAAoB5B,WAApB,CAAX;;AACA,gBAAIsJ,GAAJ,EAAQ;AACNA,iBAAE;AACH;;AACDR,2BAAe,UAAf,CAAuB9I,WAAvB;AACD;AACF,SAfD;;AAgBA,YAAIwI,aAAa,IAAIP,cAArB,EAAqC;AACnC1F,6BAAmB;AACpB;;AACD,YAAIgD,aAAa,IAAI2C,cAArB,EAAqC;AACnCT,6BAAmB,CAAC/D,cAAD,CAAnB;AACD,SAnDiC,CAoDlC;AACA;AACA;;;AACA,mCAAoB+E,MAApB,6BAA4B;AAAvB,cAAMjI,KAAK,cAAX;AACHuI,uBAAa,CAACvI,KAAD,CAAb;AACD;;AACDY,WAAG,CAACiB,gBAAJ,CAAqB,iBAArB,EAAyC,UAACS,EAAD,EAAQ;AAC/CiG,uBAAa,CAACjG,EAAE,CAACyG,MAAJ,CAAb;AACD,SAFD;AAGAnI,WAAG,CAACiB,gBAAJ,CAAqB,mBAArB,EAA2C,UAACS,EAAD,EAAQ;AACjDuG,yBAAe,CAACvG,EAAE,CAACyG,MAAJ,CAAf;AACD,SAFD;AAGD,OAhED","file":"input-shims-bc550f99-js-es5.js","sourcesContent":["import { a as addEventListener, b as removeEventListener, p as pointerCoord } from './helpers-90f46169.js';\n\nconst cloneMap = new WeakMap();\nconst relocateInput = (componentEl, inputEl, shouldRelocate, inputRelativeY = 0) => {\n if (cloneMap.has(componentEl) === shouldRelocate) {\n return;\n }\n if (shouldRelocate) {\n addClone(componentEl, inputEl, inputRelativeY);\n }\n else {\n removeClone(componentEl, inputEl);\n }\n};\nconst isFocused = (input) => {\n return input === input.getRootNode().activeElement;\n};\nconst addClone = (componentEl, inputEl, inputRelativeY) => {\n // this allows for the actual input to receive the focus from\n // the user's touch event, but before it receives focus, it\n // moves the actual input to a location that will not screw\n // up the app's layout, and does not allow the native browser\n // to attempt to scroll the input into place (messing up headers/footers)\n // the cloned input fills the area of where native input should be\n // while the native input fakes out the browser by relocating itself\n // before it receives the actual focus event\n // We hide the focused input (with the visible caret) invisible by making it scale(0),\n const parentEl = inputEl.parentNode;\n // DOM WRITES\n const clonedEl = inputEl.cloneNode(false);\n clonedEl.classList.add('cloned-input');\n clonedEl.tabIndex = -1;\n parentEl.appendChild(clonedEl);\n cloneMap.set(componentEl, clonedEl);\n const doc = componentEl.ownerDocument;\n const tx = doc.dir === 'rtl' ? 9999 : -9999;\n componentEl.style.pointerEvents = 'none';\n inputEl.style.transform = `translate3d(${tx}px,${inputRelativeY}px,0) scale(0)`;\n};\nconst removeClone = (componentEl, inputEl) => {\n const clone = cloneMap.get(componentEl);\n if (clone) {\n cloneMap.delete(componentEl);\n clone.remove();\n }\n componentEl.style.pointerEvents = '';\n inputEl.style.transform = '';\n};\n\nconst enableHideCaretOnScroll = (componentEl, inputEl, scrollEl) => {\n if (!scrollEl || !inputEl) {\n return () => { return; };\n }\n const scrollHideCaret = (shouldHideCaret) => {\n if (isFocused(inputEl)) {\n relocateInput(componentEl, inputEl, shouldHideCaret);\n }\n };\n const onBlur = () => relocateInput(componentEl, inputEl, false);\n const hideCaret = () => scrollHideCaret(true);\n const showCaret = () => scrollHideCaret(false);\n addEventListener(scrollEl, 'ionScrollStart', hideCaret);\n addEventListener(scrollEl, 'ionScrollEnd', showCaret);\n inputEl.addEventListener('blur', onBlur);\n return () => {\n removeEventListener(scrollEl, 'ionScrollStart', hideCaret);\n removeEventListener(scrollEl, 'ionScrollEnd', showCaret);\n inputEl.addEventListener('ionBlur', onBlur);\n };\n};\n\nconst SKIP_SELECTOR = 'input, textarea, [no-blur]';\nconst enableInputBlurring = () => {\n let focused = true;\n let didScroll = false;\n const doc = document;\n const onScroll = () => {\n didScroll = true;\n };\n const onFocusin = () => {\n focused = true;\n };\n const onTouchend = (ev) => {\n // if app did scroll return early\n if (didScroll) {\n didScroll = false;\n return;\n }\n const active = doc.activeElement;\n if (!active) {\n return;\n }\n // only blur if the active element is a text-input or a textarea\n if (active.matches(SKIP_SELECTOR)) {\n return;\n }\n // if the selected target is the active element, do not blur\n const tapped = ev.target;\n if (tapped === active) {\n return;\n }\n if (tapped.matches(SKIP_SELECTOR) || tapped.closest(SKIP_SELECTOR)) {\n return;\n }\n focused = false;\n // TODO: find a better way, why 50ms?\n setTimeout(() => {\n if (!focused) {\n active.blur();\n }\n }, 50);\n };\n addEventListener(doc, 'ionScrollStart', onScroll);\n doc.addEventListener('focusin', onFocusin, true);\n doc.addEventListener('touchend', onTouchend, false);\n return () => {\n removeEventListener(doc, 'ionScrollStart', onScroll, true);\n doc.removeEventListener('focusin', onFocusin, true);\n doc.removeEventListener('touchend', onTouchend, false);\n };\n};\n\nconst SCROLL_ASSIST_SPEED = 0.3;\nconst getScrollData = (componentEl, contentEl, keyboardHeight) => {\n const itemEl = componentEl.closest('ion-item,[ion-item]') || componentEl;\n return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, componentEl.ownerDocument.defaultView.innerHeight);\n};\nconst calcScrollData = (inputRect, contentRect, keyboardHeight, platformHeight) => {\n // compute input's Y values relative to the body\n const inputTop = inputRect.top;\n const inputBottom = inputRect.bottom;\n // compute visible area\n const visibleAreaTop = contentRect.top;\n const visibleAreaBottom = Math.min(contentRect.bottom, platformHeight - keyboardHeight);\n // compute safe area\n const safeAreaTop = visibleAreaTop + 15;\n const safeAreaBottom = visibleAreaBottom * 0.75;\n // figure out if each edge of the input is within the safe area\n const distanceToBottom = safeAreaBottom - inputBottom;\n const distanceToTop = safeAreaTop - inputTop;\n // desiredScrollAmount is the negated distance to the safe area according to our calculations.\n const desiredScrollAmount = Math.round((distanceToBottom < 0)\n ? -distanceToBottom\n : (distanceToTop > 0)\n ? -distanceToTop\n : 0);\n // our calculations make some assumptions that aren't always true, like the keyboard being closed when an input\n // gets focus, so make sure we don't scroll the input above the visible area\n const scrollAmount = Math.min(desiredScrollAmount, inputTop - visibleAreaTop);\n const distance = Math.abs(scrollAmount);\n const duration = distance / SCROLL_ASSIST_SPEED;\n const scrollDuration = Math.min(400, Math.max(150, duration));\n return {\n scrollAmount,\n scrollDuration,\n scrollPadding: keyboardHeight,\n inputSafeY: -(inputTop - safeAreaTop) + 4\n };\n};\n\nconst enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardHeight) => {\n let coord;\n const touchStart = (ev) => {\n coord = pointerCoord(ev);\n };\n const touchEnd = (ev) => {\n // input cover touchend/mouseup\n if (!coord) {\n return;\n }\n // get where the touchend/mouseup ended\n const endCoord = pointerCoord(ev);\n // focus this input if the pointer hasn't moved XX pixels\n // and the input doesn't already have focus\n if (!hasPointerMoved(6, coord, endCoord) && !isFocused(inputEl)) {\n ev.preventDefault();\n ev.stopPropagation();\n // begin the input focus process\n jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight);\n }\n };\n componentEl.addEventListener('touchstart', touchStart, true);\n componentEl.addEventListener('touchend', touchEnd, true);\n return () => {\n componentEl.removeEventListener('touchstart', touchStart, true);\n componentEl.removeEventListener('touchend', touchEnd, true);\n };\n};\nconst jsSetFocus = async (componentEl, inputEl, contentEl, footerEl, keyboardHeight) => {\n if (!contentEl && !footerEl) {\n return;\n }\n const scrollData = getScrollData(componentEl, (contentEl || footerEl), keyboardHeight);\n if (contentEl && Math.abs(scrollData.scrollAmount) < 4) {\n // the text input is in a safe position that doesn't\n // require it to be scrolled into view, just set focus now\n inputEl.focus();\n return;\n }\n // temporarily move the focus to the focus holder so the browser\n // doesn't freak out while it's trying to get the input in place\n // at this point the native text input still does not have focus\n relocateInput(componentEl, inputEl, true, scrollData.inputSafeY);\n inputEl.focus();\n /* tslint:disable-next-line */\n if (typeof window !== 'undefined') {\n let scrollContentTimeout;\n const scrollContent = async () => {\n // clean up listeners and timeouts\n if (scrollContentTimeout !== undefined) {\n clearTimeout(scrollContentTimeout);\n }\n window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);\n window.removeEventListener('ionKeyboardDidShow', scrollContent);\n // scroll the input into place\n if (contentEl) {\n await contentEl.scrollByPoint(0, scrollData.scrollAmount, scrollData.scrollDuration);\n }\n // the scroll view is in the correct position now\n // give the native text input focus\n relocateInput(componentEl, inputEl, false, scrollData.inputSafeY);\n // ensure this is the focused input\n inputEl.focus();\n };\n const doubleKeyboardEventListener = () => {\n window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);\n window.addEventListener('ionKeyboardDidShow', scrollContent);\n };\n if (contentEl) {\n const scrollEl = await contentEl.getScrollElement();\n /**\n * scrollData will only consider the amount we need\n * to scroll in order to properly bring the input\n * into view. It will not consider the amount\n * we can scroll in the content element.\n * As a result, scrollData may request a greater\n * scroll position than is currently available\n * in the DOM. If this is the case, we need to\n * wait for the webview to resize/the keyboard\n * to show in order for additional scroll\n * bandwidth to become available.\n */\n const totalScrollAmount = scrollEl.scrollHeight - scrollEl.clientHeight;\n if (scrollData.scrollAmount > (totalScrollAmount - scrollEl.scrollTop)) {\n /**\n * On iOS devices, the system will show a \"Passwords\" bar above the keyboard\n * after the initial keyboard is shown. This prevents the webview from resizing\n * until the \"Passwords\" bar is shown, so we need to wait for that to happen first.\n */\n if (inputEl.type === 'password') {\n // Add 50px to account for the \"Passwords\" bar\n scrollData.scrollAmount += 50;\n window.addEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);\n }\n else {\n window.addEventListener('ionKeyboardDidShow', scrollContent);\n }\n /**\n * This should only fire in 2 instances:\n * 1. The app is very slow.\n * 2. The app is running in a browser on an old OS\n * that does not support Ionic Keyboard Events\n */\n scrollContentTimeout = setTimeout(scrollContent, 1000);\n return;\n }\n }\n scrollContent();\n }\n};\nconst hasPointerMoved = (threshold, startCoord, endCoord) => {\n if (startCoord && endCoord) {\n const deltaX = (startCoord.x - endCoord.x);\n const deltaY = (startCoord.y - endCoord.y);\n const distance = deltaX * deltaX + deltaY * deltaY;\n return distance > (threshold * threshold);\n }\n return false;\n};\n\nconst PADDING_TIMER_KEY = '$ionPaddingTimer';\nconst enableScrollPadding = (keyboardHeight) => {\n const doc = document;\n const onFocusin = (ev) => {\n setScrollPadding(ev.target, keyboardHeight);\n };\n const onFocusout = (ev) => {\n setScrollPadding(ev.target, 0);\n };\n doc.addEventListener('focusin', onFocusin);\n doc.addEventListener('focusout', onFocusout);\n return () => {\n doc.removeEventListener('focusin', onFocusin);\n doc.removeEventListener('focusout', onFocusout);\n };\n};\nconst setScrollPadding = (input, keyboardHeight) => {\n if (input.tagName !== 'INPUT') {\n return;\n }\n if (input.parentElement && input.parentElement.tagName === 'ION-INPUT') {\n return;\n }\n if (input.parentElement &&\n input.parentElement.parentElement &&\n input.parentElement.parentElement.tagName === 'ION-SEARCHBAR') {\n return;\n }\n const el = input.closest('ion-content');\n if (el === null) {\n return;\n }\n const timer = el[PADDING_TIMER_KEY];\n if (timer) {\n clearTimeout(timer);\n }\n if (keyboardHeight > 0) {\n el.style.setProperty('--keyboard-offset', `${keyboardHeight}px`);\n }\n else {\n el[PADDING_TIMER_KEY] = setTimeout(() => {\n el.style.setProperty('--keyboard-offset', '0px');\n }, 120);\n }\n};\n\nconst INPUT_BLURRING = true;\nconst SCROLL_PADDING = true;\nconst startInputShims = (config) => {\n const doc = document;\n const keyboardHeight = config.getNumber('keyboardHeight', 290);\n const scrollAssist = config.getBoolean('scrollAssist', true);\n const hideCaret = config.getBoolean('hideCaretOnScroll', true);\n const inputBlurring = config.getBoolean('inputBlurring', true);\n const scrollPadding = config.getBoolean('scrollPadding', true);\n const inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea'));\n const hideCaretMap = new WeakMap();\n const scrollAssistMap = new WeakMap();\n const registerInput = async (componentEl) => {\n if (componentEl.componentOnReady) {\n await componentEl.componentOnReady();\n }\n const inputRoot = componentEl.shadowRoot || componentEl;\n const inputEl = inputRoot.querySelector('input') || inputRoot.querySelector('textarea');\n const scrollEl = componentEl.closest('ion-content');\n const footerEl = (!scrollEl) ? componentEl.closest('ion-footer') : null;\n if (!inputEl) {\n return;\n }\n if ( !!scrollEl && hideCaret && !hideCaretMap.has(componentEl)) {\n const rmFn = enableHideCaretOnScroll(componentEl, inputEl, scrollEl);\n hideCaretMap.set(componentEl, rmFn);\n }\n if ( (!!scrollEl || !!footerEl) && scrollAssist && !scrollAssistMap.has(componentEl)) {\n const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight);\n scrollAssistMap.set(componentEl, rmFn);\n }\n };\n const unregisterInput = (componentEl) => {\n if ( hideCaret) {\n const fn = hideCaretMap.get(componentEl);\n if (fn) {\n fn();\n }\n hideCaretMap.delete(componentEl);\n }\n if ( scrollAssist) {\n const fn = scrollAssistMap.get(componentEl);\n if (fn) {\n fn();\n }\n scrollAssistMap.delete(componentEl);\n }\n };\n if (inputBlurring && INPUT_BLURRING) {\n enableInputBlurring();\n }\n if (scrollPadding && SCROLL_PADDING) {\n enableScrollPadding(keyboardHeight);\n }\n // Input might be already loaded in the DOM before ion-device-hacks did.\n // At this point we need to look for all of the inputs not registered yet\n // and register them.\n for (const input of inputs) {\n registerInput(input);\n }\n doc.addEventListener('ionInputDidLoad', ((ev) => {\n registerInput(ev.detail);\n }));\n doc.addEventListener('ionInputDidUnload', ((ev) => {\n unregisterInput(ev.detail);\n }));\n};\n\nexport { startInputShims };\n"]}