All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev-ui.qwc-automatiko-function-flow.js Maven / Gradle / Ivy

The newest version!
import { LitElement, html, css} from 'lit';
import { columnBodyRenderer } from '@vaadin/grid/lit.js';
import { functionFlows } from 'build-time-data';
import '@vaadin/grid';
import '@vaadin/vertical-layout';
import 'qui-badge';

export class QwcAutomatikoFunctionFlow extends LitElement {

    static styles = css`
        .arctable {
          height: 100%;
          padding-bottom: 10px;
        }

        code {
          font-size: 85%;
        }

        .annotation {
          color: var(--lumo-contrast-50pct);
        }

        .producer {
          color: var(--lumo-primary-text-color);
        }
        `;

    static properties = {
        _functionFlows: {state: true},
    };

    constructor() {
        super();
        this._functionFlows = functionFlows;
    }
    
    textToClipboard (text) {
	    var dummy = document.createElement("textarea");
	    document.body.appendChild(dummy);
	    dummy.value = text;
	    dummy.select();
	    document.execCommand("copy");
	    document.body.removeChild(dummy);
	}

    render() {
        if (this._functionFlows) {

            return html`
                
                    
                    

                    
                    
                    
                    
                      
                    
                     
                    
                    
                    
                    
                    
                  
                `;
            
        } else {
            return html`No functions found`;
        }
    }


    _nameRenderer(func) {
      return html`
        
          ${func.name}
        
    `;
    }
    
    _endpointRenderer(func) {
      return html`
        
          ${func.endpoint}
        
    `;
    }
    _binaryRenderer(func) {
      return html`
        
          
${func.binaryInstructions}
`; } _binaryCopyRenderer(func) { return html` this.textToClipboard(func.curlBinary)} class="button"> `; } _structureRenderer(func) { return html`
${func.structuredInstructions}
`; } _structureCopyRenderer(func) { return html` this.textToClipboard(func.curlStructure)} class="button"> `; } } customElements.define('qwc-automatiko-function-flow', QwcAutomatikoFunctionFlow);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy