Icard/angular-clarity-master(work.../node_modules/@angular/cdk/fesm2022/overlay.mjs.map

1 line
223 KiB
Plaintext
Raw Permalink Normal View History

2024-07-16 14:55:36 +00:00
{"version":3,"file":"overlay.mjs","sources":["../../../../../../src/cdk/overlay/scroll/block-scroll-strategy.ts","../../../../../../src/cdk/overlay/scroll/scroll-strategy.ts","../../../../../../src/cdk/overlay/scroll/close-scroll-strategy.ts","../../../../../../src/cdk/overlay/scroll/noop-scroll-strategy.ts","../../../../../../src/cdk/overlay/position/scroll-clip.ts","../../../../../../src/cdk/overlay/scroll/reposition-scroll-strategy.ts","../../../../../../src/cdk/overlay/scroll/scroll-strategy-options.ts","../../../../../../src/cdk/overlay/overlay-config.ts","../../../../../../src/cdk/overlay/position/connected-position.ts","../../../../../../src/cdk/overlay/dispatchers/base-overlay-dispatcher.ts","../../../../../../src/cdk/overlay/dispatchers/overlay-keyboard-dispatcher.ts","../../../../../../src/cdk/overlay/dispatchers/overlay-outside-click-dispatcher.ts","../../../../../../src/cdk/overlay/overlay-container.ts","../../../../../../src/cdk/overlay/overlay-ref.ts","../../../../../../src/cdk/overlay/position/flexible-connected-position-strategy.ts","../../../../../../src/cdk/overlay/position/global-position-strategy.ts","../../../../../../src/cdk/overlay/position/overlay-position-builder.ts","../../../../../../src/cdk/overlay/overlay.ts","../../../../../../src/cdk/overlay/overlay-directives.ts","../../../../../../src/cdk/overlay/overlay-module.ts","../../../../../../src/cdk/overlay/fullscreen-overlay-container.ts","../../../../../../src/cdk/overlay/overlay_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ScrollStrategy} from './scroll-strategy';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {coerceCssPixelValue} from '@angular/cdk/coercion';\nimport {supportsScrollBehavior} from '@angular/cdk/platform';\n\nconst scrollBehaviorSupported = supportsScrollBehavior();\n\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nexport class BlockScrollStrategy implements ScrollStrategy {\n private _previousHTMLStyles = {top: '', left: ''};\n private _previousScrollPosition: {top: number; left: number};\n private _isEnabled = false;\n private _document: Document;\n\n constructor(private _viewportRuler: ViewportRuler, document: any) {\n this._document = document;\n }\n\n /** Attaches this scroll strategy to an overlay. */\n attach() {}\n\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this._canBeEnabled()) {\n const root = this._document.documentElement!;\n\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n }\n\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable() {\n if (this._isEnabled) {\n const html = this._document.documentElement!;\n const body = this._document.body!;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n\n this._isEnabled = false;\n\n htmlStyle.left = this._previousHTMLStyles.left;\n htmlStyle.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n\n // Disable