@obliczeniowo/elementary
Version:
Library made in Angular version 19
80 lines (79 loc) • 3.98 kB
TypeScript
import { ComponentRef, SimpleChanges, ViewContainerRef, ElementRef, ChangeDetectorRef } from '@angular/core';
import { Point2D } from '@obliczeniowo/elementary/classes';
import { EventEmitterExt } from '@obliczeniowo/elementary/rx-js-ext';
import { BoxModel } from '../../models/box.model';
import { RelationConnectorComponent } from '@obliczeniowo/elementary/connectors';
import { ComponentData } from '../../models/component-data';
import { ModellerService } from '../../services/modeller.service';
import { ModellerConnectorModel } from '../../models/modeller-connector.model';
import { BoxItemModel } from '../../models/box-item.model';
import { ModellerSpaceComponent } from '../../public-api';
import * as i0 from "@angular/core";
export declare class ModellerBoxComponent {
protected ref: ElementRef<HTMLElement>;
changes: ChangeDetectorRef;
protected modeller: ModellerService;
model?: BoxModel;
/** world (global translation) */
world: Point2D;
/** local box only translation */
translate: Point2D;
/** translation for dragging this stuff */
offset: Point2D;
index: number;
/** Unique per box type registration */
id?: string;
/** globally unique id as meany the same type boxes can exists */
subId?: string;
/** used only for 'input'/'output' type of model */
inputModel?: {
[]: any;
};
/** parent */
parent?: ModellerSpaceComponent;
/** */
options?: {
[]: any;
};
/** used only for 'input'/'output' type of model */
outputChanged: EventEmitterExt<any>;
/** */
optionsChanged: EventEmitterExt<void>;
dragBox: EventEmitterExt<{
mouse: MouseEvent;
component: ModellerBoxComponent;
}>;
connector: EventEmitterExt<ModellerConnectorModel>;
remove: EventEmitterExt<ModellerBoxComponent>;
/** remove connector by id */
removeConnector: EventEmitterExt<string>;
protected connectors?: RelationConnectorComponent[];
protected userModel?: {
[]: any;
} | any[];
protected dynamic?: boolean;
protected type: 'input' | 'button';
get zIndex(): number;
get transform(): string;
containerRef: ViewContainerRef;
protected components: ComponentRef<any>[];
constructor(ref: ElementRef<HTMLElement>, changes: ChangeDetectorRef, modeller: ModellerService);
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
allConnectors(): RelationConnectorComponent[];
getBoxItemModel(): BoxItemModel;
setConnectors(connectors: RelationConnectorComponent[]): void;
protected clear(): void;
protected toDynamic(): void;
protected transformUserModel(): {
[]: any;
} | undefined;
protected reload(): void;
protected setRemove(component: ComponentRef<any>, com: ComponentData): void;
protected restoreConnectors(): void;
protected add(name?: string): void;
item(parentId: string, subId: string, id: string): ComponentRef<any> | undefined;
recalc(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ModellerBoxComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ModellerBoxComponent, "obl-modeller-box", never, { "model": { "alias": "model"; "required": false; }; "world": { "alias": "world"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "index": { "alias": "index"; "required": false; }; "id": { "alias": "id"; "required": false; }; "subId": { "alias": "subId"; "required": false; }; "inputModel": { "alias": "inputModel"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "outputChanged": "outputChanged"; "optionsChanged": "optionsChanged"; "dragBox": "dragBox"; "connector": "connector"; "remove": "remove"; "removeConnector": "removeConnector"; }, never, never, false, never>;
}