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

@deephaven/jsapi-utils

Package Overview
Dependencies
Maintainers
0
Versions
685
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deephaven/jsapi-utils - npm Package Compare versions

Comparing version 0.92.1-beta.3 to 0.93.0

18

dist/ViewportDataUtils.d.ts

@@ -8,8 +8,5 @@ import type { Key } from 'react';

columns: dh.Column[];
rows: ViewportRow[];
rows: dh.Row[];
}>;
export type RowDeserializer<T> = (row: ViewportRow, columns: dh.Column[]) => T;
export type ViewportRow = dh.Row & {
offsetInSnapshot: number;
};
export type RowDeserializer<T> = (row: dh.Row, columns: dh.Column[]) => T;
/**

@@ -24,11 +21,2 @@ * Create a `KeyedItem.key` for a given index. The prefix is necessary to avoid

/**
* Create a unique string key for a row based on its ordinal position in its
* source table. This is calculated based on it's offset in the viewport
* (row.offsetInSnapshot) + the offset of the snapshot.
* @param row Row from a Table update event.
* @param offset Offset of the current viewport.
* @returns Unique string key for the ordinal position of the given row.
*/
export declare function createKeyFromOffsetRow(row: ViewportRow, offset: number): string;
/**
* Creates a handler function for a `dh.Table.EVENT_UPDATED` event. Rows that

@@ -51,3 +39,3 @@ * get passed to the handler will be bulk updated in the given `viewportData`

*/
export declare function defaultRowDeserializer<T>(row: ViewportRow, columns: dh.Column[]): T;
export declare function defaultRowDeserializer<T>(row: dh.Row, columns: dh.Column[]): T;
/**

@@ -54,0 +42,0 @@ * For windowing to work, the underlying list needs to maintain a KeyedItem for

@@ -18,14 +18,2 @@ import clamp from 'lodash.clamp';

/**
* Create a unique string key for a row based on its ordinal position in its
* source table. This is calculated based on it's offset in the viewport
* (row.offsetInSnapshot) + the offset of the snapshot.
* @param row Row from a Table update event.
* @param offset Offset of the current viewport.
* @returns Unique string key for the ordinal position of the given row.
*/
export function createKeyFromOffsetRow(row, offset) {
return createKeyedItemKey(row.offsetInSnapshot + offset);
}
/**
* Creates a handler function for a `dh.Table.EVENT_UPDATED` event. Rows that

@@ -53,5 +41,5 @@ * get passed to the handler will be bulk updated in the given `viewportData`

var updateKeyMap = new Map();
rows.forEach(row => {
rows.forEach((row, offsetInSnapshot) => {
var item = deserializeRow(row, columns);
var key = createKeyFromOffsetRow(row, offset);
var key = createKeyedItemKey(offset + offsetInSnapshot);
updateKeyMap.set(key, {

@@ -58,0 +46,0 @@ key,

12

package.json
{
"name": "@deephaven/jsapi-utils",
"version": "0.92.1-beta.3+99b8d595",
"version": "0.93.0",
"description": "Deephaven JSAPI Utils",

@@ -24,6 +24,6 @@ "author": "Deephaven Data Labs LLC",

"dependencies": {
"@deephaven/filters": "^0.92.1-beta.3+99b8d595",
"@deephaven/filters": "^0.93.0",
"@deephaven/jsapi-types": "^1.0.0-dev0.34.0",
"@deephaven/log": "^0.92.1-beta.3+99b8d595",
"@deephaven/utils": "^0.92.1-beta.3+99b8d595",
"@deephaven/log": "^0.93.0",
"@deephaven/utils": "^0.93.0",
"lodash.clamp": "^4.0.3",

@@ -33,3 +33,3 @@ "nanoid": "^5.0.7"

"devDependencies": {
"@deephaven/jsapi-shim": "^0.92.1-beta.3+99b8d595"
"@deephaven/jsapi-shim": "^0.93.0"
},

@@ -43,3 +43,3 @@ "files": [

},
"gitHead": "99b8d5952ba325bf74d2d16ed39eb7a2e897d196"
"gitHead": "1503a37f687860ed63e5fd009fc2fb9416e40eef"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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