forked from revolist/vue3-datagrid
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b50b639
Showing
22 changed files
with
8,285 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Node.js Package | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install | ||
# Build | ||
- run: npm run build | ||
# Publish to npm | ||
- run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/setup-node@v1 | ||
with: | ||
registry-url: 'https://npm.pkg.github.com' | ||
# Defaults to the user or organization that owns the workflow file | ||
scope: '@revolist' | ||
# Publish to GitHub Packages | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dist/ | ||
www/ | ||
|
||
*~ | ||
*.sw[mnpcod] | ||
*.log | ||
*.lock | ||
*.tmp | ||
*.tmp.* | ||
log.txt | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
.stencil/ | ||
.idea/ | ||
.vscode/ | ||
.sass-cache/ | ||
.versions/ | ||
node_modules/ | ||
|
||
$RECYCLE.BIN/ | ||
|
||
.DS_Store | ||
Thumbs.db | ||
UserInterfaceState.xcuserstate | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const path = require('path'); | ||
|
||
let libraryName = 'vgrid'; | ||
module.exports = { | ||
entry: { | ||
[libraryName]: './src/vgrid.ts' | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: '[name].js', | ||
library: 'VGrid', | ||
libraryTarget: 'umd', | ||
umdNamedDefine: true | ||
}, | ||
externals: { | ||
vue: 'vue', | ||
'@revolist/revogrid': '@revolist/revogrid', | ||
'@revolist/revogrid/loader': '@revolist/revogrid/loader' | ||
}, | ||
resolve: { | ||
extensions: [ '.tsx', '.ts', '.js' ], | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: 'ts-loader', | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const { VueLoaderPlugin } = require('vue-loader') | ||
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); | ||
|
||
module.exports = { | ||
mode: 'development', | ||
entry: { | ||
app: './public/index.ts' | ||
}, | ||
devtool: 'inline-source-map', | ||
devServer: { | ||
port: 3332 | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../distServe'), | ||
filename: '[name].js', | ||
libraryTarget: 'umd', | ||
umdNamedDefine: true | ||
}, | ||
plugins: [ | ||
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }), | ||
new VueLoaderPlugin(), | ||
new HtmlWebpackPlugin({ | ||
title: 'Development', | ||
template: './public/index.html', | ||
appMountId: 'app', | ||
inject: true, | ||
"exJs": [], //"dist/vgrid.js" | ||
}), | ||
], | ||
resolve: { | ||
extensions: [ '.tsx', '.ts', '.js', '.vue' ], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm-bundler.js', | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
use: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
options: { | ||
appendTsSuffixTo: [/\.vue$/], | ||
}, | ||
exclude: /node_modules/, | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
'vue-style-loader', | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
esModule: false | ||
} | ||
}, | ||
'sass-loader' | ||
] | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Revolist | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<p align="center"> | ||
<a href="https://revolist.github.io/revogrid"> | ||
<img src="https://raw.githubusercontent.com/revolist/revogrid/master/assets/logo.svg" alt="RevoGrid" height="150" /> | ||
</a> | ||
</p> | ||
|
||
## | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@revolist/revogrid"><img src="https://img.shields.io/npm/v/@revolist/vue-datagrid" alt="Latest Version on NPM"/></a> | ||
<a href="https://github.com/revolist/revogrid/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@revolist/revogrid" alt="Software License"/></a> | ||
</p> | ||
<h4 align="center">Powerful data grid component built on top of <a href="https://github.com/revolist/revogrid" target="_blank">RevoGrid</a>.</h4> | ||
<p align="center"> | ||
Millions of cells and thousands columns easy and efficiently. | ||
|
||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://revolist.github.io/revogrid">Demo and API</a> • | ||
<a href="#key-features">Key Features</a> • | ||
<a href="#how-to-use">How To Use</a> • | ||
<a href="https://github.com/revolist/revogrid/blob/master/src/components/revo-grid/readme.md">Docs</a> • | ||
<a href="#license">License</a> | ||
</p> | ||
|
||
<img src="https://raw.githubusercontent.com/revolist/revogrid/master/assets/material.jpg" alt="Material grid preview" width="100%" /> | ||
<i>RevoGrid material theme.</i> | ||
<br> | ||
|
||
|
||
## Key Features | ||
|
||
- Millions of cells virtual viewport scroll with a powerful core is in-build by default; | ||
- Keayboard support; | ||
- Super light initial starter <img src="https://badgen.net/bundlephobia/min/@revolist/revogrid@latest" alt="Min size"/>. Can be imported with polifill or as module for modern browsers; | ||
- Intelligent Virtual DOM and smart row recombination in order to achieve less redraws; | ||
- Sorting: multiple options, can be customized per column and advanced with events; | ||
- Filtering: predefined system filters and a way to define you own; | ||
- Export to file; | ||
- Column and Row custom sizes; | ||
- Column resizing; | ||
- Column auto-size support (content related column size feature); | ||
- Pinned columns (columns are always on the left or on the right of the screen); | ||
- Pinned row (rows are always at the top or at the bottom); | ||
- Column grouping; | ||
- Cell editing; | ||
- Custom header renderer; | ||
- Custom cell renderer templates (build your own cell view); | ||
- Custom cell editor (apply your own editors and cell types); | ||
- Custom cell properties; | ||
- [Column types (select, string, number, date, custom)](https://revolist.github.io/revogrid/guide/column.types.html); | ||
- Drag and drop rows; | ||
- Range selection; | ||
- Range edit; | ||
- Theme packages: | ||
- Excel like | ||
- Material, compact, dark or light; | ||
- Copy/Paste: Copy/paste from Excel, Google Sheets or any other sheet format; | ||
- Easy extenation and support with modern VNode features and tsx support; | ||
- Trimmed rows: hide rows on demand; | ||
- Plugin system: create your own plugins or extend existing one, it's transparent and easy; | ||
- Hundred small customizations and improvements [RevoGrid](https://revolist.github.io/revogrid). | ||
|
||
|
||
## Overview | ||
|
||
The RevoGrid component helps represent a huge amount of data in a form of data table "excel like" or as list. | ||
<br> | ||
![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | | ||
--- | --- | --- | --- | --- | | ||
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | | ||
|
||
|
||
## How to use | ||
|
||
|
||
With NPM: | ||
```bash | ||
npm i @revolist/vue-datagrid --save; | ||
``` | ||
|
||
With Yarn: | ||
|
||
```bash | ||
yarn add @revolist/vue-datagrid; | ||
``` | ||
|
||
[Sandbox](https://codesandbox.io/s/data-vue-test-3wkzi?file=/src/App.vue) | ||
```vue | ||
<template> | ||
<div id="app"> | ||
<v-grid | ||
v-if="grid === 1" | ||
key="1" | ||
theme="compact" | ||
:source="rows" | ||
:columns="columns" | ||
></v-grid> | ||
</div> | ||
</template> | ||
<script> | ||
import VGrid from "@revolist/vue-datagrid"; | ||
export default { | ||
name: "App", | ||
data() { | ||
return { | ||
columns: [{ | ||
prop: "name", | ||
name: "First", | ||
}, | ||
{ | ||
prop: "details", | ||
name: "Second", | ||
}], | ||
rows: [{ | ||
name: "1", | ||
details: "Item 1", | ||
}] | ||
}; | ||
}, | ||
components: { | ||
VGrid, | ||
}, | ||
}; | ||
</script> | ||
``` | ||
|
||
## Contributing | ||
|
||
If you have any idea, feel free to open an issue to discuss a new feature and submit your changes back to me. | ||
|
||
|
||
## License | ||
|
||
MIT | ||
|
Oops, something went wrong.