Skip to content

Commit

Permalink
main - 61103c5 fix(google-maps): hide info window node when opened wi…
Browse files Browse the repository at this point in the history
…th content (#30392)
  • Loading branch information
crisbeto committed Jan 27, 2025
1 parent 20c585a commit 6afdf52
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[<span class="hljs-attr">fixedInViewport</span>]=<span class="hljs-string">&quot;isMobile()&quot;</span> <span class="hljs-attr">fixedTopGap</span>=<span class="hljs-string">&quot;56&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">mat-nav-list</span>&gt;</span>
@for (nav of fillerNav; track nav) {
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">mat-list-item</span> <span class="hljs-attr">routerLink</span>=<span class="hljs-string">&quot;.&quot;</span>&gt;</span>{{nav}}<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">mat-list-item</span>&gt;</span>{{nav}}<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
}
<span class="hljs-tag">&lt;/<span class="hljs-name">mat-nav-list</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">mat-sidenav</span>&gt;</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@
<span class="hljs-keyword">import</span> {MatIconModule} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/icon&#x27;</span>;
<span class="hljs-keyword">import</span> {MatButtonModule} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/button&#x27;</span>;
<span class="hljs-keyword">import</span> {MatToolbarModule} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/toolbar&#x27;</span>;
<span class="hljs-keyword">import</span> {RouterLink} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/router&#x27;</span>;

<span class="hljs-comment">/** <span class="hljs-doctag">@title </span>Responsive sidenav */</span>
<span class="hljs-meta">@Component</span>({
<span class="hljs-attr">selector</span>: <span class="hljs-string">&#x27;sidenav-responsive-example&#x27;</span>,
<span class="hljs-attr">templateUrl</span>: <span class="hljs-string">&#x27;sidenav-responsive-example.html&#x27;</span>,
<span class="hljs-attr">styleUrl</span>: <span class="hljs-string">&#x27;sidenav-responsive-example.css&#x27;</span>,
<span class="hljs-attr">imports</span>: [
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatSidenavModule,
MatListModule,
RouterLink,
],
<span class="hljs-attr">imports</span>: [MatToolbarModule, MatButtonModule, MatIconModule, MatSidenavModule, MatListModule],
})
<span class="hljs-keyword">export</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">SidenavResponsiveExample</span> <span class="hljs-title">implements</span> <span class="hljs-title">OnDestroy</span> </span>{
<span class="hljs-keyword">protected</span> <span class="hljs-keyword">readonly</span> fillerNav = <span class="hljs-built_in">Array</span>.from({<span class="hljs-attr">length</span>: <span class="hljs-number">50</span>}, <span class="hljs-function">(<span class="hljs-params">_, i</span>) =&gt;</span> <span class="hljs-string">`Nav Item <span class="hljs-subst">${i + <span class="hljs-number">1</span>}</span>`</span>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1 class="example-app-name">Responsive App</h1>
[fixedInViewport]="isMobile()" fixedTopGap="56">
<mat-nav-list>
@for (nav of fillerNav; track nav) {
<a mat-list-item routerLink=".">{{nav}}</a>
<a mat-list-item>{{nav}}</a>
}
</mat-nav-list>
</mat-sidenav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ import {MatSidenavModule} from '@angular/material/sidenav';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material/button';
import {MatToolbarModule} from '@angular/material/toolbar';
import {RouterLink} from '@angular/router';

/** @title Responsive sidenav */
@Component({
selector: 'sidenav-responsive-example',
templateUrl: 'sidenav-responsive-example.html',
styleUrl: 'sidenav-responsive-example.css',
imports: [
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatSidenavModule,
MatListModule,
RouterLink,
],
imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatSidenavModule, MatListModule],
})
export class SidenavResponsiveExample implements OnDestroy {
protected readonly fillerNav = Array.from({length: 50}, (_, i) => `Nav Item ${i + 1}`);
Expand Down
12 changes: 2 additions & 10 deletions fesm2022/material/sidenav.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import * as i5 from '@angular/material/list';
import { MatListModule } from '@angular/material/list';
import * as i3$3 from '@angular/material/icon';
import { MatIconModule } from '@angular/material/icon';
import { RouterLink } from '@angular/router';

/**
* @title Autosize sidenav
Expand Down Expand Up @@ -178,18 +177,11 @@ class SidenavResponsiveExample {
}
shouldRun = /(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host);
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: SidenavResponsiveExample, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0-rc.0", type: SidenavResponsiveExample, isStandalone: true, selector: "sidenav-responsive-example", ngImport: i0, template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item routerLink=\".\">{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n", styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0-rc.0", type: SidenavResponsiveExample, isStandalone: true, selector: "sidenav-responsive-example", ngImport: i0, template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item>{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n", styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-rc.0", ngImport: i0, type: SidenavResponsiveExample, decorators: [{
type: Component,
args: [{ selector: 'sidenav-responsive-example', imports: [
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatSidenavModule,
MatListModule,
RouterLink,
], template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item routerLink=\".\">{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n", styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"] }]
args: [{ selector: 'sidenav-responsive-example', imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatSidenavModule, MatListModule], template: "@if (shouldRun) {\n <div class=\"example-container\" [class.example-is-mobile]=\"isMobile()\">\n <mat-toolbar class=\"example-toolbar\">\n <button mat-icon-button (click)=\"snav.toggle()\"><mat-icon>menu</mat-icon></button>\n <h1 class=\"example-app-name\">Responsive App</h1>\n </mat-toolbar>\n\n <mat-sidenav-container class=\"example-sidenav-container\"\n [style.marginTop.px]=\"isMobile() ? 56 : 0\">\n <mat-sidenav #snav [mode]=\"isMobile() ? 'over' : 'side'\"\n [fixedInViewport]=\"isMobile()\" fixedTopGap=\"56\">\n <mat-nav-list>\n @for (nav of fillerNav; track nav) {\n <a mat-list-item>{{nav}}</a>\n }\n </mat-nav-list>\n </mat-sidenav>\n\n <mat-sidenav-content>\n @for (content of fillerContent; track content) {\n <p>{{content}}</p>\n }\n </mat-sidenav-content>\n </mat-sidenav-container>\n </div>\n} @else {\n <div>Please open on Stackblitz to see result</div>\n}\n", styles: [".example-container {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.example-is-mobile .example-toolbar {\n position: fixed;\n /* Make sure the toolbar will stay on top of the content as it scrolls past. */\n z-index: 2;\n}\n\nh1.example-app-name {\n margin-left: 8px;\n}\n\n.example-sidenav-container {\n /* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This\n causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */\n flex: 1;\n}\n\n.example-is-mobile .example-sidenav-container {\n /* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the\n `<body>` to be our scrolling element for mobile layouts. */\n flex: 1 0 auto;\n}\n"] }]
}], ctorParameters: () => [] });

/**
Expand Down
2 changes: 1 addition & 1 deletion fesm2022/material/sidenav.mjs.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular/components-examples",
"version": "19.2.0-next.1+sha-41d12d4",
"version": "19.2.0-next.1+sha-61103c5",
"description": "Angular Components Examples",
"private": true,
"repository": {
Expand Down Expand Up @@ -259,15 +259,15 @@
},
"homepage": "https://github.com/angular/components#readme",
"peerDependencies": {
"@angular/cdk": "19.2.0-next.1+sha-41d12d4",
"@angular/cdk-experimental": "19.2.0-next.1+sha-41d12d4",
"@angular/cdk": "19.2.0-next.1+sha-61103c5",
"@angular/cdk-experimental": "19.2.0-next.1+sha-61103c5",
"@angular/core": "^19.0.0-0 || ^19.1.0-0 || ^19.2.0-0 || ^19.3.0-0 || ^20.0.0-0",
"@angular/common": "^19.0.0-0 || ^19.1.0-0 || ^19.2.0-0 || ^19.3.0-0 || ^20.0.0-0",
"@angular/material": "19.2.0-next.1+sha-41d12d4",
"@angular/material-experimental": "19.2.0-next.1+sha-41d12d4",
"@angular/material-moment-adapter": "19.2.0-next.1+sha-41d12d4",
"@angular/material-luxon-adapter": "19.2.0-next.1+sha-41d12d4",
"@angular/material-date-fns-adapter": "19.2.0-next.1+sha-41d12d4"
"@angular/material": "19.2.0-next.1+sha-61103c5",
"@angular/material-experimental": "19.2.0-next.1+sha-61103c5",
"@angular/material-moment-adapter": "19.2.0-next.1+sha-61103c5",
"@angular/material-luxon-adapter": "19.2.0-next.1+sha-61103c5",
"@angular/material-date-fns-adapter": "19.2.0-next.1+sha-61103c5"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down

0 comments on commit 6afdf52

Please sign in to comment.