3.0.5 • Published 5 years ago

@advanced-rest-client/variables-editor v3.0.5

Weekly downloads
16
License
Apache-2.0
Repository
github
Last release
5 years ago

Published on NPM

Build Status

Published on webcomponents.org

variables-editor

A variables editor element is an UI element to display existing variables and forms to edit them.

Required component

This component works with:

  • variables-model - Storing / restoring data from the data store
  • variables-manager - Managing environments and variables
  • variables-evaluator - Evaluates variables into values

This components can be replaced with other logic with compatible API.

Jexl dependency

variables-editor requires Jexl library to be installed in the application and included into the document. This is not done inside the variables-editor element as each element using Jexl would have to include it's own copy and at build time it would produce multiple copies of the library.

This element, when installed locally, installs Jexl and produces local copy of the library to be used with demo page.

Usage

Installation

npm install --save @advanced-rest-client/variables-editor
import { LitElement, html } from 'lit-element';
import './node_odules/@advanced-rest-client/variables-editor/variables-editor.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <variables-editor></variables-editor>

    <variables-model></variables-model>
    <variables-manager></variables-manager>
    <variables-evaluator></variables-evaluator>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Development

git clone https://github.com/advanced-rest-client/variables-editor
cd variables-editor
npm install

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem