sequential-workflow-designer 0.25.0 → 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 +662 -614
- package/lib/cjs/index.cjs +662 -614
- package/lib/esm/index.js +659 -615
- package/lib/index.d.ts +83 -55
- 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
83
|
static create(shadowRoot: ShadowRoot | undefined): BehaviorController;
|
|
81
|
-
private
|
|
84
|
+
private previousEndToken;
|
|
85
|
+
private state;
|
|
82
86
|
private constructor();
|
|
83
87
|
start(startPosition: Vector, behavior: Behavior): void;
|
|
84
88
|
private bind;
|
|
@@ -460,33 +464,33 @@ declare class ToolboxApi {
|
|
|
460
464
|
private activateStep;
|
|
461
465
|
}
|
|
462
466
|
|
|
467
|
+
declare class ViewportApi {
|
|
468
|
+
private readonly state;
|
|
469
|
+
private readonly workspaceController;
|
|
470
|
+
private readonly viewportController;
|
|
471
|
+
private readonly animator;
|
|
472
|
+
constructor(state: DesignerState, workspaceController: WorkspaceControllerWrapper, viewportController: ViewportController);
|
|
473
|
+
limitScale(scale: number): number;
|
|
474
|
+
resetViewport(): void;
|
|
475
|
+
zoom(direction: boolean): void;
|
|
476
|
+
moveViewportToStep(stepId: string): void;
|
|
477
|
+
handleWheelEvent(e: WheelEvent): void;
|
|
478
|
+
}
|
|
479
|
+
|
|
463
480
|
declare class WorkspaceApi {
|
|
464
481
|
private readonly state;
|
|
465
482
|
private readonly workspaceController;
|
|
466
483
|
constructor(state: DesignerState, workspaceController: WorkspaceControllerWrapper);
|
|
484
|
+
getViewport(): Viewport;
|
|
485
|
+
setViewport(viewport: Viewport): void;
|
|
467
486
|
getCanvasPosition(): Vector;
|
|
468
487
|
getCanvasSize(): Vector;
|
|
469
488
|
getRootComponentSize(): Vector;
|
|
470
|
-
getViewport(): Viewport;
|
|
471
|
-
setViewport(viewport: Viewport): void;
|
|
472
489
|
updateRootComponent(): void;
|
|
473
490
|
updateBadges(): void;
|
|
474
491
|
updateCanvasSize(): void;
|
|
475
492
|
}
|
|
476
493
|
|
|
477
|
-
declare class ViewportApi {
|
|
478
|
-
private readonly workspaceController;
|
|
479
|
-
private readonly viewportController;
|
|
480
|
-
private readonly api;
|
|
481
|
-
private readonly animator;
|
|
482
|
-
constructor(workspaceController: WorkspaceControllerWrapper, viewportController: ViewportController, api: WorkspaceApi);
|
|
483
|
-
limitScale(scale: number): number;
|
|
484
|
-
resetViewport(): void;
|
|
485
|
-
zoom(direction: boolean): void;
|
|
486
|
-
moveViewportToStep(stepId: string): void;
|
|
487
|
-
handleWheelEvent(e: WheelEvent): void;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
494
|
declare class DesignerApi {
|
|
491
495
|
readonly shadowRoot: ShadowRoot | undefined;
|
|
492
496
|
readonly controlBar: ControlBarApi;
|
|
@@ -501,6 +505,15 @@ declare class DesignerApi {
|
|
|
501
505
|
private constructor();
|
|
502
506
|
}
|
|
503
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
|
+
|
|
504
517
|
declare class Badges {
|
|
505
518
|
private readonly g;
|
|
506
519
|
private readonly position;
|
|
@@ -757,6 +770,7 @@ declare class DefaultRegionComponentViewExtension implements RegionComponentView
|
|
|
757
770
|
interface DesignerExtension {
|
|
758
771
|
steps?: StepExtension[];
|
|
759
772
|
stepComponentViewWrapper?: StepComponentViewWrapperExtension;
|
|
773
|
+
clickBehaviorWrapperExtension?: ClickBehaviorWrapperExtension;
|
|
760
774
|
badges?: BadgeExtension[];
|
|
761
775
|
uiComponents?: UiComponentExtension[];
|
|
762
776
|
draggedComponent?: DraggedComponentExtension;
|
|
@@ -805,6 +819,12 @@ interface SequenceContext {
|
|
|
805
819
|
interface StepComponentViewWrapperExtension {
|
|
806
820
|
wrap(view: StepComponentView, stepContext: StepContext): StepComponentView;
|
|
807
821
|
}
|
|
822
|
+
interface ClickBehaviorWrapperExtension {
|
|
823
|
+
create(customActionController: CustomActionController): ClickBehaviorWrapper;
|
|
824
|
+
}
|
|
825
|
+
interface ClickBehaviorWrapper {
|
|
826
|
+
wrap(behavior: Behavior, commandOrNull: ClickCommand | null): Behavior;
|
|
827
|
+
}
|
|
808
828
|
interface BadgeExtension {
|
|
809
829
|
id: string;
|
|
810
830
|
createForStep(parentElement: SVGElement, view: StepComponentView, stepContext: StepContext, componentContext: ComponentContext): Badge;
|
|
@@ -1125,13 +1145,9 @@ declare class ControlBarApi {
|
|
|
1125
1145
|
private readonly state;
|
|
1126
1146
|
private readonly historyController;
|
|
1127
1147
|
private readonly stateModifier;
|
|
1128
|
-
|
|
1129
|
-
static create(state: DesignerState, historyController: HistoryController | undefined, stateModifier: StateModifier, viewportApi: ViewportApi): ControlBarApi;
|
|
1148
|
+
static create(state: DesignerState, historyController: HistoryController | undefined, stateModifier: StateModifier): ControlBarApi;
|
|
1130
1149
|
private constructor();
|
|
1131
1150
|
readonly onStateChanged: SimpleEvent<unknown>;
|
|
1132
|
-
resetViewport(): void;
|
|
1133
|
-
zoomIn(): void;
|
|
1134
|
-
zoomOut(): void;
|
|
1135
1151
|
isDragDisabled(): boolean;
|
|
1136
1152
|
toggleIsDragDisabled(): void;
|
|
1137
1153
|
isUndoRedoSupported(): boolean;
|
|
@@ -1143,6 +1159,50 @@ declare class ControlBarApi {
|
|
|
1143
1159
|
canDelete(): boolean;
|
|
1144
1160
|
}
|
|
1145
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
|
+
|
|
1146
1206
|
declare class Editor {
|
|
1147
1207
|
private readonly view;
|
|
1148
1208
|
private readonly renderer;
|
|
@@ -1289,36 +1349,4 @@ declare class Designer<TDefinition extends Definition = Definition> {
|
|
|
1289
1349
|
private getHistoryController;
|
|
1290
1350
|
}
|
|
1291
1351
|
|
|
1292
|
-
|
|
1293
|
-
readonly size: Vector;
|
|
1294
|
-
readonly element: SVGPathElement;
|
|
1295
|
-
static create(size: Vector): LineGrid;
|
|
1296
|
-
private constructor();
|
|
1297
|
-
setScale(_: number, scaledSize: Vector): void;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
declare class LineGridExtension implements GridExtension {
|
|
1301
|
-
private readonly configuration;
|
|
1302
|
-
static create(configuration?: LineGridConfiguration): LineGridExtension;
|
|
1303
|
-
private constructor();
|
|
1304
|
-
create(): LineGrid;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
declare class LineGridDesignerExtension implements DesignerExtension {
|
|
1308
|
-
readonly grid: LineGridExtension;
|
|
1309
|
-
static create(configuration?: LineGridConfiguration): DesignerExtension;
|
|
1310
|
-
private constructor();
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
interface StepsDesignerExtensionConfiguration {
|
|
1314
|
-
container?: ContainerStepExtensionConfiguration;
|
|
1315
|
-
switch?: SwitchStepExtensionConfiguration;
|
|
1316
|
-
task?: TaskStepExtensionConfiguration;
|
|
1317
|
-
}
|
|
1318
|
-
declare class StepsDesignerExtension implements DesignerExtension {
|
|
1319
|
-
readonly steps: StepExtension<Step>[];
|
|
1320
|
-
static create(configuration: StepsDesignerExtensionConfiguration): StepsDesignerExtension;
|
|
1321
|
-
protected constructor(steps: StepExtension<Step>[]);
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
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, DefaultViewportControllerConfiguration, 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, 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, ViewportApi, 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",
|