JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q59871F
  • 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: 12, sourceId: 9000, target: '605ea8c2f74bfd2f9c25eaad6e41f5356d8ba58f5b9dce339b866ae6ce602f54', priority: 4, categoryId: 1, startDate: '2019-07-25T09:00:06.069', endDate: null, source: { id: 9000, categoryId: 1, deviceId: 'a7f8d7d426d716d384e78b9606be016601cb7ef012bdf488741c6fd4fa285978', name: 'Naeem ', city: 'Amstelveen', status: 'ACTIVE', latitude: 52.31142, longitude: 4.870087, image: null, website: null, type: 'SUN', description: 'sdfdf', supply: 4564, startDate: '2019-01-01T00:00:00', endDate: null, }, }, { id: 10, sourceId: 8000, target: '605ea8c2f74bfd2f9c25eaad6e41f5356d8ba58f5b9dce339b866ae6ce602f54', priority: 5, categoryId: 1, startDate: '2019-07-25T09:00:06.069', endDate: null, source: { id: 8000, categoryId: 1, deviceId: '270200df51f975d003e872334e8b5238d013ade3ad7c2a61781fa85aed851432', name: 'Akhilesh ', city: 'Antwerp', status: 'ACTIVE', latitude: 51.219448, longitude: 4.402464, image: null, website: null, type: 'SUN', description: 'solar panels', supply: 453, startDate: '2019-04-04T00:00:00', endDate: null, }, }, ]; ```
*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.2.0

  • Adhere to new global style variables

1.1.5 | 1.1.6

  • Bundle and minify related fixes

1.1.4

  • Sortable list not rendering fix

1.1.3

  • CSS hide of loading shimmer fix

1.1.2

  • Avatar fix

1.1.1

  • Dependency fixes

1.1.0

  • Sourcemix model has changed

1.0.0

  • Initial version of the sourcemix list