content-type-selector

WebJar for content-type-selector

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.bowergithub.advanced-rest-client
ArtifactId

ArtifactId

content-type-selector
Last Version

Last Version

2.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

content-type-selector
WebJar for content-type-selector
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/advanced-rest-client/content-type-selector

Download content-type-selector

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/content-type-selector/ -->
<dependency>
    <groupId>org.webjars.bowergithub.advanced-rest-client</groupId>
    <artifactId>content-type-selector</artifactId>
    <version>2.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/content-type-selector/
implementation 'org.webjars.bowergithub.advanced-rest-client:content-type-selector:2.0.1'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.advanced-rest-client/content-type-selector/
implementation ("org.webjars.bowergithub.advanced-rest-client:content-type-selector:2.0.1")
'org.webjars.bowergithub.advanced-rest-client:content-type-selector:jar:2.0.1'
<dependency org="org.webjars.bowergithub.advanced-rest-client" name="content-type-selector" rev="2.0.1">
  <artifact name="content-type-selector" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.advanced-rest-client', module='content-type-selector', version='2.0.1')
)
libraryDependencies += "org.webjars.bowergithub.advanced-rest-client" % "content-type-selector" % "2.0.1"
[org.webjars.bowergithub.advanced-rest-client/content-type-selector "2.0.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.bowergithub.advanced-rest-client » events-target-behavior jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-dropdown-menu jar [2.0.3,3)
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-item jar [2.1.0,3)
org.webjars.bowergithub.polymerelements : paper-listbox jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on NPM

Build Status

Published on webcomponents.org

<content-type-selector>

An element that provides an UI for selecting common content type values.

<content-type-selector contenttype="application/zip">
  <paper-item slot="item" data-type="application/zip">Zip file</paper-item>
  <paper-item slot="item" data-type="application/7z">7-zip file</paper-item>
</content-type-selector>

API components

This components is a part of API components ecosystem

Usage

Installation

npm install --save @advanced-rest-client/content-type-selector

In an html file

<html>
  <head>
    <script type="module">
      import '@advanced-rest-client/content-type-selector/content-type-selector.js';
    </script>
    <script src="node_modules/web-animations-js/web-animations-next.min.js"></script>
  </head>
  <body>
    <content-type-selector contenttype="application/json"></content-type-selector>
    <script>
    window.addEventListener('content-type-changed', (e) => {
      console.log(e.detail.value);
    });
    </script>
  </body>
</html>

In a LitElement template

import { LitElement, html } from 'lit-element';
import '@advanced-rest-client/content-type-selector/content-type-selector.js';

class SampleElement extends LitElement {
  render() {
    return html`
    <content-type-selector .contentType="${this.mediaType}" @contenttype-changed="${this._mediaChangeHandler}"></content-type-selector>
    `;
  }

  _mediaChangeHandler(e) {
    console.log(e.target.contentType);
    // or e.detail.value
  }
}
customElements.define('sample-element', SampleElement);

In a Polymer 3 element

import {PolymerElement, html} from '@polymer/polymer';
import '@advanced-rest-client/content-type-selector/content-type-selector.js';

class SampleElement extends PolymerElement {
  static get template() {
    return html`
    <content-type-selector contenttype="{{mediaType}}"></content-type-selector>
    `;
  }
}
customElements.define('sample-element', SampleElement);

Installation

git clone https://github.com/advanced-rest-client/content-type-selector
cd content-type-selector
npm install

Running the demo locally

npm start

Running the tests

npm test
org.webjars.bowergithub.advanced-rest-client

ARC

A set of repositories related to the Advanced REST Client and API console (by Mulesoft)

Versions

Version
2.0.1