Skip to content

Commit 233073a

Browse files
authored
0.14.1. (#69)
1 parent f6e889c commit 233073a

File tree

15 files changed

+72
-30
lines changed

15 files changed

+72
-30
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.14.1
2+
3+
This version includes the ability to hide the context menu for Angular and React packages.
4+
5+
```tsx
6+
// React
7+
<SequentialWorkflowDesigner contextMenu={false} ... />
8+
```
9+
10+
```html
11+
<!-- Angular -->
12+
<sqd-designer [contextMenu]="false" ...></sqd-designer>
13+
```
14+
15+
🌟 The pro version introduces the loading badge. Check the [badges example](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/badges.html).
16+
117
## 0.14.0
218

319
This version introduces the context menu, providing a new and interactive way to engage with the designer. If you want, you can disable this feature using the `contextMenu` property in the configuration.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Sequential Workflow Designer
44

5-
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fb4rtaz%2Fsequential-workflow-designer%2Fbadge%3Fref%3Dmain&style=flat-square)](https://actions-badge.atrox.dev/b4rtaz/sequential-workflow-designer/goto?ref=main) [![License: MIT](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](/LICENSE) [![View this project on NPM](https://img.shields.io/npm/v/sequential-workflow-designer.svg?style=flat-square)](https://npmjs.org/package/sequential-workflow-designer)
5+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fb4rtaz%2Fsequential-workflow-designer%2Fbadge%3Fref%3Dmain&style=flat-square)](https://actions-badge.atrox.dev/b4rtaz/sequential-workflow-designer/goto?ref=main) [![License: MIT](https://img.shields.io/badge/license-MIT-green?style=flat-square)](/LICENSE) [![View this project on NPM](https://img.shields.io/npm/v/sequential-workflow-designer.svg?style=flat-square)](https://npmjs.org/package/sequential-workflow-designer)
66

77
Sequential workflow designer with 0 external 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 builders.
88

@@ -93,10 +93,10 @@ Add the below code to your head section in HTML document.
9393
```html
9494
<head>
9595
...
96-
<link href="https://cdn.jsdelivr.net/npm/[email protected].0/css/designer.css" rel="stylesheet">
97-
<link href="https://cdn.jsdelivr.net/npm/[email protected].0/css/designer-light.css" rel="stylesheet">
98-
<link href="https://cdn.jsdelivr.net/npm/[email protected].0/css/designer-dark.css" rel="stylesheet">
99-
<script src="https://cdn.jsdelivr.net/npm/[email protected].0/dist/index.umd.js"></script>
96+
<link href="https://cdn.jsdelivr.net/npm/[email protected].1/css/designer.css" rel="stylesheet">
97+
<link href="https://cdn.jsdelivr.net/npm/[email protected].1/css/designer-light.css" rel="stylesheet">
98+
<link href="https://cdn.jsdelivr.net/npm/[email protected].1/css/designer-dark.css" rel="stylesheet">
99+
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/dist/index.umd.js"></script>
100100
```
101101

102102
Call the designer by:

angular/designer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Sequential Workflow Designer for Angular
44

5-
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fb4rtaz%2Fsequential-workflow-designer%2Fbadge%3Fref%3Dmain&style=flat-square)](https://actions-badge.atrox.dev/b4rtaz/sequential-workflow-designer/goto?ref=main) [![License: MIT](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](/LICENSE) [![View this project on NPM](https://img.shields.io/npm/v/sequential-workflow-designer-angular.svg?style=flat-square)](https://npmjs.org/package/sequential-workflow-designer-angular)
5+
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fb4rtaz%2Fsequential-workflow-designer%2Fbadge%3Fref%3Dmain&style=flat-square)](https://actions-badge.atrox.dev/b4rtaz/sequential-workflow-designer/goto?ref=main) [![License: MIT](https://img.shields.io/badge/license-MIT-green?style=flat-square)](/LICENSE) [![View this project on NPM](https://img.shields.io/npm/v/sequential-workflow-designer-angular.svg?style=flat-square)](https://npmjs.org/package/sequential-workflow-designer-angular)
66

77
Angular wrapper for the [Sequential Workflow Designer](https://github.com/nocode-js/sequential-workflow-designer) component.
88

@@ -151,6 +151,7 @@ At the end attach the designer:
151151
[stepsConfiguration]="stepsConfiguration"
152152
[validatorConfiguration]="validatorConfiguration"
153153
[controlBar]="true"
154+
[contextMenu]="true"
154155
[areEditorsHidden]="false"
155156
[globalEditor]="globalEditor"
156157
[stepEditor]="stepEditor"

angular/designer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sequential-workflow-designer-angular",
33
"description": "Angular wrapper for Sequential Workflow Designer component.",
4-
"version": "0.14.0",
4+
"version": "0.14.1",
55
"author": {
66
"name": "NoCode JS",
77
"url": "https://nocode-js.com/"
@@ -15,7 +15,7 @@
1515
"peerDependencies": {
1616
"@angular/common": "12 - 16",
1717
"@angular/core": "12 - 16",
18-
"sequential-workflow-designer": "^0.14.0"
18+
"sequential-workflow-designer": "^0.14.1"
1919
},
2020
"dependencies": {
2121
"tslib": "^2.3.0"

angular/designer/src/designer.component.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ import {
1919
Designer,
2020
DesignerExtension,
2121
GlobalEditorContext,
22+
GlobalEditorProvider,
2223
Step,
2324
StepEditorContext,
25+
StepEditorProvider,
2426
StepsConfiguration,
2527
ToolboxConfiguration,
2628
ValidatorConfiguration
@@ -64,14 +66,16 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
6466
public toolboxConfiguration?: AngularToolboxConfiguration | false;
6567
@Input('controlBar')
6668
public controlBar?: boolean;
69+
@Input('contextMenu')
70+
public contextMenu?: boolean;
6771
@Input('extensions')
6872
public extensions?: DesignerExtension[];
6973
@Input('areEditorsHidden')
7074
public areEditorsHidden?: boolean;
7175
@Input('globalEditor')
72-
public globalEditor?: TemplateRef<unknown>;
76+
public globalEditor?: TemplateRef<unknown> | GlobalEditorProvider;
7377
@Input('stepEditor')
74-
public stepEditor?: TemplateRef<unknown>;
78+
public stepEditor?: TemplateRef<unknown> | StepEditorProvider;
7579

7680
@Output()
7781
public readonly onReady = new EventEmitter<Designer>();
@@ -140,6 +144,7 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
140144
validator: this.validatorConfiguration,
141145
toolbox: this.toolboxConfiguration,
142146
controlBar: this.controlBar,
147+
contextMenu: this.contextMenu,
143148
extensions: this.extensions
144149
});
145150
designer.onReady.subscribe(() => {
@@ -160,6 +165,9 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
160165
if (!this.globalEditor) {
161166
throw new Error('Input "globalEditor" is not set');
162167
}
168+
if (typeof this.globalEditor === 'function') {
169+
return this.globalEditor(definition, context);
170+
}
163171
return this.editorProvider<GlobalEditorWrapper>(this.globalEditor, {
164172
definition,
165173
context
@@ -170,6 +178,9 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
170178
if (!this.stepEditor) {
171179
throw new Error('Input "stepEditor" is not set');
172180
}
181+
if (typeof this.stepEditor === 'function') {
182+
return this.stepEditor(step, context, definition);
183+
}
173184
return this.editorProvider<StepEditorWrapper>(this.stepEditor, {
174185
step,
175186
definition,

demos/angular-app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
"private": true,
1717
"dependencies": {
1818
"@angular/animations": "^15.2.9",
19+
"@angular/cdk": "15.2.9",
1920
"@angular/common": "^15.2.9",
2021
"@angular/compiler": "^15.2.9",
2122
"@angular/core": "^15.2.9",
2223
"@angular/forms": "^15.2.9",
23-
"@angular/cdk": "15.2.9",
2424
"@angular/material": "15.2.9",
2525
"@angular/platform-browser": "^15.2.9",
2626
"@angular/platform-browser-dynamic": "^15.2.9",
2727
"@angular/router": "^15.2.9",
2828
"rxjs": "~7.8.0",
29-
"sequential-workflow-designer": "^0.14.0",
30-
"sequential-workflow-designer-angular": "^0.14.0",
29+
"sequential-workflow-designer": "^0.14.1",
30+
"sequential-workflow-designer-angular": "^0.14.1",
3131
"tslib": "^2.3.0",
3232
"zone.js": "~0.13.0"
3333
},
@@ -45,4 +45,4 @@
4545
"prettier": "^2.8.4",
4646
"typescript": "~4.9.5"
4747
}
48-
}
48+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fs = require('fs');
2+
3+
const json = JSON.parse(fs.readFileSync('../package.json', 'utf8'));
4+
json['dependencies']['sequential-workflow-designer'] = 'file:../../designer';
5+
json['dependencies']['sequential-workflow-designer-angular'] = 'file:../../angular/designer-dist';
6+
7+
fs.writeFileSync('../package.json', JSON.stringify(json, null, '\t'), 'utf8');

demos/angular-app/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5956,17 +5956,17 @@ [email protected]:
59565956
range-parser "~1.2.1"
59575957
statuses "2.0.1"
59585958

5959-
sequential-workflow-designer-angular@^0.14.0:
5960-
version "0.14.0"
5961-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.14.0.tgz#64d0d479a71f7fb05bd61afa5c44310b9f19c74a"
5962-
integrity sha512-qFkyBn8YSgcLQLVlhrh5Doue4rnJsnZqbJN/ZhUXP79yhKGRj6J7uxc9X8W5AKooGCUjAKahviongUJyFgj7Hw==
5959+
sequential-workflow-designer-angular@^0.14.1:
5960+
version "0.14.1"
5961+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.14.1.tgz#fdfb90516e74ea1c2924ec9f6f623f682129b3ba"
5962+
integrity sha512-7HPxGo5VN/bODMcSnx5nbfnCvAIHSghunlhHVkA0aPTCR29FcaoLo6PJ0ORxSR9V7EMlXY9dx+8UJZxn4wXjcg==
59635963
dependencies:
59645964
tslib "^2.3.0"
59655965

5966-
sequential-workflow-designer@^0.14.0:
5967-
version "0.14.0"
5968-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.14.0.tgz#6866785bc1bb44d8f69a8a3c39d62671e6b4afaa"
5969-
integrity sha512-sYqDMbNbHx89zaaRooFrFkpsDNszVtKqSUqxnFcue+y9++QNfauyaFaZ8q4l4vjy6Ojd7aFGEEeu76r87E5nNQ==
5966+
sequential-workflow-designer@^0.14.1:
5967+
version "0.14.1"
5968+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.14.1.tgz#1f7f5b2a1c4a337044e77eaef36fe1333ba22c4b"
5969+
integrity sha512-wPgNKnl/4q4QMbYqn19O9On6eYf/MXzityXAFmzo/WQBAl6RJhclY4LmL8HxotdkcGSQznW80E3gOpNERZCdLw==
59705970
dependencies:
59715971
sequential-workflow-model "^0.2.0"
59725972

demos/react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"dependencies": {
77
"react": "^18.2.0",
88
"react-dom": "^18.2.0",
9-
"sequential-workflow-designer": "^0.14.0",
10-
"sequential-workflow-designer-react": "^0.14.0"
9+
"sequential-workflow-designer": "^0.14.1",
10+
"sequential-workflow-designer-react": "^0.14.1"
1111
},
1212
"devDependencies": {
1313
"@types/jest": "^29.2.5",

demos/react-app/src/nativeEditors/NativeEditors.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function NativeEditors() {
4747
toolboxConfiguration={false}
4848
stepsConfiguration={{}}
4949
controlBar={true}
50+
contextMenu={true}
5051
globalEditor={globalEditorProvider}
5152
stepEditor={stepEditorProvider}
5253
/>

0 commit comments

Comments
 (0)