sequential-workflow-designer 0.24.8 → 0.26.0
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 +5 -4
- package/dist/index.umd.js +865 -682
- package/lib/cjs/index.cjs +865 -682
- package/lib/esm/index.js +861 -682
- package/lib/index.d.ts +107 -60
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -71,14 +71,18 @@ declare function race<A, B, C, D>(timeout: number, a: SimpleEvent<A>, b: SimpleE
|
|
|
71
71
|
interface Behavior {
|
|
72
72
|
onStart(position: Vector): void;
|
|
73
73
|
onMove(delta: Vector): Behavior | void;
|
|
74
|
-
onEnd(interrupt: boolean, element: Element | null): void;
|
|
74
|
+
onEnd(interrupt: boolean, element: Element | null, previousEndToken: BehaviorEndToken | null): BehaviorEndToken | void;
|
|
75
|
+
}
|
|
76
|
+
interface BehaviorEndToken {
|
|
77
|
+
type: string;
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
declare class BehaviorController {
|
|
78
81
|
private readonly dom;
|
|
79
82
|
private readonly shadowRoot;
|
|
80
|
-
private state?;
|
|
81
83
|
static create(shadowRoot: ShadowRoot | undefined): BehaviorController;
|
|
84
|
+
private previousEndToken;
|
|
85
|
+
private state;
|
|
82
86
|
private constructor();
|
|
83
87
|
start(startPosition: Vector, behavior: Behavior): void;
|
|
84
88
|
private bind;
|
|
@@ -461,23 +465,27 @@ declare class ToolboxApi {
|
|
|
461
465
|
}
|
|
462
466
|
|
|
463
467
|
declare class ViewportApi {
|
|
468
|
+
private readonly state;
|
|
464
469
|
private readonly workspaceController;
|
|
465
470
|
private readonly viewportController;
|
|
466
|
-
|
|
471
|
+
private readonly animator;
|
|
472
|
+
constructor(state: DesignerState, workspaceController: WorkspaceControllerWrapper, viewportController: ViewportController);
|
|
473
|
+
limitScale(scale: number): number;
|
|
467
474
|
resetViewport(): void;
|
|
468
475
|
zoom(direction: boolean): void;
|
|
469
476
|
moveViewportToStep(stepId: string): void;
|
|
477
|
+
handleWheelEvent(e: WheelEvent): void;
|
|
470
478
|
}
|
|
471
479
|
|
|
472
480
|
declare class WorkspaceApi {
|
|
473
481
|
private readonly state;
|
|
474
482
|
private readonly workspaceController;
|
|
475
483
|
constructor(state: DesignerState, workspaceController: WorkspaceControllerWrapper);
|
|
484
|
+
getViewport(): Viewport;
|
|
485
|
+
setViewport(viewport: Viewport): void;
|
|
476
486
|
getCanvasPosition(): Vector;
|
|
477
487
|
getCanvasSize(): Vector;
|
|
478
488
|
getRootComponentSize(): Vector;
|
|
479
|
-
getViewport(): Viewport;
|
|
480
|
-
setViewport(viewport: Viewport): void;
|
|
481
489
|
updateRootComponent(): void;
|
|
482
490
|
updateBadges(): void;
|
|
483
491
|
updateCanvasSize(): void;
|
|
@@ -497,6 +505,15 @@ declare class DesignerApi {
|
|
|
497
505
|
private constructor();
|
|
498
506
|
}
|
|
499
507
|
|
|
508
|
+
declare const TYPE = "selectStep";
|
|
509
|
+
declare class SelectStepBehaviorEndToken implements BehaviorEndToken {
|
|
510
|
+
readonly stepId: string;
|
|
511
|
+
readonly time: number;
|
|
512
|
+
static is(token: BehaviorEndToken | null): token is SelectStepBehaviorEndToken;
|
|
513
|
+
readonly type = "selectStep";
|
|
514
|
+
constructor(stepId: string, time: number);
|
|
515
|
+
}
|
|
516
|
+
|
|
500
517
|
declare class Badges {
|
|
501
518
|
private readonly g;
|
|
502
519
|
private readonly position;
|
|
@@ -664,13 +681,13 @@ interface TaskStepExtensionConfiguration {
|
|
|
664
681
|
}
|
|
665
682
|
|
|
666
683
|
declare class CenteredViewportCalculator {
|
|
667
|
-
static center(
|
|
668
|
-
static
|
|
684
|
+
static center(padding: number, canvasSize: Vector, rootComponentSize: Vector): Viewport;
|
|
685
|
+
static getFocusedOnComponent(canvasSize: Vector, viewport: Viewport, componentPosition: Vector, componentSize: Vector): Viewport;
|
|
669
686
|
}
|
|
670
687
|
|
|
671
688
|
declare class ClassicWheelController implements WheelController {
|
|
672
689
|
private readonly api;
|
|
673
|
-
static create(api:
|
|
690
|
+
static create(api: ViewportApi): ClassicWheelController;
|
|
674
691
|
private constructor();
|
|
675
692
|
onWheel(e: WheelEvent): void;
|
|
676
693
|
}
|
|
@@ -679,24 +696,32 @@ declare class ClassicWheelControllerExtension implements WheelControllerExtensio
|
|
|
679
696
|
readonly create: typeof ClassicWheelController.create;
|
|
680
697
|
}
|
|
681
698
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
699
|
+
interface DefaultViewportControllerConfiguration {
|
|
700
|
+
scales: number[];
|
|
701
|
+
smoothDeltaYLimit: number;
|
|
702
|
+
padding: number;
|
|
685
703
|
}
|
|
686
704
|
|
|
687
705
|
declare class DefaultViewportController implements ViewportController {
|
|
706
|
+
readonly smoothDeltaYLimit: number;
|
|
707
|
+
private readonly nqn;
|
|
688
708
|
private readonly api;
|
|
689
|
-
|
|
690
|
-
|
|
709
|
+
private readonly padding;
|
|
710
|
+
static create(api: WorkspaceApi, configuration?: DefaultViewportControllerConfiguration): DefaultViewportController;
|
|
691
711
|
private constructor();
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
712
|
+
getDefault(): Viewport;
|
|
713
|
+
getZoomed(direction: boolean): Viewport | null;
|
|
714
|
+
getFocusedOnComponent(componentPosition: Vector, componentSize: Vector): Viewport;
|
|
715
|
+
getNextScale(scale: number, direction: boolean): NextScale;
|
|
716
|
+
limitScale(scale: number): number;
|
|
696
717
|
}
|
|
697
718
|
|
|
719
|
+
type DefaultViewportControllerExtensionConfiguration = DefaultViewportControllerConfiguration;
|
|
698
720
|
declare class DefaultViewportControllerExtension implements ViewportControllerExtension {
|
|
699
|
-
readonly
|
|
721
|
+
private readonly configuration;
|
|
722
|
+
static create(configuration?: DefaultViewportControllerExtensionConfiguration): DefaultViewportControllerExtension;
|
|
723
|
+
private constructor();
|
|
724
|
+
create(api: WorkspaceApi): DefaultViewportController;
|
|
700
725
|
}
|
|
701
726
|
|
|
702
727
|
interface RectPlaceholderConfiguration {
|
|
@@ -745,6 +770,7 @@ declare class DefaultRegionComponentViewExtension implements RegionComponentView
|
|
|
745
770
|
interface DesignerExtension {
|
|
746
771
|
steps?: StepExtension[];
|
|
747
772
|
stepComponentViewWrapper?: StepComponentViewWrapperExtension;
|
|
773
|
+
clickBehaviorWrapperExtension?: ClickBehaviorWrapperExtension;
|
|
748
774
|
badges?: BadgeExtension[];
|
|
749
775
|
uiComponents?: UiComponentExtension[];
|
|
750
776
|
draggedComponent?: DraggedComponentExtension;
|
|
@@ -793,6 +819,12 @@ interface SequenceContext {
|
|
|
793
819
|
interface StepComponentViewWrapperExtension {
|
|
794
820
|
wrap(view: StepComponentView, stepContext: StepContext): StepComponentView;
|
|
795
821
|
}
|
|
822
|
+
interface ClickBehaviorWrapperExtension {
|
|
823
|
+
create(customActionController: CustomActionController): ClickBehaviorWrapper;
|
|
824
|
+
}
|
|
825
|
+
interface ClickBehaviorWrapper {
|
|
826
|
+
wrap(behavior: Behavior, commandOrNull: ClickCommand | null): Behavior;
|
|
827
|
+
}
|
|
796
828
|
interface BadgeExtension {
|
|
797
829
|
id: string;
|
|
798
830
|
createForStep(parentElement: SVGElement, view: StepComponentView, stepContext: StepContext, componentContext: ComponentContext): Badge;
|
|
@@ -800,7 +832,7 @@ interface BadgeExtension {
|
|
|
800
832
|
createStartValue(): unknown;
|
|
801
833
|
}
|
|
802
834
|
interface WheelControllerExtension {
|
|
803
|
-
create(
|
|
835
|
+
create(viewportApi: ViewportApi, workspaceApi: WorkspaceApi): WheelController;
|
|
804
836
|
}
|
|
805
837
|
interface WheelController {
|
|
806
838
|
onWheel(e: WheelEvent): void;
|
|
@@ -865,9 +897,16 @@ interface ViewportControllerExtension {
|
|
|
865
897
|
create(api: WorkspaceApi): ViewportController;
|
|
866
898
|
}
|
|
867
899
|
interface ViewportController {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
900
|
+
smoothDeltaYLimit: number;
|
|
901
|
+
getDefault(): Viewport;
|
|
902
|
+
getZoomed(direction: boolean): Viewport | null;
|
|
903
|
+
getFocusedOnComponent(componentPosition: Vector, componentSize: Vector): Viewport;
|
|
904
|
+
getNextScale(scale: number, direction: boolean): NextScale;
|
|
905
|
+
limitScale(scale: number): number;
|
|
906
|
+
}
|
|
907
|
+
interface NextScale {
|
|
908
|
+
current: number;
|
|
909
|
+
next: number;
|
|
871
910
|
}
|
|
872
911
|
interface Viewport {
|
|
873
912
|
readonly position: Vector;
|
|
@@ -1106,13 +1145,9 @@ declare class ControlBarApi {
|
|
|
1106
1145
|
private readonly state;
|
|
1107
1146
|
private readonly historyController;
|
|
1108
1147
|
private readonly stateModifier;
|
|
1109
|
-
|
|
1110
|
-
static create(state: DesignerState, historyController: HistoryController | undefined, stateModifier: StateModifier, viewportApi: ViewportApi): ControlBarApi;
|
|
1148
|
+
static create(state: DesignerState, historyController: HistoryController | undefined, stateModifier: StateModifier): ControlBarApi;
|
|
1111
1149
|
private constructor();
|
|
1112
1150
|
readonly onStateChanged: SimpleEvent<unknown>;
|
|
1113
|
-
resetViewport(): void;
|
|
1114
|
-
zoomIn(): void;
|
|
1115
|
-
zoomOut(): void;
|
|
1116
1151
|
isDragDisabled(): boolean;
|
|
1117
1152
|
toggleIsDragDisabled(): void;
|
|
1118
1153
|
isUndoRedoSupported(): boolean;
|
|
@@ -1124,6 +1159,50 @@ declare class ControlBarApi {
|
|
|
1124
1159
|
canDelete(): boolean;
|
|
1125
1160
|
}
|
|
1126
1161
|
|
|
1162
|
+
declare class DefaultViewportControllerDesignerExtension implements DesignerExtension {
|
|
1163
|
+
readonly viewportController: ViewportControllerExtension;
|
|
1164
|
+
static create(configuration: DefaultViewportControllerExtensionConfiguration): DesignerExtension;
|
|
1165
|
+
private constructor();
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
declare class LineGrid implements Grid {
|
|
1169
|
+
readonly size: Vector;
|
|
1170
|
+
readonly element: SVGPathElement;
|
|
1171
|
+
static create(size: Vector): LineGrid;
|
|
1172
|
+
private constructor();
|
|
1173
|
+
setScale(_: number, scaledSize: Vector): void;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
declare class LineGridExtension implements GridExtension {
|
|
1177
|
+
private readonly configuration;
|
|
1178
|
+
static create(configuration?: LineGridConfiguration): LineGridExtension;
|
|
1179
|
+
private constructor();
|
|
1180
|
+
create(): LineGrid;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
declare class LineGridDesignerExtension implements DesignerExtension {
|
|
1184
|
+
readonly grid: LineGridExtension;
|
|
1185
|
+
static create(configuration?: LineGridConfiguration): DesignerExtension;
|
|
1186
|
+
private constructor();
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
declare class StartStopRootComponentDesignerExtension implements DesignerExtension {
|
|
1190
|
+
readonly rootComponent: RootComponentExtension;
|
|
1191
|
+
static create(configuration: StartStopRootComponentExtensionConfiguration): DesignerExtension;
|
|
1192
|
+
private constructor();
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
interface StepsDesignerExtensionConfiguration {
|
|
1196
|
+
container?: ContainerStepExtensionConfiguration;
|
|
1197
|
+
switch?: SwitchStepExtensionConfiguration;
|
|
1198
|
+
task?: TaskStepExtensionConfiguration;
|
|
1199
|
+
}
|
|
1200
|
+
declare class StepsDesignerExtension implements DesignerExtension {
|
|
1201
|
+
readonly steps: StepExtension<Step>[];
|
|
1202
|
+
static create(configuration: StepsDesignerExtensionConfiguration): StepsDesignerExtension;
|
|
1203
|
+
protected constructor(steps: StepExtension<Step>[]);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1127
1206
|
declare class Editor {
|
|
1128
1207
|
private readonly view;
|
|
1129
1208
|
private readonly renderer;
|
|
@@ -1270,36 +1349,4 @@ declare class Designer<TDefinition extends Definition = Definition> {
|
|
|
1270
1349
|
private getHistoryController;
|
|
1271
1350
|
}
|
|
1272
1351
|
|
|
1273
|
-
|
|
1274
|
-
readonly size: Vector;
|
|
1275
|
-
readonly element: SVGPathElement;
|
|
1276
|
-
static create(size: Vector): LineGrid;
|
|
1277
|
-
private constructor();
|
|
1278
|
-
setScale(_: number, scaledSize: Vector): void;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
declare class LineGridExtension implements GridExtension {
|
|
1282
|
-
private readonly configuration;
|
|
1283
|
-
static create(configuration?: LineGridConfiguration): LineGridExtension;
|
|
1284
|
-
private constructor();
|
|
1285
|
-
create(): LineGrid;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
declare class LineGridDesignerExtension implements DesignerExtension {
|
|
1289
|
-
readonly grid: LineGridExtension;
|
|
1290
|
-
static create(configuration?: LineGridConfiguration): DesignerExtension;
|
|
1291
|
-
private constructor();
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
interface StepsDesignerExtensionConfiguration {
|
|
1295
|
-
container?: ContainerStepExtensionConfiguration;
|
|
1296
|
-
switch?: SwitchStepExtensionConfiguration;
|
|
1297
|
-
task?: TaskStepExtensionConfiguration;
|
|
1298
|
-
}
|
|
1299
|
-
declare class StepsDesignerExtension implements DesignerExtension {
|
|
1300
|
-
readonly steps: StepExtension<Step>[];
|
|
1301
|
-
static create(configuration: StepsDesignerExtensionConfiguration): StepsDesignerExtension;
|
|
1302
|
-
protected constructor(steps: StepExtension<Step>[]);
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
export { Attributes, Badge, BadgeExtension, BadgeView, Badges, BadgesResult, BaseClickCommand, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickCommand, ClickCommandType, ClickDetails, Component, ComponentContext, ComponentDom, ComponentView, ContainerStepComponentViewConfiguration, ContainerStepExtensionConfiguration, ContextMenuExtension, ContextMenuItem, ContextMenuItemsProvider, ControlBarApi, CustomAction, CustomActionController, CustomActionHandler, CustomActionHandlerContext, Daemon, DaemonExtension, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerExtension, DefinitionChangeType, DefinitionChangedEvent, Designer, DesignerApi, DesignerConfiguration, DesignerContext, DesignerExtension, DesignerState, Dom, DraggedComponent, DraggedComponentExtension, Editor, EditorApi, EditorsConfiguration, FoundPlaceholders, Grid, GridExtension, I18n, Icons, InputView, JoinView, KeyboardAction, KeyboardConfiguration, LabelView, LineGridConfiguration, LineGridDesignerExtension, ObjectCloner, OpenFolderClickCommand, OutputView, PathBarApi, Placeholder, PlaceholderController, PlaceholderControllerExtension, PlaceholderDirection, PlaceholderExtension, PlaceholderView, PreferenceStorage, QuantifiedScaleViewportCalculator, RectPlaceholder, RectPlaceholderConfiguration, RectPlaceholderView, RegionComponentViewContentFactory, RegionComponentViewExtension, RegionView, RegionViewFactory, RerenderStepClickCommand, RootComponentExtension, RootEditorContext, RootEditorProvider, RootValidator, SelectStepClickCommand, SelectedStepIdProvider, SequenceComponent, SequenceComponentExtension, SequenceContext, SequencePlaceIndicator, Services, ServicesResolver, SimpleEvent, SimpleEventListener, StartStopRootComponentExtension, StartStopRootComponentExtensionConfiguration, StartStopRootComponentViewConfiguration, StateModifierDependency, StepComponent, StepComponentView, StepComponentViewContext, StepComponentViewFactory, StepComponentViewWrapperExtension, StepContext, StepDefinition, StepDescriptionProvider, StepEditorContext, StepEditorProvider, StepExtension, StepExtensionResolver, StepIconUrlProvider, StepLabelProvider, StepValidator, StepsConfiguration, StepsDesignerExtension, StepsDesignerExtensionConfiguration, SwitchStepComponentViewConfiguration, SwitchStepExtensionConfiguration, TaskStepComponentViewConfiguration, TaskStepExtensionConfiguration, ToolboxApi, ToolboxConfiguration, ToolboxGroupConfiguration, TriggerCustomActionClickCommand, UiComponent, UiComponentExtension, Uid, UidGenerator, UndoStack, UndoStackItem, ValidationErrorBadgeExtension, ValidationErrorBadgeExtensionConfiguration, ValidationErrorBadgeViewConfiguration, ValidatorConfiguration, Vector, Viewport, ViewportController, ViewportControllerExtension, WheelController, WheelControllerExtension, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
|
1352
|
+
export { Attributes, Badge, BadgeExtension, BadgeView, Badges, BadgesResult, BaseClickCommand, Behavior, BehaviorEndToken, CenteredViewportCalculator, ClassicWheelControllerExtension, ClickBehaviorWrapper, ClickBehaviorWrapperExtension, ClickCommand, ClickCommandType, ClickDetails, Component, ComponentContext, ComponentDom, ComponentView, ContainerStepComponentViewConfiguration, ContainerStepExtensionConfiguration, ContextMenuExtension, ContextMenuItem, ContextMenuItemsProvider, ControlBarApi, CustomAction, CustomActionController, CustomActionHandler, CustomActionHandlerContext, Daemon, DaemonExtension, DefaultRegionComponentViewExtension, DefaultRegionView, DefaultSequenceComponent, DefaultSequenceComponentView, DefaultViewportController, DefaultViewportControllerConfiguration, DefaultViewportControllerDesignerExtension, DefaultViewportControllerExtension, DefaultViewportControllerExtensionConfiguration, DefinitionChangeType, DefinitionChangedEvent, Designer, DesignerApi, DesignerConfiguration, DesignerContext, DesignerExtension, DesignerState, Dom, DraggedComponent, DraggedComponentExtension, Editor, EditorApi, EditorsConfiguration, FoundPlaceholders, Grid, GridExtension, I18n, Icons, InputView, JoinView, KeyboardAction, KeyboardConfiguration, LabelView, LineGridConfiguration, LineGridDesignerExtension, NextScale, ObjectCloner, OpenFolderClickCommand, OutputView, PathBarApi, Placeholder, PlaceholderController, PlaceholderControllerExtension, PlaceholderDirection, PlaceholderExtension, PlaceholderView, PreferenceStorage, RectPlaceholder, RectPlaceholderConfiguration, RectPlaceholderView, RegionComponentViewContentFactory, RegionComponentViewExtension, RegionView, RegionViewFactory, RerenderStepClickCommand, RootComponentExtension, RootEditorContext, RootEditorProvider, RootValidator, SelectStepBehaviorEndToken, SelectStepClickCommand, SelectedStepIdProvider, SequenceComponent, SequenceComponentExtension, SequenceContext, SequencePlaceIndicator, Services, ServicesResolver, SimpleEvent, SimpleEventListener, StartStopRootComponentDesignerExtension, StartStopRootComponentExtension, StartStopRootComponentExtensionConfiguration, StartStopRootComponentViewConfiguration, StateModifierDependency, StepComponent, StepComponentView, StepComponentViewContext, StepComponentViewFactory, StepComponentViewWrapperExtension, StepContext, StepDefinition, StepDescriptionProvider, StepEditorContext, StepEditorProvider, StepExtension, StepExtensionResolver, StepIconUrlProvider, StepLabelProvider, StepValidator, StepsConfiguration, StepsDesignerExtension, StepsDesignerExtensionConfiguration, SwitchStepComponentViewConfiguration, SwitchStepExtensionConfiguration, TYPE, TaskStepComponentViewConfiguration, TaskStepExtensionConfiguration, ToolboxApi, ToolboxConfiguration, ToolboxGroupConfiguration, TriggerCustomActionClickCommand, UiComponent, UiComponentExtension, Uid, UidGenerator, UndoStack, UndoStackItem, ValidationErrorBadgeExtension, ValidationErrorBadgeExtensionConfiguration, ValidationErrorBadgeViewConfiguration, ValidatorConfiguration, Vector, Viewport, ViewportApi, ViewportController, ViewportControllerExtension, WheelController, WheelControllerExtension, WorkspaceApi, createContainerStepComponentViewFactory, createSwitchStepComponentViewFactory, createTaskStepComponentViewFactory, getAbsolutePosition, race };
|
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.
|
|
4
|
+
"version": "0.26.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|