Skip to content

Commit 90d058c

Browse files
committed
Initial commit
0 parents  commit 90d058c

39 files changed

+3495
-0
lines changed

.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
"es2015",
4+
"react"
5+
],
6+
"plugins": [
7+
"lodash",
8+
"syntax-object-rest-spread",
9+
"transform-object-rest-spread"
10+
]
11+
}

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
packages/*/node_modules
2+
node_modules
3+
gh-pages
4+
dist
5+
build
6+
coverage
7+

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
"extends": "airbnb",
3+
"parser": "babel-eslint",
4+
"env": {
5+
"browser": true,
6+
"jasmine": true,
7+
"node": true
8+
},
9+
"plugins": [
10+
"react"
11+
],
12+
"rules": {
13+
"comma-dangle": ["error", "never"], // personal preference
14+
"prefer-arrow-callback": 0, // mocha tests (recommendation)
15+
"func-names": 0, // mocha tests (recommendation)
16+
"import/extensions": 0, // skip import extensions
17+
"import/no-extraneous-dependencies": 0, // monorepo setup
18+
"import/no-unresolved": [1, { ignore: ['^reactabular'] }], // monorepo setup
19+
"no-underscore-dangle": 0, // implementation detail (_highlights etc.)
20+
"no-unused-expressions": 0, // chai
21+
"no-use-before-define": 0, // personal preference
22+
"react/forbid-prop-types": 0, // TODO: re-enable this later
23+
"react/sort-comp": 0, // personal preference
24+
"react/no-multi-comp": 0, // personal preference
25+
"react/jsx-filename-extension": 0, // personal preference
26+
"jsx-a11y/no-static-element-interactions": 0 // personal preference
27+
}
28+
};

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
coverage/
3+
dist/
4+
.eslintcache
5+

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: node_js
2+
node_js:
3+
- "4"
4+
- "5"
5+
- "6"
6+
script:
7+
- npm run test
8+
after_success:
9+
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
## treetabular
2+
3+
1.0.0 / 2016-11-26
4+
==================
5+
6+
* Initial re-release under a different name.
7+
* Bug fix - Respect `idField` properly at `tree.moveRows`.
8+
* Breaking - Make `tree.filter` throw if `fieldName` is not passed. Without this it would fail silently.
9+
* Feature - Attach `_isParent` to parents when using `tree.unpack`.
10+
* Bug fix - `tree.moveRows` will return the original rows now if moving fails for some reason.
11+
12+
---
13+
14+
## reactabular-tree
15+
16+
7.0.0 / 2016-11-03
17+
==================
18+
19+
* Bug fix - Allow `tree.toggleChildren` to work without column `props` defined.
20+
* Feature - Add `tree.getImmediateChildren`.
21+
* Feature - Add `tree.moveRows`.
22+
* Breaking - Refactor `tree.filter` as `({ fieldName, parentField = 'parent' }) => (rows) => filteredRows`.
23+
24+
6.1.1 / 2016-10-27
25+
==================
26+
27+
* Bug fix - Allow `tree.filter` `parent` to be zero.
28+
29+
6.1.0 / 2016-10-25
30+
==================
31+
32+
* Feature - Allow `idField` to be passed to `tree.sort`.
33+
34+
6.0.3 / 2016-10-19
35+
==================
36+
37+
* Bug fix - Bump peer version ranges to avoid npm warnings.
38+
39+
6.0.0 / 2016-10-14
40+
==================
41+
42+
* Breaking - Merge `tree.flatten` with `tree.unpack`. The new signature for `tree.unpack` is `tree.unpack = ({ parentField = 'parent', parent, idField = 'id'}) => (rows) => <unpackedRows>`.
43+
* Breaking - Rework API so that all functions except `tree.toggleChildren` work in curry format (`(...) => (rows) => <new rows>`). This way the API is consistent and easy to extend.
44+
* Breaking - Expose `childrenField` for `tree.pack` and `tree.unpack`. It defaults to `children`.
45+
* Breaking - Make `tree.pack` to work in a recursive manner (packs children within children).
46+
* Breaking - Make `tree.search` match against children as well. If children as matched, it will return parents as well.
47+
* Feature - Add `tree.getChildren` utilities for getting node children.
48+
49+
5.2.1 / 2016-09-30
50+
==================
51+
52+
* Bug fix - If `className` is not provided to `tree.toggleChildren`, do not render `undefined` as a class. Also dropped extra `console.log`.
53+
54+
5.2.0 / 2016-09-30
55+
==================
56+
57+
* Bug fix - Calculate `tree.getParents` correctly for root level nodes without parents. Previously that gave false positives.
58+
* Feature - Annotate `tree.toggleChildren` with `has-children` and `has-parent` classes. Easier to style this way.
59+
60+
5.1.0 / 2016-09-29
61+
==================
62+
63+
* Feature - Add `tree.flatten` to allow transforming a nested tree structure into a flat structure used by the algorithms.
64+
65+
4.3.0 / 2016-09-27
66+
==================
67+
68+
* Feature - Let `toggleChildren` toggle when cell is clicked. If you want the old behavior, override `onClick` through `props`.
69+
* Feature - Add `collapseAll` and `expandAll` helpers.
70+
71+
4.2.0 / 2016-09-23
72+
==================
73+
74+
* Feature - Allow `toggleChildren` to accept `props` for customization.
75+
76+
3.0.5 / 2016-09-02
77+
==================
78+
79+
* Feature - Allow `id` to be passed to `filter`.
80+
81+
3.0.4 / 2016-09-02
82+
==================
83+
84+
* Feature - Allow `toggleChildren` `id` to be customized (not just "id" anymore).
85+
86+
3.0.2 / 2016-09-01
87+
==================
88+
89+
* Feature - Include suggested default styling for the toggle arrow.
90+
91+
3.0.1 / 2016-09-01
92+
==================
93+
94+
* Bug fix - Pass `strategy` to `sorter` at `tree.sort`.
95+
96+
3.0.0 / 2016-09-01
97+
==================
98+
99+
* Breaking - Rewrite API. Now most parts accept objects and you can also customize field names.
100+
* Feature - Add `tree.sort` to wrap toggling row children.
101+
102+
2.0.0 / 2016-08-16
103+
==================
104+
105+
* Initial release.

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Juho Vepsäläinen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)