JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q39401F
  • License MIT

Webcomponent preignition-mixin following open-wc recommendations

Package Exports

  • @preignition/preignition-mixin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@preignition/preignition-mixin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

<preignition-mixin>

Series of helper mixin while developping Preignition with lit-element:

  • defaultValueMixin: allow to declare default values in properties (similar to Polymer)
  • selectMixin: use d3-selection in component shadowRoot

This webcomponent follows the open-wc recommendation.

Installation

npm i preignition-mixin

Usage

defaultValueMixin

import { defaultValueMixin } from '@preignition/preignition-mixin';

class DefaultElement extends defaultValueMixin(TestElement) {
  
  static get properties() {
    return {
      value: {type: String, value: 'test'}
    };
  }
}

selectMixin

import { selectMixin } from '@preignition/preignition-mixin';

class SelectElement extends selectMixin(TestElement) {
}
window.customElements.define('select-element', SelectElement);

const el = html`<select-element></select-element>`;
const title = el.selectShadow('#title')

Testing using karma (if applied by author)

npm run test