Skip to content

Commit

Permalink
Merge branch 'master' into fix-async-add
Browse files Browse the repository at this point in the history
  • Loading branch information
javve committed Nov 21, 2020
2 parents b6a826d + 572cc95 commit 30967fa
Show file tree
Hide file tree
Showing 89 changed files with 14,345 additions and 6,373 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ie 9
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2.1
jobs:
build:
docker:
- image: circleci/node:14.15.1
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: test
command: npm test
- run:
name: code-coverage
command: 'bash <(curl -s https://codecov.io/bash)'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/_site
docs/.sass-cache
docs/.jekyll-metadata
coverage
docs/vendor
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.15.1
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.min.js
79 changes: 52 additions & 27 deletions History.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,55 @@
# TODO

- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96
- Regex in search https://github.com/javve/list.js/issues/371
- Keep original order?
- Automatically add item in the right place if sort is active
- How to handle arrays?
- Implement debouncing in search?
- Better search https://github.com/javve/list.js/pull/312/files ?
- Investigate sort button defaults:
- https://github.com/javve/list.js/issues/316
- https://github.com/javve/list.js/pull/301
- Improve testability by decoupling things and make it possible to use require('') in tests
- Add .remove() method to remove all listeners etc.
- Example of more advanced filtering
- Fix test suite
- Example with multiple lists

# Changelog

- **[Feature]** #634 Add item template function
- **[Bugfix]** #667 Fix `getAttribute` fallback method

### 2.0.0 - 2020-11-21 - Winter cleanup 🧹

- **[Breaking]** Drop support for IE6-8
- **[Website]** Update Jekyll to remove security warnings
- **[Website]** Fix all examples (sorry that they we're broken)
- **[Misc]** Update dev dependencies to latest version: Webpack 3.12.0 -> 5.6.0, jest 23.3 -> 26.6.3, jquery 3.3.1 -> 3.5.1, Removed: jshint jshint-loader
- **[Misc]** Replace uglify-js with terser
- **[Misc]** Update Node for dev from 6.15 to 14.15.1
- **[Misc]** Prettier on everything
- **[Misc]** Make release script simpler
- **[Misc]** Rename History.md to CHANGELOG.md
- **[Misc]** Use `babal-loader` with `@babel/preset-env` for supporting IE9-11
- **[Misc]** Add source-maps to `/dist`

### 1.5.1

- **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list.
- **[Misc]** Update CircleCI from 1.0 to 2.0
- **[Website]** Use https instead of http for listjs.com
- **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7)
- **[Website]** Update Jekyll & jQuery versions to remove security warnings.
- **[Bugfix]** Use one event listener per pagination and select page via data attributes
[See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8)
- **[Bugfix]** Don't break pagination if page=0
[See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d)
[See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310)

### 2017-01-29 v1.5.0

- **[Feature]** Bundle fuzzySearch and pagination plugins into List.js
[See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489)
- **[Misc]** Switch from Grunt to Webpack and from Mocha to Jest
[See commit →](https://github.com/javve/list.js/commit/8376ef01b1da4b6e60a7457d628d97a803a82e14)

### 2017-01-19 v1.4.1

- **[Bugfix]** Move string-natural-compare to dependencies instead of devDependencies
[See commit →](https://github.com/javve/list.js/commit/c17162b26fd5093d3ddde01e11a3f748310d993c)


### 2017-01-15 v1.4.0

- **[Bugfix/Feature]** Change natural-sort library to support custom alphabets
and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong.
and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong.
[See commit →](https://github.com/javve/list.js/commit/81e1386bed88d1f932e729feca2b3649e489bdfe)

### 2016-10-23 v1.3.0

- **[Bugfix]** Make mkdir in build script OS agnostic
[See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5)
- **[Bugfix]** Make it possible to reset search columns
Expand All @@ -53,6 +68,7 @@ and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong
[See commit →](https://github.com/javve/list.js/commit/1af94012de89fd6bcf8446c31305ad517507c44b)

### 2016-02-27: v1.2.0

It's been two years since the last update of List.js. That is absolutely not ok
and I'm very sorry that it has taken so long. I promise I'll do better in the future!

Expand Down Expand Up @@ -107,14 +123,15 @@ I hope you'll like this update!
get same values as first item in list
[See commit →](https://github.com/javve/list.js/commit/3a4733d52cff25ef99ee8a1326c0b54be81d64ca)


### 2014-02-03: 1.1.1

- **[Bugfix]** Update `javve/events` version which fixes critical bugs in Safari
for PC and PhantomJS (which makes the command line tests work again).
- **[Bugfix]** Clear search when clicking in the HTML5 clear button.
- **[Misc]** Add History.md file for changelog instead of having it at Listjs.com.

### 2014-02-03: 1.1.0

- **[Breaking]** The sorting API is update so it looks like this
`listObj.sort('name', { order: "asc "})` and `listObj.sort('name', { order: "desc "})`
instead or `listObj.sort('name', { desc: true/false })`.
Expand All @@ -124,11 +141,12 @@ I hope you'll like this update!
- **[Bugfix]** Remove sorting when searching and filtering.
- **[Bugfix]** Fix sorting and search when using pagiation plugin


### 2014-01-17: 1.0.2

- **[Bugfix]** Fix error that broke the lib in IE8.

### 2013-11-12: 1.0.0

- **[Feature]** Add more events and enable to add them on initialization.
- **[Feature]** Add support for Component.js, Bower, RequireJS and CommonJS
- **[Feature]** Make it possible to remove event handlers by `.off('event', handler)`
Expand All @@ -150,42 +168,49 @@ I hope you'll like this update!
- **[Change]** Move plugins into seperated repos: <a href="https://github.com/javve/list.pagination.js">github.com/javve/list.pagination.js</a> and <a href="https://github.com/javve/list.fuzzysearch.js">github.com/javve/list.fuzzysearch.js</a>
- **[Change]** Plugin initiation have changed. See <a href="/docs/plugins">getting started with plugins


### 2012-04-24: 0.2.1
- Fuzzy Search plugin, `.filter()` changes and bug fixes *[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)*

- Fuzzy Search plugin, `.filter()` changes and bug fixes _[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)_

### 2012-01-23: 0.2.0
- Lots of updates and interesting features. *[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)*

- Lots of updates and interesting features. _[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)_

### 2011-12-15: 0.1.4

- `.filters()`, `.sort()` and `.search()` now deped on each other. If the list is filtered and then there is a search, the items hidden by the filters will stay hidden etc.
- `.filter()` is the only way to reset filter. `.filter(false)` does not work anymore.

### 2011-11-29: 0.1.3 release

- Added function `.clear()` that removes all items from the list
- Changed the sort function to be based on `data-sort` instead of `rel`
- When sorting one category, all sort-related classes will be removed from the other sort buttons
- Updated `.sort(valueName, sortFunction)` to `.sort(valueName, options)`, se more info in the documentation

### 2011-11-16: 0.1.2 release

- Sorting is now indicated by class `asc` or `desc` at sorting buttons
- Added three new small helper functions `hasClass(element, class)`, `addClass(element, class)``
and `removeClass(element, class)`</li>
- Added three new small helper functions `hasClass(element, class)`, ` addClass(element, class)`` and `removeClass(element, class)`</li>

### 2011-10-20: 0.1.1 release

- Added possibility to reverse sort the list

### 2011-10-18: 0.1 release

- Examples at Listjs.com works in IE7,8,9 (IE6 is not tested, should work)
- More documentation
- Misc bug fixes

### 2011-10-15 Final alpha 0.3 release

- More documentation
- Only show 200 items at same time, huge speed increase
- Misc bug fixes

### 2011-08-08 Alpha 0.2 release

- Added asynchronous item adding
- Added asynchronous list indexing
- Improved (but incomplete) documentation
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2011-2014 Jonny Strömberg, jonnystromberg.com
Copyright (c) 2011-2018 Jonny Strömberg, jonnystromberg.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
54 changes: 33 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# List.js

Perfect library for adding **search**, **sort**, **filters** and **flexibility** to
**tables**, **lists** and various HTML elements. Built to be invisible and work on existing HTML.
Really simple and easy to use!
Expand All @@ -7,8 +8,10 @@ Really simple and easy to use!
[![npm version](https://badge.fury.io/js/list.js.svg)](https://badge.fury.io/js/list.js)
[![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master)
[![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/list.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/list.js)

### Core idea

- Simple and invisible
- Easy to apply to existing HTML
- No dependencies
Expand All @@ -17,32 +20,45 @@ Really simple and easy to use!
- Handle thousands of items

### Features

- Works both lists, tables and almost anything else. E.g. `<div>`,`<ul>`,`<table>`, etc.
- Search [Read more ›](http://listjs.com/docs/list-api#search)
- Sort [Read more ›](http://listjs.com/docs/list-api#sort)
- Filter [Read more ›](http://listjs.com/docs/list-api#filter)
- Simple templating system that adds possibility to add, edit, remove items [Read more ›](http://listjs.com/docs/list-api#add)
- Plugins [Read more ›](http://listjs.com/docs/plugins)
- Support for Chrome, Safari, Firefox, IE6+
- Support for Chrome, Safari, Firefox, IE9+

### Download / Install
##### Via Bower
```
bower install list.js
```

##### Via NPM

```
npm install list.js
```

##### Via Bower

```
bower install list.js
```

##### Via CDNJS

```html
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/2.0.0/list.min.js"></script>
```

##### Via Direct Download
- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js)
- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js)

- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.0.0/dist/list.min.js)
- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.0.0/dist/list.js)

### Questions / How to?

https://stackoverflow.com/questions/tagged/list.js

### Demo / Examples

- [Existing list](http://listjs.com/examples/existing-list)
- [Existing list + add](http://listjs.com/examples/existing-list-add)
- [New list](http://listjs.com/examples/new-list)
Expand All @@ -55,28 +71,24 @@ npm install list.js
- [Only show list after search/filter](http://codepen.io/javve/pen/YyqyRg)

## Documentation

- [Getting started](http://listjs.com/docs)
- [Options](http://listjs.com/docs/options)
- [List API](http://listjs.com/docs/list-api)
- [Item API](http://listjs.com/docs/item-api)
- [Changelog](http://listjs.com/overview/changelog)

### Plugins
- [Introduction](http://listjs.com/docs/plugins)
- [Pagination](http://listjs.com/docs/plugins/pagination)
- [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch)
- [Build your own](http://listjs.com/docs/plugins/build)
- [Changelog](https://github.com/javve/list.js/blob/master/CHANGELOG.md)

### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them?

- Read more at [listjs.com/overview/contribute](http://listjs.com/overview/contribute)

### Creator
| | Jonny Strömberg [@javve](http://twitter.com/javve) |
| ------------- | ------------- |
| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;)

| | Jonny Strömberg [@javve](http://twitter.com/javve) |
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) |

## License (MIT)

Copyright (c) 2012-2017 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)>
[http://javve.com](http://javve.com)
Copyright (c) 2011-2020 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)>
[javve.com](https://javve.com)
11 changes: 3 additions & 8 deletions Release.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# RELEASE

1. Update version in package.json
2. `cp package.json docs/_data/pkg.json`
3. Commit "Version x.y.z"
4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0`
5. Push with `git push`
6. Push tags with `git push --tags`
7. Update links in README.md
8. `npm publish`
1. `npm release patch|minor|major` (depending on what kind of release it is)
2. `npm publish`
3. Update links in README.md with new version number
21 changes: 21 additions & 0 deletions WISHLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Wishlist
- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96
- Regex in search https://github.com/javve/list.js/issues/371
- Keep original order? + know
- Automatically add item in the right place if sort is active
- How to handle arrays?
- [Implement debouncing in search?](https://github.com/javve/list.js/issues/621)
- Better search https://github.com/javve/list.js/pull/312/files ?
- Investigate sort button defaults:
- https://github.com/javve/list.js/issues/316
- https://github.com/javve/list.js/pull/301
- Improve testability by decoupling things and make it possible to use require('') in tests
- Add .remove() method to remove all listeners etc.
- Example of more advanced filtering
- Example with multiple lists
- Multiple filter functionality
- Activ search term, sort order, filter, etc
- [Smarter pagination window](https://github.com/javve/list.js/issues/599)

# Known bugs
Pagination does not respect .show(i, page)
Loading

0 comments on commit 30967fa

Please sign in to comment.