sequential-workflow-designer 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.umd.js +14 -13
- package/lib/cjs/index.cjs +14 -13
- package/lib/esm/index.js +14 -13
- package/lib/index.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,10 +103,10 @@ Add the below code to your head section in HTML document.
|
|
|
103
103
|
```html
|
|
104
104
|
<head>
|
|
105
105
|
...
|
|
106
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.
|
|
107
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.
|
|
108
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.
|
|
109
|
-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.
|
|
106
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.1/css/designer.css" rel="stylesheet">
|
|
107
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.1/css/designer-light.css" rel="stylesheet">
|
|
108
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.1/css/designer-dark.css" rel="stylesheet">
|
|
109
|
+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.22.1/dist/index.umd.js"></script>
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
Call the designer by:
|
package/dist/index.umd.js
CHANGED
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
function race(timeout, a, b, c) {
|
|
169
|
-
const value = [undefined, undefined, undefined];
|
|
168
|
+
function race(timeout, a, b, c, d) {
|
|
169
|
+
const value = [undefined, undefined, undefined, undefined];
|
|
170
170
|
const result = new SimpleEvent();
|
|
171
171
|
let scheduled = false;
|
|
172
172
|
function forward() {
|
|
@@ -184,26 +184,27 @@
|
|
|
184
184
|
}
|
|
185
185
|
}, timeout);
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
.
|
|
189
|
-
.forEach((e, index) => {
|
|
190
|
-
e.subscribe(v => {
|
|
187
|
+
function subscribe(event, index) {
|
|
188
|
+
event.subscribe(v => {
|
|
191
189
|
value[index] = v;
|
|
192
190
|
forward();
|
|
193
191
|
});
|
|
194
|
-
}
|
|
192
|
+
}
|
|
193
|
+
subscribe(a, 0);
|
|
194
|
+
subscribe(b, 1);
|
|
195
|
+
if (c) {
|
|
196
|
+
subscribe(c, 2);
|
|
197
|
+
}
|
|
198
|
+
if (d) {
|
|
199
|
+
subscribe(d, 3);
|
|
200
|
+
}
|
|
195
201
|
return result;
|
|
196
202
|
}
|
|
197
203
|
|
|
198
204
|
class ControlBarApi {
|
|
199
205
|
static create(state, historyController, stateModifier, viewportApi) {
|
|
200
206
|
const api = new ControlBarApi(state, historyController, stateModifier, viewportApi);
|
|
201
|
-
state.onIsReadonlyChanged.subscribe(api.onStateChanged.forward);
|
|
202
|
-
state.onSelectedStepIdChanged.subscribe(api.onStateChanged.forward);
|
|
203
|
-
state.onIsDragDisabledChanged.subscribe(api.onStateChanged.forward);
|
|
204
|
-
if (api.isUndoRedoSupported()) {
|
|
205
|
-
state.onDefinitionChanged.subscribe(api.onStateChanged.forward);
|
|
206
|
-
}
|
|
207
|
+
race(0, state.onIsReadonlyChanged, state.onSelectedStepIdChanged, state.onIsDragDisabledChanged, api.isUndoRedoSupported() ? state.onDefinitionChanged : undefined).subscribe(api.onStateChanged.forward);
|
|
207
208
|
return api;
|
|
208
209
|
}
|
|
209
210
|
constructor(state, historyController, stateModifier, viewportApi) {
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -163,8 +163,8 @@ class SimpleEvent {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
function race(timeout, a, b, c) {
|
|
167
|
-
const value = [undefined, undefined, undefined];
|
|
166
|
+
function race(timeout, a, b, c, d) {
|
|
167
|
+
const value = [undefined, undefined, undefined, undefined];
|
|
168
168
|
const result = new SimpleEvent();
|
|
169
169
|
let scheduled = false;
|
|
170
170
|
function forward() {
|
|
@@ -182,26 +182,27 @@ function race(timeout, a, b, c) {
|
|
|
182
182
|
}
|
|
183
183
|
}, timeout);
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
.
|
|
187
|
-
.forEach((e, index) => {
|
|
188
|
-
e.subscribe(v => {
|
|
185
|
+
function subscribe(event, index) {
|
|
186
|
+
event.subscribe(v => {
|
|
189
187
|
value[index] = v;
|
|
190
188
|
forward();
|
|
191
189
|
});
|
|
192
|
-
}
|
|
190
|
+
}
|
|
191
|
+
subscribe(a, 0);
|
|
192
|
+
subscribe(b, 1);
|
|
193
|
+
if (c) {
|
|
194
|
+
subscribe(c, 2);
|
|
195
|
+
}
|
|
196
|
+
if (d) {
|
|
197
|
+
subscribe(d, 3);
|
|
198
|
+
}
|
|
193
199
|
return result;
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
class ControlBarApi {
|
|
197
203
|
static create(state, historyController, stateModifier, viewportApi) {
|
|
198
204
|
const api = new ControlBarApi(state, historyController, stateModifier, viewportApi);
|
|
199
|
-
state.onIsReadonlyChanged.subscribe(api.onStateChanged.forward);
|
|
200
|
-
state.onSelectedStepIdChanged.subscribe(api.onStateChanged.forward);
|
|
201
|
-
state.onIsDragDisabledChanged.subscribe(api.onStateChanged.forward);
|
|
202
|
-
if (api.isUndoRedoSupported()) {
|
|
203
|
-
state.onDefinitionChanged.subscribe(api.onStateChanged.forward);
|
|
204
|
-
}
|
|
205
|
+
race(0, state.onIsReadonlyChanged, state.onSelectedStepIdChanged, state.onIsDragDisabledChanged, api.isUndoRedoSupported() ? state.onDefinitionChanged : undefined).subscribe(api.onStateChanged.forward);
|
|
205
206
|
return api;
|
|
206
207
|
}
|
|
207
208
|
constructor(state, historyController, stateModifier, viewportApi) {
|
package/lib/esm/index.js
CHANGED
|
@@ -162,8 +162,8 @@ class SimpleEvent {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
function race(timeout, a, b, c) {
|
|
166
|
-
const value = [undefined, undefined, undefined];
|
|
165
|
+
function race(timeout, a, b, c, d) {
|
|
166
|
+
const value = [undefined, undefined, undefined, undefined];
|
|
167
167
|
const result = new SimpleEvent();
|
|
168
168
|
let scheduled = false;
|
|
169
169
|
function forward() {
|
|
@@ -181,26 +181,27 @@ function race(timeout, a, b, c) {
|
|
|
181
181
|
}
|
|
182
182
|
}, timeout);
|
|
183
183
|
}
|
|
184
|
-
|
|
185
|
-
.
|
|
186
|
-
.forEach((e, index) => {
|
|
187
|
-
e.subscribe(v => {
|
|
184
|
+
function subscribe(event, index) {
|
|
185
|
+
event.subscribe(v => {
|
|
188
186
|
value[index] = v;
|
|
189
187
|
forward();
|
|
190
188
|
});
|
|
191
|
-
}
|
|
189
|
+
}
|
|
190
|
+
subscribe(a, 0);
|
|
191
|
+
subscribe(b, 1);
|
|
192
|
+
if (c) {
|
|
193
|
+
subscribe(c, 2);
|
|
194
|
+
}
|
|
195
|
+
if (d) {
|
|
196
|
+
subscribe(d, 3);
|
|
197
|
+
}
|
|
192
198
|
return result;
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
class ControlBarApi {
|
|
196
202
|
static create(state, historyController, stateModifier, viewportApi) {
|
|
197
203
|
const api = new ControlBarApi(state, historyController, stateModifier, viewportApi);
|
|
198
|
-
state.onIsReadonlyChanged.subscribe(api.onStateChanged.forward);
|
|
199
|
-
state.onSelectedStepIdChanged.subscribe(api.onStateChanged.forward);
|
|
200
|
-
state.onIsDragDisabledChanged.subscribe(api.onStateChanged.forward);
|
|
201
|
-
if (api.isUndoRedoSupported()) {
|
|
202
|
-
state.onDefinitionChanged.subscribe(api.onStateChanged.forward);
|
|
203
|
-
}
|
|
204
|
+
race(0, state.onIsReadonlyChanged, state.onSelectedStepIdChanged, state.onIsDragDisabledChanged, api.isUndoRedoSupported() ? state.onDefinitionChanged : undefined).subscribe(api.onStateChanged.forward);
|
|
204
205
|
return api;
|
|
205
206
|
}
|
|
206
207
|
constructor(state, historyController, stateModifier, viewportApi) {
|
package/lib/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare class SimpleEvent<T> {
|
|
|
66
66
|
}
|
|
67
67
|
type SimpleEventListener<T> = (value: T) => void;
|
|
68
68
|
|
|
69
|
-
declare function race<A, B, C>(timeout: number, a: SimpleEvent<A>, b: SimpleEvent<B>, c?: SimpleEvent<C>): SimpleEvent<[A?, B?, C?]>;
|
|
69
|
+
declare function race<A, B, C, D>(timeout: number, a: SimpleEvent<A>, b: SimpleEvent<B>, c?: SimpleEvent<C>, d?: SimpleEvent<D>): SimpleEvent<[A?, B?, C?, D?]>;
|
|
70
70
|
|
|
71
71
|
interface Behavior {
|
|
72
72
|
onStart(position: Vector): void;
|
|
@@ -405,7 +405,7 @@ declare class PathBarApi {
|
|
|
405
405
|
private readonly state;
|
|
406
406
|
private readonly definitionWalker;
|
|
407
407
|
constructor(state: DesignerState, definitionWalker: DefinitionWalker);
|
|
408
|
-
readonly onStateChanged: SimpleEvent<[(string[] | undefined)?, (DefinitionChangedEvent | undefined)?, unknown?]>;
|
|
408
|
+
readonly onStateChanged: SimpleEvent<[(string[] | undefined)?, (DefinitionChangedEvent | undefined)?, unknown?, unknown?]>;
|
|
409
409
|
setFolderPath(path: string[]): void;
|
|
410
410
|
getFolderPath(): string[];
|
|
411
411
|
getFolderPathStepNames(): string[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sequential-workflow-designer",
|
|
3
3
|
"description": "Customizable no-code component for building flow-based programming applications.",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|