
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
sequential-workflow-designer
Advanced tools
Customizable no-code component for building flow-based programming applications.
Sequential workflow designer with no dependencies for web. It's written in pure TypeScript and uses SVG for rendering. This designer is not associated with any workflow engine. It's full generic. You may create any kind application by this, from graphical programming languages to workflow designers.
Features:
🤩 Don't miss the pro version.
Pro:
To use the designer you should add JS/TS files and CSS files to your project.
Install this package by NPM command:
npm i sequential-workflow-designer
To import the package:
import { Designer } from 'sequential-workflow-designer';
If you use css-loader or similar, you can add CSS files to your bundle:
import 'sequential-workflow-designer/css/designer.css';
import 'sequential-workflow-designer/css/designer-light.css';
import 'sequential-workflow-designer/css/designer-dark.css';
To create the designer write the below code:
// ...
Designer.create(placeholder, definition, configuration);
Add the below code to your head section in HTML document.
<head>
...
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7.0/css/designer.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7.0/css/designer-light.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7.0/css/designer-dark.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7.0/dist/index.umd.js"></script>
Call the designer by:
sequentialWorkflowDesigner.Designer.create(placeholder, definition, configuration);
Check examples directory.
import { Designer } from 'sequential-workflow-designer';
const placeholder = document.getElementById('placeholder');
const definition = {
properties: {
'myProperty': 'my-value',
// global properties...
},
sequence: [
// root steps...
]
};
const configuration = {
theme: 'light', // optional, default: 'light'
isReadonly: false, // optional, default: false
undoStackSize: 10, // optional, default: 0 - disabled, 1+ - enabled
toolbox: {
isHidden: false, // optional, default: false
groups: [
{
name: 'Files',
steps: [
// steps for the toolbox's group
]
},
{
name: 'Notification',
steps: [
// steps for the toolbox's group
]
}
]
},
steps: {
// all properties in this section are optional
iconUrlProvider: (componentType, type) => {
return `icon-${componentType}-${type}.svg`;
},
validator: (step, sourceSequence) => {
return /^[a-z]+$/.test(step.name);
},
isDraggable: (step, parentSequence) => {
return step.name !== 'y';
},
isDeletable: (step, parentSequence) => {
return step.properties['isDeletable'];
},
canInsertStep: (step, targetSequence, targetIndex) => {
return targetSequence.length < 5;
},
canMoveStep: (sourceSequence, step, targetSequence, targetIndex) => {
return !step.properties['isLocked'];
},
canDeleteStep: (step, parentSequence) => {
return step.name !== 'x';
}
},
editors: {
isHidden: false, // optional, default: false
globalEditorProvider: (definition, globalContext) => {
const editor = document.createElement('div');
// ...
return editor;
},
stepEditorProvider: (step, stepContext) => {
const editor = document.createElement('div');
// ...
return editor;
}
}
};
const designer = Designer.create(placeholder, definition, configuration);
designer.onDefinitionChanged.subscribe((newDefinition) => {
// ...
});
The designer doesn't provide editors for steps. Why? Because this part usually is strongly dependent on a project type. So you must create editors by your own and set them in the start configuration.
The designer supports two types of editors.
definition.properties
object.step.name
) and step's property values (step.properties
). Also, it can change children, but you must be careful and don't mix responsibilities.You need to notify the designer when your editor changes the definition. To do it you need to call one of the editor context methods.
const editorsConfiguration = {
globalEditorProvider: (definition, globalContext) => {
// ...
input.addEventListener('changed', () => {
definition.properties['a'] = newA;
globalContext.notifyPropertiesChanged();
});
// ...
},
stepEditorProvider: (step, stepContext) => {
// ...
input.addEventListener('changed', () => {
step.name = newName;
stepContext.notifyNameChanged();
step.properties['x'] = newX;
stepContext.notifyPropertiesChanged();
step.branches['newBranch'] = [];
stepContext.notifyChildrenChanged();
});
// ...
}
}
Any atomic task.
const taskStep = {
componentType: 'task',
id: 'my-unique-id',
type: 'my-type', // e.g. 'save-file', 'send-email', ...
name: 'my-name',
properties: {
'myProperty': 'my-value',
// ...
}
};
This component is mainly designed for for/while/foreach
loops. It could be used as a context container too.
const containerStep = {
componentType: 'container',
id: 'my-unique-id',
type: 'my-type', // e.g. 'for', 'while', 'foreach'...
name: 'my-name',
properties: {
'myProperty': 'my-value',
// ...
},
sequence: [
// steps...
]
};
This component is designed for if/else
expressions, but you may use it for switch/case
expressions too. This component must have minimum 2 branches.
const switchStep = {
componentType: 'switch',
id: 'my-unique-id',
type: 'my-type', // e.g. 'if', 'switch'...
name: 'my-name',
properties: {
'myProperty': 'my-value',
// ...
},
branches: {
'true': [
// steps...
],
'false': [
// steps...
],
// ...
'next': [
// steps...
]
}
};
This project is released under the MIT license.
0.7.0
step
and parentSequence
.isDraggable
and isDeletable
.StepContext
interface..sqd-step-start-stop*
CSS selectors to .sqd-root-start-stop*
.FAQs
Customizable no-code component for building flow-based programming applications.
The npm package sequential-workflow-designer receives a total of 0 weekly downloads. As such, sequential-workflow-designer popularity was classified as not popular.
We found that sequential-workflow-designer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.