Skip to content

Commit f215166

Browse files
authored
0.28.0. (#183)
1 parent dccfe9e commit f215166

File tree

20 files changed

+92
-68
lines changed

20 files changed

+92
-68
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.28.0
2+
3+
This update modifies the custom context menu in the pro version. The context menu items provider now retrieves the parent sequence of the selected workspace root sequence. If the root sequence is a folder sequence, the parent sequence is the folder sequence.
4+
15
# 0.27.4
26

37
Support for React 19 has been added.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ Add the below code to your head section in HTML document.
104104
```html
105105
<head>
106106
...
107-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.27.4/css/designer.css" rel="stylesheet">
108-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.27.4/css/designer-light.css" rel="stylesheet">
109-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.27.4/css/designer-dark.css" rel="stylesheet">
110-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.27.4/dist/index.umd.js"></script>
107+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.28.0/css/designer.css" rel="stylesheet">
108+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.28.0/css/designer-light.css" rel="stylesheet">
109+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.28.0/css/designer-dark.css" rel="stylesheet">
110+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.28.0/dist/index.umd.js"></script>
111111
```
112112

113113
Call the designer by:

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.27.4",
4+
"version": "0.28.0",
55
"author": {
66
"name": "NoCode JS",
77
"url": "https://nocode-js.com/"
@@ -15,7 +15,7 @@
1515
"peerDependencies": {
1616
"@angular/common": "12 - 19",
1717
"@angular/core": "12 - 19",
18-
"sequential-workflow-designer": "^0.27.4"
18+
"sequential-workflow-designer": "^0.28.0"
1919
},
2020
"dependencies": {
2121
"tslib": "^2.3.0"

demos/angular-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"@angular/platform-browser-dynamic": "^17.3.9",
2727
"@angular/router": "^17.3.9",
2828
"rxjs": "~7.8.0",
29-
"sequential-workflow-designer": "^0.27.4",
30-
"sequential-workflow-designer-angular": "^0.27.4",
29+
"sequential-workflow-designer": "^0.28.0",
30+
"sequential-workflow-designer-angular": "^0.28.0",
3131
"tslib": "^2.3.0",
3232
"zone.js": "~0.14.6"
3333
},

demos/angular-app/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6744,17 +6744,17 @@ send@0.18.0:
67446744
range-parser "~1.2.1"
67456745
statuses "2.0.1"
67466746

6747-
sequential-workflow-designer-angular@^0.27.4:
6748-
version "0.27.4"
6749-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.27.4.tgz#ef03a499b4db91429bf602d405bc137ee9f6d335"
6750-
integrity sha512-HUTb8dLTxcFyXcFAqAt++TjI2iwS0xPsVSF0t1Wi5z77e+yP2tlzpcq/NqPTvs1/C2udoMcq/pk9Tezln2GCfA==
6747+
sequential-workflow-designer-angular@^0.28.0:
6748+
version "0.28.0"
6749+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.28.0.tgz#6748b69c5b626424e9d2f1a47686daa825ce7981"
6750+
integrity sha512-bSTGD3kh+7BCIPAMvDWipuUaoUv3G0RmdZiaQM7cE1f9P27HNQQueOr1nVRJmUbClE/2gW9+96n8VEpTtZ59xQ==
67516751
dependencies:
67526752
tslib "^2.3.0"
67536753

6754-
sequential-workflow-designer@^0.27.4:
6755-
version "0.27.4"
6756-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.27.4.tgz#84e3d075229d1a3fe93f1913ab44212e66a8f0fb"
6757-
integrity sha512-OZr0IjbfTDfXidfe5hTPAGtisc4Q0idDoanAoBf+lKU2Dc7mzclp1EUrE5KP2IBbi8BofwGJIJdVwWQVOVwgkA==
6754+
sequential-workflow-designer@^0.28.0:
6755+
version "0.28.0"
6756+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.28.0.tgz#b6fd72abf9ec00eab2b8633fe34f7f456b32dbf4"
6757+
integrity sha512-GEUERe8giyx/D9hsA+YG+LjescdLPBLs+yydHQ5UnGtXzl8784eUmPqqdGg/AnzsoEB5G+LIcgShoFMLVBYq+A==
67586758
dependencies:
67596759
sequential-workflow-model "^0.2.0"
67606760

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.27.4",
10-
"sequential-workflow-designer-react": "^0.27.4"
9+
"sequential-workflow-designer": "^0.28.0",
10+
"sequential-workflow-designer-react": "^0.28.0"
1111
},
1212
"devDependencies": {
1313
"@types/jest": "^29.2.5",

demos/svelte-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"eslint": "eslint ./src --ext .ts"
1717
},
1818
"dependencies": {
19-
"sequential-workflow-designer": "^0.27.4",
20-
"sequential-workflow-designer-svelte": "^0.27.4"
19+
"sequential-workflow-designer": "^0.28.0",
20+
"sequential-workflow-designer-svelte": "^0.28.0"
2121
},
2222
"devDependencies": {
2323
"@sveltejs/adapter-static": "^2.0.3",

designer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sequential-workflow-designer",
33
"description": "Customizable no-code component for building flow-based programming applications.",
4-
"version": "0.27.4",
4+
"version": "0.28.0",
55
"type": "module",
66
"main": "./lib/esm/index.js",
77
"types": "./lib/index.d.ts",

designer/src/api/designer-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { I18n } from '../designer-configuration';
1111

1212
export class DesignerApi {
1313
public static create(context: DesignerContext): DesignerApi {
14-
const workspace = new WorkspaceApi(context.state, context.workspaceController);
14+
const workspace = new WorkspaceApi(context.state, context.definitionWalker, context.workspaceController);
1515
const viewportController = context.services.viewportController.create(workspace);
1616
const toolboxDataProvider = new ToolboxDataProvider(
1717
context.componentContext.iconProvider,

designer/src/api/workspace-api.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DefinitionWalker, Sequence, StepChildrenType, StepWithParentSequence } from 'sequential-workflow-model';
12
import { Vector } from '../core';
23
import { Viewport } from '../designer-extension';
34
import { DesignerState } from '../designer-state';
@@ -6,6 +7,7 @@ import { WorkspaceControllerWrapper } from '../workspace/workspace-controller';
67
export class WorkspaceApi {
78
public constructor(
89
private readonly state: DesignerState,
10+
private readonly definitionWalker: DefinitionWalker,
911
private readonly workspaceController: WorkspaceControllerWrapper
1012
) {}
1113

@@ -40,4 +42,28 @@ export class WorkspaceApi {
4042
public updateCanvasSize() {
4143
this.workspaceController.updateCanvasSize();
4244
}
45+
46+
public getRootSequence(): WorkspaceRootSequence {
47+
const stepId = this.state.tryGetLastStepIdFromFolderPath();
48+
if (stepId) {
49+
const parentStep = this.definitionWalker.getParentSequence(this.state.definition, stepId);
50+
const children = this.definitionWalker.getChildren(parentStep.step);
51+
if (!children || children.type !== StepChildrenType.sequence) {
52+
throw new Error('Cannot find single sequence in folder step');
53+
}
54+
return {
55+
sequence: children.items as Sequence,
56+
parentStep
57+
};
58+
}
59+
return {
60+
sequence: this.state.definition.sequence,
61+
parentStep: null
62+
};
63+
}
64+
}
65+
66+
export interface WorkspaceRootSequence {
67+
sequence: Sequence;
68+
parentStep: StepWithParentSequence | null;
4369
}

0 commit comments

Comments
 (0)