@igo2/common
Version:
54 lines (49 loc) • 5.44 kB
JavaScript
import * as i0 from '@angular/core';
import { Input, HostBinding, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
import { NgIf, NgClass } from '@angular/common';
class PanelComponent {
title;
get withHeader() {
return this._withHeader;
}
set withHeader(value) {
this._withHeader = value;
}
_withHeader = true;
cursorPointer = false;
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: PanelComponent, isStandalone: true, selector: "igo-panel", inputs: { title: "title", withHeader: "withHeader", cursorPointer: "cursorPointer" }, host: { properties: { "class.igo-panel-with-header": "this.withHeader" } }, ngImport: i0, template: "<div\n *ngIf=\"withHeader\"\n class=\"igo-panel-header\"\n title=\"\"\n [ngClass]=\"{ 'igo-cursor-pointer': cursorPointer === true }\"\n>\n <div class=\"panel-left\">\n <ng-content select=\"[panelLeftButton]\"></ng-content>\n </div>\n <h4 class=\"igo-panel-title\">\n {{ title }}\n <ng-content select=\"[panelHeader]\"></ng-content>\n </h4>\n <div class=\"panel-right\">\n <ng-content select=\"[panelRightButton]\"></ng-content>\n </div>\n</div>\n<div class=\"igo-panel-content\" title=\"\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host>.igo-panel-header{color:var(--mat-sys-on-primary)!important;background-color:var(--mat-sys-on-primary-container)}:host>.igo-panel-header ::ng-deep mat-icon{fill:var(--mat-sys-on-primary);color:var(--mat-sys-on-primary)}:host .igo-panel-header{display:flex;justify-content:space-between;align-items:center;height:48px;text-align:center}:host .igo-panel-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;font-weight:600;flex:1;color:var(--mat-sys-on-primary)!important}:host .igo-panel-content{flex:1;overflow:auto}:host .igo-cursor-pointer{cursor:pointer}:host .panel-left,:host .panel-right{display:flex;min-width:40px}:host .panel-right:not(:empty){padding-right:4px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PanelComponent, decorators: [{
type: Component,
args: [{ selector: 'igo-panel', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIf, NgClass], template: "<div\n *ngIf=\"withHeader\"\n class=\"igo-panel-header\"\n title=\"\"\n [ngClass]=\"{ 'igo-cursor-pointer': cursorPointer === true }\"\n>\n <div class=\"panel-left\">\n <ng-content select=\"[panelLeftButton]\"></ng-content>\n </div>\n <h4 class=\"igo-panel-title\">\n {{ title }}\n <ng-content select=\"[panelHeader]\"></ng-content>\n </h4>\n <div class=\"panel-right\">\n <ng-content select=\"[panelRightButton]\"></ng-content>\n </div>\n</div>\n<div class=\"igo-panel-content\" title=\"\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host>.igo-panel-header{color:var(--mat-sys-on-primary)!important;background-color:var(--mat-sys-on-primary-container)}:host>.igo-panel-header ::ng-deep mat-icon{fill:var(--mat-sys-on-primary);color:var(--mat-sys-on-primary)}:host .igo-panel-header{display:flex;justify-content:space-between;align-items:center;height:48px;text-align:center}:host .igo-panel-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0;font-weight:600;flex:1;color:var(--mat-sys-on-primary)!important}:host .igo-panel-content{flex:1;overflow:auto}:host .igo-cursor-pointer{cursor:pointer}:host .panel-left,:host .panel-right{display:flex;min-width:40px}:host .panel-right:not(:empty){padding-right:4px}\n"] }]
}], propDecorators: { title: [{
type: Input
}], withHeader: [{
type: Input
}, {
type: HostBinding,
args: ['class.igo-panel-with-header']
}], cursorPointer: [{
type: Input
}] } });
/**
* @deprecated import the PanelComponent directly
*/
class IgoPanelModule {
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IgoPanelModule, imports: [PanelComponent], exports: [PanelComponent] });
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoPanelModule });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoPanelModule, decorators: [{
type: NgModule,
args: [{
imports: [PanelComponent],
exports: [PanelComponent]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { IgoPanelModule, PanelComponent };
//# sourceMappingURL=igo2-common-panel.mjs.map