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

streaksheet

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streaksheet - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

15

build/src/CellContainer.js
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -14,3 +16,3 @@

var _react = _interopRequireDefault(require("react"));
var _react = _interopRequireWildcard(require("react"));

@@ -31,4 +33,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

cellIndexesToKeysAndData = data.cellIndexesToKeysAndData,
sectionRowMatcher = data.sectionRowMatcher;
sectionRowMatcher = data.sectionRowMatcher,
setCellBeingEdited = data.setCellBeingEdited;
var position = sectionRowMatcher.getSectionRow(rowIndex);
var setEditing = (0, _react.useCallback)(function (isEditing) {
if (isEditing) {
setCellBeingEdited([rowIndex, columnIndex]);
} else {
setCellBeingEdited(null);
}
}, [setCellBeingEdited, rowIndex, columnIndex]);

@@ -61,2 +71,3 @@ if (!position || position.rowIndex === -1) {

isEditing: isEditing,
setEditing: setEditing,
rowData: rowData,

@@ -63,0 +74,0 @@ rowKey: rowKey

@@ -51,2 +51,3 @@ import React, { ComponentType, CSSProperties } from 'react';

isEditing: boolean;
setEditing(isEditing: boolean): void;
rowData: T;

@@ -53,0 +54,0 @@ rowKey: string;

28

build/src/index.js

@@ -239,4 +239,16 @@ "use strict";

cellBeingEdited = _useState2[0],
setCellBeingEdited = _useState2[1];
_setCellBeingEdited = _useState2[1];
var setCellBeingEdited = (0, _react.useCallback)(function (newValue) {
_setCellBeingEdited(function (cellBeingEdited) {
var newActual = typeof newValue === 'function' ? newValue(cellBeingEdited) : newValue; // keep exact old value if new value is equivalent
if (cellBeingEdited && newActual && cellBeingEdited[0] === newActual[0] && cellBeingEdited[1] === newActual[1]) {
return cellBeingEdited;
}
return newActual;
});
}, []);
var _useState3 = (0, _react.useState)(null),

@@ -363,13 +375,6 @@ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),

setCellBeingEdited(function (cellBeingEdited) {
// If the active cell was double-clicked, keep the old value's identity.
if (cellBeingEdited && cellBeingEdited[0] === cellIndexes[0] && cellBeingEdited[1] === cellIndexes[1]) {
return cellBeingEdited;
}
return cellIndexes;
});
setCellBeingEdited(cellIndexes);
event.preventDefault();
event.stopPropagation();
}, []);
}, [setCellBeingEdited]);
var handleGridKeyDown = (0, _react.useCallback)(function (event) {

@@ -826,3 +831,4 @@ var key = event.key,

sectionRowMatcher: sectionRowMatcher,
styles: styles
styles: styles,
setCellBeingEdited: setCellBeingEdited
};

@@ -829,0 +835,0 @@ var sheetDataForStreakSheet = sheetData.useByStreakSheet();

@@ -27,2 +27,3 @@ import type { ComponentType } from 'react';

styles: Styles;
setCellBeingEdited: React.Dispatch<React.SetStateAction<CellIndexes | null>>;
}

@@ -29,0 +30,0 @@ export interface InternalPasteTarget {

{
"name": "streaksheet",
"version": "0.7.2",
"version": "0.7.3",
"author": "Chris Cowan <agentme49@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

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