sequential-workflow-designer 0.29.0 → 0.29.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 +12 -14
- package/lib/cjs/index.cjs +12 -14
- package/lib/esm/index.js +12 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,10 +104,10 @@ Add the below code to your head section in HTML document.
|
|
|
104
104
|
```html
|
|
105
105
|
<head>
|
|
106
106
|
...
|
|
107
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.
|
|
108
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.
|
|
109
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.
|
|
110
|
-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.
|
|
107
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.1/css/designer.css" rel="stylesheet">
|
|
108
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.1/css/designer-light.css" rel="stylesheet">
|
|
109
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.1/css/designer-dark.css" rel="stylesheet">
|
|
110
|
+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.29.1/dist/index.umd.js"></script>
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
Call the designer by:
|
package/dist/index.umd.js
CHANGED
|
@@ -425,14 +425,16 @@
|
|
|
425
425
|
class PlaceholderFinder {
|
|
426
426
|
static create(placeholders, state) {
|
|
427
427
|
const checker = new PlaceholderFinder(placeholders, state);
|
|
428
|
-
state.onViewportChanged.subscribe(checker.
|
|
429
|
-
window.addEventListener('scroll', checker.
|
|
428
|
+
state.onViewportChanged.subscribe(checker.clearCache);
|
|
429
|
+
window.addEventListener('scroll', checker.clearCache, false);
|
|
430
430
|
return checker;
|
|
431
431
|
}
|
|
432
432
|
constructor(placeholders, state) {
|
|
433
433
|
this.placeholders = placeholders;
|
|
434
434
|
this.state = state;
|
|
435
|
-
this.
|
|
435
|
+
this.clearCache = () => {
|
|
436
|
+
this.cache = undefined;
|
|
437
|
+
};
|
|
436
438
|
}
|
|
437
439
|
find(vLt, vWidth, vHeight) {
|
|
438
440
|
var _a;
|
|
@@ -455,11 +457,8 @@
|
|
|
455
457
|
})) === null || _a === void 0 ? void 0 : _a.placeholder;
|
|
456
458
|
}
|
|
457
459
|
destroy() {
|
|
458
|
-
this.state.onViewportChanged.unsubscribe(this.
|
|
459
|
-
window.removeEventListener('scroll', this.
|
|
460
|
-
}
|
|
461
|
-
clearCache() {
|
|
462
|
-
this.cache = undefined;
|
|
460
|
+
this.state.onViewportChanged.unsubscribe(this.clearCache);
|
|
461
|
+
window.removeEventListener('scroll', this.clearCache, false);
|
|
463
462
|
}
|
|
464
463
|
}
|
|
465
464
|
|
|
@@ -3270,7 +3269,7 @@
|
|
|
3270
3269
|
workspace.appendChild(canvas);
|
|
3271
3270
|
parent.appendChild(workspace);
|
|
3272
3271
|
const view = new WorkspaceView(componentContext.shadowRoot, workspace, canvas, pattern, gridPattern, foreground, componentContext);
|
|
3273
|
-
window.addEventListener('resize', view.
|
|
3272
|
+
window.addEventListener('resize', view.onResize, false);
|
|
3274
3273
|
return view;
|
|
3275
3274
|
}
|
|
3276
3275
|
constructor(shadowRoot, workspace, canvas, pattern, gridPattern, foreground, context) {
|
|
@@ -3281,7 +3280,9 @@
|
|
|
3281
3280
|
this.gridPattern = gridPattern;
|
|
3282
3281
|
this.foreground = foreground;
|
|
3283
3282
|
this.context = context;
|
|
3284
|
-
this.
|
|
3283
|
+
this.onResize = () => {
|
|
3284
|
+
this.refreshSize();
|
|
3285
|
+
};
|
|
3285
3286
|
}
|
|
3286
3287
|
render(sequence, parentPlaceIndicator) {
|
|
3287
3288
|
if (this.rootComponent) {
|
|
@@ -3342,7 +3343,7 @@
|
|
|
3342
3343
|
this.canvas.addEventListener('wheel', handler, listenerOptions$1);
|
|
3343
3344
|
}
|
|
3344
3345
|
destroy() {
|
|
3345
|
-
window.removeEventListener('resize', this.
|
|
3346
|
+
window.removeEventListener('resize', this.onResize, false);
|
|
3346
3347
|
}
|
|
3347
3348
|
refreshSize() {
|
|
3348
3349
|
Dom.attrs(this.canvas, {
|
|
@@ -3350,9 +3351,6 @@
|
|
|
3350
3351
|
height: this.workspace.offsetHeight
|
|
3351
3352
|
});
|
|
3352
3353
|
}
|
|
3353
|
-
onResize() {
|
|
3354
|
-
this.refreshSize();
|
|
3355
|
-
}
|
|
3356
3354
|
}
|
|
3357
3355
|
|
|
3358
3356
|
class MoveViewportBehavior {
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -423,14 +423,16 @@ class DragStepView {
|
|
|
423
423
|
class PlaceholderFinder {
|
|
424
424
|
static create(placeholders, state) {
|
|
425
425
|
const checker = new PlaceholderFinder(placeholders, state);
|
|
426
|
-
state.onViewportChanged.subscribe(checker.
|
|
427
|
-
window.addEventListener('scroll', checker.
|
|
426
|
+
state.onViewportChanged.subscribe(checker.clearCache);
|
|
427
|
+
window.addEventListener('scroll', checker.clearCache, false);
|
|
428
428
|
return checker;
|
|
429
429
|
}
|
|
430
430
|
constructor(placeholders, state) {
|
|
431
431
|
this.placeholders = placeholders;
|
|
432
432
|
this.state = state;
|
|
433
|
-
this.
|
|
433
|
+
this.clearCache = () => {
|
|
434
|
+
this.cache = undefined;
|
|
435
|
+
};
|
|
434
436
|
}
|
|
435
437
|
find(vLt, vWidth, vHeight) {
|
|
436
438
|
var _a;
|
|
@@ -453,11 +455,8 @@ class PlaceholderFinder {
|
|
|
453
455
|
})) === null || _a === void 0 ? void 0 : _a.placeholder;
|
|
454
456
|
}
|
|
455
457
|
destroy() {
|
|
456
|
-
this.state.onViewportChanged.unsubscribe(this.
|
|
457
|
-
window.removeEventListener('scroll', this.
|
|
458
|
-
}
|
|
459
|
-
clearCache() {
|
|
460
|
-
this.cache = undefined;
|
|
458
|
+
this.state.onViewportChanged.unsubscribe(this.clearCache);
|
|
459
|
+
window.removeEventListener('scroll', this.clearCache, false);
|
|
461
460
|
}
|
|
462
461
|
}
|
|
463
462
|
|
|
@@ -3085,7 +3084,7 @@ class WorkspaceView {
|
|
|
3085
3084
|
workspace.appendChild(canvas);
|
|
3086
3085
|
parent.appendChild(workspace);
|
|
3087
3086
|
const view = new WorkspaceView(componentContext.shadowRoot, workspace, canvas, pattern, gridPattern, foreground, componentContext);
|
|
3088
|
-
window.addEventListener('resize', view.
|
|
3087
|
+
window.addEventListener('resize', view.onResize, false);
|
|
3089
3088
|
return view;
|
|
3090
3089
|
}
|
|
3091
3090
|
constructor(shadowRoot, workspace, canvas, pattern, gridPattern, foreground, context) {
|
|
@@ -3096,7 +3095,9 @@ class WorkspaceView {
|
|
|
3096
3095
|
this.gridPattern = gridPattern;
|
|
3097
3096
|
this.foreground = foreground;
|
|
3098
3097
|
this.context = context;
|
|
3099
|
-
this.
|
|
3098
|
+
this.onResize = () => {
|
|
3099
|
+
this.refreshSize();
|
|
3100
|
+
};
|
|
3100
3101
|
}
|
|
3101
3102
|
render(sequence, parentPlaceIndicator) {
|
|
3102
3103
|
if (this.rootComponent) {
|
|
@@ -3157,7 +3158,7 @@ class WorkspaceView {
|
|
|
3157
3158
|
this.canvas.addEventListener('wheel', handler, listenerOptions$1);
|
|
3158
3159
|
}
|
|
3159
3160
|
destroy() {
|
|
3160
|
-
window.removeEventListener('resize', this.
|
|
3161
|
+
window.removeEventListener('resize', this.onResize, false);
|
|
3161
3162
|
}
|
|
3162
3163
|
refreshSize() {
|
|
3163
3164
|
Dom.attrs(this.canvas, {
|
|
@@ -3165,9 +3166,6 @@ class WorkspaceView {
|
|
|
3165
3166
|
height: this.workspace.offsetHeight
|
|
3166
3167
|
});
|
|
3167
3168
|
}
|
|
3168
|
-
onResize() {
|
|
3169
|
-
this.refreshSize();
|
|
3170
|
-
}
|
|
3171
3169
|
}
|
|
3172
3170
|
|
|
3173
3171
|
class MoveViewportBehavior {
|
package/lib/esm/index.js
CHANGED
|
@@ -422,14 +422,16 @@ class DragStepView {
|
|
|
422
422
|
class PlaceholderFinder {
|
|
423
423
|
static create(placeholders, state) {
|
|
424
424
|
const checker = new PlaceholderFinder(placeholders, state);
|
|
425
|
-
state.onViewportChanged.subscribe(checker.
|
|
426
|
-
window.addEventListener('scroll', checker.
|
|
425
|
+
state.onViewportChanged.subscribe(checker.clearCache);
|
|
426
|
+
window.addEventListener('scroll', checker.clearCache, false);
|
|
427
427
|
return checker;
|
|
428
428
|
}
|
|
429
429
|
constructor(placeholders, state) {
|
|
430
430
|
this.placeholders = placeholders;
|
|
431
431
|
this.state = state;
|
|
432
|
-
this.
|
|
432
|
+
this.clearCache = () => {
|
|
433
|
+
this.cache = undefined;
|
|
434
|
+
};
|
|
433
435
|
}
|
|
434
436
|
find(vLt, vWidth, vHeight) {
|
|
435
437
|
var _a;
|
|
@@ -452,11 +454,8 @@ class PlaceholderFinder {
|
|
|
452
454
|
})) === null || _a === void 0 ? void 0 : _a.placeholder;
|
|
453
455
|
}
|
|
454
456
|
destroy() {
|
|
455
|
-
this.state.onViewportChanged.unsubscribe(this.
|
|
456
|
-
window.removeEventListener('scroll', this.
|
|
457
|
-
}
|
|
458
|
-
clearCache() {
|
|
459
|
-
this.cache = undefined;
|
|
457
|
+
this.state.onViewportChanged.unsubscribe(this.clearCache);
|
|
458
|
+
window.removeEventListener('scroll', this.clearCache, false);
|
|
460
459
|
}
|
|
461
460
|
}
|
|
462
461
|
|
|
@@ -3084,7 +3083,7 @@ class WorkspaceView {
|
|
|
3084
3083
|
workspace.appendChild(canvas);
|
|
3085
3084
|
parent.appendChild(workspace);
|
|
3086
3085
|
const view = new WorkspaceView(componentContext.shadowRoot, workspace, canvas, pattern, gridPattern, foreground, componentContext);
|
|
3087
|
-
window.addEventListener('resize', view.
|
|
3086
|
+
window.addEventListener('resize', view.onResize, false);
|
|
3088
3087
|
return view;
|
|
3089
3088
|
}
|
|
3090
3089
|
constructor(shadowRoot, workspace, canvas, pattern, gridPattern, foreground, context) {
|
|
@@ -3095,7 +3094,9 @@ class WorkspaceView {
|
|
|
3095
3094
|
this.gridPattern = gridPattern;
|
|
3096
3095
|
this.foreground = foreground;
|
|
3097
3096
|
this.context = context;
|
|
3098
|
-
this.
|
|
3097
|
+
this.onResize = () => {
|
|
3098
|
+
this.refreshSize();
|
|
3099
|
+
};
|
|
3099
3100
|
}
|
|
3100
3101
|
render(sequence, parentPlaceIndicator) {
|
|
3101
3102
|
if (this.rootComponent) {
|
|
@@ -3156,7 +3157,7 @@ class WorkspaceView {
|
|
|
3156
3157
|
this.canvas.addEventListener('wheel', handler, listenerOptions$1);
|
|
3157
3158
|
}
|
|
3158
3159
|
destroy() {
|
|
3159
|
-
window.removeEventListener('resize', this.
|
|
3160
|
+
window.removeEventListener('resize', this.onResize, false);
|
|
3160
3161
|
}
|
|
3161
3162
|
refreshSize() {
|
|
3162
3163
|
Dom.attrs(this.canvas, {
|
|
@@ -3164,9 +3165,6 @@ class WorkspaceView {
|
|
|
3164
3165
|
height: this.workspace.offsetHeight
|
|
3165
3166
|
});
|
|
3166
3167
|
}
|
|
3167
|
-
onResize() {
|
|
3168
|
-
this.refreshSize();
|
|
3169
|
-
}
|
|
3170
3168
|
}
|
|
3171
3169
|
|
|
3172
3170
|
class MoveViewportBehavior {
|
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.29.
|
|
4
|
+
"version": "0.29.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|