ng-zorro-antd-yj
Version:
An enterprise-class UI components based on Ant Design and Angular
85 lines • 8.13 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, Output, TemplateRef, ViewEncapsulation } from '@angular/core';
import { NzPageHeaderFooterDirective } from './nz-page-header-cells';
var NzPageHeaderComponent = /** @class */ (function () {
function NzPageHeaderComponent() {
this.isTemplateRefBackIcon = false;
this.isStringBackIcon = false;
this.nzBackIcon = null;
this.nzBack = new EventEmitter();
}
/**
* @return {?}
*/
NzPageHeaderComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} changes
* @return {?}
*/
NzPageHeaderComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.hasOwnProperty('nzBackIcon')) {
this.isTemplateRefBackIcon = changes.nzBackIcon.currentValue instanceof TemplateRef;
this.isStringBackIcon = typeof changes.nzBackIcon.currentValue === 'string';
}
};
/**
* @return {?}
*/
NzPageHeaderComponent.prototype.onBack = /**
* @return {?}
*/
function () {
this.nzBack.emit();
};
NzPageHeaderComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-page-header',
template: "<ng-content select=\"nz-breadcrumb[nz-page-header-breadcrumb]\"></ng-content>\n\n<div *ngIf=\"nzBackIcon !== null\" (click)=\"onBack()\" class=\"ant-page-header-back-icon\">\n <i *ngIf=\"isStringBackIcon\" nz-icon [type]=\"nzBackIcon ? nzBackIcon : 'arrow-left'\" theme=\"outline\"></i>\n <ng-container *ngIf=\"isTemplateRefBackIcon\" [ngTemplateOutlet]=\"nzBackIcon\"></ng-container>\n <nz-divider nzType=\"vertical\"></nz-divider>\n</div>\n\n<div class=\"ant-page-header-title-view\">\n <span class=\"ant-page-header-title-view-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </span>\n <ng-content *ngIf=\"!nzTitle\" select=\"nz-page-header-title, [nz-page-header-title]\"></ng-content>\n <span class=\"ant-page-header-title-view-sub-title\" *ngIf=\"nzSubtitle\">\n <ng-container *nzStringTemplateOutlet=\"nzSubtitle\">{{ nzSubtitle }}</ng-container>\n </span>\n <ng-content *ngIf=\"!nzSubtitle\" select=\"nz-page-header-subtitle, [nz-page-header-subtitle]\"></ng-content>\n <ng-content select=\"nz-page-header-tags, [nz-page-header-tags]\"></ng-content>\n <ng-content select=\"nz-page-header-extra, [nz-page-header-extra]\"></ng-content>\n</div>\n\n<ng-content select=\"nz-page-header-content, [nz-page-header-content]\"></ng-content>\n<ng-content select=\"nz-page-header-footer, [nz-page-header-footer]\"></ng-content>\n",
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
host: {
class: 'ant-page-header',
'[class.ant-page-header-has-footer]': 'nzPageHeaderFooter'
},
styles: ["nz-page-header,nz-page-header-content,nz-page-header-footer{display:block}"]
}] }
];
/** @nocollapse */
NzPageHeaderComponent.ctorParameters = function () { return []; };
NzPageHeaderComponent.propDecorators = {
nzBackIcon: [{ type: Input }],
nzTitle: [{ type: Input }],
nzSubtitle: [{ type: Input }],
nzBack: [{ type: Output }],
nzPageHeaderFooter: [{ type: ContentChild, args: [NzPageHeaderFooterDirective,] }]
};
return NzPageHeaderComponent;
}());
export { NzPageHeaderComponent };
if (false) {
/** @type {?} */
NzPageHeaderComponent.prototype.isTemplateRefBackIcon;
/** @type {?} */
NzPageHeaderComponent.prototype.isStringBackIcon;
/** @type {?} */
NzPageHeaderComponent.prototype.nzBackIcon;
/** @type {?} */
NzPageHeaderComponent.prototype.nzTitle;
/** @type {?} */
NzPageHeaderComponent.prototype.nzSubtitle;
/** @type {?} */
NzPageHeaderComponent.prototype.nzBack;
/** @type {?} */
NzPageHeaderComponent.prototype.nzPageHeaderFooter;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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