New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-konva-grid

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-konva-grid - npm Package Compare versions

Comparing version 2.7.3 to 2.7.4

2

package.json
{
"name": "react-konva-grid",
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets",
"version": "2.7.3",
"version": "2.7.4",
"main": "dist/index.js",

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

@@ -92,3 +92,3 @@ import React, { useCallback, useEffect, useMemo, useRef } from "react";

const { items } = e.clipboardData;
const mimeTypes = [MimeType.csv, MimeType.plain];
const mimeTypes = [MimeType.html, MimeType.csv, MimeType.plain];
let type;

@@ -108,10 +108,20 @@ let value;

const doc = domparser.parseFromString(value, type);
const tableRows = doc.querySelectorAll("tr");
for (const tableRow of tableRows) {
const row = [];
const cells = tableRow.querySelectorAll("td");
for (const cell of cells) {
row.push(cell.textContent);
const supportedNodes = "table, p, h1, h2, h3, h4, h5, h6";
const nodes = doc.querySelectorAll(supportedNodes);
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
if (node.nodeName === "TABLE") {
const tableRows = doc.querySelectorAll("tr");
for (const tableRow of tableRows) {
const row = [];
const cells = tableRow.querySelectorAll("td");
for (const cell of cells) {
row.push(cell.textContent);
}
rows.push(row);
}
} else {
// Single nodes
rows.push([node.textContent]);
}
rows.push(row);
}

@@ -128,3 +138,2 @@ } else {

}
onPaste && onPaste(rows, selectionRef.current.activeCell);

@@ -131,0 +140,0 @@ };

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