igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
91 lines (90 loc) • 4.41 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export let IgxChildContentComponent = /*@__PURE__*/ (() => {
class IgxChildContentComponent {
constructor(_changeDetectorRef, renderer, viewContainer) {
this._changeDetectorRef = _changeDetectorRef;
this.renderer = renderer;
this.viewContainer = viewContainer;
this._display = "inline-block";
this._flexDirection = "row";
this._alignItems = "center";
this._template = null;
}
get display() {
return this._display;
}
set display(value) {
this._display = value;
var ele = this.viewContainer.element.nativeElement;
this.renderer.setStyle(ele, "display", this._display);
//this.style.display = value;
}
get flexDirection() {
return this._flexDirection;
}
set flexDirection(value) {
this._flexDirection = value;
var ele = this.viewContainer.element.nativeElement;
this.renderer.setStyle(ele, "flex-direction", this._flexDirection);
//this.style.flexDirection = value;
}
get alignItems() {
return this._alignItems;
}
set alignItems(value) {
this._alignItems = value;
var ele = this.viewContainer.element.nativeElement;
this.renderer.setStyle(ele, "align-items", this._alignItems);
//this.style.flexDirection = value;
}
set template(value) {
this._template = value;
this._changeDetectorRef.detectChanges();
// if (this._context != null) {
//
// }
}
get template() {
return this._template;
}
markChanged() {
this._changeDetectorRef.detectChanges();
}
}
IgxChildContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxChildContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
IgxChildContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxChildContentComponent, selector: "igx-child-content", inputs: { template: "template" }, host: { classAttribute: "ig-child-content igx-child-content" }, ngImport: i0, template: `
<ng-template #defaultTemplate>
<div></div>
</ng-template>
<ng-container *ngTemplateOutlet="template ? template : defaultTemplate;">
</ng-container>
`, isInline: true, styles: ["\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxChildContentComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxChildContentComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-child-content',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<ng-template #defaultTemplate>
<div></div>
</ng-template>
<ng-container *ngTemplateOutlet="template ? template : defaultTemplate;">
</ng-container>
`,
host: { class: "ig-child-content igx-child-content" },
styles: [`
`]
}]
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }]; }, propDecorators: { template: [{
type: Input
}] } });