Socket
Socket
Sign inDemoInstall

react-infinity-menu

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-infinity-menu - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

LICENSE.txt

2

dist/infinity-menu.js

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

if (this.props.onNodeMouseClick) {
var currLevel = Math.floor(keyPath.length / 2);
var currLevel = Math.floor(keyPath.split(".").length / 2);
this.props.onNodeMouseClick(event, tree, node, currLevel);

@@ -75,0 +75,0 @@ }

import React from "react";
import ReactDOM from "react-dom";
import "../../src/infinity-menu.css";

@@ -100,2 +101,2 @@ import InfinityMenu from "../../src/infinity-menu";

}
React.render(<App />, document.getElementById("example"));
ReactDOM.render(<App />, document.getElementById("example"));
{
"name": "react-infinity-menu",
"version": "2.0.0",
"version": "2.0.1",
"description": "[![Circle CI](https://circleci.com/gh/socialtables/react-infinity-menu.svg?style=svg&circle-token=230aaa396d006f1dc8d875b340834234c4937bbc)](https://circleci.com/gh/socialtables/react-infinity-menu)",

@@ -36,2 +36,5 @@ "main": "./dist/infinity-menu.js",

"mocha": "^2.3.3",
"react": "^0.14.3",
"react-addons-test-utils": "^0.14.3",
"react-dom": "^0.14.3",
"should": "^7.1.0",

@@ -38,0 +41,0 @@ "should-sinon": "0.0.3",

@@ -174,1 +174,11 @@ # react-infinity-menu

`/src/infinity-menu.css`
# License
Copyright (C) 2015 Social Tables, Inc. (https://www.socialtables.com) All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

@@ -35,3 +35,3 @@ import React from "react";

if (this.props.onNodeMouseClick) {
const currLevel = Math.floor(keyPath.length / 2);
const currLevel = Math.floor(keyPath.split(".").length / 2);
this.props.onNodeMouseClick(event, tree, node, currLevel);

@@ -38,0 +38,0 @@ }

@@ -1,3 +0,4 @@

import React from "react/addons";
let TestUtils = React.addons.TestUtils;
import React from "react";
import ReactDOM from "react-dom";
import TestUtils from "react-addons-test-utils";
let shallowRenderer = TestUtils.createRenderer();

@@ -110,3 +111,3 @@ import InfinityMenu from "../dist/infinity-menu";

it("should call onNodeMouseClick function", function () {
var folderNode = React.findDOMNode(
var folderNode = ReactDOM.findDOMNode(
TestUtils.scryRenderedDOMComponentsWithClass(

@@ -119,2 +120,4 @@ dom,

TestUtils.Simulate.click(folderNode);
/*the fourth argument is the level of current node*/
onNodeMouseClickStub.args[0][3].should.equal(1);
onNodeMouseClickStub.should.have.callCount(1);

@@ -124,3 +127,3 @@ });

it("should call onLeafMouseClick function", function () {
var leaf = React.findDOMNode(
var leaf = ReactDOM.findDOMNode(
TestUtils.scryRenderedDOMComponentsWithClass(

@@ -137,3 +140,3 @@ dom,

it("should call onLeafMouseDown function", function () {
var leaf = React.findDOMNode(
var leaf = ReactDOM.findDOMNode(
TestUtils.scryRenderedDOMComponentsWithClass(

@@ -150,3 +153,3 @@ dom,

it("should call onLeafMouseUp function", function () {
var leaf = React.findDOMNode(
var leaf = ReactDOM.findDOMNode(
TestUtils.scryRenderedDOMComponentsWithClass(

@@ -153,0 +156,0 @@ dom,

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