Skip to content

Commit d6bc139

Browse files
author
Vinayak Kulkarni
committed
Initial Commit
0 parents  commit d6bc139

File tree

109 files changed

+3116
-0
lines changed

Some content is hidden

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

109 files changed

+3116
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["es2015"],
3+
"plugins": ["transform-vue-jsx"]
4+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
npm-debug.log
3+
compiled

ISSUE_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Vue.js version:
2+
- consumed using: (browserify/webpack/rollup)
3+
- FULL error message (including stack trace):
4+
- relevant code:
5+
- steps for reproducing the issue:

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Matanya
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.
22+

bower.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "vue-tables-2",
3+
"description": "Vue.js 2 grid components",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"keywords": [
7+
"vue",
8+
"bootstrap",
9+
"tables",
10+
"grids"
11+
],
12+
"homepage": "https://github.com/matfish2/vue-tables-2",
13+
"ignore": [
14+
"**/.*",
15+
"node_modules",
16+
"bower_components",
17+
"test",
18+
"tests"
19+
]
20+
}

gulpfile.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var gulp = require('gulp');
2+
3+
var semantic = {
4+
watch: require('./node_modules/semantic-ui/tasks/watch'),
5+
build: require('./node_modules/semantic-ui/tasks/build')
6+
};
7+
8+
gulp.task('semantic-copy-config', function () {
9+
gulp.src('theme.config').pipe(gulp.dest('node_modules/semantic-ui/src/', {overwrite: true}));
10+
});
11+
12+
gulp.task('semantic-build', ['semantic-copy-config'], semantic.build);

lib/bus.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
7+
var _vue = require('vue');
8+
9+
var _vue2 = _interopRequireDefault(_vue);
10+
11+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12+
13+
var bus = new _vue2.default();
14+
15+
exports.default = bus;

lib/computed/all-columns.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict';
2+
3+
module.exports = function () {
4+
return displayableColumns(this.Columns, this.windowWidth, this.columnsDisplay);
5+
};
6+
7+
function displayableColumns(columns, windowWidth, display) {
8+
9+
if (!display) return columns;
10+
11+
return columns.filter(function (column) {
12+
if (!display[column]) return true;
13+
14+
var range = display[column];
15+
var operator = range[2];
16+
17+
var inRange = (!range[0] || windowWidth >= range[0]) && (!range[1] || windowWidth < range[1]);
18+
19+
return operator == 'not' ? !inRange : inRange;
20+
});
21+
}

lib/computed/custom-q.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
module.exports = function () {
4+
return JSON.stringify(this.customQueries);
5+
};

lib/computed/filtered-data.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict';
2+
3+
var search = require('../methods/client-search');
4+
var clone = require('clone');
5+
6+
module.exports = function () {
7+
8+
var data = clone(this.tableData);
9+
10+
var column = this.orderBy.column;
11+
12+
data.sort(this.getSortFn(column));
13+
14+
data = this.search(data);
15+
16+
if (this.vuex) {
17+
if (this.count != data.length) this.commit('SET_COUNT', data.length, true);
18+
} else {
19+
this.count = data.length;
20+
}
21+
22+
var offset = (this.page - 1) * this.limit;
23+
24+
data = data.splice(offset, this.limit);
25+
26+
return this.applyFilters(data);
27+
};

0 commit comments

Comments
 (0)