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

nflow-vis

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nflow-vis - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

4

package.json
{
"name": "nflow-vis",
"version": "0.1.6",
"version": "0.1.7",
"description": "d3 visualisation for nflow",

@@ -9,3 +9,3 @@ "main": "dist/nflow-vis.js",

"devDependencies": {
"nflow": "^0.2.2",
"nflow": "^0.2.3",
"highlight.js": "^9.3.0",

@@ -12,0 +12,0 @@ "split.js": "^1.0.6",

@@ -13,2 +13,3 @@ import './inspector.scss'

d3dom:null,
selectedNode:null
})

@@ -56,3 +57,5 @@ //.call(Nodes)

d.d3dom.select('.status').text(e.f.status)
d.d3dom.select('.version').text(e.f.version)
d.d3dom.select('.parent').text((!e.f.isUnparented && e.f.parent && e.f.parent.name!=null)?e.f.parent.name: 'DETACHED')
//data

@@ -69,3 +72,3 @@ let datum = e.f.data!=null?JSON.stringify(JSON.parse(e.f.data), null, ' '):''

.data(Object.keys(e.f.listeners||{}))
let dl = listeners.enter()

@@ -82,3 +85,2 @@ .append('dl')

console.log(e.f)

@@ -125,2 +127,3 @@ // recipents

childNodes.select('dd').text(d=>d.status)
childNodes.classed('is-unparented',d=>d.isUnparented)

@@ -127,0 +130,0 @@

@@ -57,3 +57,3 @@ import {RADIUS} from '../utils/paths'

.classed('is-flow', d=>d.target.f.isEvent)
.classed('is-removed', d=>d.target.f.isRemoved)
.classed('is-removed', d=>d.target.f.isUnparented)
.classed('is-cancelled', d=>utils.parentCancelled(d.target))

@@ -60,0 +60,0 @@ // Transition exiting nodes to the parent's new position.

@@ -15,3 +15,4 @@ import nflow from 'nflow'

hidden:true,
listeners:[]
listeners:[],
isRoot:true
},

@@ -18,0 +19,0 @@ nodeMap: {}

import nflow from 'nflow'
var actions = {}
let noop = ()=>{}
export default (parent)=>{

@@ -16,3 +16,2 @@ var f = nflow.create('actions')

if (actions[name]) {
console.log(name, data)
actions[name](s, ...data)

@@ -92,2 +91,3 @@ updateProps(s, ...data)

e.isEvent = true;
e.isUnparented = true
updateHash(e)

@@ -125,12 +125,17 @@ }

actions.parent = actions.parented = (s, f, newParent, oldParent)=>{
actions.parented =noop;
actions.parent = (s, f, newParent, oldParent)=>{
var e = s.nodeMap[f.guid]
if (!e) return
e.isRemoved = newParent==null
updateHash(e)
// remove child from old parent
var oldP = e.parent
if (oldP && newParent) { // fix this, introduce ownership
console.log(oldP)
oldP.children = oldP.children.filter(n=>n.guid!=f.guid)
var newP = newParent && s.nodeMap[newParent.guid]
if (oldP) {
// move ownership
if (newP) {
oldP.children = oldP.children.filter(n=>n.guid!=f.guid)
}
updateHash(oldP)

@@ -140,3 +145,2 @@ }

// add to new parent
var newP = newParent && s.nodeMap[newParent.guid]
if (newP) {

@@ -148,3 +152,3 @@ newP.children = newP.children || [];

}
else e.parent = null
e.isUnparented = !newP
}

@@ -151,0 +155,0 @@

@@ -101,3 +101,2 @@ import './tree.scss'

node.displayName = node.f.name
if (node.f.version) node.displayName += `(${node.f.version})`
node.recurring = false

@@ -104,0 +103,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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