Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slickgrid

Package Overview
Dependencies
Maintainers
0
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slickgrid - npm Package Compare versions

Comparing version 5.12.0 to 5.12.1

4

dist/browser/controls/slick.columnmenu.js

@@ -123,3 +123,7 @@ "use strict";

}
/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId, show) {
this.setColumnVisibility(idxOrId, show);
}
setColumnVisibility(idxOrId, show) {
let idx = typeof idxOrId == "number" ? idxOrId : this.getColumnIndexbyId(idxOrId), visibleColumns = this.getVisibleColumns(), col = this.columns[idx];

@@ -126,0 +130,0 @@ if (show)

@@ -129,3 +129,7 @@ "use strict";

}
/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId, show) {
this.setColumnVisibility(idxOrId, show);
}
setColumnVisibility(idxOrId, show) {
let idx = typeof idxOrId == "number" ? idxOrId : this.getColumnIndexbyId(idxOrId), visibleColumns = this.getVisibleColumns(), col = this.columns[idx];

@@ -132,0 +136,0 @@ if (show)

18

dist/browser/plugins/slick.cellexternalcopymanager.js

@@ -150,8 +150,12 @@ "use strict";

clipCommand.oldValues[y] = [], clipCommand.w = 0, clipCommand.h++;
let xOffset = 0;
for (let x = 0; x < clipCommand.destW; x++) {
clipCommand.w++;
let desty = activeRow + y, destx = activeCell + x;
if (desty < clipCommand.maxDestY && destx < clipCommand.maxDestX) {
let desty = activeRow + y, destx = activeCell + x, column = columns[destx];
if (column.hidden) {
clipCommand.destW++, xOffset++;
continue;
}
if (clipCommand.w++, desty < clipCommand.maxDestY && destx < clipCommand.maxDestX) {
let dt = grid.getDataItem(desty);
clipCommand.oldValues[y][x] = dt[columns[destx].field], oneCellToMultiple ? clipCommand.setDataItemValueForColumn(dt, columns[destx], clippedRange[0][0]) : clipCommand.setDataItemValueForColumn(dt, columns[destx], clippedRange[y] ? clippedRange[y][x] : ""), grid.updateCell(desty, destx), grid.onCellChange.notify({
clipCommand.oldValues[y][x - xOffset] = dt[column.field], oneCellToMultiple ? clipCommand.setDataItemValueForColumn(dt, column, clippedRange[0][0]) : clipCommand.setDataItemValueForColumn(dt, column, clippedRange[y] ? clippedRange[y][x - xOffset] : ""), grid.updateCell(desty, destx), grid.onCellChange.notify({
row: desty,

@@ -235,3 +239,3 @@ cell: destx,

let focusEl = document.activeElement, ta = this._createTextBox(clipText);
if (ta.focus(), setTimeout(() => {
if (ta.focus(), window.setTimeout(() => {
this._bodyElement.removeChild(ta), focusEl ? focusEl.focus() : console.log("No element to restore focus to after copy?");

@@ -247,3 +251,3 @@ }, (_d = (_c = this._options) == null ? void 0 : _c.clipboardPasteDelay) != null ? _d : CLIPBOARD_PASTE_DELAY), typeof this._onCopySuccess == "function") {

let focusEl = document.activeElement, ta = this._createTextBox("");
return setTimeout(() => {
return window.setTimeout(() => {
this._decodeTabularData(this._grid, ta), focusEl == null || focusEl.focus();

@@ -264,3 +268,3 @@ }, (_f = (_e = this._options) == null ? void 0 : _e.clipboardPasteDelay) != null ? _f : CLIPBOARD_PASTE_DELAY), !1;

}
this._grid.setCellCssStyles(this._copiedCellStyleLayerKey, hash), clearTimeout(this._clearCopyTI), this._clearCopyTI = setTimeout(() => {
this._grid.setCellCssStyles(this._copiedCellStyleLayerKey, hash), window.clearTimeout(this._clearCopyTI), this._clearCopyTI = window.setTimeout(() => {
this.clearCopySelection();

@@ -267,0 +271,0 @@ }, ((_a = this._options) == null ? void 0 : _a.clearCopySelectionDelay) || CLEAR_COPY_SELECTION_DELAY);

@@ -141,3 +141,3 @@ "use strict";

let xTotalDelay = 0, yTotalDelay = 0;
this._autoScrollTimerId = setInterval(() => {
this._autoScrollTimerId = window.setInterval(() => {
let xNeedUpdate = !1, yNeedUpdate = !1;

@@ -153,3 +153,3 @@ this._draggingMouseOffset.offset.x ? (xTotalDelay += this._options.minIntervalToShowNextCell, xNeedUpdate = xTotalDelay >= this._xDelayForNextCell) : xTotalDelay = 0, this._draggingMouseOffset.offset.y ? (yTotalDelay += this._options.minIntervalToShowNextCell, yNeedUpdate = yTotalDelay >= this._yDelayForNextCell) : yTotalDelay = 0, (xNeedUpdate || yNeedUpdate) && (xNeedUpdate && (xTotalDelay = 0), yNeedUpdate && (yTotalDelay = 0), this.handleDragToNewPosition(xNeedUpdate, yNeedUpdate));

stopIntervalTimer() {
this._autoScrollTimerId && (clearInterval(this._autoScrollTimerId), this._autoScrollTimerId = void 0);
this._autoScrollTimerId && (window.clearInterval(this._autoScrollTimerId), this._autoScrollTimerId = void 0);
}

@@ -156,0 +156,0 @@ handleDragTo(e, dd) {

@@ -99,7 +99,7 @@ "use strict";

return new Promise((resolve) => {
resizeDelay > 0 ? (clearTimeout(this._timer), this._timer = setTimeout(() => {
resizeDelay > 0 ? (window.clearTimeout(this._timer), this._timer = window.setTimeout(() => {
resolve(this.resizeGridCallback(newSizes, event));
}, resizeDelay)) : resolve(this.resizeGridCallback(newSizes, event));
});
resizeDelay > 0 ? (clearTimeout(this._timer), this._timer = setTimeout(() => {
resizeDelay > 0 ? (window.clearTimeout(this._timer), this._timer = window.setTimeout(() => {
this.resizeGridCallback(newSizes, event);

@@ -106,0 +106,0 @@ }, resizeDelay)) : this.resizeGridCallback(newSizes, event);

@@ -170,3 +170,3 @@ "use strict";

let rowIndex = item.rowIndex || this._dataView.getRowById(item[this._dataViewIdProperty]);
setTimeout(() => {
window.setTimeout(() => {
document.querySelector(`.${this._gridUid} .cellDetailView_${item[this._dataViewIdProperty]}`) && this.onRowBackToViewportRange.notify({

@@ -173,0 +173,0 @@ grid: this._grid,

@@ -46,3 +46,3 @@ "use strict";

}
setTimeout(function() {
window.setTimeout(() => {
Array.isArray(editors) && editors.length > 0 && typeof editors[0].focus == "function" && editors[0].focus();

@@ -49,0 +49,0 @@ }, 0);

@@ -233,3 +233,3 @@ "use strict";

}
}), this.args.compositeEditorOptions || setTimeout(() => {
}), this.args.compositeEditorOptions || window.setTimeout(() => {
this.show(), this.focus();

@@ -236,0 +236,0 @@ }, 50), Utils.width(this.input, Utils.width(this.input) - (this.args.compositeEditorOptions ? 28 : 18));

@@ -13,3 +13,3 @@ "use strict";

__publicField(this, "data", { length: 0 });
__publicField(this, "h_request", null);
__publicField(this, "h_request");
__publicField(this, "req", null);

@@ -54,3 +54,3 @@ // ajax request

let recStart = fromPage * this.PAGESIZE, recCount = (toPage - fromPage) * this.PAGESIZE + this.PAGESIZE, url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss(" + recStart + "%2C" + recCount + ")%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22&format=json";
this.h_request !== null && clearTimeout(this.h_request), this.h_request = setTimeout(() => {
this.h_request && window.clearTimeout(this.h_request), this.h_request = window.setTimeout(() => {
for (let i = fromPage; i <= toPage; i++)

@@ -57,0 +57,0 @@ this.data[i * this.PAGESIZE] = null;

@@ -16,3 +16,3 @@ "use strict";

__publicField(this, "sortdir", 1);
__publicField(this, "h_request", null);
__publicField(this, "h_request");
__publicField(this, "req", null);

@@ -57,3 +57,3 @@ // ajax request

let url = "http://octopart.com/api/v3/parts/search?apikey=68b25f31&include[]=short_description&show[]=uid&show[]=manufacturer&show[]=mpn&show[]=brand&show[]=octopart_url&show[]=short_description&q=" + this.searchstr + "&start=" + fromPage * this.PAGESIZE + "&limit=" + ((toPage - fromPage) * this.PAGESIZE + this.PAGESIZE);
this.sortcol !== null && (url += "&sortby=" + this.sortcol + (this.sortdir > 0 ? "+asc" : "+desc")), this.h_request !== null && clearTimeout(this.h_request), this.h_request = setTimeout(() => {
this.sortcol !== null && (url += "&sortby=" + this.sortcol + (this.sortdir > 0 ? "+asc" : "+desc")), this.h_request && window.clearTimeout(this.h_request), this.h_request = window.setTimeout(() => {
for (let i = fromPage; i <= toPage; i++)

@@ -60,0 +60,0 @@ this.data[i * this.PAGESIZE] = null;

@@ -52,3 +52,5 @@ import { BindingEventService as BindingEventService_, type SlickEventData } from '../slick.core';

updateColumn(e: DOMMouseOrTouchEvent<HTMLInputElement>): void;
/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean): void;
setColumnVisibility(idxOrId: number | string, show: boolean): void;
getAllColumns(): Column<any>[];

@@ -55,0 +57,0 @@ getColumnbyId(id: number | string): Column<any> | null;

@@ -53,3 +53,5 @@ import { BindingEventService as BindingEventService_, type SlickEventData } from '../slick.core';

protected updateColumn(e: DOMMouseOrTouchEvent<HTMLInputElement>): void;
/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean): void;
setColumnVisibility(idxOrId: number | string, show: boolean): void;
getAllColumns(): Column<any>[];

@@ -56,0 +58,0 @@ getColumnbyId(id: number | string): Column<any> | null;

@@ -40,3 +40,3 @@ import type { Column, ExcelCopyBufferOption, SlickPlugin } from '../models/index';

protected _copiedRanges: SlickRange_[] | null;
protected _clearCopyTI?: NodeJS.Timeout;
protected _clearCopyTI?: number;
protected _copiedCellStyle: string;

@@ -43,0 +43,0 @@ protected _copiedCellStyleLayerKey: string;

@@ -32,3 +32,3 @@ import { SlickEvent as SlickEvent_, type SlickEventData, SlickEventHandler as SlickEventHandler_, SlickRange as SlickRange_ } from '../slick.core';

protected _activeViewport: HTMLElement;
protected _autoScrollTimerId?: NodeJS.Timeout;
protected _autoScrollTimerId?: number;
protected _draggingMouseOffset: MouseOffsetViewport;

@@ -35,0 +35,0 @@ protected _moveDistanceForOneCell: {

@@ -71,3 +71,3 @@ import { BindingEventService as BindingEventService_ } from '../slick.core';

protected _resizePaused: boolean;
protected _timer: NodeJS.Timeout;
protected _timer?: number;
protected _options: ResizerOption;

@@ -74,0 +74,0 @@ protected _defaults: ResizerOption;

@@ -13,3 +13,3 @@ import type SortableInstance from 'sortablejs';

*
* SlickGrid v5.12.0
* SlickGrid v5.12.1
*

@@ -106,6 +106,6 @@ * NOTES:

protected _columnAutosizeDefaults: AutoSize;
protected _columnResizeTimer?: any;
protected _executionBlockTimer?: any;
protected _flashCellTimer?: any;
protected _highlightRowTimer?: any;
protected _columnResizeTimer?: number;
protected _executionBlockTimer?: number;
protected _flashCellTimer?: number;
protected _highlightRowTimer?: number;
protected th: number;

@@ -224,6 +224,6 @@ protected h: number;

};
protected h_editorLoader: any;
protected h_editorLoader?: number;
protected h_render: null;
protected h_postrender: any;
protected h_postrenderCleanup: any;
protected h_postrender?: number;
protected h_postrenderCleanup?: number;
protected postProcessedRows: any;

@@ -230,0 +230,0 @@ protected postProcessToRow: number;

@@ -9,3 +9,3 @@ /***

protected data: any;
protected h_request: any;
protected h_request?: number;
protected req: any;

@@ -12,0 +12,0 @@ protected onDataLoading: import("./slick.core").SlickEvent<any>;

@@ -13,3 +13,3 @@ import type { ColumnSort } from './models/index';

protected sortdir: number;
protected h_request: any;
protected h_request?: number;
protected req: any;

@@ -16,0 +16,0 @@ onDataLoading: import("./slick.core").SlickEvent<any>;

{
"name": "slickgrid",
"version": "5.12.0",
"version": "5.12.1",
"description": "A lightning fast JavaScript grid/spreadsheet",

@@ -42,3 +42,3 @@ "main": "./dist/cjs/index.js",

"dependencies": {
"sortablejs": "^1.15.2"
"sortablejs": "^1.15.3"
},

@@ -45,0 +45,0 @@ "browserslist": [

@@ -297,3 +297,8 @@ import { BindingEventService as BindingEventService_, Event as SlickEvent_, type SlickEventData, Utils as Utils_ } from '../slick.core';

/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean) {
this.setColumnVisibility(idxOrId, show);
}
setColumnVisibility(idxOrId: number | string, show: boolean) {
const idx = typeof idxOrId === 'number' ? idxOrId : this.getColumnIndexbyId(idxOrId);

@@ -300,0 +305,0 @@ let visibleColumns: Column[] = this.getVisibleColumns();

@@ -304,3 +304,8 @@ import { BindingEventService as BindingEventService_, Event as SlickEvent_, type SlickEventData, Utils as Utils_ } from '../slick.core';

/** @deprecated because of a typo @use `setColumnVisibility()` instead */
setColumnVisibiliy(idxOrId: number | string, show: boolean) {
this.setColumnVisibility(idxOrId, show);
}
setColumnVisibility(idxOrId: number | string, show: boolean) {
const idx = typeof idxOrId === 'number' ? idxOrId : this.getColumnIndexbyId(idxOrId);

@@ -307,0 +312,0 @@ let visibleColumns = this.getVisibleColumns();

@@ -48,3 +48,3 @@ import type { Column, CssStyleHash, ExcelCopyBufferOption, ExternalCopyClipCommand, SlickPlugin } from '../models/index';

protected _copiedRanges: SlickRange_[] | null = null;
protected _clearCopyTI?: NodeJS.Timeout;
protected _clearCopyTI?: number;
protected _copiedCellStyle: string;

@@ -258,3 +258,2 @@ protected _copiedCellStyleLayerKey: string;

w: 0,
execute: () => {

@@ -266,14 +265,26 @@ clipCommand.h = 0;

clipCommand.h++;
let xOffset = 0; // the x offset for hidden col
for (let x = 0; x < clipCommand.destW; x++) {
clipCommand.w++;
const desty = activeRow + y;
const destx = activeCell + x;
const column = columns[destx];
// paste on hidden column will be skipped, but we need to paste 1 cell further on X axis
// we'll increase our X and increase the offset`
if (column.hidden) {
clipCommand.destW++;
xOffset++;
continue;
}
clipCommand.w++;
if (desty < clipCommand.maxDestY && destx < clipCommand.maxDestX) {
const dt = grid.getDataItem(desty);
clipCommand.oldValues[y][x] = dt[columns[destx]['field']];
clipCommand.oldValues[y][x - xOffset] = dt[column['field']];
if (oneCellToMultiple) {
clipCommand.setDataItemValueForColumn(dt, columns[destx], clippedRange[0][0]);
clipCommand.setDataItemValueForColumn(dt, column, clippedRange[0][0]);
} else {
clipCommand.setDataItemValueForColumn(dt, columns[destx], clippedRange[y] ? clippedRange[y][x] : '');
clipCommand.setDataItemValueForColumn(dt, column, clippedRange[y] ? clippedRange[y][x - xOffset] : '');
}

@@ -303,3 +314,2 @@ grid.updateCell(desty, destx);

},
undo: () => {

@@ -428,3 +438,3 @@ for (let y = 0; y < clipCommand.destH; y++) {

setTimeout(() => {
window.setTimeout(() => {
this._bodyElement.removeChild(ta);

@@ -459,6 +469,6 @@ // restore focus when possible

const ta = this._createTextBox('');
setTimeout(() => {
this._decodeTabularData(this._grid, ta);
// restore focus when possible
focusEl?.focus();
window.setTimeout(() => {
this._decodeTabularData(this._grid, ta);
// restore focus when possible
focusEl?.focus();
}, this._options?.clipboardPasteDelay ?? CLIPBOARD_PASTE_DELAY);

@@ -484,4 +494,4 @@ return false;

this._grid.setCellCssStyles(this._copiedCellStyleLayerKey, hash);
clearTimeout(this._clearCopyTI as NodeJS.Timeout);
this._clearCopyTI = setTimeout(() => {
window.clearTimeout(this._clearCopyTI);
this._clearCopyTI = window.setTimeout(() => {
this.clearCopySelection();

@@ -488,0 +498,0 @@ }, this._options?.clearCopySelectionDelay || CLEAR_COPY_SELECTION_DELAY);

@@ -52,3 +52,3 @@ import { SlickEvent as SlickEvent_, type SlickEventData, SlickEventHandler as SlickEventHandler_, SlickRange as SlickRange_, Utils as Utils_ } from '../slick.core';

protected _activeViewport!: HTMLElement;
protected _autoScrollTimerId?: NodeJS.Timeout;
protected _autoScrollTimerId?: number;
protected _draggingMouseOffset!: MouseOffsetViewport;

@@ -256,3 +256,3 @@ protected _moveDistanceForOneCell!: { x: number; y: number; };

let yTotalDelay = 0;
this._autoScrollTimerId = setInterval(() => {
this._autoScrollTimerId = window.setInterval(() => {
let xNeedUpdate = false;

@@ -314,3 +314,3 @@ let yNeedUpdate = false;

if (this._autoScrollTimerId) {
clearInterval(this._autoScrollTimerId);
window.clearInterval(this._autoScrollTimerId);
this._autoScrollTimerId = undefined;

@@ -317,0 +317,0 @@ }

@@ -83,3 +83,3 @@ import { BindingEventService as BindingEventService_, Event as SlickEvent_, Utils as Utils_ } from '../slick.core';

protected _resizePaused = false;
protected _timer!: NodeJS.Timeout;
protected _timer?: number;
protected _options: ResizerOption;

@@ -251,4 +251,4 @@ protected _defaults: ResizerOption = {

if (resizeDelay > 0) {
clearTimeout(this._timer);
this._timer = setTimeout(() => {
window.clearTimeout(this._timer);
this._timer = window.setTimeout(() => {
resolve(this.resizeGridCallback(newSizes, event));

@@ -263,4 +263,4 @@ }, resizeDelay);

if (resizeDelay > 0) {
clearTimeout(this._timer);
this._timer = setTimeout(() => {
window.clearTimeout(this._timer);
this._timer = window.setTimeout(() => {
this.resizeGridCallback(newSizes, event);

@@ -267,0 +267,0 @@ }, resizeDelay);

@@ -408,3 +408,3 @@ import { SlickEvent as SlickEvent_, type SlickEventData, SlickEventHandler as SlickEventHandler_, Utils as Utils_ } from '../slick.core';

setTimeout(() => {
window.setTimeout(() => {
// make sure View Row DOM Element really exist before notifying that it's a row that is visible again

@@ -411,0 +411,0 @@ if (document.querySelector(`.${this._gridUid} .cellDetailView_${item[this._dataViewIdProperty]}`)) {

@@ -99,3 +99,3 @@ import type { Column, CompositeEditorOption, Editor, EditorArguments, HtmlElementPosition } from './models/index';

// focus on first input
setTimeout(function () {
window.setTimeout(() => {
if (Array.isArray(editors) && editors.length > 0 && typeof editors[0].focus === 'function') {

@@ -102,0 +102,0 @@ editors[0].focus();

@@ -377,3 +377,3 @@ import type { Column, Editor, EditorArguments, EditorValidationResult, ElementPosition, GridOption, OnCompositeEditorChangeEventArgs } from './models/index';

if (!this.args.compositeEditorOptions) {
setTimeout(() => {
window.setTimeout(() => {
this.show();

@@ -380,0 +380,0 @@ this.focus();

@@ -10,3 +10,3 @@ /***

protected data: any = { length: 0 };
protected h_request: any = null;
protected h_request?: number;
protected req: any = null; // ajax request

@@ -83,7 +83,7 @@

if (this.h_request !== null) {
clearTimeout(this.h_request);
if (this.h_request) {
window.clearTimeout(this.h_request);
}
this.h_request = setTimeout(() => {
this.h_request = window.setTimeout(() => {
for (let i = fromPage; i <= toPage; i++) {

@@ -90,0 +90,0 @@ this.data[i * this.PAGESIZE] = null; // null indicates a 'requested but not available yet'

@@ -15,3 +15,3 @@ import type { ColumnSort } from './models/index';

protected sortdir = 1;
protected h_request: any = null;
protected h_request?: number;
protected req: any = null; // ajax request

@@ -88,7 +88,7 @@

if (this.h_request !== null) {
clearTimeout(this.h_request);
if (this.h_request) {
window.clearTimeout(this.h_request);
}
this.h_request = setTimeout(() => {
this.h_request = window.setTimeout(() => {
for (let i = fromPage; i <= toPage; i++) {

@@ -95,0 +95,0 @@ this.data[i * this.PAGESIZE] = null; // null indicates a 'requested but not available yet'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc