Skip to content

Commit 4f0c619

Browse files
authored
Code modifications and styled components usage (#3)
* Moved from webpack to nwb * Changed from FlutterTable to ReduxDatatable * Demo setup (incomplete) * Update dependencies * Fixed Pagination shown when no results * Updated demo * Update dependencies * Updated demo * Update dependencies * styled-components incomplete * Added pagination styles * Added styled bootstrap components * Updated toolbar to styled * Update with working Body * Pagination update. * Removed redundant code. * Fixed Limiter * Added default limit. * Fixed shouldComponentUpdate * Removed usage of withTableConfig HOC in Toolbar * Completed Pagination, Toolbar (connect removal remaining) * Update * Update * Removed redundant code * Update * Fixed table styling * Removed object.assign * Fixed windowing * Fixed default limit and added margin to Pagination * Added padding between number type filters * Added background style to row * Customizable table cell width * Added even row boolean attribute to Row element * Fixed header sorter and remove redundant code * Fixed filterer * Removed redundant code * Send selected extra props to row elements. * Update utils.js * Fixed row selection * Handle actions using redux-thunk (experimental)
1 parent be976b3 commit 4f0c619

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+15724
-9863
lines changed

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.gitignore

100755100644
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
/coverage
2+
/demo/dist
3+
/es
4+
/lib
15
/node_modules
6+
/umd
7+
npm-debug.log*

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sudo: false
2+
3+
language: node_js
4+
node_js:
5+
- 8
6+
7+
before_install:
8+
- npm install codecov.io coveralls
9+
10+
after_success:
11+
- cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
12+
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
13+
14+
branches:
15+
only:
16+
- master

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Prerequisites
2+
3+
[Node.js](http://nodejs.org/) >= 6 must be installed.
4+
5+
## Installation
6+
7+
- Running `npm install` in the component's root directory will install everything you need for development.
8+
9+
## Demo Development Server
10+
11+
- `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading.
12+
13+
## Running Tests
14+
15+
- `npm test` will run the tests once.
16+
- `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`.
17+
- `npm run test:watch` will run the tests on every change.
18+
19+
## Building
20+
21+
- `npm run build` will build the component for publishing to npm and also bundle the demo app.
22+
- `npm run clean` will delete built resources.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @flipbyte/redux-datatable
2+
3+
[![Travis][build-badge]][build]
4+
[![npm package][npm-badge]][npm]
5+
[![Coveralls][coveralls-badge]][coveralls]
6+
7+
Describe @flipbyte/redux-datatable here.
8+
9+
[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
10+
[build]: https://travis-ci.org/user/repo
11+
12+
[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
13+
[npm]: https://www.npmjs.org/package/npm-package
14+
15+
[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
16+
[coveralls]: https://coveralls.io/github/user/repo

build/index.js

Lines changed: 0 additions & 2610 deletions
This file was deleted.

build/main.css

Lines changed: 0 additions & 197 deletions
This file was deleted.

demo/src/ExampleTableContainer.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React, { Component } from 'react';
2+
import { render } from 'react-dom';
3+
import ReduxDatatable from '../../src';
4+
import config from './config';
5+
6+
const ExampleTableContainer = ({ title, className, id, ...tableProps }) =>
7+
<div id={ id } className="form-container">
8+
<h5 className="card-title">{ title }</h5>
9+
<ReduxDatatable reducerName={ config.tableReducerName } { ...tableProps } />
10+
</div>
11+
12+
export default ExampleTableContainer;

demo/src/config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { reducer, epics } from '../../src';
2+
3+
export default {
4+
tableReducerName: 'reduxDatatable',
5+
reducers: {
6+
reduxDatatable: reducer
7+
},
8+
epics: {
9+
pageTableFetchDataEpic: epics.fetchDataEpic,
10+
pageTableSetParamsEpic: epics.setParamsEpic
11+
}
12+
}

0 commit comments

Comments
 (0)