react-matrix-tree
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
147
33695
28
10
91
3
1
- Removedstyled-components@^5.3.10
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/compat-data@7.26.3(transitive)
- Removed@babel/core@7.26.0(transitive)
- Removed@babel/generator@7.26.3(transitive)
- Removed@babel/helper-annotate-as-pure@7.25.9(transitive)
- Removed@babel/helper-compilation-targets@7.25.9(transitive)
- Removed@babel/helper-module-imports@7.25.9(transitive)
- Removed@babel/helper-module-transforms@7.26.0(transitive)
- Removed@babel/helper-plugin-utils@7.25.9(transitive)
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/helper-validator-option@7.25.9(transitive)
- Removed@babel/helpers@7.26.0(transitive)
- Removed@babel/parser@7.26.3(transitive)
- Removed@babel/plugin-syntax-jsx@7.25.9(transitive)
- Removed@babel/template@7.25.9(transitive)
- Removed@babel/traverse@7.26.4(transitive)
- Removed@babel/types@7.26.3(transitive)
- Removed@emotion/is-prop-valid@1.3.1(transitive)
- Removed@emotion/memoize@0.9.0(transitive)
- Removed@emotion/stylis@0.8.5(transitive)
- Removed@emotion/unitless@0.7.5(transitive)
- Removed@jridgewell/gen-mapping@0.3.8(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removedbabel-plugin-styled-components@2.1.4(transitive)
- Removedbrowserslist@4.24.2(transitive)
- Removedcamelize@1.0.1(transitive)
- Removedcaniuse-lite@1.0.30001687(transitive)
- Removedconvert-source-map@2.0.0(transitive)
- Removedcss-color-keywords@1.0.0(transitive)
- Removedcss-to-react-native@3.2.0(transitive)
- Removeddebug@4.4.0(transitive)
- Removedelectron-to-chromium@1.5.73(transitive)
- Removedescalade@3.2.0(transitive)
- Removedgensync@1.0.0-beta.2(transitive)
- Removedglobals@11.12.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhoist-non-react-statics@3.3.2(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjsesc@3.1.0(transitive)
- Removedjson5@2.2.3(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedms@2.1.3(transitive)
- Removednode-releases@2.0.19(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedpostcss-value-parser@4.2.0(transitive)
- Removedreact-dom@19.0.0(transitive)
- Removedreact-is@16.13.119.0.0(transitive)
- Removedscheduler@0.25.0(transitive)
- Removedsemver@6.3.1(transitive)
- Removedshallowequal@1.1.0(transitive)
- Removedstyled-components@5.3.11(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedupdate-browserslist-db@1.1.1(transitive)
- Removedyallist@3.1.1(transitive)