/** * @author Martin Karkowski * @email m.karkowski@zema.de * @create date 2019-05-03 09:45:08 * @modify date 2020-07-22 21:53:21 * @desc [description] */ import { IBaseNodeOptions } from '../../../@zema/ZISS-Network/type/IBaseNodeOptions'; import { IBaseEdgeOptions } from '../../../@zema/ZISS-Network/type/IBaseEdgeOptions'; import { IJsonSchema } from '../../../@zema/ZISS-TypeScript-Library/src/JSON'; import { ILogicCallbackData } from '../../gui-component-logic-editor/interfaces/ILogicCallbackData'; export interface ITemplate { type: 'elements' /** * Array of Nodes, containing all * selected Nodes (idx 0 = the one * which will be added first and will * be edited, by the Edit-Pages) * and Subnodes of the Node. */ nodes: Array; /** * All Edges which are Selected. * (idx 0 = the one which will be * added first and will be edited, * by the Edit-Pages) */ edges: Array; } export interface IMustacheTemplate { type: 'mustache' /** The Mustache Template */ mustache: string; /** The Schema for the Query */ schema: IJsonSchema; /** Sample Data => Required for Rendering */ example: { [index: string]: any } // Function to Adapt the Template. adaptSchema? (template: IMustacheTemplate, data: ILogicCallbackData): IMustacheTemplate, adaptData? (data: ILogicCallbackData, genObject: {[index: string] : any}): {[index: string] : any} }