@angular/material
Version:
Angular Material
10 lines (9 loc) • 3.8 kB
JavaScript
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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
*/
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/material/core"),require("@angular/cdk/platform"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/material/core","@angular/cdk/platform","@angular/common"],t):t((o.ng=o.ng||{},o.ng.material=o.ng.material||{},o.ng.material.toolbar=o.ng.material.toolbar||{}),o.ng.core,o.ng.material.core,o.ng.cdk.platform,o.ng.common)}(this,function(o,t,e,r,n){"use strict";function a(o,t){function e(){this.constructor=o}l(o,t),o.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}function i(){throw Error("MatToolbar: Attempting to combine different toolbar modes. Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content inside of a `<mat-toolbar>` for a single row.")}var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e])},s=function(){function o(o){this._elementRef=o}return o}(),c=e.mixinColor(s),m=function(){function o(){}return o.decorators=[{type:t.Directive,args:[{selector:"mat-toolbar-row",exportAs:"matToolbarRow",host:{class:"mat-toolbar-row"}}]}],o.ctorParameters=function(){return[]},o}(),u=function(o){function e(t,e,r){var n=o.call(this,t)||this;return n._platform=e,n._document=r,n}return a(e,o),e.prototype.ngAfterViewInit=function(){var o=this;t.isDevMode()&&this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return o._checkToolbarMixedModes()}))},e.prototype._checkToolbarMixedModes=function(){var o=this;if(this._toolbarRows.length){[].slice.call(this._elementRef.nativeElement.childNodes).filter(function(o){return!(o.classList&&o.classList.contains("mat-toolbar-row"))}).filter(function(t){return t.nodeType!==(o._document?o._document.COMMENT_NODE:8)}).some(function(o){return o.textContent.trim()})&&i()}},e.decorators=[{type:t.Component,args:[{selector:"mat-toolbar",exportAs:"matToolbar",template:'<ng-content></ng-content><ng-content select="mat-toolbar-row"></ng-content>',styles:[".mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}.mat-toolbar-multiple-rows{min-height:64px}.mat-toolbar-row,.mat-toolbar-single-row{height:64px}@media (max-width:599px){.mat-toolbar-multiple-rows{min-height:56px}.mat-toolbar-row,.mat-toolbar-single-row{height:56px}}"],inputs:["color"],host:{class:"mat-toolbar","[class.mat-toolbar-multiple-rows]":"this._toolbarRows.length","[class.mat-toolbar-single-row]":"!this._toolbarRows.length"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,preserveWhitespaces:!1}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:r.Platform},{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]},e.propDecorators={_toolbarRows:[{type:t.ContentChildren,args:[m]}]},e}(c),p=function(){function o(){}return o.decorators=[{type:t.NgModule,args:[{imports:[e.MatCommonModule,r.PlatformModule],exports:[u,m,e.MatCommonModule],declarations:[u,m]}]}],o.ctorParameters=function(){return[]},o}();o.MatToolbarModule=p,o.MatToolbarBase=s,o._MatToolbarMixinBase=c,o.MatToolbarRow=m,o.MatToolbar=u,o.throwToolbarMixedModesError=i,Object.defineProperty(o,"__esModule",{value:!0})});
//# sourceMappingURL=material-toolbar.umd.min.js.map