Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jun 17, 2024
1 parent e838552 commit 4b2ca50
Show file tree
Hide file tree
Showing 26 changed files with 75 additions and 74 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"license": "MIT",
"dependencies": {},
"devDependencies": {
"eslint": "^9.4.0",
"eslint-config-plus": "^2.0.1",
"eslint": "^9.5.0",
"eslint-config-plus": "^2.0.2",
"eslint-plugin-html": "^8.1.1",
"stylelint": "^16.6.1",
"stylelint-config-plus": "^1.1.2",
"vine-ui": "^3.1.13"
"vine-ui": "^3.1.14"
}
}
2 changes: 1 addition & 1 deletion public/assets/vine-ui.js

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions public/assets/vue.global.prod.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/async.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
paintThrottle(2);
paintDebounce(3);

//twice for test microtask
// twice for test microtask
pos += 2;
paintSync(0);
paintMicrotask(1);
Expand Down
2 changes: 1 addition & 1 deletion public/cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
const container = document.querySelector('.grid-container');
const grid = new Grid(container);
grid.bind('onUpdated', function(e, viewport) {
//console.log(viewport);
// console.log(viewport);

document.querySelector('.column-list').innerHTML = `columns: ${viewport.columns}`;
document.querySelector('.row-list').innerHTML = `rows: ${viewport.rows}`;
Expand Down
2 changes: 1 addition & 1 deletion public/conflict.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
});

const loadAgain = function() {
//load double script
// load double script
Array.from(document.querySelectorAll('script')).forEach(function(elem) {
const src = elem.getAttribute('src');
if (src && src.indexOf('turbogrid.js') !== -1) {
Expand Down
16 changes: 8 additions & 8 deletions public/frozen-middle.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<script type="text/javascript">
const Grid = window.turbogrid.Grid;

//=======================================================================================
//Frozen Middle Grid
// =======================================================================================
// Frozen Middle Grid
const FMG = function(container) {
container.innerHTML = `
<div class="fmg">
Expand Down Expand Up @@ -95,15 +95,15 @@
this.gridL = new Grid(this.containerL);
this.gridR = new Grid(this.containerR);

//sync scroll
// sync scroll
this.gridL.bind('onScroll', (e, d) => {
this.gridR.setScrollTop(d.scrollTop);
});
this.gridR.bind('onScroll', (e, d) => {
this.gridL.setScrollTop(d.scrollTop);
});

//sync sort
// sync sort
this.gridL.bind('onSort', (e, d) => {
this.gridL.once('onUpdated', () => {
this.gridR.removeSortColumn();
Expand All @@ -117,7 +117,7 @@
});
});

//sync hover
// sync hover
this.gridL.bind('onRowMouseEnter', (e, d) => {
this.gridR.setRowHover(d.rowItem, true);
}).bind('onRowMouseLeave', (e, d) => {
Expand Down Expand Up @@ -195,7 +195,7 @@
}
};

//=======================================================================================
// =======================================================================================

const getData = function() {

Expand Down Expand Up @@ -281,7 +281,7 @@
}
});

//console.log(row);
// console.log(row);

rows.push(row);
};
Expand All @@ -300,7 +300,7 @@
};
};

//=======================================================================================
// =======================================================================================
const container = document.querySelector('.grid-container');
const grid = new FMG(container);
grid.setData(getData());
Expand Down
14 changes: 7 additions & 7 deletions public/load-cells.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
console.log('duration:', `${this.renderDuration}ms`);
});

//mock random data from server
// mock random data from server
const mockDataByIdList = function(requestCellIdList) {
const dataList = [];
for (let i = 0, l = requestCellIdList.length; i < l; i++) {
Expand All @@ -55,7 +55,7 @@
if (Math.random() > 0.2) {
item.data[columnId] = Math.round(10000 * Math.random());
} else {
//null for –
// null for –
item.data[columnId] = null;
}
});
Expand All @@ -64,7 +64,7 @@
return dataList;
};

//mock request data
// mock request data
let timeout_requestData;
const requestData = function(requestCellIdList) {
clearTimeout(timeout_requestData);
Expand All @@ -77,9 +77,9 @@

const dataList = mockDataByIdList(requestCellIdList);

//console.log(dataList);
// console.log(dataList);

//merge data from server response data list
// merge data from server response data list
dataList.forEach(function(item) {
const rowId = item.id;
Object.keys(item.data).forEach((columnId) => {
Expand Down Expand Up @@ -117,12 +117,12 @@
}
});

//current rows already loaded
// current rows already loaded
if (!requestCellIdList.length) {
return;
}

//console.log(requestCellIdList);
// console.log(requestCellIdList);

requestData(requestCellIdList);

Expand Down
8 changes: 4 additions & 4 deletions public/load-rows.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
};
};

//mock random data from server
// mock random data from server
const mockDataByIdList = function(requestRowIndexList, requestColumnIdList) {
const dataList = [];
for (let i = 0, l = requestRowIndexList.length; i < l; i++) {
Expand Down Expand Up @@ -102,12 +102,12 @@
}
});

//current rows already loaded
// current rows already loaded
if (!requestRowIndexList.length) {
return;
}

//flush columns if loaded except name and index
// flush columns if loaded except name and index
const columnsData = grid.getColumns();
const requestColumnIdList = [];
columnsData.forEach(function(column) {
Expand All @@ -121,7 +121,7 @@
grid.hideLoading();

const dataList = mockDataByIdList(requestRowIndexList, requestColumnIdList);
//merge data from server response data list
// merge data from server response data list
dataList.forEach(function(item) {
item.data.data_loaded = true;
grid.updateRow(item.index, item.data);
Expand Down
10 changes: 5 additions & 5 deletions public/load-subs.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

const rowIndex = item.tg_index;

//show loading and load data from server here
// show loading and load data from server here
grid.setRowState(item, 'waiting');
grid.showLoading();

Expand Down Expand Up @@ -205,17 +205,17 @@
console.log(d);
requestSubs(this, d);
}).bind('onClick', function(e, d) {
//click first column on name
// click first column on name
if (d.columnItem.id !== 'name') {
return;
}
const rowItem = d.rowItem;
console.log(rowItem);
//click group
// click group
if (!rowItem.tg_group) {
return;
}
//already loaded
// already loaded
if (rowItem.subs) {
grid.toggleRow(rowItem);
return;
Expand Down Expand Up @@ -274,7 +274,7 @@
return;
}
keywords = k;
//update rows
// update rows
grid.update();
});

Expand Down
2 changes: 1 addition & 1 deletion public/negative-number.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
if (Util.isNum(value)) {
if (value < 0 && negativeFormatter) {
value = `(${numFix(-value)})`;
//for Negative Number Align
// for Negative Number Align
if (cellNode) {
cellNode.classList.add('tg-cell-negative');
}
Expand Down
6 changes: 3 additions & 3 deletions public/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@

const pageData = pageHandler(getRandomData());

//mock ajax request data from server
// mock ajax request data from server
grid.showLoading();
setTimeout(function() {
grid.hideLoading();
Expand Down Expand Up @@ -176,7 +176,7 @@
page = Math.max(1, page);
page = Math.min(totalPage, page);

//reset page
// reset page
pageNode.innerHTML = '';
pageList.innerHTML = '';

Expand All @@ -200,7 +200,7 @@

pageList.querySelector(`.page-item_${page}`).classList.add('selected');

//slice page data
// slice page data
const start = (page - 1) * pageSize;
const end = start + pageSize;
const pageRows = totalRows.slice(start, end);
Expand Down
2 changes: 1 addition & 1 deletion public/performance-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
};
const sortOnInit = document.querySelector('.cb_sortOnInit').checked;
if (sortOnInit) {
//test sort performance, need init rows twice
// test sort performance, need init rows twice
options.sortOnInit = true;
options.sortField = 'index';
options.sortAsc = false;
Expand Down
4 changes: 2 additions & 2 deletions public/poc.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@

const options = {
theme: document.querySelector('.st-theme').value,
//collapseAllOnInit: true,
// collapseAllOnInit: true,

//collapseAllVisible: false,
// collapseAllVisible: false,

frozenColumn: 0,
frozenRow: 0
Expand Down
2 changes: 1 addition & 1 deletion public/resize.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@

['.it_width', '.it_height'].forEach(function(item) {
document.querySelector(item).addEventListener('change', function(e) {
//console.log('change', e);
// console.log('change', e);
updateContainerSize();
});
});
Expand Down
8 changes: 4 additions & 4 deletions public/row-add-delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@
window.appendLog(`event: ${e.type}`, d);
}).bind('onClick', function(e, d) {
if (d.e.target.classList.contains('tg-cell-hover-icon')) {
//console.log(d);
// console.log(d);
this.deleteRow(d.rowItem);
}

}).bind('onRowMouseEnter', function(e, d) {
//console.log(d);
// console.log(d);
const cellNode = this.getCellNode(d.rowItem, 'name');
if (!cellNode) {
return;
Expand Down Expand Up @@ -126,7 +126,7 @@
const options = {
theme: document.querySelector('.st-theme').value,
selectVisible: true,
//collapseAllOnInit: true,
// collapseAllOnInit: true,
frozenColumn: 0,
rowFilter: function(rowItem) {
if (!keywords) {
Expand Down Expand Up @@ -185,7 +185,7 @@
return;
}
keywords = k;
//update rows
// update rows
grid.update();
});

Expand Down
4 changes: 2 additions & 2 deletions public/row-hover.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
cellNode.style.background = 'none';
});

//=========================================================================================
//usage 2
// =========================================================================================
// usage 2

const usageData = {
rows: [{
Expand Down
4 changes: 2 additions & 2 deletions public/row-move.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
selectMultiple: document.querySelector('.cb_selectMultiple').checked,
bindWindowResize: true,
selectVisible: true,
//collapseAllOnInit: true,
// collapseAllOnInit: true,
frozenColumn: 0,
rowFilter: function(rowItem) {
if (!keywords) {
Expand Down Expand Up @@ -181,7 +181,7 @@
return;
}
keywords = k;
//update rows
// update rows
grid.update();
});

Expand Down
2 changes: 1 addition & 1 deletion public/row-not-found.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
return;
}
keywords = k;
//update rows
// update rows
grid.update();
});

Expand Down
4 changes: 2 additions & 2 deletions public/row-select-limit.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
console.log(d);
document.querySelector('.onSelectChanged').innerHTML = d.length;

//limit handler
// limit handler
const selectedRows = this.getSelectedRows();
const len = selectedRows.length;
const limit = document.querySelector('.ip_limit').value | 0;
Expand All @@ -89,7 +89,7 @@

});

//===============================================================================
// ===============================================================================
const renderData = function(data) {
const options = {
theme: document.querySelector('.st-theme').value,
Expand Down
2 changes: 1 addition & 1 deletion public/row-select.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
return;
}
keywords = k;
//update rows
// update rows
grid.update();
});

Expand Down
Loading

0 comments on commit 4b2ca50

Please sign in to comment.