Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@api-components/api-property-form-item

advanced-rest-client2.6kApache-2.03.0.16TypeScript support: included

An input to use with forms to render inputs based in ARC view-model

web-components, api-console, form-item

readme

Published on NPM

Build Status

<api-property-form-item>

An input to use with forms to render inputs based in ARC view-model

<api-property-form-item model='{"schema":{"inputLabel": "Enter number value", "inputType": "number", "minimum": 1, "maximum": 100}}' name="numericModel" value="1"></api-property-form-item>

Deprecation notice

This element is moved to api-forms repository and @api-components/api-forms package. This element will be deprecated and archived once the migration finish.

Usage

Installation

npm install --save @api-components/api-property-form-item

In an html file

<html>
  <head>
    <script type="module">
      import '@api-components/api-property-form-item/api-property-form-item.js';
    </script>
  </head>
  <body>
    <api-property-form-item name="numericModel" value="1"></api-property-form-item>
    <script>
    {
      document.querySelector('api-property-form-item').model = {
        schema: {
          inputLabel: 'Enter number value',
          inputType: 'number',
          minimum: 1,
          maximum: 100
        }
      };
    }
    </script>
  </body>
</html>

In a LitElement

import { LitElement, html } from 'lit-element';
import '@api-components/api-property-form-item/api-property-form-item.js';

class SampleElement extends PolymerElement {
  render() {
    return html`
    <api-property-form-item
      name="numericModel"
      value="1"
      .model="${this.inputModel}"
      @changed="${this._handleHande}"></api-property-form-item>
    `;
  }

  _handleHande(e) {
    this.inputValue = e.target.value;
  }
}
customElements.define('sample-element', SampleElement);

Base styles

The element provides 3 basic styling options:

  • Filled - Material design filled style, default style
  • Outlined - Material design outlined style, use outlined property
  • Legacy - Anypoint style, use legacy property
<api-property-form-item outlined></api-property-form-item>
<api-property-form-item legacy></api-property-form-item>

Running the demo locally

npm start

Running the tests

npm test

API components

This components is a part of API components ecosystem

changelog

2.0.6 (2018-11-26)

Docs

Fix

New

Update

2.0.5 (2018-08-08)

Docs

Fix

New

Update

2.0.4 (2018-05-18)

Docs

Update

2.0.3 (2018-03-20)

Docs

Update

(2018-03-20)

Docs

Update

3.0.0 (2019-08-14)

Bug Fixes

  • fixing travis configuration (2afb244)

3.0.1 (2019-08-15)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing travis configuration (2afb244)

3.0.2 (2019-08-17)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

3.0.3 (2019-08-18)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing input width in flex layout (b0805d6)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

3.0.4 (2019-08-18)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing input width in flex layout (b0805d6)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

3.0.5 (2019-08-18)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing input width in flex layout (b0805d6)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

Features

3.0.6 (2019-08-23)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing input width in flex layout (b0805d6)
  • fixing selection in boolean selector (d389916)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

Features

3.0.8 (2019-08-25)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing change in FF for numeric types (6c9f4ad)
  • fixing input width in flex layout (b0805d6)
  • fixing selection in boolean selector (d389916)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

Features

  • adding disabled state (c4a2f02)
  • array is now also nillable (3a25325)

3.0.9 (2019-08-30)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing change in FF for numeric types (6c9f4ad)
  • fixing input width in flex layout (b0805d6)
  • fixing selection in boolean selector (d389916)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

Features

  • adding disabled state (c4a2f02)
  • array is now also nillable (3a25325)

3.0.11 (2019-11-07)

Bug Fixes

  • fixing _isArray accessor in value setter (378c589)
  • fixing change in FF for numeric types (6c9f4ad)
  • fixing input width in flex layout (b0805d6)
  • fixing selection in boolean selector (d389916)
  • fixing travis configuration (2afb244)
  • removing invalid CSS selectors (8efde0d)

Features

  • adding disabled state (c4a2f02)
  • array is now also nillable (3a25325)

3.0.12 (2019-12-10)

Build

  • bumping version b025d13 by Pawel Psztyc
  • bumping version 8869a28 by Pawel Psztyc
  • bumping version 71fdc53 by Pawel
  • bumping version e7153c9 by Pawel
  • bumping version 2dced1a by Pawel
  • bumping version 8ea9125 by Pawel
  • bumping version 2dfcf9e by Pawel
  • bumping version 0f260e2 by Pawel
  • bumping version 30e6ad3 by Pawel
  • bumping version bf34c5a by Pawel
  • bumping version ba0c95e by Pawel
  • publishing stable version e803642 by Pawel

Update

  • updating dependencies 5232e11 by Pawel Psztyc
  • upgrading depdndencies cd6b239 by Pawel Psztyc
  • embed css styles in render method a57bb77 by TwoPlusTwoOne
  • replacing global icons with new ARC icons ed3b2c4 by Pawel Psztyc
  • upgrading dependencies 631b018 by Pawel
  • removing old description 1aa7ebf by Pawel
  • updating eslint config 48b2024 by Pawel
  • upgrading dependencies 654e6ba by Pawel
  • adding typpings 562c999 by Pawel
  • adding devault value f52f08d by Pawel
  • adding type check to value setter 59652ee by Pawel
  • finalizing the element f5351c3 by Pawel
  • replacing paper-input with anypoint-input 8a09bd5 by Pawel Psztyc
  • started upgrading to anypoint components and lit element 6f3f787 by Pawel

Features

  • array is now also nillable 3a25325 by Pawel
  • adding disabled state c4a2f02 by Pawel

Bug Fixes

  • fixes #3 - input event retargeting a35ab67 by Pawel Psztyc
  • fixing change in FF for numeric types 6c9f4ad by Pawel
  • fixing selection in boolean selector d389916 by Pawel
  • fixing input width in flex layout b0805d6 by Pawel
  • removing invalid CSS selectors 8efde0d by Pawel
  • fixing _isArray accessor in value setter 378c589 by Pawel
  • fixing travis configuration 2afb244 by Pawel

Refactor

  • moving the impl to src/ folder 43e92bd by Pawel Psztyc
  • updating error message (Uri's request) 92e6819 by Pawel
  • deprecating legacy for compatibility a3556da by Pawel
  • changing readonly to readOnly to make it consistant a90ed04 by Pawel

Testing

  • adding BS integration 33b695a by Pawel Psztyc
  • updating tests configuration, adding Edge back to tests a254889 by Pawel Psztyc
  • fixing test after icons change f685d5a by Pawel Psztyc
  • removing Edge again 491dcf5 by Pawel
  • upgrading deps and restoring Edge tests 86b10e6 by Pawel
  • removing Egde due to unknown error c2e76a0 by Pawel

Other

  • Update: Restoring test coverage d754f3b by Pawel Psztyc
  • Update: Updating import paths to match web spec fff4b46 by Pawel Psztyc
  • New: Adding npm ignore file 2526390 by Pawel Psztyc
  • Breaking: Upgrading component to Polymer 3 dbd3b85 by Pawel Psztyc
  • Docs: Updating documentation dc488bb by Pawel Psztyc
  • New: Adding readonly property a45158c by Pawel Psztyc
  • Fix: Fixing linter errors 44de4a6 by Pawel Psztyc
  • Update: Removiung lint command ca8e282 by Paweł Psztyć
  • Docs: Updating documentation 7d48c1b by Paweł Psztyć
  • Docs: Updated main documentation cbf8fd2 by Pawel Psztyc
  • Update: Updated validation of the element. f8c64a9 by Pawel Psztyc
  • Update: Added a11y tests 75c8b9e by Pawel Psztyc
  • Update: Updated styles definition 87e6759 by Pawel Psztyc
  • Update: Updated tests configuration. 75c550b by Pawel Psztyc
  • Update: Updated Travis configuration to connect to Sauce Labs. 263428b by Pawel Psztyc

3.0.13 (2020-11-11)

Build

  • bumping version b025d13 by Pawel Psztyc
  • bumping version 8869a28 by Pawel Psztyc
  • bumping version 71fdc53 by Pawel
  • bumping version e7153c9 by Pawel
  • bumping version 2dced1a by Pawel
  • bumping version 8ea9125 by Pawel
  • bumping version 2dfcf9e by Pawel
  • bumping version 0f260e2 by Pawel
  • bumping version 30e6ad3 by Pawel
  • bumping version bf34c5a by Pawel
  • bumping version ba0c95e by Pawel
  • publishing stable version e803642 by Pawel

Update

  • upgrading types and testing 286fbfd by Pawel
  • updating dependencies 5232e11 by Pawel Psztyc
  • upgrading depdndencies cd6b239 by Pawel Psztyc
  • embed css styles in render method a57bb77 by TwoPlusTwoOne
  • replacing global icons with new ARC icons ed3b2c4 by Pawel Psztyc
  • upgrading dependencies 631b018 by Pawel
  • removing old description 1aa7ebf by Pawel
  • updating eslint config 48b2024 by Pawel
  • upgrading dependencies 654e6ba by Pawel
  • adding typpings 562c999 by Pawel
  • adding devault value f52f08d by Pawel
  • adding type check to value setter 59652ee by Pawel
  • finalizing the element f5351c3 by Pawel
  • replacing paper-input with anypoint-input 8a09bd5 by Pawel Psztyc
  • started upgrading to anypoint components and lit element 6f3f787 by Pawel

Features

  • array is now also nillable 3a25325 by Pawel
  • adding disabled state c4a2f02 by Pawel

Bug Fixes

  • fixes #3 - input event retargeting a35ab67 by Pawel Psztyc
  • fixing change in FF for numeric types 6c9f4ad by Pawel
  • fixing selection in boolean selector d389916 by Pawel
  • fixing input width in flex layout b0805d6 by Pawel
  • removing invalid CSS selectors 8efde0d by Pawel
  • fixing _isArray accessor in value setter 378c589 by Pawel
  • fixing travis configuration 2afb244 by Pawel

Refactor

  • moving the impl to src/ folder 43e92bd by Pawel Psztyc
  • updating error message (Uri's request) 92e6819 by Pawel
  • deprecating legacy for compatibility a3556da by Pawel
  • changing readonly to readOnly to make it consistant a90ed04 by Pawel

Testing

  • adding BS integration 33b695a by Pawel Psztyc
  • updating tests configuration, adding Edge back to tests a254889 by Pawel Psztyc
  • fixing test after icons change f685d5a by Pawel Psztyc
  • removing Edge again 491dcf5 by Pawel
  • upgrading deps and restoring Edge tests 86b10e6 by Pawel
  • removing Egde due to unknown error c2e76a0 by Pawel

Other

  • Update: Restoring test coverage d754f3b by Pawel Psztyc
  • Update: Updating import paths to match web spec fff4b46 by Pawel Psztyc
  • New: Adding npm ignore file 2526390 by Pawel Psztyc
  • Breaking: Upgrading component to Polymer 3 dbd3b85 by Pawel Psztyc
  • Docs: Updating documentation dc488bb by Pawel Psztyc
  • New: Adding readonly property a45158c by Pawel Psztyc
  • Fix: Fixing linter errors 44de4a6 by Pawel Psztyc
  • Update: Removiung lint command ca8e282 by Paweł Psztyć
  • Docs: Updating documentation 7d48c1b by Paweł Psztyć
  • Docs: Updated main documentation cbf8fd2 by Pawel Psztyc
  • Update: Updated validation of the element. f8c64a9 by Pawel Psztyc
  • Update: Added a11y tests 75c8b9e by Pawel Psztyc
  • Update: Updated styles definition 87e6759 by Pawel Psztyc
  • Update: Updated tests configuration. 75c550b by Pawel Psztyc
  • Update: Updated Travis configuration to connect to Sauce Labs. 263428b by Pawel Psztyc

3.0.14 (2020-11-11)

Build

  • bumping version b025d13 by Pawel Psztyc
  • bumping version 8869a28 by Pawel Psztyc
  • bumping version 71fdc53 by Pawel

Update

  • [ci skip] automated merge master->stage. syncing main branches 6e42119 by Ci agent
  • upgrading types and testing 286fbfd by Pawel
  • updating dependencies 5232e11 by Pawel Psztyc
  • upgrading depdndencies cd6b239 by Pawel Psztyc
  • embed css styles in render method a57bb77 by TwoPlusTwoOne
  • replacing global icons with new ARC icons ed3b2c4 by Pawel Psztyc
  • upgrading dependencies 631b018 by Pawel

Bug Fixes

  • fixing type definition for the model item 8691cd6 by Pawel
  • fixes #3 - input event retargeting a35ab67 by Pawel Psztyc

Refactor

  • moving the impl to src/ folder 43e92bd by Pawel Psztyc
  • updating error message (Uri's request) 92e6819 by Pawel
  • deprecating legacy for compatibility a3556da by Pawel

Testing

  • adding BS integration 33b695a by Pawel Psztyc
  • updating tests configuration, adding Edge back to tests a254889 by Pawel Psztyc
  • fixing test after icons change f685d5a by Pawel Psztyc

3.0.15 (2020-11-11)

Build

  • bumping version b025d13 by Pawel Psztyc
  • bumping version 8869a28 by Pawel Psztyc
  • bumping version 71fdc53 by Pawel

Update

  • [ci skip] automated merge master->stage. syncing main branches 7a2a60f by Ci agent
  • [ci skip] automated merge master->stage. syncing main branches 6e42119 by Ci agent
  • upgrading types and testing 286fbfd by Pawel
  • updating dependencies 5232e11 by Pawel Psztyc
  • upgrading depdndencies cd6b239 by Pawel Psztyc
  • embed css styles in render method a57bb77 by TwoPlusTwoOne
  • replacing global icons with new ARC icons ed3b2c4 by Pawel Psztyc
  • upgrading dependencies 631b018 by Pawel

Documentation

  • adding event definition d345b91 by Pawel

Bug Fixes

  • fixing type definition for the model item 8691cd6 by Pawel
  • fixes #3 - input event retargeting a35ab67 by Pawel Psztyc

Refactor

  • moving the impl to src/ folder 43e92bd by Pawel Psztyc
  • updating error message (Uri's request) 92e6819 by Pawel
  • deprecating legacy for compatibility a3556da by Pawel

Testing

  • adding BS integration 33b695a by Pawel Psztyc
  • updating tests configuration, adding Edge back to tests a254889 by Pawel Psztyc
  • fixing test after icons change f685d5a by Pawel Psztyc

3.0.16 (2021-03-29)

Build

  • bumping version b025d13 by Pawel Psztyc
  • bumping version 8869a28 by Pawel Psztyc
  • bumping version 71fdc53 by Pawel

Update

  • adding deprecation notice 232e49f by Pawel Psztyc
  • updating dependnecies 95c8a0b by Pawel Psztyc
  • [ci skip] automated merge master->stage. syncing main branches 497a713 by Ci agent
  • [ci skip] automated merge master->stage. syncing main branches 7a2a60f by Ci agent
  • [ci skip] automated merge master->stage. syncing main branches 6e42119 by Ci agent
  • upgrading types and testing 286fbfd by Pawel
  • updating dependencies 5232e11 by Pawel Psztyc
  • upgrading depdndencies cd6b239 by Pawel Psztyc
  • embed css styles in render method a57bb77 by TwoPlusTwoOne
  • replacing global icons with new ARC icons ed3b2c4 by Pawel Psztyc
  • upgrading dependencies 631b018 by Pawel

Documentation

  • adding event definition d345b91 by Pawel

Bug Fixes

  • fixing type definition for the model item 8691cd6 by Pawel
  • fixes #3 - input event retargeting a35ab67 by Pawel Psztyc

Refactor

  • moving the impl to src/ folder 43e92bd by Pawel Psztyc
  • updating error message (Uri's request) 92e6819 by Pawel
  • deprecating legacy for compatibility a3556da by Pawel

Testing

  • adding BS integration 33b695a by Pawel Psztyc
  • updating tests configuration, adding Edge back to tests a254889 by Pawel Psztyc
  • fixing test after icons change f685d5a by Pawel Psztyc