npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

punchlist

v1.0.12

Published

Punch List JQueryLess

Downloads

2

Readme

Punch List Jquery Less

Simple plugin to organize tasks without Jquery

Getting Started

These instructions will get you a copy of the project up and running on your local machine.

Installation

To install punchlist run the following command

npm install

Examples

To run the examples run the following command

npm start

It will start listening on localhost port 3030

Examples:

  1. Example with API Call: http://localhost:3030/example.html
  2. Example without API Call: http://localhost:3030/example_b.html
  3. Example with dev js: http://localhost:3030/example_dev.html

Usage

  1. Include Font Awesome CSS:

     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css">
  2. Include Punch List CSS:

     <link rel="stylesheet" href="dist/punchlist.css">
  3. Include Punch List JS:

    <script src="dist/punchlist.all.min.js"></script>
  4. Call the plugin:

    punchList.init(options);

Options

Options are used to configure the Punch List. Detailed Options to be send:

| Property | Description | | --- | --- | | .container | Required. Selector for the main container of the Punch List | | .title | Title of the Punch List | | .width | Width of the container. If not set, will expand to the size of the parent | | .fillDataCall | RestFULL API CALL. Response must be JSON | | .fillDataTransform | JSON mapping to convert to standarize items. In case that .fillDataCall was used | | .addItemHandler | Handler to be called one a item is added Parameters itemId: is the unique id that can be used to return the dom of the object val: is the task value the new item will have | | .removeItemHandler | Handler to be called when an item is removed Parameters itemId: is the unique id that can be used to return the dom of the object itemData: is the 'item' data $(#itemId).data('item') | | .checkedItemHandler| Handler to be called when an item change is status Parameters itemId: is the unique id that can be used to return the dom of the object itemData: is the 'item' data $(#itemId).data('item') checked: boolean. It tells if the item has been checked or unchecked |

Example

var options = {
  width: 600,
  fillDataCall: "json/response.json",
  fillDataTransform: jsonTransform,
  addItemHandler: onAdd,
  removeItemHandler: onDelete,
  checkedItemHandler: onChecked,
  container: "#punchlist-container"
};

See also: working example

JSON Data Transform

In order to be able to use a json not using the format expected in the punch list, a transformation must be made. The transformation information must be set in an object.

| Property | Description | | --- | --- | | .task | This is the userdata property where is the description of the task. | | .checked | This is the userdata property where is a boolean value that inform if the task is complete or not.If not set all task will be in not complete state. | | .data | This is an array of key value pair of field. This data will be added in each task item that is added.This information is send when the task is deteled or change it's complete state.This property is not required.KeyValue Pair Properties:name -> The key property that will be added in data.field -> The property field in the userdata that will be use as value. | | .tags | This is an array of key value pair of field. This data will be shown under the task name to add extra information that could be need.This property is not required.KeyValue Pair Properties:name -> The key property that will be added in data.field -> The property field in the userdata that will be use as value.convert -> Conver the value in case that need. Current there is a unique "date"."date": Convert from String to Date and return localeString of it. | | .comments | This is an object property. It will contain comments of the task that are inside of the userdata.This property is not required.Object Properties:listField : Property in userdata where the Arrays of Comments are.field : The property inside the array where the proper comment is.deletable : Property informing if the comments in userdata can be deleted.tags : See tags. |

Example

      var jsonTransform = {
        data: [
        {
          field: "id",
          name: "id"
        }],
        task: "item",
        checked: "index",
        tags: [ 
          { 
            field:"project",
            name:"Project",
            convert: null,
          }, 
          {
            field:"datetime",
            name:"Date",
            convert: "date", 
          }
        ],
        comments: { 
          listField: "comments", 
          field:"comment",
          deletable: false,
          tags: [
            {
              field: "user",
              name: "User",
              convert: null,
            }
          ]
        }
      }   
    };

See also: working example and converted json

Task Data

Data used in function drawItems(data).

| Property | Description | | --- | --- | |task|Field for the task description| |checked|boolean indicating if the task is done or not.| |data|An array of KeyValuePair. This information will be added as data inside the task items and will be sent when the task is deleted or it state is changed.| |tags|An array of KeyValuePair. This information will be shown under the task to provide more context of the task.| |comments|An array of comments that will be shown under the task.|

Comments

| Property | Description | | --- | --- | |comment|String with the comment.| |deletable|boolean declaring if the comment can be deleted. | |tags|An array of KeyValuePair. This information will be shown under the task to provide more context of the task.|

####Example:

```javascript
var tasks = [ {
    task:"Task Description",
    checked:false,
    data: [ {
      name: 'id',
      value: 'TaskUniqueIDonOthePlatform',
      },
      ...
    ],
    tags: [ {
      name: 'User',
      value: 'Boss',
      },
      {
      name: 'Date',
      value: 'Yesterday',
      },
      ...
    ],        
    comments: [ {
      comment: 'This is my comment',
      deletable: false,
      tags: [ {
      name: 'User',
      value: 'Boss',
      },
      {
      name: 'Date',
      value: 'Yesterday',
      },
      ...
      ] },
    ...
    ] ,
    ...
  },
  ...
  ];
```

See also: working example

License

This project is licensed under the MIT License - see the LICENSE.txt file for details