🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

react-dagre-map-v2

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dagre-map-v2 - npm Package Compare versions

Comparing version
1.3.0
to
1.3.1
+13
dist/esm/DagreMap/components/card/index.css
@keyframes turnX {
0% {
transform: rotate(0deg);
}
0% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
}
.autoScroll {
.home {
position: relative;
}
}
+1
-0
import React from 'react';
import './index.css';
import { INode } from '../../interface';
declare const Card: React.FC<Partial<INode>>;
export default Card;
+63
-27

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

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

@@ -14,3 +20,3 @@

import React, { useState, useEffect } from 'react';
import styles from "./index.less";
import "./index.css";
import { ARROW_DIR } from "../../enum";

@@ -20,2 +26,39 @@ import loadingPng from "../../images/loading.png";

import { jsxs as _jsxs } from "react/jsx-runtime";
var lineStyle = {
position: 'absolute',
height: '1px',
backgroundColor: '#c7c7d7'
};
var circleStyle = {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
position: 'absolute',
boxSizing: 'border-box',
background: '#ffffff',
border: '1px solid #7f7f8e',
borderRadius: '50%',
textAlign: 'center',
fontSize: '12px',
cursor: 'pointer'
};
var loadingStyle = {
display: 'block',
width: '100%',
height: '100%',
transformOrigin: 'center',
animation: 'turnX 1s linear infinite'
};
var dreStyle = {
display: 'inline-block',
height: '1px',
background: '#7f7f8e'
};
var numStyle = {
fontSize: '12px',
display: 'inline-block',
transform: 'scale(0.8)',
transformOrigin: '50%',
letterSpacing: '-1px'
};

@@ -35,3 +78,3 @@ var Card = function Card(props) {

hideUp = info.hideUp,
hideDown = info.hideDown; // const {} = current;
hideDown = info.hideDown;

@@ -55,12 +98,10 @@ var _useState = useState(false),

return /*#__PURE__*/_jsxs("div", {
className: styles.card,
style: style,
children: [renderChild(info), rank > -1 && downLength !== 0 ? /*#__PURE__*/_jsxs("div", {
children: [/*#__PURE__*/_jsx("div", {
className: styles.dline,
style: {
style: _objectSpread({
left: width,
top: height / 2,
width: circleWidth
}
}, lineStyle)
}), /*#__PURE__*/_jsx("div", {

@@ -71,20 +112,18 @@ onClick: function onClick() {

},
style: {
style: _objectSpread({
width: 2 * circleWidth,
height: 2 * circleWidth,
left: width + circleWidth,
top: height / 2 - circleWidth // lineHeight: `${2 * circleWidth}px`,
},
className: "".concat(styles.down, " ").concat(styles.circle),
top: height / 2 - circleWidth
}, circleStyle),
children: hideDown ? loadingLeft ? /*#__PURE__*/_jsx("img", {
style: loadingStyle,
src: loadingPng
}) : /*#__PURE__*/_jsx("span", {
className: styles.num,
style: numStyle,
children: downLength
}) : /*#__PURE__*/_jsx("span", {
style: {
style: _objectSpread({
width: circleWidth
},
className: styles.dre
}, dreStyle)
})

@@ -94,8 +133,7 @@ })]

children: [/*#__PURE__*/_jsx("div", {
style: {
style: _objectSpread({
left: -circleWidth,
top: height / 2,
width: circleWidth
},
className: styles.uline
}, lineStyle)
}), /*#__PURE__*/_jsx("div", {

@@ -106,20 +144,18 @@ onClick: function onClick() {

},
style: {
style: _objectSpread({
width: 2 * circleWidth,
height: 2 * circleWidth,
left: -3 * circleWidth,
top: height / 2 - circleWidth // lineHeight:`${2 * circleWidth}px`,
},
className: "".concat(styles.up, " ").concat(styles.circle),
top: height / 2 - circleWidth
}, circleStyle),
children: hideUp ? loadingRight ? /*#__PURE__*/_jsx("img", {
style: loadingStyle,
src: loadingPng
}) : /*#__PURE__*/_jsx("span", {
className: styles.num,
style: numStyle,
children: upLength
}) : /*#__PURE__*/_jsx("span", {
style: {
style: _objectSpread({
width: circleWidth
},
className: styles.dre
}, dreStyle)
})

@@ -126,0 +162,0 @@ })]

@@ -592,3 +592,5 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

width: NODE_WIDTH,
height: NODE_HEIGHT
height: NODE_HEIGHT,
position: 'absolute',
boxSizing: 'border-box'
},

@@ -595,0 +597,0 @@ renderChild: renderChild,

{
"name": "react-dagre-map-v2",
"version": "1.3.0",
"version": "1.3.1",
"author": "1047664386@qq.com",

@@ -5,0 +5,0 @@ "scripts": {

@link: rgb(24, 144, 255);
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.card {
position: absolute;
// width: 340px;
// height: 124px;
// padding: 12px;
// background: #ffffff;
/* 阴影/1级 */
// box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
// border-radius: 4px;
box-sizing: border-box;
// transition:left linear 0.2s;
// animation: fadeIn 0.2s;
.dline {
position: absolute;
// left: 340px;
// top: 62px;
height: 1px;
// width: 8px;
background-color: #c7c7d7;
}
.uline {
position: absolute;
// left: -8px;
// top: 62px;
height: 1px;
// width: 8px;
background-color: #c7c7d7;
}
.circle {
box-sizing: border-box;
// width: 16px;
// height: 16px;
/* 中立色/NI-8(#FFFFFF) */
background: #ffffff;
/* 中立色/NI-3(#7F7F8E) */
border: 1px solid #7f7f8e;
border-radius: 50%;
// line-height: 14px;
text-align: center;
font-size: 12px;
cursor: pointer;
// overflow: hidden;
display:flex;
justify-content: center;
align-items: center;
img {
display: block;
width: 100%;
height: 100%;
transform-origin: center;
animation: turnX 1s linear infinite;
}
.dre {
display: inline-block;
height: 1px;
// width: 8px;
background: #7f7f8e;
// transform: translateY(-4px);
}
.num {
font-size: 12px;
display: inline-block;
transform: scale(0.8);
transform-origin: 50%;
letter-spacing: -1px;
}
}
@keyframes turnX {
0% {
transform: rotate(0deg);
}
0% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
}
.down {
position: absolute;
// left: 348px;
// top: 54px;
}
.up {
position: absolute;
// left: -24px;
// top: 54px;
}
}