UNPKG

@acrodata/gui

Version:

JSON powered GUI for configurable panels.

38 lines (37 loc) 1.55 kB
import { ElementRef, OnInit, PipeTransform } from '@angular/core'; import { GuiDefaultValue, GuiFields, GuiOperator } from './interface'; import * as i0 from "@angular/core"; /** * Lightweight EJS template engine * * @param str template string * @param data data passed to the template * @returns * * ### Example * * ```ts * const people = ['geddy', 'neil', 'alex']; * const res = ejsTmpl('<%= people.join(", ") %>', {people: people}); * console.log(res); * // => 'geddy, neil, alex' * ``` * */ export declare function ejsTmpl(str: string, data: any): any; export declare class GuiEjsPipe implements PipeTransform { transform(value: string, data?: {}): string; static ɵfac: i0.ɵɵFactoryDeclaration<GuiEjsPipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<GuiEjsPipe, "ejs", true>; } export declare class GuiFlexDirective implements OnInit { private el; flex: number | undefined; constructor(el: ElementRef); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GuiFlexDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<GuiFlexDirective, "[flex]", never, { "flex": { "alias": "flex"; "required": false; }; }, {}, never, never, true, never>; } export declare function compareValues(a: GuiDefaultValue, b: GuiDefaultValue, operator: GuiOperator): boolean; export declare function getValueByPath(obj: Record<string, any>, path: string): Record<string, any> | undefined; export declare function getModelFromConfig(config?: GuiFields, model?: Record<string, any>): Record<string, any>;