sequential-workflow-designer 0.16.4 → 0.16.6

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 CHANGED
@@ -13,7 +13,7 @@ Features:
13
13
  * use light/dark themes or customize easily,
14
14
  * compatible with modern browsers and mobile devices,
15
15
  * the definition is stored as JSON,
16
- * supports [React](./react/) and [Angular](./angular/designer/).
16
+ * supports [Angular](./angular/designer/), [React](./react/) and [Svelte](./svelte/).
17
17
 
18
18
  📝 Check the [documentation](https://nocode-js.com/docs/category/sequential-workflow-designer) for more details.
19
19
 
@@ -33,8 +33,9 @@ Features:
33
33
  * [📜 Scrollable Page](https://nocode-js.github.io/sequential-workflow-designer/examples/scrollable-page.html)
34
34
  * [🌵 Multi-Conditional Switch](https://nocode-js.github.io/sequential-workflow-designer/examples/multi-conditional-switch.html)
35
35
  * [🌀 Auto-Select](https://nocode-js.github.io/sequential-workflow-designer/examples/auto-select.html)
36
- * [React Demo](https://nocode-js.github.io/sequential-workflow-designer/react-app/)
37
36
  * [Angular Demo](https://nocode-js.github.io/sequential-workflow-designer/angular-app/)
37
+ * [React Demo](https://nocode-js.github.io/sequential-workflow-designer/react-app/)
38
+ * [Svelte Demo](https://nocode-js.github.io/sequential-workflow-designer/svelte-app/)
38
39
 
39
40
  Pro:
40
41
 
@@ -95,10 +96,10 @@ Add the below code to your head section in HTML document.
95
96
  ```html
96
97
  <head>
97
98
  ...
98
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.4/css/designer.css" rel="stylesheet">
99
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.4/css/designer-light.css" rel="stylesheet">
100
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.4/css/designer-dark.css" rel="stylesheet">
101
- <script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.4/dist/index.umd.js"></script>
99
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.6/css/designer.css" rel="stylesheet">
100
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.6/css/designer-light.css" rel="stylesheet">
101
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.6/css/designer-dark.css" rel="stylesheet">
102
+ <script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.6/dist/index.umd.js"></script>
102
103
  ```
103
104
 
104
105
  Call the designer by:
package/dist/index.umd.js CHANGED
@@ -1012,7 +1012,7 @@
1012
1012
  Dom.translate(circle, halfOfSize, halfOfSize);
1013
1013
  g.appendChild(circle);
1014
1014
  const icon = Icons.appendPath(g, 'sqd-validation-error-icon-path', Icons.alert, cfg.iconSize);
1015
- const offsetX = (cfg.size - cfg.iconSize) * 0.5;
1015
+ const offsetX = (cfg.size - cfg.iconSize) / 2;
1016
1016
  const offsetY = offsetX * 1.5;
1017
1017
  Dom.translate(icon, offsetX, offsetY);
1018
1018
  parent.appendChild(g);
@@ -2587,6 +2587,9 @@
2587
2587
  }
2588
2588
 
2589
2589
  let lastGridPatternId = 0;
2590
+ const listenerOptions$1 = {
2591
+ passive: false
2592
+ };
2590
2593
  class WorkspaceView {
2591
2594
  static create(parent, componentContext) {
2592
2595
  const patternId = 'sqd-grid-pattern-' + lastGridPatternId++;
@@ -2667,7 +2670,7 @@
2667
2670
  const position = readTouchPosition(e);
2668
2671
  handler(position, element, 0);
2669
2672
  }
2670
- }, { passive: false });
2673
+ }, listenerOptions$1);
2671
2674
  }
2672
2675
  bindContextMenu(handler) {
2673
2676
  this.canvas.addEventListener('contextmenu', e => {
@@ -2676,7 +2679,7 @@
2676
2679
  }, false);
2677
2680
  }
2678
2681
  bindWheel(handler) {
2679
- this.canvas.addEventListener('wheel', handler, false);
2682
+ this.canvas.addEventListener('wheel', handler, listenerOptions$1);
2680
2683
  }
2681
2684
  destroy() {
2682
2685
  window.removeEventListener('resize', this.onResizeHandler, false);
@@ -3575,7 +3578,7 @@
3575
3578
  parent.appendChild(root);
3576
3579
  const view = new ScrollBoxView(root, viewport);
3577
3580
  window.addEventListener('resize', view.onResize, false);
3578
- root.addEventListener('wheel', e => view.onWheel(e), false);
3581
+ root.addEventListener('wheel', e => view.onWheel(e), listenerOptions);
3579
3582
  root.addEventListener('touchstart', e => view.onTouchStart(e), listenerOptions);
3580
3583
  root.addEventListener('mousedown', e => view.onMouseDown(e), false);
3581
3584
  return view;
@@ -3639,6 +3642,7 @@
3639
3642
  };
3640
3643
  }
3641
3644
  onWheel(e) {
3645
+ e.preventDefault();
3642
3646
  e.stopPropagation();
3643
3647
  if (this.content) {
3644
3648
  const delta = e.deltaY > 0 ? -25 : 25;
package/lib/cjs/index.cjs CHANGED
@@ -1010,7 +1010,7 @@ class ValidationErrorBadgeView {
1010
1010
  Dom.translate(circle, halfOfSize, halfOfSize);
1011
1011
  g.appendChild(circle);
1012
1012
  const icon = Icons.appendPath(g, 'sqd-validation-error-icon-path', Icons.alert, cfg.iconSize);
1013
- const offsetX = (cfg.size - cfg.iconSize) * 0.5;
1013
+ const offsetX = (cfg.size - cfg.iconSize) / 2;
1014
1014
  const offsetY = offsetX * 1.5;
1015
1015
  Dom.translate(icon, offsetX, offsetY);
1016
1016
  parent.appendChild(g);
@@ -2402,6 +2402,9 @@ function isElementAttached(element) {
2402
2402
  }
2403
2403
 
2404
2404
  let lastGridPatternId = 0;
2405
+ const listenerOptions$1 = {
2406
+ passive: false
2407
+ };
2405
2408
  class WorkspaceView {
2406
2409
  static create(parent, componentContext) {
2407
2410
  const patternId = 'sqd-grid-pattern-' + lastGridPatternId++;
@@ -2482,7 +2485,7 @@ class WorkspaceView {
2482
2485
  const position = readTouchPosition(e);
2483
2486
  handler(position, element, 0);
2484
2487
  }
2485
- }, { passive: false });
2488
+ }, listenerOptions$1);
2486
2489
  }
2487
2490
  bindContextMenu(handler) {
2488
2491
  this.canvas.addEventListener('contextmenu', e => {
@@ -2491,7 +2494,7 @@ class WorkspaceView {
2491
2494
  }, false);
2492
2495
  }
2493
2496
  bindWheel(handler) {
2494
- this.canvas.addEventListener('wheel', handler, false);
2497
+ this.canvas.addEventListener('wheel', handler, listenerOptions$1);
2495
2498
  }
2496
2499
  destroy() {
2497
2500
  window.removeEventListener('resize', this.onResizeHandler, false);
@@ -3390,7 +3393,7 @@ class ScrollBoxView {
3390
3393
  parent.appendChild(root);
3391
3394
  const view = new ScrollBoxView(root, viewport);
3392
3395
  window.addEventListener('resize', view.onResize, false);
3393
- root.addEventListener('wheel', e => view.onWheel(e), false);
3396
+ root.addEventListener('wheel', e => view.onWheel(e), listenerOptions);
3394
3397
  root.addEventListener('touchstart', e => view.onTouchStart(e), listenerOptions);
3395
3398
  root.addEventListener('mousedown', e => view.onMouseDown(e), false);
3396
3399
  return view;
@@ -3454,6 +3457,7 @@ class ScrollBoxView {
3454
3457
  };
3455
3458
  }
3456
3459
  onWheel(e) {
3460
+ e.preventDefault();
3457
3461
  e.stopPropagation();
3458
3462
  if (this.content) {
3459
3463
  const delta = e.deltaY > 0 ? -25 : 25;
package/lib/esm/index.js CHANGED
@@ -1009,7 +1009,7 @@ class ValidationErrorBadgeView {
1009
1009
  Dom.translate(circle, halfOfSize, halfOfSize);
1010
1010
  g.appendChild(circle);
1011
1011
  const icon = Icons.appendPath(g, 'sqd-validation-error-icon-path', Icons.alert, cfg.iconSize);
1012
- const offsetX = (cfg.size - cfg.iconSize) * 0.5;
1012
+ const offsetX = (cfg.size - cfg.iconSize) / 2;
1013
1013
  const offsetY = offsetX * 1.5;
1014
1014
  Dom.translate(icon, offsetX, offsetY);
1015
1015
  parent.appendChild(g);
@@ -2401,6 +2401,9 @@ function isElementAttached(element) {
2401
2401
  }
2402
2402
 
2403
2403
  let lastGridPatternId = 0;
2404
+ const listenerOptions$1 = {
2405
+ passive: false
2406
+ };
2404
2407
  class WorkspaceView {
2405
2408
  static create(parent, componentContext) {
2406
2409
  const patternId = 'sqd-grid-pattern-' + lastGridPatternId++;
@@ -2481,7 +2484,7 @@ class WorkspaceView {
2481
2484
  const position = readTouchPosition(e);
2482
2485
  handler(position, element, 0);
2483
2486
  }
2484
- }, { passive: false });
2487
+ }, listenerOptions$1);
2485
2488
  }
2486
2489
  bindContextMenu(handler) {
2487
2490
  this.canvas.addEventListener('contextmenu', e => {
@@ -2490,7 +2493,7 @@ class WorkspaceView {
2490
2493
  }, false);
2491
2494
  }
2492
2495
  bindWheel(handler) {
2493
- this.canvas.addEventListener('wheel', handler, false);
2496
+ this.canvas.addEventListener('wheel', handler, listenerOptions$1);
2494
2497
  }
2495
2498
  destroy() {
2496
2499
  window.removeEventListener('resize', this.onResizeHandler, false);
@@ -3389,7 +3392,7 @@ class ScrollBoxView {
3389
3392
  parent.appendChild(root);
3390
3393
  const view = new ScrollBoxView(root, viewport);
3391
3394
  window.addEventListener('resize', view.onResize, false);
3392
- root.addEventListener('wheel', e => view.onWheel(e), false);
3395
+ root.addEventListener('wheel', e => view.onWheel(e), listenerOptions);
3393
3396
  root.addEventListener('touchstart', e => view.onTouchStart(e), listenerOptions);
3394
3397
  root.addEventListener('mousedown', e => view.onMouseDown(e), false);
3395
3398
  return view;
@@ -3453,6 +3456,7 @@ class ScrollBoxView {
3453
3456
  };
3454
3457
  }
3455
3458
  onWheel(e) {
3459
+ e.preventDefault();
3456
3460
  e.stopPropagation();
3457
3461
  if (this.content) {
3458
3462
  const delta = e.deltaY > 0 ? -25 : 25;
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.16.4",
4
+ "version": "0.16.6",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "types": "./lib/index.d.ts",