-
Notifications
You must be signed in to change notification settings - Fork 2
Production pr #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Production pr #433
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c876ef6
shadow root issue fixes
Chandan-walker d8d4ccc
remove unused code
Chandan-walker a3e6d41
Merge pull request #432 from Walkover-Web-Solution/P0072-clean
Chandan-walker dc56280
org details script bugs fixes
Chandan-walker 59b4c6f
pr changes
Chandan-walker cbecc8a
fixed design issue
Chandan-walker 7a18b17
Merge pull request #437 from Walkover-Web-Solution/P0072-clean
Chandan-walker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { DOCUMENT } from '@angular/common'; | ||
| import { Inject, Injectable } from '@angular/core'; | ||
| import { OverlayContainer } from '@angular/cdk/overlay'; | ||
| import { Platform } from '@angular/cdk/platform'; | ||
|
|
||
| const CONTAINER_CLASS = 'cdk-overlay-container'; | ||
| /** Full-viewport overlay container style so positioning is viewport-based when in shadow root */ | ||
| const OVERLAY_CONTAINER_STYLE = | ||
| 'position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;pointer-events:none!important;z-index:1000!important;'; | ||
| /** | ||
| * OverlayContainer that: | ||
| * - When proxy-auth with shadow root exists (script load): attaches the overlay as the | ||
| * **first** child of the shadow root with full-viewport fixed style, so it is NOT | ||
| * inside the fixed .container and positioning is correct (dropdown below the right field). | ||
| * - Otherwise: attaches to document.body (default behaviour). | ||
| */ | ||
| @Injectable() | ||
| export class ShadowDomOverlayContainer extends OverlayContainer { | ||
| constructor(@Inject(DOCUMENT) document: Document, _platform: Platform) { | ||
| super(document, _platform); | ||
| } | ||
|
|
||
| protected override _createContainer(): void { | ||
| if (!this._platform.isBrowser) { | ||
| return; | ||
| } | ||
|
|
||
| const container = this._document.createElement('div'); | ||
| container.classList.add(CONTAINER_CLASS); | ||
|
|
||
| const parent = this._getOverlayParent(); | ||
| if (parent !== this._document.body) { | ||
| container.setAttribute('style', OVERLAY_CONTAINER_STYLE); | ||
| const first = parent.firstChild; | ||
| if (first) { | ||
| parent.insertBefore(container, first); | ||
| } else { | ||
| parent.appendChild(container); | ||
| } | ||
| } else { | ||
| parent.appendChild(container); | ||
| } | ||
| this._containerElement = container; | ||
| } | ||
|
|
||
| private _getOverlayParent(): HTMLElement { | ||
| const host = | ||
| (this._document.querySelector('proxy-auth:not([data-master])') as HTMLElement | null) ?? | ||
| (this._document.querySelector('proxy-auth') as HTMLElement | null); | ||
|
|
||
| if (host?.shadowRoot) { | ||
| return host.shadowRoot as unknown as HTMLElement; | ||
| } | ||
| return this._document.body; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.