Rename ReGrid to DataTable 💃

This commit is contained in:
Faris Ansari 2017-10-07 20:24:25 +05:30
parent 8de87e25d7
commit 8dbeea9ba1
8 changed files with 833 additions and 833 deletions

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ReGrid</title>
<title>Frappé DataTable</title>
<style>
body {
font-family: 'Tahoma';
@ -16,14 +16,14 @@
</head>
<body>
<h1>ReGrid</h1>
<h1>Frappé DataTable</h1>
<button onclick="_regrid.render()">Refresh</button>
<section style="width: 60%;">
</section>
<script src="./node_modules/jquery/dist/jquery.js"></script>
<script src="./node_modules/clusterize.js/clusterize.js"></script>
<script src="./lib/ReGrid.js"></script>
<script src="./lib/frappe-datatable.js"></script>
<script>
$(() => {
@ -502,25 +502,25 @@
console.log('No of Rows:', data.rows.length)
performance.mark("ReGrid-start");
var grid = new ReGrid(document.querySelector('section'), {
performance.mark("DataTable-start");
var datatable = new DataTable(document.querySelector('section'), {
addSerialNoColumn: true,
enableClusterize: true,
data
});
performance.mark("ReGrid-end");
performance.mark("DataTable-end");
performance.measure(
"ReGrid",
"ReGrid-start",
"ReGrid-end"
"DataTable",
"DataTable-start",
"DataTable-end"
);
var measures = performance.getEntriesByName("ReGrid");
var measures = performance.getEntriesByName("DataTable");
var measure = measures[0];
console.log(measure.duration);
window._regrid = grid;
window.datatable = datatable;
})
</script>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{
"name": "regrid",
"name": "frappe-datatable",
"version": "0.0.1",
"description": "A modern datatable library for the web",
"main": "lib/regrid.js",
"main": "lib/frappe-datatable.js",
"scripts": {
"build": "webpack --env build",
"dev": "webpack --progress --colors --watch --env dev",
@ -29,7 +29,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/netchampfaris/regrid.git"
"url": "https://github.com/frappe/datatable.git"
},
"keywords": [
"webpack",
@ -43,12 +43,11 @@
"author": "Faris Ansari",
"license": "MIT",
"bugs": {
"url": "https://github.com/netchampfaris/regrid/issues"
"url": "https://github.com/frappe/datatable/issues"
},
"homepage": "https://github.com/netchampfaris/regrid",
"homepage": "https://frappe.github.io/datatable",
"dependencies": {
"bootstrap": "^4.0.0-beta",
"clusterize.js": "^0.17.6",
"popper.js": "^1.12.5"
}
}

View File

@ -25,7 +25,7 @@ const DEFAULT_OPTIONS = {
addCheckbox: true
};
export default class ReGrid {
export default class DataTable {
constructor(wrapper, options) {
this.wrapper = $(wrapper);
@ -686,7 +686,7 @@ export default class ReGrid {
}
makeStyle() {
this.$style = $('<style data-id="regrid"></style>')
this.$style = $('<style data-id="datatable"></style>')
.prependTo(this.wrapper);
}

View File

@ -1,2 +1,2 @@
import ReGrid from './regrid.js';
export default ReGrid;
import DataTable from './datatable.js';
export default DataTable;

View File

@ -5,7 +5,7 @@ const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const path = require('path');
const env = require('yargs').argv.env; // use --env with webpack 2
let libraryName = 'ReGrid', outputFile = 'regrid';
let libraryName = 'DataTable', outputFile = 'frappe-datatable';
let plugins = [];