Skip to content

Commit 622cb46

Browse files
authored
0.13.5. (#61)
1 parent 033427b commit 622cb46

24 files changed

+188
-66
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.13.5
2+
3+
We have added a third parameter, `definition`, to the step editor provider.
4+
5+
```js
6+
function stepEditorProvider(step, stepContext, definition) { /* ... */ }
7+
```
8+
19
## 0.13.4
210

311
The `getStepParents` method of the `Designer` class supports now a step id as an argument. It is possible to get parents of a step by its id. The method still supports a step object or a sequence as an argument.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ Add the below code to your head section in HTML document.
9090
```html
9191
<head>
9292
...
93-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.4/css/designer.css" rel="stylesheet">
94-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.4/css/designer-light.css" rel="stylesheet">
95-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.4/css/designer-dark.css" rel="stylesheet">
96-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.4/dist/index.umd.js"></script>
93+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.5/css/designer.css" rel="stylesheet">
94+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.5/css/designer-light.css" rel="stylesheet">
95+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.5/css/designer-dark.css" rel="stylesheet">
96+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.5/dist/index.umd.js"></script>
9797
```
9898

9999
Call the designer by:
@@ -186,7 +186,7 @@ const configuration = {
186186
// ...
187187
return editor;
188188
},
189-
stepEditorProvider: (step, stepContext) => {
189+
stepEditorProvider: (step, stepContext, definition) => {
190190
const editor = document.createElement('div');
191191
// ...
192192
return editor;

angular/designer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Create a template for the step editor. The value of the `editor` variable implem
135135
```ts
136136
interface StepEditorWrapper {
137137
step: Step;
138+
definition: Definition;
138139
context: StepEditorContext;
139140
}
140141
```

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.13.4",
4+
"version": "0.13.5",
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.13.4"
18+
"sequential-workflow-designer": "^0.13.5"
1919
},
2020
"dependencies": {
2121
"tslib": "^2.3.0"

angular/designer/src/designer.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export interface GlobalEditorWrapper {
3232

3333
export interface StepEditorWrapper {
3434
step: Step;
35+
definition: Definition;
3536
context: StepEditorContext;
3637
}
3738

@@ -163,12 +164,13 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
163164
});
164165
};
165166

166-
private readonly stepEditorProvider = (step: Step, context: StepEditorContext) => {
167+
private readonly stepEditorProvider = (step: Step, context: StepEditorContext, definition: Definition) => {
167168
if (!this.stepEditor) {
168169
throw new Error('Input "stepEditor" is not set');
169170
}
170171
return this.editorProvider<StepEditorWrapper>(this.stepEditor, {
171172
step,
173+
definition,
172174
context
173175
});
174176
};

demos/angular-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"@angular/platform-browser-dynamic": "^15.2.2",
2525
"@angular/router": "^15.2.2",
2626
"rxjs": "~7.8.0",
27-
"sequential-workflow-designer": "^0.13.4",
28-
"sequential-workflow-designer-angular": "^0.13.4",
27+
"sequential-workflow-designer": "^0.13.5",
28+
"sequential-workflow-designer-angular": "^0.13.5",
2929
"tslib": "^2.3.0",
3030
"zone.js": "~0.13.0"
3131
},

demos/angular-app/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5180,17 +5180,17 @@ send@0.18.0:
51805180
range-parser "~1.2.1"
51815181
statuses "2.0.1"
51825182

5183-
sequential-workflow-designer-angular@^0.13.4:
5184-
version "0.13.4"
5185-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.13.4.tgz#99921f1cff60ab9d2e31b2f01af9706335d534eb"
5186-
integrity sha512-w/N6JdX0SxaYnlVyze8O7CNj/dmHnhOHjFwgtzx9I7YTsqfdg2IRIY/bmWo3Wf61L4m3YS4z84ugMFLrWHp10g==
5183+
sequential-workflow-designer-angular@^0.13.5:
5184+
version "0.13.5"
5185+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.13.5.tgz#67b50f31ab17aa553246bb284fb3be09ae5b11da"
5186+
integrity sha512-XkKq58tzzo6wt7Z/Mf7JBU4dLP9WgFlINzwwodJ5Ac2A1cIpPlNJ1Xsulqk0Sw2/3iUG/RxYE6G2UHABU+yfqQ==
51875187
dependencies:
51885188
tslib "^2.3.0"
51895189

5190-
sequential-workflow-designer@^0.13.4:
5191-
version "0.13.4"
5192-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.13.4.tgz#bd4c7ba1fe4b6408ce12fe9fcf4df81bd0e98e6c"
5193-
integrity sha512-wKbV1hgr8VFVEC7z0sQfMT1VUTUyZ2tbLBxQs5VBAD/FS5UVgeQrVf0iuUD2+WvRSaQ1pADfKBJuJ7JJkb/wow==
5190+
sequential-workflow-designer@^0.13.5:
5191+
version "0.13.5"
5192+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.13.5.tgz#9e0485d233d890c03675e0a59057eba8abd4e09d"
5193+
integrity sha512-MyG/p7EF+AskWsEHRXt3hSYfJNr5SEmQfUDHqT1Oqt7jBJb4RH6E+nD7XwiPwZ0HMJRIlMX6jiC6eV/Ieq/AXQ==
51945194
dependencies:
51955195
sequential-workflow-model "^0.1.4"
51965196

demos/react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"dependencies": {
66
"react": "^18.2.0",
77
"react-dom": "^18.2.0",
8-
"sequential-workflow-designer": "^0.13.4",
9-
"sequential-workflow-designer-react": "^0.13.4"
8+
"sequential-workflow-designer": "^0.13.5",
9+
"sequential-workflow-designer-react": "^0.13.5"
1010
},
1111
"devDependencies": {
1212
"@types/jest": "^29.2.5",

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.13.4",
4+
"version": "0.13.5",
55
"type": "module",
66
"main": "./lib/esm/index.js",
77
"types": "./lib/index.d.ts",

designer/src/designer-configuration.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export type RootValidator = (definition: Definition) => boolean;
142142

143143
export interface EditorsConfiguration<TDefinition extends Definition = Definition> {
144144
isCollapsed?: boolean;
145-
stepEditorProvider: StepEditorProvider;
145+
stepEditorProvider: StepEditorProvider<TDefinition>;
146146
globalEditorProvider: GlobalEditorProvider<TDefinition>;
147147
}
148148

@@ -152,7 +152,11 @@ export interface StepEditorContext {
152152
notifyChildrenChanged(): void;
153153
}
154154

155-
export type StepEditorProvider = (step: Step, context: StepEditorContext) => HTMLElement;
155+
export type StepEditorProvider<TDefinition extends Definition = Definition> = (
156+
step: Step,
157+
context: StepEditorContext,
158+
definition: TDefinition
159+
) => HTMLElement;
156160

157161
export interface GlobalEditorContext {
158162
notifyPropertiesChanged(): void;

0 commit comments

Comments
 (0)