/** @license Copyright (c) 2024 trading_peter This program is available under Apache License Version 2.0 */ import { html, css } from 'lit'; import { TpFlowNode } from './tp-flow-node'; import { TpFlowNodes } from './tp-flow-nodes.js'; class DemoNode extends TpFlowNode { static get styles() { return [ ...super.styles, css` :host { display: block; } ` ]; } renderNodeContent() { return html` `; } static get properties() { return { }; } constructor() { super(); this.flowNodeType = 'MathNode'; this.inputs = [ { name: 'value1' }, { name: 'value2' } ]; this.outputs = [ { name: 'result' } ]; this.data = { operation: 'add' }; } _handleOperationChange(e) { this.data.operation = e.target.value; } } window.customElements.define('demo-node', DemoNode); TpFlowNodes.registerNode('MathNode', DemoNode);