Skip to content

Commit 033427b

Browse files
authored
0.13.4. (#57)
1 parent 30fa065 commit 033427b

File tree

13 files changed

+64
-39
lines changed

13 files changed

+64
-39
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.4
2+
3+
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.
4+
5+
```js
6+
designer.getStepParents('eb4f481ee1b90c6e3fc9b42dd010d2a5');
7+
```
8+
19
## 0.13.3
210

311
This version introduces 4 new features:

README.md

Lines changed: 4 additions & 4 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.3/css/designer.css" rel="stylesheet">
94-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.3/css/designer-light.css" rel="stylesheet">
95-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.3/css/designer-dark.css" rel="stylesheet">
96-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.3/dist/index.umd.js"></script>
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>
9797
```
9898

9999
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.13.3",
4+
"version": "0.13.4",
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.3"
18+
"sequential-workflow-designer": "^0.13.4"
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
@@ -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.3",
28-
"sequential-workflow-designer-angular": "^0.13.3",
27+
"sequential-workflow-designer": "^0.13.4",
28+
"sequential-workflow-designer-angular": "^0.13.4",
2929
"tslib": "^2.3.0",
3030
"zone.js": "~0.13.0"
3131
},

demos/angular-app/yarn.lock

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

5183-
sequential-workflow-designer-angular@^0.13.3:
5184-
version "0.13.3"
5185-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.13.3.tgz#66922b823e1f5fd60cbe32ec8e3bc31d500c0237"
5186-
integrity sha512-e6vkxzHxydVOoNKP7qmY1bkKxZTi4WcZKJMx/uIJ8UtyOZGAk1VNUysQM1D+5Ss6eiQU8r/rr9WFtCiie9CAcA==
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==
51875187
dependencies:
51885188
tslib "^2.3.0"
51895189

5190-
sequential-workflow-designer@^0.13.3:
5191-
version "0.13.3"
5192-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.13.3.tgz#c4edbb3ae1386503f79571ad6212ef064d4547f7"
5193-
integrity sha512-l31MUXwGrNrZWWDHKs90iU7sLSZ1D0iB1ztFlTTJ7X5QqunzAB/BRb25USUo3tcHnAGdZnYN/CN26NmcAOBOfQ==
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==
51945194
dependencies:
5195-
sequential-workflow-model "^0.1.3"
5195+
sequential-workflow-model "^0.1.4"
51965196

5197-
sequential-workflow-model@^0.1.3:
5198-
version "0.1.3"
5199-
resolved "https://registry.yarnpkg.com/sequential-workflow-model/-/sequential-workflow-model-0.1.3.tgz#c957f73a22d105e1154636cf8247772f53ed0d03"
5200-
integrity sha512-Z8aIDHMKurjHK5CIoUW+eE0tthcvf2yvxERsODMMYl7MbyL14ONYvDUzH2G3bVUge1HDgKVa2w2CYEEdilz0AA==
5197+
sequential-workflow-model@^0.1.4:
5198+
version "0.1.4"
5199+
resolved "https://registry.yarnpkg.com/sequential-workflow-model/-/sequential-workflow-model-0.1.4.tgz#fcda9b0d802c00668ff1cd4860bf5c9141cfe788"
5200+
integrity sha512-z44I8CQqP51sO7gHqH0/7GjmBOt2yczmmEGdRdJaczogDtZ1E6kucLkcvA4LugXFFuxTilYldY7NKFFTK+XWDA==
52015201

52025202
serialize-javascript@^6.0.0, serialize-javascript@^6.0.1:
52035203
version "6.0.1"

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.3",
9-
"sequential-workflow-designer-react": "^0.13.3"
8+
"sequential-workflow-designer": "^0.13.4",
9+
"sequential-workflow-designer-react": "^0.13.4"
1010
},
1111
"devDependencies": {
1212
"@types/jest": "^29.2.5",

designer/package.json

Lines changed: 3 additions & 3 deletions
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.3",
4+
"version": "0.13.4",
55
"type": "module",
66
"main": "./lib/esm/index.js",
77
"types": "./lib/index.d.ts",
@@ -57,10 +57,10 @@
5757
"prettier:fix": "prettier --write ./src"
5858
},
5959
"dependencies": {
60-
"sequential-workflow-model": "^0.1.3"
60+
"sequential-workflow-model": "^0.1.4"
6161
},
6262
"peerDependencies": {
63-
"sequential-workflow-model": "^0.1.3"
63+
"sequential-workflow-model": "^0.1.4"
6464
},
6565
"devDependencies": {
6666
"@rollup/plugin-node-resolve": "^15.0.1",

designer/src/designer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ export class Designer<TDefinition extends Definition = Definition> {
199199
}
200200

201201
/**
202-
* @returns parent steps and branch names of the passed step or the passed sequence.
202+
* @param needle A step, a sequence or a step id.
203+
* @returns parent steps and branch names.
203204
*/
204-
public getStepParents(needle: Sequence | Step): StepOrName[] {
205+
public getStepParents(needle: Sequence | Step | string): StepOrName[] {
205206
return this.walker.getParents(this.state.definition, needle);
206207
}
207208

examples/assets/fullscreen.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ function reloadChangeReadonlyButtonText() {
5454

5555
function appendCheckbox(root, label, isChecked, onClick) {
5656
const item = document.createElement('div');
57-
item.innerHTML = '<div><h5></h5> <input type="checkbox" /></div>';
58-
const h5 = item.getElementsByTagName('h5')[0];
59-
h5.innerText = label;
57+
item.innerHTML = '<div><h3></h3> <input type="checkbox" /></div>';
58+
const h3 = item.getElementsByTagName('h3')[0];
59+
h3.innerText = label;
6060
const input = item.getElementsByTagName('input')[0];
6161
input.checked = isChecked;
6262
input.addEventListener('click', () => {
@@ -65,6 +65,16 @@ function appendCheckbox(root, label, isChecked, onClick) {
6565
root.appendChild(item);
6666
}
6767

68+
function appendPath(root, step) {
69+
const parents = designer.getStepParents(step);
70+
const path = document.createElement('div');
71+
path.className = 'step-path';
72+
path.innerText = 'Step path: ' + parents.map((parent) => {
73+
return typeof parent === 'string' ? parent : parent.name;
74+
}).join('/');
75+
root.appendChild(path);
76+
}
77+
6878
let designer;
6979
let changeReadonlyButton;
7080
let validationStatusText;
@@ -101,6 +111,7 @@ const configuration = {
101111
editors: {
102112
globalEditorProvider: (definition) => {
103113
const root = document.createElement('div');
114+
root.className = 'definition-json';
104115
root.innerHTML = '<textarea style="width: 100%; border: 0;" rows="50"></textarea>';
105116
const textarea = root.getElementsByTagName('textarea')[0];
106117
textarea.value = JSON.stringify(definition, null, 2);
@@ -125,6 +136,8 @@ const configuration = {
125136
editorContext.notifyChildrenChanged();
126137
});
127138
}
139+
140+
appendPath(root, step);
128141
return root;
129142
}
130143
}

examples/assets/lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function embedStylesheet(url) {
1919

2020
const baseUrl = isTestEnv()
2121
? '../designer'
22-
: '//cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.3';
22+
: '//cdn.jsdelivr.net/npm/sequential-workflow-designer@0.13.4';
2323

2424
embedScript(`${baseUrl}/dist/index.umd.js`);
2525
embedStylesheet(`${baseUrl}/css/designer.css`);

0 commit comments

Comments
 (0)