mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
51 KiB
JSON
1 line
51 KiB
JSON
|
|
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-7a8b7a1c.js';\nimport { b as getIonMode } from './ionic-global-63a97a32.js';\nimport { a as attachComponent, d as detachComponent } from './framework-delegate-94e770cc.js';\nimport { B as BACKDROP, e as prepareOverlay, d as present, f as dismiss, g as eventMethod } from './overlays-a62f858b.js';\nimport { g as getClassMap } from './theme-ff3fc52f.js';\nimport { e as deepReady } from './index-a7711c1e.js';\nimport { c as createAnimation } from './animation-822d986b.js';\nimport './helpers-1457892a.js';\nimport './hardware-back-button-4a6b37fb.js';\n\n/**\n * iOS Popover Enter Animation\n */\nconst iosEnterAnimation = (baseEl, ev) => {\n let originY = 'top';\n let originX = 'left';\n const contentEl = baseEl.querySelector('.popover-content');\n const contentDimentions = contentEl.getBoundingClientRect();\n const contentWidth = contentDimentions.width;\n const contentHeight = contentDimentions.height;\n const bodyWidth = baseEl.ownerDocument.defaultView.innerWidth;\n const bodyHeight = baseEl.ownerDocument.defaultView.innerHeight;\n // If ev was passed, use that for target element\n const targetDim = ev && ev.target && ev.target.getBoundingClientRect();\n const targetTop = targetDim != null && 'top' in targetDim ? targetDim.top : bodyHeight / 2 - contentHeight / 2;\n const targetLeft = targetDim != null && 'left' in targetDim ? targetDim.left : bodyWidth / 2;\n const targetWidth = targetDim && targetDim.width || 0;\n const targetHeight = targetDim && targetDim.height || 0;\n const arrowEl = baseEl.querySelector('.popover-arrow');\n const arrowDim = arrowEl.getBoundingClientRect();\n const arrowWidth = arrowDim.width;\n const arrowHeight = arrowDim.height;\n if (targetDim == null) {\n arrowEl.style.display = 'none';\n }\n const arrowCSS = {\n top: targetTop + targetHeight,\n left: targetLeft + targetWidth / 2 - arrowWidth / 2\n };\n const popoverCSS = {\n top: targetTop + targetHeight + (arrowHeight - 1),\n left: targetLeft + targetWidth / 2 - contentWidth / 2\n };\n // If the popover left is less than the padding it is off screen\n // to the left so adjust it, else if the width of the popover\n // exceeds the body width it is off screen to the right so adjust\n //\n let checkSafeAreaLeft = false;\n let checkSafeAreaRight = false;\n // If the popover left is less than the padding it is off screen\n // to the left so adjust it, else if the width of the popover\n // exceeds the body width it is off screen to the right so adjust\n // 25 is a random/arbitrary number. It seems to work fine for ios11\n // and iPhoneX. Is it perfect? No. Does it work? Yes.\n if (popoverCSS.left < POPOVER_IOS_BODY_PADDING + 25) {\n checkSafeAreaLeft = true;\n popoverCSS.left = POPOVER_IOS_BODY_PADDING;\n } else if (contentWidth + POPOVER_IOS_BODY_PADDING + popoverCSS.left + 25 > bodyWidth) {\n // Ok, so we're on the right side of the screen,\n // but now we need to make sure we're still a bit further right\n // cus....notchurally... Again, 25 is random. It works tho\n checkSafeAreaRight = true;\n popoverCSS.left = bodyWidth - contentWidth - POPOVER_IOS_BODY_PADDING;\n originX = 'right';\n }\n // make it pop up if there's room above\n if (targetTop + targetHeight + contentHeight > bodyHeight && targetTop - contentHeight > 0) {\n arrowCSS.top = targetTop - (arrowHeight + 1);\n popoverCSS.top = targetTop - contentHeight - (arrowHeight - 1);\n baseEl.className = baseEl.className + ' popover-bottom';\n originY = 'bottom';\n // If there isn't room for it to pop up above the target cut it off\n } else if (targetTop + targetHeight + contentHeight > bodyHeight) {\n contentEl.style.bottom = POPOVER_IOS_BODY_PADDING + '%';\n }\n arrowEl.style.top = arrowCSS.top + 'px';\n arrowEl.style.left = arr
|