0.0.3 • Published 12 months ago

@denysvuika/ng-bpmn v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Angular BPMN

Standalone BPMN components for your Angular applications.

Getting Started

Install the dependency:

npm i @DenysVuika/ng-bpmn

BPMN

<ng-bpmn [url]="diagramUrl" />

default

Keyboard Hotkeys

<ng-bpmn [url]="diagramUrl" [hotkeys]="true" />

Supported hotkeys:

KeysMacOSAction
Ctrl+aCommand+aselect all
eedirect editing
hhhand tool
lllasso tool
ssspace tool
ccglobal connect tool
Ctrl+=Command+=zoom in
Ctrl+-Command+-zoom out
Ctrl+0Command+0reset zoom
Ctrl+9Command+9zoom to fit
Ctrl+zCommand+zundo
Ctrl+Shift+zCommand+Shift+zredo
BackspaceBackspaceremove selection
Ctrl+cCommand+ccopy selection
Ctrl+vCommand+vpaste
Ctrl+xCommand+xcut selection
Ctrl+fCommand+ffind

Invoking Component API

You can get the reference to the ng-bpmn component, and pass to the underlying application code.

For the sake of simplicity, some of the code was omitted.

app.component.html

<ng-bpmn #bpmn [url]="diagramUrl" />
<button (click)="exportSVG(bpmn)">Export SVG</button>

app.component.ts

import { saveAs } from 'file-saver';

export class AppComponent {
  exportSVG(bpmnComponent: NgBpmnComponent) {
    bpmnComponent.saveXML().then((content) => {
      if (content) {
        const blob = new Blob([content]);
        saveAs(blob, 'diagram.xml');
      }
    });
  }
}

Properties Panel

<ng-bpmn [url]="diagramUrl" [showProperties]="true" />

properties panel

Minimap

<ng-bpmn [url]="diagramUrl" [showProperties]="true" [showMinimap]="true" />

minimap

DMN

<ng-dmn [url]="diagramUrl" />

Properties Panel

<ng-dmn [url]="diagramUrl" [showProperties]="true" />

Keyboard Hotkeys

<ng-dmn [url]="diagramUrl" [hotkeys]="true" />

Supported hotkeys:

KeysMacOSAction
Ctrl+aCommand+aselect all
eedirect editing
hhhand tool
lllasso tool
Ctrl+=Command+=zoom in
Ctrl+-Command+-zoom out
Ctrl+0Command+0reset zoom
Ctrl+9Command+9zoom to fit
Ctrl+zCommand+zundo
Ctrl+Shift+zCommand+Shift+zredo
BackspaceBackspaceremove selection

CMMN

<ng-cmmn [url]="diagramUrl" />

Properties Panel

<ng-cmmn [url]="diagramUrl" [showProperties]="true" />

Keyboard Hotkeys

<ng-cmmn [url]="diagramUrl" [hotkeys]="true" />

Supported hotkeys:

KeysMacOSAction
Ctrl+aCommand+aselect all
eedirect editing
hhhand tool
lllasso tool
ccglobal connect tool
Ctrl+=Command+=zoom in
Ctrl+-Command+-zoom out
Ctrl+0Command+0reset zoom
Ctrl+9Command+9zoom to fit
Ctrl+zCommand+zundo
Ctrl+Shift+zCommand+Shift+zredo
BackspaceBackspaceremove selection
Ctrl+fCommand+ffind