JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q59835F
  • License MIT

List of sourcemixes

Package Exports

  • @ppci/sourcemix-list

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 (@ppci/sourcemix-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sourcemix list

A list of sourcemixes

Table of contents

  1. Installation
  2. Usage
  3. Theme | Styling
  4. Properties
  5. Events
  6. Changelog

Installation

CDN

  <script type='module' src="https://unpkg.com/@ppci/sourcemix-list@1.0.0/index.js" />

NPM

  npm i @ppci/sourcemix-list

Usage

// Javascript import
import '@ppci/sourcemix-list'

// or module import
<script type="module" src="https://unpkg.com/@ppci/sourcemix-list@1.0.0/index.js" />

<sourcemix-list 
  items="Array" 
  limit="Number" 
  loading="Boolean"
  deleteMode="Boolean"
  @list-item-click="Event"
  @list-item-delete="Event"
  @change="Event"
  @placeholder-click="Event">
</sourcemix-list>

Theme | Styling

sourcemix-list {
   /* Dynamically generated icon variables based on available energy subtypes */
  --icon-wind: 'wind icon';
  --icon-sun: 'sun icon';
  --icon-water: 'water icon';
  ...etc

  /* Dynamically generated category color variables based on the available categories */
  --local-color: red;
  --social-color: blue;
  ...etc

}

Properties

Property Type Description Possible Values
*items* Array ```javascript const items = [ { id: 'd677ecdd-79c8-4409-81be-f0fd956f4be2', name: 'Meta Stroom met een lange naam Meta Stroom met een lange naam', city: 'Hoogerheide', status: 'ACTIVE', latitude: '51.4321136', longitude: '4.3191078', avatar: 'https://powerpeers-tst.azurewebsites.net/assets/ images/avatars/Avatars-blonde.png', category: 'LOCAL', energySubtype: 'SUN', description: 'Ik ben meta', sourceSinceDate: '2018-10-15T07:57:20.831', supply: 200.0, }, { id: '33da046b-2be4-3616-0156-8f5796b1849b', name: 'HardSun', city: 'Soesterberg', avatar: 'https://www.powerpeers.nl/media/119482/img_6055.jpg?anchor=center &mode=crop&width=96&height=96&rnd=131574885500000000', status: 'ACTIVE', latitude: '52.1161965', longitude: '5.2827762', category: 'SOCIAL', energySubtype: 'SUN', description: 'Een kleine installatie, maar bij zonnige dagen genoeg om beschikbaar te stellen. Alle beetjes helpen', sourceSinceDate: '2018-07-29T00:00:00.000', supply: 100.0, }, ]; ```
*limit* Number Amount of sourcemixes visible in the list
loading Boolean Show/hide loading indicator
deleteMode Boolean Toggle delete mode on the list.

Events

Name Description Detail / Payload
@list-item-click List item has been clicked ```{ detail: { id: '1' } }```
@list-item-delete List item delete button clicked ```{ detail: { id: '1' } }```
@add-click add button clicked ``````
@list-sorted List has been reordered ``` { detail: [ // reordered list of items. See property items for item data example] }```

Changelog

1.0.0 ( Major )

  • Initial version of the sourcemix list