"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dev-app/dev-app.ts" between
material2-7.3.4.tar.gz and material2-7.3.5.tar.gz

About: material2 offers Material Design components for Angular.

dev-app.ts  (material2-7.3.4):dev-app.ts  (material2-7.3.5)
/** /**
* @license * @license
* Copyright Google LLC All Rights Reserved. * Copyright Google LLC All Rights Reserved.
* *
* Use of this source code is governed by an MIT-style license that can be * Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {OverlayContainer} from '@angular/cdk/overlay'; import {Component, ViewEncapsulation} from '@angular/core';
import {Component, ElementRef, ViewEncapsulation} from '@angular/core';
import {DevAppRippleOptions} from './ripple/ripple-options';
/** Root component for the dev-app demos. */ /** Root component for the dev-app demos. */
@Component({ @Component({
moduleId: module.id, moduleId: module.id,
selector: 'dev-app', selector: 'dev-app',
templateUrl: 'dev-app.html', template: '<dev-app-layout><router-outlet></router-outlet></dev-app-layout>',
styleUrls: ['dev-app.css'],
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
}) })
export class DevAppComponent { export class DevAppComponent {
dark = false;
navItems = [
{name: 'Examples', route: '/examples'},
{name: 'Autocomplete', route: '/autocomplete'},
{name: 'Badge', route: '/badge'},
{name: 'Bottom sheet', route: '/bottom-sheet'},
{name: 'Button Toggle', route: '/button-toggle'},
{name: 'Button', route: '/button'},
{name: 'Card', route: '/card'},
{name: 'Chips', route: '/chips'},
{name: 'Connected Overlay', route: '/connected-overlay'},
{name: 'Checkbox', route: '/checkbox'},
{name: 'Chips', route: '/chips'},
{name: 'Datepicker', route: '/datepicker'},
{name: 'Dialog', route: '/dialog'},
{name: 'Drawer', route: '/drawer'},
{name: 'Drag and Drop', route: '/drag-drop'},
{name: 'Expansion Panel', route: '/expansion'},
{name: 'Focus Origin', route: '/focus-origin'},
{name: 'Gestures', route: '/gestures'},
{name: 'Grid List', route: '/grid-list'},
{name: 'Icon', route: '/icon'},
{name: 'Input', route: '/input'},
{name: 'List', route: '/list'},
{name: 'Live Announcer', route: '/live-announcer'},
{name: 'Menu', route: '/menu'},
{name: 'Paginator', route: '/paginator'},
{name: 'Platform', route: '/platform'},
{name: 'Portal', route: '/portal'},
{name: 'Progress Bar', route: '/progress-bar'},
{name: 'Progress Spinner', route: '/progress-spinner'},
{name: 'Radio', route: '/radio'},
{name: 'Ripple', route: '/ripple'},
{name: 'Screen Type', route: '/screen-type'},
{name: 'Select', route: '/select'},
{name: 'Sidenav', route: '/sidenav'},
{name: 'Slide Toggle', route: '/slide-toggle'},
{name: 'Slider', route: '/slider'},
{name: 'Snack Bar', route: '/snack-bar'},
{name: 'Stepper', route: '/stepper'},
{name: 'Table', route: '/table'},
{name: 'Tabs', route: '/tabs'},
{name: 'Toolbar', route: '/toolbar'},
{name: 'Tooltip', route: '/tooltip'},
{name: 'Tree', route: '/tree'},
{name: 'Typography', route: '/typography'},
{name: 'Virtual Scrolling', route: '/virtual-scroll'},
];
constructor(
private _element: ElementRef<HTMLElement>,
private _overlayContainer: OverlayContainer,
public rippleOptions: DevAppRippleOptions) {}
toggleFullscreen() {
// Cast to `any`, because the typings don't include the browser-prefixed met
hods.
const elem = this._element.nativeElement.querySelector('.demo-content') as a
ny;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullScreen) {
elem.webkitRequestFullScreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.msRequestFullScreen) {
elem.msRequestFullScreen();
}
}
toggleTheme() {
const darkThemeClass = 'demo-unicorn-dark-theme';
this.dark = !this.dark;
if (this.dark) {
this._element.nativeElement.classList.add(darkThemeClass);
this._overlayContainer.getContainerElement().classList.add(darkThemeClass)
;
} else {
this._element.nativeElement.classList.remove(darkThemeClass);
this._overlayContainer.getContainerElement().classList.remove(darkThemeCla
ss);
}
}
} }
/** Home component which includes a welcome message for the dev-app. */ /** Home component which includes a welcome message for the dev-app. */
@Component({ @Component({
selector: 'home', selector: 'home',
template: ` template: `
<p>Welcome to the development demos for Angular Material!</p> <p>Welcome to the development demos for Angular Material!</p>
<p>Open the sidenav to select a demo.</p> <p>Open the sidenav to select a demo.</p>
`, `,
}) })
 End of changes. 3 change blocks. 
90 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)