sequential-workflow-designer 0.16.0 → 0.16.2

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
@@ -4,9 +4,6 @@
4
4
 
5
5
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fb4rtaz%2Fsequential-workflow-designer%2Fbadge%3Fref%3Dmain&style=flat-square)](https://actions-badge.atrox.dev/b4rtaz/sequential-workflow-designer/goto?ref=main) [![License: MIT](https://img.shields.io/badge/license-MIT-green?style=flat-square)](/LICENSE) [![View this project on NPM](https://img.shields.io/npm/v/sequential-workflow-designer.svg?style=flat-square)](https://npmjs.org/package/sequential-workflow-designer)
6
6
 
7
- > 🚨 **Have you noticed the "package not found" error?** 🚨<br />
8
- > Check [this comment](https://github.com/nocode-js/sequential-workflow-designer/issues/82#issuecomment-1712958636) for instructions on how to resolve the problem.
9
-
10
7
  Sequential workflow designer with 0 external dependencies for web applications. It's written in pure TypeScript and uses SVG for rendering. This designer is not associated with any workflow engine. It's full generic. You may create any kind application by this, from graphical programming languages to workflow builders.
11
8
 
12
9
  Features:
@@ -98,10 +95,10 @@ Add the below code to your head section in HTML document.
98
95
  ```html
99
96
  <head>
100
97
  ...
101
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.0/css/designer.css" rel="stylesheet">
102
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.0/css/designer-light.css" rel="stylesheet">
103
- <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.0/css/designer-dark.css" rel="stylesheet">
104
- <script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.0/dist/index.umd.js"></script>
98
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.2/css/designer.css" rel="stylesheet">
99
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.2/css/designer-light.css" rel="stylesheet">
100
+ <link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.2/css/designer-dark.css" rel="stylesheet">
101
+ <script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.16.2/dist/index.umd.js"></script>
105
102
  ```
106
103
 
107
104
  Call the designer by:
package/dist/index.umd.js CHANGED
@@ -2706,8 +2706,8 @@
2706
2706
  }
2707
2707
 
2708
2708
  class SelectStepBehavior {
2709
- static create(pressedStepComponent, forceDisableDrag, context) {
2710
- const isDragDisabled = forceDisableDrag ||
2709
+ static create(pressedStepComponent, isMiddleButton, context) {
2710
+ const isDragDisabled = isMiddleButton ||
2711
2711
  context.state.isDragDisabled ||
2712
2712
  !context.definitionModifier.isDraggable(pressedStepComponent.step, pressedStepComponent.parentSequence);
2713
2713
  return new SelectStepBehavior(pressedStepComponent, isDragDisabled, context, context.state);
@@ -2817,13 +2817,13 @@
2817
2817
  this.designerContext = designerContext;
2818
2818
  this.state = state;
2819
2819
  }
2820
- resolve(commandOrNull, element, forceDisableDrag) {
2820
+ resolve(commandOrNull, element, isMiddleButton) {
2821
2821
  if (!commandOrNull) {
2822
- return MoveViewportBehavior.create(this.state, true);
2822
+ return MoveViewportBehavior.create(this.state, !isMiddleButton);
2823
2823
  }
2824
2824
  switch (commandOrNull.type) {
2825
2825
  case exports.ClickCommandType.selectStep:
2826
- return SelectStepBehavior.create(commandOrNull.component, forceDisableDrag, this.designerContext);
2826
+ return SelectStepBehavior.create(commandOrNull.component, isMiddleButton, this.designerContext);
2827
2827
  case exports.ClickCommandType.rerenderStep:
2828
2828
  return PressingBehavior.create(element, new RerenderStepPressingBehaviorHandler(this.designerContext));
2829
2829
  case exports.ClickCommandType.openFolder:
@@ -3116,8 +3116,7 @@
3116
3116
  const isMiddleButton = buttonIndex === 1;
3117
3117
  if (isPrimaryButton || isMiddleButton) {
3118
3118
  const commandOrNull = this.resolveClick(target, position);
3119
- const forceDisableDrag = isMiddleButton;
3120
- const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, forceDisableDrag);
3119
+ const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, isMiddleButton);
3121
3120
  this.behaviorController.start(position, behavior);
3122
3121
  }
3123
3122
  }
package/lib/cjs/index.cjs CHANGED
@@ -2521,8 +2521,8 @@ class MoveViewportBehavior {
2521
2521
  }
2522
2522
 
2523
2523
  class SelectStepBehavior {
2524
- static create(pressedStepComponent, forceDisableDrag, context) {
2525
- const isDragDisabled = forceDisableDrag ||
2524
+ static create(pressedStepComponent, isMiddleButton, context) {
2525
+ const isDragDisabled = isMiddleButton ||
2526
2526
  context.state.isDragDisabled ||
2527
2527
  !context.definitionModifier.isDraggable(pressedStepComponent.step, pressedStepComponent.parentSequence);
2528
2528
  return new SelectStepBehavior(pressedStepComponent, isDragDisabled, context, context.state);
@@ -2632,13 +2632,13 @@ class ClickBehaviorResolver {
2632
2632
  this.designerContext = designerContext;
2633
2633
  this.state = state;
2634
2634
  }
2635
- resolve(commandOrNull, element, forceDisableDrag) {
2635
+ resolve(commandOrNull, element, isMiddleButton) {
2636
2636
  if (!commandOrNull) {
2637
- return MoveViewportBehavior.create(this.state, true);
2637
+ return MoveViewportBehavior.create(this.state, !isMiddleButton);
2638
2638
  }
2639
2639
  switch (commandOrNull.type) {
2640
2640
  case exports.ClickCommandType.selectStep:
2641
- return SelectStepBehavior.create(commandOrNull.component, forceDisableDrag, this.designerContext);
2641
+ return SelectStepBehavior.create(commandOrNull.component, isMiddleButton, this.designerContext);
2642
2642
  case exports.ClickCommandType.rerenderStep:
2643
2643
  return PressingBehavior.create(element, new RerenderStepPressingBehaviorHandler(this.designerContext));
2644
2644
  case exports.ClickCommandType.openFolder:
@@ -2931,8 +2931,7 @@ class Workspace {
2931
2931
  const isMiddleButton = buttonIndex === 1;
2932
2932
  if (isPrimaryButton || isMiddleButton) {
2933
2933
  const commandOrNull = this.resolveClick(target, position);
2934
- const forceDisableDrag = isMiddleButton;
2935
- const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, forceDisableDrag);
2934
+ const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, isMiddleButton);
2936
2935
  this.behaviorController.start(position, behavior);
2937
2936
  }
2938
2937
  }
package/lib/esm/index.js CHANGED
@@ -2520,8 +2520,8 @@ class MoveViewportBehavior {
2520
2520
  }
2521
2521
 
2522
2522
  class SelectStepBehavior {
2523
- static create(pressedStepComponent, forceDisableDrag, context) {
2524
- const isDragDisabled = forceDisableDrag ||
2523
+ static create(pressedStepComponent, isMiddleButton, context) {
2524
+ const isDragDisabled = isMiddleButton ||
2525
2525
  context.state.isDragDisabled ||
2526
2526
  !context.definitionModifier.isDraggable(pressedStepComponent.step, pressedStepComponent.parentSequence);
2527
2527
  return new SelectStepBehavior(pressedStepComponent, isDragDisabled, context, context.state);
@@ -2631,13 +2631,13 @@ class ClickBehaviorResolver {
2631
2631
  this.designerContext = designerContext;
2632
2632
  this.state = state;
2633
2633
  }
2634
- resolve(commandOrNull, element, forceDisableDrag) {
2634
+ resolve(commandOrNull, element, isMiddleButton) {
2635
2635
  if (!commandOrNull) {
2636
- return MoveViewportBehavior.create(this.state, true);
2636
+ return MoveViewportBehavior.create(this.state, !isMiddleButton);
2637
2637
  }
2638
2638
  switch (commandOrNull.type) {
2639
2639
  case ClickCommandType.selectStep:
2640
- return SelectStepBehavior.create(commandOrNull.component, forceDisableDrag, this.designerContext);
2640
+ return SelectStepBehavior.create(commandOrNull.component, isMiddleButton, this.designerContext);
2641
2641
  case ClickCommandType.rerenderStep:
2642
2642
  return PressingBehavior.create(element, new RerenderStepPressingBehaviorHandler(this.designerContext));
2643
2643
  case ClickCommandType.openFolder:
@@ -2930,8 +2930,7 @@ class Workspace {
2930
2930
  const isMiddleButton = buttonIndex === 1;
2931
2931
  if (isPrimaryButton || isMiddleButton) {
2932
2932
  const commandOrNull = this.resolveClick(target, position);
2933
- const forceDisableDrag = isMiddleButton;
2934
- const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, forceDisableDrag);
2933
+ const behavior = this.clickBehaviorResolver.resolve(commandOrNull, target, isMiddleButton);
2935
2934
  this.behaviorController.start(position, behavior);
2936
2935
  }
2937
2936
  }
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.0",
4
+ "version": "0.16.2",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "types": "./lib/index.d.ts",