blob: 147439bcb95725f0896e8b02f3038a82cc1718fa [file] [log] [blame]
/**
* @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/cdk/platform"),require("@angular/common"),require("@angular/core"),require("@angular/material/core")):"function"==typeof define&&define.amd?define("@angular/material/toolbar",["exports","@angular/cdk/platform","@angular/common","@angular/core","@angular/material/core"],t):t((o.ng=o.ng||{},o.ng.material=o.ng.material||{},o.ng.material.toolbar={}),o.ng.cdk.platform,o.ng.common,o.ng.core,o.ng.material.core)}(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=function(o,t){return(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])})(o,t)},s=function(){function o(o){this._elementRef=o}return o}(),c=n.mixinColor(s),m=function(){function o(){}return o.decorators=[{type:r.Directive,args:[{selector:"mat-toolbar-row",exportAs:"matToolbarRow",host:{class:"mat-toolbar-row"}}]}],o}(),u=function(o){function n(t,e,r){var n=o.call(this,t)||this;return n._platform=e,n._document=r,n}return a(n,o),n.prototype.ngAfterViewInit=function(){var o=this;r.isDevMode()&&this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return o._checkToolbarMixedModes()}))},n.prototype._checkToolbarMixedModes=function(){var o=this;if(this._toolbarRows.length){Array.from(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||!o.textContent.trim())})&&i()}},n.decorators=[{type:r.Component,args:[{selector:"mat-toolbar",exportAs:"matToolbar",template:'<ng-content></ng-content><ng-content select="mat-toolbar-row"></ng-content>',styles:["@media (-ms-high-contrast:active){.mat-toolbar{outline:solid 1px}}.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]":"_toolbarRows.length > 0","[class.mat-toolbar-single-row]":"_toolbarRows.length === 0"},changeDetection:r.ChangeDetectionStrategy.OnPush,encapsulation:r.ViewEncapsulation.None}]}],n.ctorParameters=function(){return[{type:r.ElementRef},{type:t.Platform},{type:void 0,decorators:[{type:r.Inject,args:[e.DOCUMENT]}]}]},n.propDecorators={_toolbarRows:[{type:r.ContentChildren,args:[m]}]},n}(c),p=function(){function o(){}return o.decorators=[{type:r.NgModule,args:[{imports:[n.MatCommonModule],exports:[u,m,n.MatCommonModule],declarations:[u,m]}]}],o}();o.MatToolbarModule=p,o.throwToolbarMixedModesError=i,o.MatToolbarRow=m,o.MatToolbar=u,Object.defineProperty(o,"__esModule",{value:!0})});
//# sourceMappingURL=material-toolbar.umd.min.js.map