Skip to content

Commit ba1f07e

Browse files
committed
0.28.0.
1 parent dccfe9e commit ba1f07e

File tree

19 files changed

+84
-60
lines changed

19 files changed

+84
-60
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/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
}

designer/src/behaviors/click-behavior-resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class ClickBehaviorResolver {
2121
return SelectStepBehavior.create(commandOrNull.component, forceMove, this.context);
2222

2323
case ClickCommandType.rerenderStep:
24-
return PressingBehavior.create(element, new RerenderStepPressingBehaviorHandler(this.context));
24+
return PressingBehavior.create(element, new RerenderStepPressingBehaviorHandler(commandOrNull, this.context));
2525

2626
case ClickCommandType.openFolder:
2727
return PressingBehavior.create(element, new OpenFolderPressingBehaviorHandler(commandOrNull, this.context));

0 commit comments

Comments
 (0)