Skip to content

Commit 1276c52

Browse files
authored
0.9.0. (#28)
1 parent c32e201 commit 1276c52

File tree

95 files changed

+6593
-11086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+6593
-11086
lines changed

.github/workflows/demos.sh renamed to .github/workflows/main.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ set -e
33

44
SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
55

6-
cd "$SCRIPT_DIR/../../demos/angular-app"
6+
cd "$SCRIPT_DIR"
77
yarn install
88
yarn build
9+
yarn eslint
910
yarn prettier
1011
yarn test:single
1112

12-
cd "$SCRIPT_DIR/../../demos/react-app"
13+
cd "$SCRIPT_DIR/../../demos/angular-app"
1314
yarn install
1415
yarn build
15-
yarn eslint
1616
yarn prettier
1717
yarn test:single

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@ jobs:
1919
uses: actions/setup-node@v2
2020
with:
2121
node-version: '16'
22-
- name: Packages
23-
run: bash .github/workflows/packages.sh
24-
- name: Demos
25-
run: bash .github/workflows/demos.sh
22+
- name: main.sh
23+
run: bash .github/workflows/main.sh

.github/workflows/packages.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
## 0.9.0
2+
3+
#### Breaking Changes
4+
5+
This version changes the main configuration. The "isHidden" properties are depreciated now and will be removed. Also we added a possibility to hide the control bar. To hide the control bar or other UI component you need to set `false` in the corresponding configuration property.
6+
7+
```js
8+
const configuration = {
9+
toolbox: false,
10+
editors: false,
11+
controlBar: false,
12+
// ...
13+
};
14+
```
15+
16+
To display components you need to set a proper value.
17+
18+
```js
19+
const configuration = {
20+
toolbox: {
21+
groups: [ /* ... */ ]
22+
},
23+
editors: {
24+
globalEditorProvider: () => { /* ... */ },
25+
stepEditorProvider: () => { /* ... */ },
26+
},
27+
controlBar: true,
28+
// ...
29+
};
30+
```
31+
32+
## React & Angular
33+
34+
The `controlBar` property is required from now. This change applies for the `sequential-workflow-designer-angular` and `sequential-workflow-designer-react` packages as well.
35+
136
## 0.8.1
237

338
Changed format of bundles:

README.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ Features:
3535

3636
Pro:
3737

38-
* [🤩 Pro Components](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/examples/webpack/public/pro-components.html)
39-
* [👈 Goto](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/examples/webpack/public/goto.html)
40-
* [📁 Folders](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/examples/webpack/public/folders.html)
41-
* [⭕ Wheel Mode](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/examples/webpack/public/wheel-mode.html)
38+
* [🤩 Pro Components](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/pro-components.html)
39+
* [👈 Goto](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/goto.html)
40+
* [📁 Folders](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/folders.html)
41+
* [⭕ Wheel Mode](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/wheel-mode.html)
42+
* [🦁 External UI Components](https://nocode-js.github.io/sequential-workflow-designer-pro-demo/demos/webpack-pro-app/public/external-ui-components.html)
4243

4344
## 👩‍💻 Integrations
4445

@@ -82,10 +83,10 @@ Add the below code to your head section in HTML document.
8283
```html
8384
<head>
8485
...
85-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.8.1/css/designer.css" rel="stylesheet">
86-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.8.1/css/designer-light.css" rel="stylesheet">
87-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.8.1/css/designer-dark.css" rel="stylesheet">
88-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.8.1/dist/index.umd.js"></script>
86+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.9.0/css/designer.css" rel="stylesheet">
87+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.9.0/css/designer-light.css" rel="stylesheet">
88+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.9.0/css/designer-dark.css" rel="stylesheet">
89+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.9.0/dist/index.umd.js"></script>
8990
```
9091

9192
Call the designer by:
@@ -118,25 +119,6 @@ const configuration = {
118119
isReadonly: false, // optional, default: false
119120
undoStackSize: 10, // optional, default: 0 - disabled, 1+ - enabled
120121

121-
toolbox: {
122-
isHidden: false, // optional, default: false
123-
124-
groups: [
125-
{
126-
name: 'Files',
127-
steps: [
128-
// steps for the toolbox's group
129-
]
130-
},
131-
{
132-
name: 'Notification',
133-
steps: [
134-
// steps for the toolbox's group
135-
]
136-
}
137-
]
138-
},
139-
140122
steps: {
141123
// all properties in this section are optional
142124

@@ -163,9 +145,24 @@ const configuration = {
163145
}
164146
},
165147

166-
editors: {
167-
isHidden: false, // optional, default: false
148+
toolbox: {
149+
groups: [
150+
{
151+
name: 'Files',
152+
steps: [
153+
// steps for the toolbox's group
154+
]
155+
},
156+
{
157+
name: 'Notification',
158+
steps: [
159+
// steps for the toolbox's group
160+
]
161+
}
162+
]
163+
},
168164

165+
editors: {
169166
globalEditorProvider: (definition, globalContext) => {
170167
const editor = document.createElement('div');
171168
// ...
@@ -176,7 +173,9 @@ const configuration = {
176173
// ...
177174
return editor;
178175
}
179-
}
176+
},
177+
178+
controlBar: true,
180179
};
181180

182181
const designer = Designer.create(placeholder, definition, configuration);
@@ -185,6 +184,17 @@ designer.onDefinitionChanged.subscribe((newDefinition) => {
185184
});
186185
```
187186

187+
You can hide default UI components by setting the corresponding configuration property to `false`.
188+
189+
```ts
190+
const configuration = {
191+
toolbox: false,
192+
editors: false,
193+
controlBar: false,
194+
// ...
195+
}
196+
```
197+
188198
## 💡 License
189199

190200
This project is released under the MIT license.

angular/designer/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ At the end attach the designer:
147147
[definition]="startDefinition"
148148
[toolboxConfiguration]="toolboxConfiguration"
149149
[stepsConfiguration]="stepsConfiguration"
150+
[controlBar]="true"
150151
[areEditorsHidden]="false"
151152
[globalEditor]="globalEditor"
152153
[stepEditor]="stepEditor"

angular/designer/package.json

Lines changed: 4 additions & 4 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.8.1",
4+
"version": "0.9.0",
55
"author": {
66
"name": "NoCode JS",
77
"url": "https://nocode-js.com/"
@@ -13,9 +13,9 @@
1313
"url": "https://github.com/nocode-js/sequential-workflow-designer.git"
1414
},
1515
"peerDependencies": {
16-
"@angular/common": "^15.1.0",
17-
"@angular/core": "^15.1.0",
18-
"sequential-workflow-designer": "^0.8.1"
16+
"@angular/common": "14 - 15",
17+
"@angular/core": "14 - 15",
18+
"sequential-workflow-designer": "^0.9.0"
1919
},
2020
"dependencies": {
2121
"tslib": "^2.3.0"

angular/designer/src/designer.component.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
5454
@Input('stepsConfiguration')
5555
public stepsConfiguration?: StepsConfiguration;
5656
@Input('toolboxConfiguration')
57-
public toolboxConfiguration?: ToolboxConfiguration;
57+
public toolboxConfiguration?: ToolboxConfiguration | false;
58+
@Input('controlBar')
59+
public controlBar?: boolean;
5860
@Input('extensions')
5961
public extensions?: DesignerExtension[];
6062
@Input('areEditorsHidden')
@@ -105,9 +107,12 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
105107
if (!this.stepsConfiguration) {
106108
throw new Error('Input "stepsConfiguration" is not set');
107109
}
108-
if (!this.toolboxConfiguration) {
110+
if (this.toolboxConfiguration === undefined) {
109111
throw new Error('Input "toolboxConfiguration" is not set');
110112
}
113+
if (this.controlBar === undefined) {
114+
throw new Error('Input "controlBar" is not set');
115+
}
111116

112117
if (this.designer) {
113118
this.designer.destroy();
@@ -117,13 +122,15 @@ export class DesignerComponent implements AfterViewInit, OnChanges, OnDestroy {
117122
const designer = Designer.create(this.placeholder.nativeElement, this.definition, {
118123
theme: this.theme,
119124
undoStackSize: this.undoStackSize,
120-
editors: {
121-
isHidden: this.areEditorsHidden,
122-
globalEditorProvider: this.globalEditorProvider,
123-
stepEditorProvider: this.stepEditorProvider
124-
},
125+
editors: this.areEditorsHidden
126+
? false
127+
: {
128+
globalEditorProvider: this.globalEditorProvider,
129+
stepEditorProvider: this.stepEditorProvider
130+
},
125131
steps: this.stepsConfiguration,
126132
toolbox: this.toolboxConfiguration,
133+
controlBar: this.controlBar,
127134
extensions: this.extensions
128135
});
129136
designer.onReady.subscribe(() => {

demos/angular-app/package.json

Lines changed: 3 additions & 3 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.8.1",
28-
"sequential-workflow-designer-angular": "^0.8.1",
27+
"sequential-workflow-designer": "^0.9.0",
28+
"sequential-workflow-designer-angular": "^0.9.0",
2929
"tslib": "^2.3.0",
3030
"zone.js": "~0.13.0"
3131
},
@@ -43,4 +43,4 @@
4343
"prettier": "^2.8.4",
4444
"typescript": "~4.9.5"
4545
}
46-
}
46+
}

demos/angular-app/src/app/app.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[definition]="definition"
55
[toolboxConfiguration]="toolboxConfiguration"
66
[stepsConfiguration]="stepsConfiguration"
7+
[controlBar]="true"
78
[areEditorsHidden]="false"
89
[globalEditor]="globalEditor"
910
[stepEditor]="stepEditor"

0 commit comments

Comments
 (0)