UNPKG

@kumologica/kumologica-contrib-base64

Version:
92 lines (75 loc) 2.85 kB
<script type="text/x-kumologica" data-template-name="Base64"> <style scoped> .hiddenAttrs {display:none;} .visibleAttrs {display:block;} </style> <div class="kumo-window"> <!-- Display name --> <div class="kumo-section"> <div class="kumo-row"> <label class="kumo-row-label" for="node-input-name"> <span>Display Name</span></label> <input class="kumo-row-editable" type="text" id="node-input-name" placeholder="Name"> </div> </div> <!-- General Settings --> <div class="kumo-section-title">General</div> <div class="kumo-section"> <div class="form-row" id='Operation'> <label class="kumo-row-label" for="node-input-operation">Operation</label> <select class="kumo-row-editable" type="text" id="node-input-operation"> <option value="Encode">Encode</option> <option value="Decode">Decode</option> ; </select> </div> <br/> <div id="AttrHolder"> <div class="form-row" id="propertyAttr" class='hiddenAttrs'> <label class="kumo-row-label" for="node-input-selector">Property</label> <input type="text" id="node-input-property" placeholder="Property"> <input type="hidden" id="node-input-propertyType"></input> </div> </div> </div> </div> </script> <script type="text/javascript"> App.nodes.registerType('Base64', { category: 'security', icon: 'kumo_base64.png', color: '#3e64ff', defaults: { name: { value: 'Base64' }, operation: { value: 'Encode' }, pageOperation: { value: ''}, property : { value: '',templateable: true , required: true }, propertyType: { value: '' } }, inputs: 1, outputs: 1, label: function () { return this.name || 'Base64'; } }); </script> <script type="text/x-kumologica" data-help-name="Base64"> <h4> Description </h4> <p>Base64 node helps encoding and decoding a given property in base64.</p> <h4> Properties </h4> <ul> <li><i>Operation</i> - (Optional). Option for Encoding or decoding a message property.</li> <li><i>Property</i> - (Required). Variable or Payload which is to be encoded or decoded based on the operation.</li> </ul> <p><i>Note : </i> The encoded string is availabe under <code>msg.base64.encodedstring</code>.Similarly decoded string under <code>msg.base64.decodedstring</code></p> <h4> Throws </h4> <ul> <li>Base64 Encoding Failed</li> <li>Base64 Decoding Failed</li> </ul> <h4> Returns </h4> Payload will not be overwrittten by this node. None of the variables will be overwritten or enriched by this node. <h4> More info </h4> <a href="http://kumologica.com/">Kumologica Documentation</a> </script>