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

fin-hypergrid-event-logger

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fin-hypergrid-event-logger - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

69

custom-listeners.js
'use strict';
var listenerDictionary = {
'fin-click': function(e) {
var cell = e.detail.gridCell;
this.log(e.type + ' cell:', cell);
},
function logEventObject(e) {
this.log(e.type, '::', e);
}
'fin-double-click': function(e) {
var rowContext = e.detail.dataRow;
this.log(e.type + ' row-context:', rowContext);
},
function logDetail(e) {
this.log(e.type, '::', e.detail);
}
'fin-selection-changed': function(e) {
this.log(e.type, e.detail.rows, e.detail.columns, e.detail.selections);
},
function logScroll(e) {
this.log(e.type, '::', e.detail.value);
}
function logCell(e) {
var gCell = e.detail.gridCell;
var dCell = e.detail.dataCell;
this.log(e.type, '::',
'grid-cell:', { x: gCell.x, y: gCell.y },
'data-cell:', { x: dCell.x, y: dCell.y });
}
function logSelection(e) {
this.log(e.type, '::', e.detail.rows, e.detail.columns, e.detail.selections);
}
function logRow(e) {
var rowContext = e.detail.primitiveEvent.dataRow;
this.log(e.type, '::', 'row-context:', rowContext);
}
module.exports = {
'fin-cell-enter': logCell,
'fin-click': logCell,
'fin-double-click': logRow,
'fin-selection-changed': logSelection,
'fin-context-menu': logCell,
'fin-scroll-x': logScroll,
'fin-scroll-y': logScroll,
'fin-context-menu': logCell,
'fin-cell-enter': logCell,
'fin-row-selection-changed': logDetail,

@@ -37,21 +55,2 @@ 'fin-column-selection-changed': logDetail,

};
function logScroll(e) {
this.log(e.type, e.detail.value);
}
function logCell(e) {
var gCell = e.detail.gridCell;
var dCell = e.detail.dataCell;
this.log(e.type, 'grid', { x: gCell.x, y: gCell.y }, 'data', { x: dCell.x, y: dCell.y });
}
function logDetail(e) {
this.log(e.type, e.detail);
}
function logEventObject(e) {
this.log(e.type, e);
}
module.exports = listenerDictionary;
l
{
"name": "fin-hypergrid-event-logger",
"version": "1.0.2",
"version": "1.0.3",
"description": "Hypegrid starlog plug-in",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -40,6 +40,10 @@ Hypegrid starlog plug-in

* This `logStart` adds some default option values directing starlog to:
* Search grid instance for event strings found in first param of calls to `addEventListener`
* Search grid instance for event strings
* Blacklist the `fin-tick` event string
* Attach logging listeners to the canvas element
The default [search pattern](https://github.com/fin-hypergrid/event-logger/blob/master/index.js#L18) looks for calls to `dispatchEvent` and `CustomEvent`.
The search currently yields 29 events.
Of these, [18 have custom listeners](https://github.com/fin-hypergrid/event-logger/blob/master/index.js#L18) that log specific information; the rest use the [default listener](https://github.com/joneit/starlog/blob/master/index.js#L138-L140) that logs only the event name.
### Installation options

@@ -46,0 +50,0 @@ `methodPrefix` is the only installation option.

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