@tots/ngx-org-chart
Version:
Hierarchical Organization Chart
26 lines • 4.85 kB
JavaScript
import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../ngx-chart-designer/ngx-chart-designer.component";
export class NgxOrgChartComponent {
constructor() {
this.hasParent = false;
this.direction = 'vertical';
this.itemClick = new EventEmitter();
}
}
NgxOrgChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxOrgChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NgxOrgChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NgxOrgChartComponent, selector: "ngx-org-chart", inputs: { nodes: "nodes", hasParent: "hasParent", direction: "direction" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "<div *ngIf=\"nodes?.length\">\n <ng-container *ngFor=\"let node of nodes\">\n <div class=\"ngx-org-self-{{direction}}\">\n <ngx-chart-designer [node]=\"node\" [direction]=\"direction\" (itemClick)=\"itemClick.emit($event)\"></ngx-chart-designer>\n </div>\n </ng-container>\n</div>\n", styles: ["html,body{display:flex;flex:1}.ngx-org-name{font-family:Patua One,cursive}.ngx-org-title{font-family:Oswald,sans-serif}.ngx-org-border{border-color:#9e9e9e}.ngx-org-box{color:#000;width:10em}.ngx-org-self-vertical{margin-bottom:2%}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.NgxChartDesignerComponent, selector: "ngx-chart-designer", inputs: ["node", "hasParent", "direction"], outputs: ["itemClick"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NgxOrgChartComponent, decorators: [{
type: Component,
args: [{ selector: 'ngx-org-chart', template: "<div *ngIf=\"nodes?.length\">\n <ng-container *ngFor=\"let node of nodes\">\n <div class=\"ngx-org-self-{{direction}}\">\n <ngx-chart-designer [node]=\"node\" [direction]=\"direction\" (itemClick)=\"itemClick.emit($event)\"></ngx-chart-designer>\n </div>\n </ng-container>\n</div>\n", styles: ["html,body{display:flex;flex:1}.ngx-org-name{font-family:Patua One,cursive}.ngx-org-title{font-family:Oswald,sans-serif}.ngx-org-border{border-color:#9e9e9e}.ngx-org-box{color:#000;width:10em}.ngx-org-self-vertical{margin-bottom:2%}\n"] }]
}], propDecorators: { nodes: [{
type: Input
}], hasParent: [{
type: Input
}], direction: [{
type: Input
}], itemClick: [{
type: Output
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW9yZy1jaGFydC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtb3JnLWNoYXJ0L3NyYy9saWIvbmd4LW9yZy1jaGFydC9uZ3gtb3JnLWNoYXJ0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1vcmctY2hhcnQvc3JjL2xpYi9uZ3gtb3JnLWNoYXJ0L25neC1vcmctY2hhcnQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQVN2RSxNQUFNLE9BQU8sb0JBQW9CO0lBTGpDO1FBV0UsY0FBUyxHQUFHLEtBQUssQ0FBQztRQUdsQixjQUFTLEdBQThCLFVBQVUsQ0FBQztRQUV4QyxjQUFTLEdBQUcsSUFBSSxZQUFZLEVBQVMsQ0FBQztLQUNqRDs7aUhBWlksb0JBQ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