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

react-matrix-tree

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-matrix-tree - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

dist/react-matrix-tree.css

9

dist/cjs/index.js

@@ -1,7 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tree = void 0;
var tslib_1 = require("tslib");
var App_1 = tslib_1.__importDefault(require("./components/App"));
exports.Tree = App_1.default;
//# sourceMappingURL=index.js.map
"use strict";var e=require("react");function t(t){var l=t.data;return e.createElement("div",null,l.imageSource&&e.createElement(e.Fragment,null,e.createElement("img",{src:l.imageSource,style:{height:40,width:40}}),e.createElement("br",null)),e.createElement("label",{style:{fontWeight:"bold",fontSize:14,whiteSpace:"nowrap"},onClick:function(e){l.onClick&&l.onClick(e,l)},title:l.tooltip},l.title))}function l(t){var l=t.ismobileview,r=t.level,a=t.item,c=t.color;e.useEffect((function(){document.documentElement.style.setProperty("--treecolor",c)}),[c]);var o=a.data,i=void 0===o?[]:o,m=!1;return l?r<=3&&i.length<=2&&(m=!0):m=i.length<=4&&(i.length>0&&r<=4),e.createElement("div",null,m&&e.createElement(e.Fragment,null,e.createElement("div",{style:{width:i&&i.length>0?"".concat(100-100/i.length,"%"):0,marginLeft:"auto",marginRight:"auto",marginBottom:10}},e.createElement("div",{className:"toparrowup-container"},e.createElement("div",{className:"toparrowup"})),e.createElement("div",{className:"bottomarrow"}),e.createElement("div",{className:"bottomarrowdown-container"},i&&i.map((function(t,l){return e.createElement("div",{className:"bottomarrowdown",key:"".concat(t.title).concat(l).concat(r)})})))),e.createElement(n,{color:c,childrens:i,level:r+1,ismobileview:l})))}var n=function(n){var r=n.childrens,a=n.level,c=n.ismobileview,o=n.color;return e.createElement("div",{style:{display:"flex",textAlign:"center"}},r.map((function(n,i){return e.createElement("div",{key:"".concat(a).concat(n.title).concat(i),style:{minWidth:"".concat(100/r.length,"%")}},e.createElement(t,{data:n}),e.createElement(l,{color:o,ismobileview:c,item:n,level:a}))})))};exports.Tree=function(t){var l=t.data,r=t.isMobile,a=t.color;return e.createElement("div",{className:"treeparent"},e.createElement(n,{color:a,childrens:l,level:1,ismobileview:null!=r&&r}))};
//# sourceMappingURL=index.js.map

@@ -1,3 +0,2 @@

import Tree from './components/App';
export { Tree };
//# sourceMappingURL=index.js.map
import e,{useEffect as t}from"react";function l(t){var l=t.data;return e.createElement("div",null,l.imageSource&&e.createElement(e.Fragment,null,e.createElement("img",{src:l.imageSource,style:{height:40,width:40}}),e.createElement("br",null)),e.createElement("label",{style:{fontWeight:"bold",fontSize:14,whiteSpace:"nowrap"},onClick:function(e){l.onClick&&l.onClick(e,l)},title:l.tooltip},l.title))}function n(l){var n=l.ismobileview,a=l.level,o=l.item,c=l.color;t((function(){document.documentElement.style.setProperty("--treecolor",c)}),[c]);var i=o.data,m=void 0===i?[]:i,s=!1;return n?a<=3&&m.length<=2&&(s=!0):s=m.length<=4&&(m.length>0&&a<=4),e.createElement("div",null,s&&e.createElement(e.Fragment,null,e.createElement("div",{style:{width:m&&m.length>0?"".concat(100-100/m.length,"%"):0,marginLeft:"auto",marginRight:"auto",marginBottom:10}},e.createElement("div",{className:"toparrowup-container"},e.createElement("div",{className:"toparrowup"})),e.createElement("div",{className:"bottomarrow"}),e.createElement("div",{className:"bottomarrowdown-container"},m&&m.map((function(t,l){return e.createElement("div",{className:"bottomarrowdown",key:"".concat(t.title).concat(l).concat(a)})})))),e.createElement(r,{color:c,childrens:m,level:a+1,ismobileview:n})))}var r=function(t){var r=t.childrens,a=t.level,o=t.ismobileview,c=t.color;return e.createElement("div",{style:{display:"flex",textAlign:"center"}},r.map((function(t,i){return e.createElement("div",{key:"".concat(a).concat(t.title).concat(i),style:{minWidth:"".concat(100/r.length,"%")}},e.createElement(l,{data:t}),e.createElement(n,{color:c,ismobileview:o,item:t,level:a}))})))},a=function(t){var l=t.data,n=t.isMobile,a=t.color;return e.createElement("div",{className:"treeparent"},e.createElement(r,{color:a,childrens:l,level:1,ismobileview:null!=n&&n}))};export{a as Tree};
//# sourceMappingURL=index.js.map
{
"name": "react-matrix-tree",
"version": "1.1.2",
"version": "1.1.3",
"description": "",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"browser": "./dist/umd/index.js",
"types": "./dist/esm/index.d.ts",
"scripts": {
"lint": "eslint \"{**/*,*}.{js,ts,jsx,tsx}\"",
"build": "npm run build:esm && npm run build:cjs",
"build": "rollup -c",
"build:esm": "tsc",

@@ -35,2 +36,6 @@ "prepare": "npm run build",

"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.3",
"@testing-library/jest-dom": "^5.16.5",

@@ -40,6 +45,4 @@ "@testing-library/react": "^14.0.0",

"@types/react": "^18.0.37",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"css-loader": "^6.7.3",
"eslint": "^8.38.0",

@@ -50,12 +53,15 @@ "eslint-config-prettier": "^8.8.0",

"eslint-plugin-react-hooks": "^4.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-styled-components": "^7.1.1",
"prettier": "^2.8.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.23.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-sass": "^1.12.19",
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4",
"typescript-plugin-css-modules": "^5.0.1"
"typescript": "^5.0.4"
},

@@ -69,6 +75,3 @@ "peerDependencies": {

"README.md"
],
"dependencies": {
"styled-components": "^5.3.10"
}
]
}

@@ -10,2 +10,6 @@ # React-Matrix-Tree

$ yarn add react-matrix-tree
import { Tree } from 'react-matrix-tree'
import 'react-matrix-tree/dist/react-matrix-tree.css';
```

@@ -32,3 +36,4 @@

import { Tree } from 'react-matrix-tree'
import { Tree } from 'react-matrix-tree';
import 'react-matrix-tree/dist/react-matrix-tree.css';

@@ -53,3 +58,4 @@ function App() {

import { Tree } from 'react-matrix-tree'
import { Tree } from 'react-matrix-tree';
import 'react-matrix-tree/dist/react-matrix-tree.css';

@@ -74,3 +80,4 @@ function App() {

import { Tree } from 'react-matrix-tree'
import { Tree } from 'react-matrix-tree';
import 'react-matrix-tree/dist/react-matrix-tree.css';

@@ -95,3 +102,4 @@ function App() {

import { Tree } from 'react-matrix-tree'
import { Tree } from 'react-matrix-tree';
import 'react-matrix-tree/dist/react-matrix-tree.css';

@@ -139,3 +147,3 @@ function App() {

Show your ❤️ and support by giving a ⭐. Any suggestions are welcome!
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! venkatmcajj@gmail.com

@@ -142,0 +150,0 @@ ## License

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