verben-workflow-ui 0.5.83 → 0.5.85
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 +33 -2
- package/esm2022/src/lib/base/core/base-data-page.facade.mjs +412 -0
- package/esm2022/src/lib/base/core/base-data-page.service.mjs +140 -0
- package/esm2022/src/lib/base/core/base-data-page.state.mjs +216 -0
- package/esm2022/src/lib/base/handlers/filter-handler.service.mjs +138 -0
- package/esm2022/src/lib/base/handlers/search-handler.service.mjs +31 -0
- package/esm2022/src/lib/base/handlers/sort-handler.service.mjs +73 -0
- package/esm2022/src/lib/base/index.mjs +2 -0
- package/esm2022/src/lib/base/models/api-payload.mjs +7 -0
- package/esm2022/src/lib/base/models/page-config.interface.mjs +2 -0
- package/esm2022/src/lib/base/models/page-filter-tab-option.interface.mjs +2 -0
- package/esm2022/src/lib/base/public-api.mjs +14 -0
- package/esm2022/src/lib/base/utils/column-helpers.mjs +55 -0
- package/esm2022/src/lib/base/verben-workflow-ui-src-lib-base.mjs +5 -0
- package/esm2022/src/lib/components/actors/actors.component.mjs +156 -110
- package/esm2022/src/lib/components/actors/actors.config.mjs +49 -0
- package/esm2022/src/lib/components/actors/actors.facade.mjs +46 -242
- package/esm2022/src/lib/components/actors/actors.form.component.mjs +20 -24
- package/esm2022/src/lib/components/actors/actors.service.mjs +49 -62
- package/esm2022/src/lib/components/actors/actors.state.mjs +11 -80
- package/esm2022/src/lib/components/designer/components/node-selector.component.mjs +1 -3
- package/esm2022/src/lib/components/designer/components/wf-designer.component.mjs +1 -4
- package/esm2022/src/lib/components/designer/services/node-precondition.service.mjs +1 -2
- package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +1 -2
- package/esm2022/src/lib/components/designer/services/wf-persistence.service.mjs +27 -25
- package/esm2022/src/lib/components/flowable-status/flowable-status.component.mjs +169 -102
- package/esm2022/src/lib/components/flowable-status/flowable-status.config.mjs +47 -0
- package/esm2022/src/lib/components/flowable-status/flowable-status.facade.mjs +56 -203
- package/esm2022/src/lib/components/flowable-status/flowable-status.service.mjs +25 -44
- package/esm2022/src/lib/components/flowable-status/flowable-status.state.mjs +10 -80
- package/esm2022/src/lib/components/form-control/form-control.component.mjs +1 -3
- package/esm2022/src/lib/components/form-group/form-fields/form-fields.component.mjs +2 -8
- package/esm2022/src/lib/components/form-group/form-group.component.mjs +2 -10
- package/esm2022/src/lib/components/form-response/form-response.component.mjs +1 -5
- package/esm2022/src/lib/components/form-timer/form-timer.component.mjs +1 -4
- package/esm2022/src/lib/components/forms/forms.component.mjs +1 -1
- package/esm2022/src/lib/components/my-queue/my-queue.component.mjs +3 -3
- package/esm2022/src/lib/components/my-queue/my-queue.facade.mjs +6 -25
- package/esm2022/src/lib/components/my-queue/my-queue.state.mjs +4 -4
- package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +1 -4
- package/esm2022/src/lib/components/operation-popup/operation-popup.component.mjs +1 -13
- package/esm2022/src/lib/components/operation-popup/operation-popup.facade.mjs +1 -15
- package/esm2022/src/lib/components/stage-details/stage-details.component.mjs +1 -3
- package/esm2022/src/lib/components/task-history/task-history.component.mjs +1 -5
- package/esm2022/src/lib/components/task-notification/task-notification.component.mjs +1 -1
- package/esm2022/src/lib/components/tasks/tasks.component.mjs +10 -5
- package/esm2022/src/lib/components/tasks/tasks.facade.mjs +23 -26
- package/esm2022/src/lib/components/tasks/tasks.form.component.mjs +1 -4
- package/esm2022/src/lib/components/tasks/tasks.state.mjs +11 -3
- package/esm2022/src/lib/components/wf/wf.component.mjs +1 -2
- package/esm2022/src/lib/components/workflow/workflow.component.mjs +2 -8
- package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +16 -10
- package/esm2022/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.mjs +10 -2
- package/esm2022/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.mjs +12 -1
- package/esm2022/src/lib/components/workflow-designer/decision-popup/decision-popup.component.mjs +20 -1
- package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +105 -66
- package/esm2022/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.mjs +14 -1
- package/esm2022/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.mjs +16 -12
- package/esm2022/src/lib/components/workflow-designer/services/connection.service.mjs +17 -2
- package/esm2022/src/lib/components/workflow-designer/services/node-management.service.mjs +23 -2
- package/esm2022/src/lib/components/workflow-designer/services/popup.service.mjs +10 -5
- package/esm2022/src/lib/components/workflow-designer/services/swimlane.service.mjs +16 -3
- package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +16 -1
- package/esm2022/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.mjs +16 -14
- package/esm2022/src/lib/components/workflow-designer/stage-node/stage-node.component.mjs +15 -6
- package/esm2022/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.mjs +15 -8
- package/esm2022/src/lib/components/workflow-designer/workflow-data.service.mjs +25 -1
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +75 -23
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.module.mjs +20 -1
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +181 -18
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +1 -1
- package/esm2022/src/lib/components/workflows/public-api.mjs +4 -1
- package/esm2022/src/lib/components/workflows/workflow-form/workflow-form.component.mjs +1 -5
- package/esm2022/src/lib/components/workflows/workflows.api.mjs +63 -0
- package/esm2022/src/lib/components/workflows/workflows.component.mjs +194 -148
- package/esm2022/src/lib/components/workflows/workflows.config.mjs +50 -0
- package/esm2022/src/lib/components/workflows/workflows.facade.mjs +106 -298
- package/esm2022/src/lib/components/workflows/workflows.service.mjs +58 -117
- package/esm2022/src/lib/components/workflows/workflows.state.mjs +12 -81
- package/esm2022/src/lib/services/environment.service.mjs +1 -2
- package/esm2022/src/lib/services/http-web-request.service.mjs +12 -10
- package/esm2022/src/lib/services/util.service.mjs +18 -16
- package/esm2022/src/lib/shared/components/base-data-view.component.mjs +1 -5
- package/fesm2022/verben-workflow-ui-src-lib-base.mjs +1055 -0
- package/fesm2022/verben-workflow-ui-src-lib-base.mjs.map +1 -0
- package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs +314 -508
- package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +26 -31
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs +289 -417
- package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs +0 -2
- package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs +2 -16
- package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs +0 -4
- package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs +0 -3
- package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +8 -30
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs +0 -26
- package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs +0 -2
- package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +0 -4
- package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +37 -30
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs +0 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +603 -158
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs +1 -7
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs +427 -623
- package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-services.mjs +28 -25
- package/fesm2022/verben-workflow-ui-src-lib-services.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-shared.mjs +0 -4
- package/fesm2022/verben-workflow-ui-src-lib-shared.mjs.map +1 -1
- package/package.json +47 -41
- package/src/lib/base/README.md +146 -0
- package/src/lib/base/core/base-data-page.facade.d.ts +138 -0
- package/src/lib/base/core/base-data-page.service.d.ts +61 -0
- package/src/lib/base/core/base-data-page.state.d.ts +73 -0
- package/src/lib/base/handlers/filter-handler.service.d.ts +34 -0
- package/src/lib/base/handlers/search-handler.service.d.ts +20 -0
- package/src/lib/base/handlers/sort-handler.service.d.ts +30 -0
- package/src/lib/base/index.d.ts +1 -0
- package/src/lib/base/models/api-payload.d.ts +2 -0
- package/src/lib/base/models/page-config.interface.d.ts +24 -0
- package/src/lib/base/models/page-filter-tab-option.interface.d.ts +19 -0
- package/src/lib/base/public-api.d.ts +9 -0
- package/src/lib/base/utils/column-helpers.d.ts +24 -0
- package/src/lib/components/actors/actors.component.d.ts +66 -18
- package/src/lib/components/actors/actors.config.d.ts +10 -0
- package/src/lib/components/actors/actors.facade.d.ts +19 -27
- package/src/lib/components/actors/actors.form.component.d.ts +8 -8
- package/src/lib/components/actors/actors.service.d.ts +23 -43
- package/src/lib/components/actors/actors.state.d.ts +10 -27
- package/src/lib/components/flowable-status/flowable-status.component.d.ts +64 -18
- package/src/lib/components/flowable-status/flowable-status.config.d.ts +11 -0
- package/src/lib/components/flowable-status/flowable-status.facade.d.ts +19 -25
- package/src/lib/components/flowable-status/flowable-status.service.d.ts +17 -29
- package/src/lib/components/flowable-status/flowable-status.state.d.ts +7 -26
- package/src/lib/components/tasks/tasks.component.d.ts +2 -1
- package/src/lib/components/tasks/tasks.facade.d.ts +5 -2
- package/src/lib/components/tasks/tasks.state.d.ts +10 -3
- package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.d.ts +4 -0
- package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.d.ts +1 -0
- package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.d.ts +4 -0
- package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.d.ts +3 -0
- package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.d.ts +104 -0
- package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.d.ts +6 -0
- package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.d.ts +4 -0
- package/src/lib/components/workflow-designer/services/connection.service.d.ts +16 -0
- package/src/lib/components/workflow-designer/services/node-management.service.d.ts +22 -1
- package/src/lib/components/workflow-designer/services/popup.service.d.ts +9 -1
- package/src/lib/components/workflow-designer/services/swimlane.service.d.ts +15 -0
- package/src/lib/components/workflow-designer/services/transformer.service.d.ts +15 -0
- package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.d.ts +3 -0
- package/src/lib/components/workflow-designer/stage-node/stage-node.component.d.ts +4 -0
- package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.d.ts +4 -0
- package/src/lib/components/workflow-designer/workflow-data.service.d.ts +24 -0
- package/src/lib/components/workflow-designer/workflow-designer.component.d.ts +74 -0
- package/src/lib/components/workflow-designer/workflow-designer.module.d.ts +19 -0
- package/src/lib/components/workflow-designer/workflow-designer.state.d.ts +179 -0
- package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +80 -0
- package/src/lib/components/workflows/public-api.d.ts +1 -0
- package/src/lib/components/workflows/workflows.api.d.ts +38 -0
- package/src/lib/components/workflows/workflows.component.d.ts +78 -29
- package/src/lib/components/workflows/workflows.config.d.ts +10 -0
- package/src/lib/components/workflows/workflows.facade.d.ts +31 -28
- package/src/lib/components/workflows/workflows.service.d.ts +28 -74
- package/src/lib/components/workflows/workflows.state.d.ts +8 -26
- package/src/lib/services/http-web-request.service.d.ts +1 -1
- package/src/lib/services/util.service.d.ts +8 -0
- package/esm2022/src/lib/components/workflows/workflows.helper.mjs +0 -21
- package/src/lib/components/workflows/workflows.helper.d.ts +0 -3
|
@@ -1,53 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseDataPageService, FilterHandlerService, SortHandlerService } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { Actor, ActorTag, ErrorResponse, Tag } from 'verben-workflow-ui/src/lib/models';
|
|
2
3
|
import { EnvironmentService, HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Service for actor API operations.
|
|
7
|
+
*
|
|
8
|
+
* The list/search/save URLs follow the base's conventions once the endpoint is
|
|
9
|
+
* spelled `Actors` (`GetActors`, `GetActorsWithParam`, `SaveActors`), so no URL
|
|
10
|
+
* seams are overridden. The two lookups do deviate and are implemented here.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ActorService extends BaseDataPageService<Actor> {
|
|
6
13
|
private envSvc;
|
|
7
|
-
|
|
14
|
+
private static readonly LOOKUP_SKIP;
|
|
15
|
+
private static readonly LOOKUP_LIMIT;
|
|
16
|
+
private static readonly LOOKUP_SORT;
|
|
17
|
+
constructor(server: HttpWebRequestService, filterHandler: FilterHandlerService, sortHandler: SortHandlerService, envSvc: EnvironmentService);
|
|
18
|
+
getEndpoint(): string;
|
|
8
19
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param limit Number of records to take
|
|
12
|
-
* @param sortParam Sort parameter
|
|
13
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
14
|
-
* @returns Promise containing the data
|
|
20
|
+
* The API has no delete endpoint for actors. Fail loudly rather than issuing
|
|
21
|
+
* a request that 404s; `enableDelete: false` keeps the UI from offering it.
|
|
15
22
|
*/
|
|
16
|
-
|
|
23
|
+
deleteItems(): Promise<boolean | ErrorResponse>;
|
|
17
24
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param skip Number of records to skip
|
|
21
|
-
* @param limit Number of records to take
|
|
22
|
-
* @param sortParam Sort parameter
|
|
23
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
24
|
-
* @returns Promise containing the filtered data
|
|
25
|
+
* Tags live on the **Authentication** API, not the workflow one, so this call
|
|
26
|
+
* passes an explicit base URL. `get()` takes baseUrl as its second argument.
|
|
25
27
|
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
* @param requests Array of data to save
|
|
30
|
-
* @returns Promise containing the save operation result
|
|
31
|
-
*/
|
|
32
|
-
saveActors(requests: Actor[]): Promise<any | ErrorResponse>;
|
|
33
|
-
/**
|
|
34
|
-
* Get user access requests with pagination and sorting
|
|
35
|
-
* @param skip Number of records to skip
|
|
36
|
-
* @param limit Number of records to take
|
|
37
|
-
* @param sortParam Sort parameter
|
|
38
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
39
|
-
* @returns Promise containing the user access requests
|
|
40
|
-
*/
|
|
41
|
-
getTags(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<Tag> | ErrorResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Get actor tags with pagination and sorting
|
|
44
|
-
* @param skip Number of records to skip
|
|
45
|
-
* @param limit Number of records to take
|
|
46
|
-
* @param sortParam Sort parameter
|
|
47
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
48
|
-
* @returns Promise containing the actor tags
|
|
49
|
-
*/
|
|
50
|
-
getActorTags(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<Tag> | ErrorResponse>;
|
|
28
|
+
getTags(): Promise<Tag[]>;
|
|
29
|
+
/** Actor tags come from the default (workflow) API. */
|
|
30
|
+
getActorTags(): Promise<ActorTag[]>;
|
|
51
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActorService, never>;
|
|
52
32
|
static ɵprov: i0.ɵɵInjectableDeclaration<ActorService>;
|
|
53
33
|
}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
import { Actor,
|
|
2
|
+
import { BaseDataPageState } from 'verben-workflow-ui/src/lib/base';
|
|
3
|
+
import { Actor, ActorTag, Tag } from 'verben-workflow-ui/src/lib/models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/**
|
|
6
|
+
* State for the actors page.
|
|
7
|
+
* Adds the two lookup lists the form's multiselects are bound to. They come
|
|
8
|
+
* from different APIs — see ActorService.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ActorState extends BaseDataPageState<Actor> {
|
|
11
11
|
private tags$;
|
|
12
12
|
private actorTags$;
|
|
13
|
-
isUpdating$(): Observable<boolean>;
|
|
14
|
-
setUpdating(isUpdating: boolean): void;
|
|
15
|
-
getRequests$(): Observable<Actor[]>;
|
|
16
|
-
setRequests(data: Actor[]): void;
|
|
17
13
|
getTags$(): Observable<Tag[]>;
|
|
18
14
|
setTags(tags: Tag[]): void;
|
|
19
|
-
getActorTags$(): Observable<
|
|
20
|
-
setActorTags(tags:
|
|
21
|
-
getSearchTerm$(): Observable<string>;
|
|
22
|
-
getSearchTermValue(): string;
|
|
23
|
-
setSearchTerm(term: string): void;
|
|
24
|
-
getFilterParams$(): Observable<IDataFilter[]>;
|
|
25
|
-
setFilterParams(params: IDataFilter[]): void;
|
|
26
|
-
getQueryParams$(): Observable<QueryParams<Actor>>;
|
|
27
|
-
getQueryParamsValue(): QueryParams<Actor>;
|
|
28
|
-
updateQueryParams(params: Partial<QueryParams<Actor>>): void;
|
|
29
|
-
addRequest(task: Actor): void;
|
|
30
|
-
resetPagination(): void;
|
|
31
|
-
updateRequest(updatedRequest: Actor): void;
|
|
32
|
-
removeRequest(code: string): void;
|
|
33
|
-
appendRequests(newRequests: Actor[]): void;
|
|
15
|
+
getActorTags$(): Observable<ActorTag[]>;
|
|
16
|
+
setActorTags(tags: ActorTag[]): void;
|
|
34
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActorState, never>;
|
|
35
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<ActorState>;
|
|
36
19
|
}
|
|
@@ -1,34 +1,80 @@
|
|
|
1
|
-
import { ChangeDetectorRef, WritableSignal } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { CardData, FormGroupConfig } from 'verben-ng-ui';
|
|
1
|
+
import { ChangeDetectorRef, OnInit, WritableSignal } from '@angular/core';
|
|
2
|
+
import { CardData, CardDataViewComponent, ColumnDefinition, DataViewComponent, FilterCondition, SortCondition } from 'verben-ng-ui';
|
|
4
3
|
import { FlowableStatus } from 'verben-workflow-ui/src/lib/models';
|
|
5
|
-
import { BaseDataViewComponent, DataViewConfig } from 'verben-workflow-ui/src/lib/shared';
|
|
6
|
-
import { FlowableStatusFacade } from './flowable-status.facade';
|
|
7
4
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class FlowableStatusComponent
|
|
5
|
+
export declare class FlowableStatusComponent implements OnInit {
|
|
9
6
|
private cdr;
|
|
7
|
+
cardDataView: CardDataViewComponent;
|
|
8
|
+
dataView: DataViewComponent;
|
|
10
9
|
private facade;
|
|
11
|
-
private
|
|
12
|
-
config:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
private destroyRef;
|
|
11
|
+
readonly config: import("verben-workflow-ui/src/lib/base").BasePageConfig<FlowableStatus>;
|
|
12
|
+
readonly styles: import("verben-ng-ui").TableStyles;
|
|
13
|
+
data: import("@angular/core").Signal<FlowableStatus[]>;
|
|
14
|
+
cardData: WritableSignal<CardData[]>;
|
|
15
|
+
readonly isTableView$: import("rxjs").Observable<boolean>;
|
|
16
|
+
readonly filters$: import("rxjs").Observable<FilterCondition[]>;
|
|
17
|
+
readonly restoredColumns$: import("rxjs").Observable<ColumnDefinition<FlowableStatus>[]>;
|
|
18
|
+
formGroupConfig: WritableSignal<import("verben-ng-ui").FormGroupConfig<any>>;
|
|
19
|
+
visibleColumns: WritableSignal<ColumnDefinition<FlowableStatus>[]>;
|
|
20
|
+
selectedColumnCount: number;
|
|
21
|
+
selectedSortCount: number;
|
|
22
|
+
selectedFilterTableCount: number;
|
|
23
|
+
constructor(cdr: ChangeDetectorRef);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Tear down the card view's own selection.
|
|
27
|
+
*
|
|
28
|
+
* Nulling the facade's currentCardData only empties the form's fields — the
|
|
29
|
+
* CardDataViewComponent keeps a separate `currentItem`, and that is what holds
|
|
30
|
+
* the right-hand panel open. Without this the form goes blank after a search
|
|
31
|
+
* but the panel stays on screen.
|
|
32
|
+
*/
|
|
33
|
+
private clearCardView;
|
|
34
|
+
/**
|
|
35
|
+
* The record open in the detail form. Backed by the facade so a refetch can
|
|
36
|
+
* close it — loadData() clears the selection before replacing the list, which
|
|
37
|
+
* is what stops the form staying open after a search.
|
|
38
|
+
*/
|
|
39
|
+
get currentData(): CardData | null;
|
|
40
|
+
set currentData(value: CardData | null);
|
|
17
41
|
loadMore(): Promise<void>;
|
|
18
|
-
|
|
19
|
-
handleSearch(event: {
|
|
20
|
-
key: string;
|
|
21
|
-
value: string;
|
|
22
|
-
}): void;
|
|
23
|
-
handleFetchedExport({ skip, limit }: any): void;
|
|
42
|
+
/** Backs lib-data-xport's dataQueryFunction; bound in the constructor. */
|
|
24
43
|
loadData(range: {
|
|
25
44
|
skip: number;
|
|
26
45
|
limit: number;
|
|
27
46
|
}): Promise<FlowableStatus[]>;
|
|
47
|
+
handleSearch(event: {
|
|
48
|
+
key: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}): void;
|
|
51
|
+
onFilterApplied(filters: FilterCondition[]): void;
|
|
52
|
+
onSortUpdated(sorts: SortCondition[]): void;
|
|
53
|
+
onColumnsUpdated(updatedColumns: ColumnDefinition<FlowableStatus>[]): void;
|
|
54
|
+
onSave(data: Partial<FlowableStatus>): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Commit an inline table-row edit. The edits must be merged over the row at
|
|
57
|
+
* `index` — the old `(rowSave)="onSave($event.data)"` binding merged them over
|
|
58
|
+
* whichever record happened to be open in the card form instead.
|
|
59
|
+
*/
|
|
60
|
+
onRowSave(event: {
|
|
61
|
+
index: number;
|
|
62
|
+
key: number | string;
|
|
63
|
+
data: Partial<FlowableStatus>;
|
|
64
|
+
}): Promise<void>;
|
|
65
|
+
onSelectionChange(_selectedRows: FlowableStatus[]): void;
|
|
66
|
+
onViewChange(isTableView: boolean): void;
|
|
28
67
|
onStateChange(event: {
|
|
29
68
|
key: string;
|
|
30
69
|
value: boolean;
|
|
31
70
|
}): void;
|
|
71
|
+
cardClicked(item: CardData, toggleView?: boolean): void;
|
|
72
|
+
handleExport(exportedData: Partial<FlowableStatus>[]): void;
|
|
73
|
+
handleFetchedExport({ skip, limit }: {
|
|
74
|
+
skip: number;
|
|
75
|
+
limit: number;
|
|
76
|
+
}): void;
|
|
77
|
+
private downloadCSV;
|
|
32
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowableStatusComponent, never>;
|
|
33
79
|
static ɵcmp: i0.ɵɵComponentDeclaration<FlowableStatusComponent, "lib-flowable-status", never, {}, {}, never, never, false, never>;
|
|
34
80
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BasePageConfig } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { FlowableStatus } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
+
/**
|
|
4
|
+
* Page configuration for flowable statuses.
|
|
5
|
+
*
|
|
6
|
+
* `enableFilter` / `enableDelete` are off: the API exposes neither a
|
|
7
|
+
* `SearchFlowableStatus` endpoint nor a delete endpoint. Turn them on once the
|
|
8
|
+
* backend has them — the base already routes to the conventional URLs. Sort
|
|
9
|
+
* stays on because it rides the plain list GET's URL and needs no new endpoint.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FLOWABLE_STATUS_CONFIG: BasePageConfig<FlowableStatus>;
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FlowableStatus, QueryParams } from 'verben-workflow-ui/src/lib/models';
|
|
1
|
+
import { BaseDataPageFacade, SearchHandlerService } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { FlowableStatus } from 'verben-workflow-ui/src/lib/models';
|
|
4
3
|
import { UtilService } from 'verben-workflow-ui/src/lib/services';
|
|
5
4
|
import { FlowableStatusService } from './flowable-status.service';
|
|
6
5
|
import { FlowableStatusState } from './flowable-status.state';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
updateQueryParams(params: Partial<QueryParams<FlowableStatus>>): void;
|
|
26
|
-
addRequest(request: Partial<FlowableStatus>): Promise<void>;
|
|
27
|
-
updateRequest(request: FlowableStatus): Promise<void>;
|
|
28
|
-
loadMore(queue?: boolean): Promise<void>;
|
|
29
|
-
loadData(skip: number, limit: number): Promise<FlowableStatus[] | void>;
|
|
7
|
+
/**
|
|
8
|
+
* Facade for the flowable-status page.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FlowableStatusFacade extends BaseDataPageFacade<FlowableStatus> {
|
|
11
|
+
constructor(state: FlowableStatusState, service: FlowableStatusService, searchHandler: SearchHandlerService, utilService: UtilService);
|
|
12
|
+
/**
|
|
13
|
+
* Save the record currently open in the form, merged over whatever the form
|
|
14
|
+
* did not edit. `saveItems()` decides insert vs update from the presence of a
|
|
15
|
+
* Code — see BaseDataPageFacade.withDataState for why the incoming DataState
|
|
16
|
+
* cannot be trusted.
|
|
17
|
+
*/
|
|
18
|
+
save(edits: Partial<FlowableStatus>): Promise<boolean>;
|
|
19
|
+
/** Commit an inline table-row edit. Does not close the card form. */
|
|
20
|
+
saveRow(row: FlowableStatus, edits: Partial<FlowableStatus>): Promise<boolean>;
|
|
21
|
+
/** Prepend a blank record and open it in the form. */
|
|
22
|
+
startCreate(): FlowableStatus;
|
|
23
|
+
private createEmpty;
|
|
30
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowableStatusFacade, never>;
|
|
31
25
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowableStatusFacade>;
|
|
32
26
|
}
|
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BaseDataPageService, FilterHandlerService, SortHandlerService } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { ErrorResponse, FlowableStatus } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
+
import { HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Service for flowable-status API operations.
|
|
7
|
+
*
|
|
8
|
+
* No URL overrides: the endpoint follows the base's conventions exactly —
|
|
9
|
+
* `GetFlowableStatus/{skip}/{limit}/{sortParam}/{sortOrder}`,
|
|
10
|
+
* `GetFlowableStatusWithParam/...` and `SaveFlowableStatus`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class FlowableStatusService extends BaseDataPageService<FlowableStatus> {
|
|
13
|
+
constructor(server: HttpWebRequestService, filterHandler: FilterHandlerService, sortHandler: SortHandlerService);
|
|
14
|
+
getEndpoint(): string;
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @param sortParam Sort parameter
|
|
13
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
14
|
-
* @returns Promise containing the data
|
|
16
|
+
* The API has no delete endpoint for flowable statuses. Fail loudly rather
|
|
17
|
+
* than issuing a request that 404s, and keep `enableDelete: false` in the
|
|
18
|
+
* config so the UI never offers the action.
|
|
15
19
|
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Get data with additional parameter, pagination and sorting
|
|
19
|
-
* @param param Search parameter
|
|
20
|
-
* @param skip Number of records to skip
|
|
21
|
-
* @param limit Number of records to take
|
|
22
|
-
* @param sortParam Sort parameter
|
|
23
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
24
|
-
* @returns Promise containing the filtered data
|
|
25
|
-
*/
|
|
26
|
-
getFlowableStatusWithParam(param: string, skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<FlowableStatus> | ErrorResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* Save multiple data
|
|
29
|
-
* @param requests Array of data to save
|
|
30
|
-
* @returns Promise containing the save operation result
|
|
31
|
-
*/
|
|
32
|
-
saveFlowableStatuses(requests: FlowableStatus[]): Promise<any | ErrorResponse>;
|
|
20
|
+
deleteItems(): Promise<boolean | ErrorResponse>;
|
|
33
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowableStatusService, never>;
|
|
34
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowableStatusService>;
|
|
35
23
|
}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FlowableStatus, QueryParams } from 'verben-workflow-ui/src/lib/models';
|
|
1
|
+
import { BaseDataPageState } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { FlowableStatus } from 'verben-workflow-ui/src/lib/models';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private filterParams$;
|
|
11
|
-
isUpdating$(): Observable<boolean>;
|
|
12
|
-
setUpdating(isUpdating: boolean): void;
|
|
13
|
-
getRequests$(): Observable<FlowableStatus[]>;
|
|
14
|
-
setRequests(data: FlowableStatus[]): void;
|
|
15
|
-
getSearchTerm$(): Observable<string>;
|
|
16
|
-
getSearchTermValue(): string;
|
|
17
|
-
setSearchTerm(term: string): void;
|
|
18
|
-
getFilterParams$(): Observable<IDataFilter[]>;
|
|
19
|
-
setFilterParams(params: IDataFilter[]): void;
|
|
20
|
-
getQueryParams$(): Observable<QueryParams<FlowableStatus>>;
|
|
21
|
-
getQueryParamsValue(): QueryParams<FlowableStatus>;
|
|
22
|
-
updateQueryParams(params: Partial<QueryParams<FlowableStatus>>): void;
|
|
23
|
-
addRequest(task: FlowableStatus): void;
|
|
24
|
-
resetPagination(): void;
|
|
25
|
-
updateRequest(updatedRequest: FlowableStatus): void;
|
|
26
|
-
removeRequest(code: string): void;
|
|
27
|
-
appendRequests(newRequests: FlowableStatus[]): void;
|
|
4
|
+
/**
|
|
5
|
+
* State for the flowable-status page.
|
|
6
|
+
* Carries no extra lookups — the page has no dropdowns to feed.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FlowableStatusState extends BaseDataPageState<FlowableStatus> {
|
|
28
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowableStatusState, never>;
|
|
29
10
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowableStatusState>;
|
|
30
11
|
}
|
|
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class TasksComponent extends BaseDataViewComponent<Task> {
|
|
8
8
|
private cdr;
|
|
9
9
|
private taskFacade;
|
|
10
|
+
pageSize: import("@angular/core").InputSignal<number>;
|
|
10
11
|
user: import("@angular/core").InputSignal<string>;
|
|
11
12
|
config: DataViewConfig<Task>;
|
|
12
13
|
constructor(cdr: ChangeDetectorRef, taskFacade: TaskFacade);
|
|
@@ -24,5 +25,5 @@ export declare class TasksComponent extends BaseDataViewComponent<Task> {
|
|
|
24
25
|
loadMore(): Promise<void>;
|
|
25
26
|
onSave(data: Partial<Task>): Promise<void>;
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<TasksComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TasksComponent, "lib-tasks", never, { "user": { "alias": "user"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TasksComponent, "lib-tasks", never, { "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
28
29
|
}
|
|
@@ -22,10 +22,13 @@ export declare class TaskFacade implements OnDestroy {
|
|
|
22
22
|
getNextActors$(): Observable<Actor[]>;
|
|
23
23
|
getQueryParams$(): Observable<QueryParams<Task>>;
|
|
24
24
|
addNewRequest(task: Task): void;
|
|
25
|
-
loadRequests(
|
|
25
|
+
loadRequests(): Promise<void>;
|
|
26
26
|
loadRequestsWithParam(param: string): Promise<void>;
|
|
27
|
-
updateQueryParams(params: Partial<QueryParams<Task>>
|
|
27
|
+
updateQueryParams(params: Partial<QueryParams<Task>> & {
|
|
28
|
+
user?: string;
|
|
29
|
+
}): void;
|
|
28
30
|
addRequest(request: Partial<Task>): Promise<void>;
|
|
31
|
+
resetQueryParams(): void;
|
|
29
32
|
updateRequest(request: Task): Promise<void>;
|
|
30
33
|
deleteRequest(requestId: string): Promise<void>;
|
|
31
34
|
approveRequest(request: Task): Promise<void>;
|
|
@@ -22,14 +22,21 @@ export declare class TaskState {
|
|
|
22
22
|
getSearchTerm$(): Observable<string>;
|
|
23
23
|
getSearchTermValue(): string;
|
|
24
24
|
setSearchTerm(term: string): void;
|
|
25
|
-
getQueryParams$(): Observable<QueryParams<Task
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
getQueryParams$(): Observable<QueryParams<Task> & {
|
|
26
|
+
user?: string;
|
|
27
|
+
}>;
|
|
28
|
+
getQueryParamsValue(): QueryParams<Task> & {
|
|
29
|
+
user?: string;
|
|
30
|
+
};
|
|
31
|
+
updateQueryParams(params: Partial<QueryParams<Task>> & {
|
|
32
|
+
user?: string;
|
|
33
|
+
}): void;
|
|
28
34
|
addRequest(task: Task): void;
|
|
29
35
|
resetPagination(): void;
|
|
30
36
|
updateRequest(updatedRequest: Task): void;
|
|
31
37
|
removeRequest(taskId: string): void;
|
|
32
38
|
appendRequests(newRequests: Task[]): void;
|
|
39
|
+
resetQueryParams(): void;
|
|
33
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TaskState, never>;
|
|
34
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<TaskState>;
|
|
35
42
|
}
|
|
@@ -9,10 +9,14 @@ export declare class ActionDialogComponent implements OnInit {
|
|
|
9
9
|
private fb;
|
|
10
10
|
private dataService;
|
|
11
11
|
private state;
|
|
12
|
+
/** Signal input — read as `this.visible()`. */
|
|
12
13
|
visible: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
/** Connection being edited. Read as `this.actionData()`. */
|
|
13
15
|
actionData: import("@angular/core").InputSignal<Connection | null>;
|
|
14
16
|
closed: EventEmitter<any>;
|
|
17
|
+
/** Emits the edited connection for the parent to apply. */
|
|
15
18
|
saved: EventEmitter<Connection>;
|
|
19
|
+
/** Emits the deleted connection's id. */
|
|
16
20
|
deleted: EventEmitter<string>;
|
|
17
21
|
actionForm: FormGroup;
|
|
18
22
|
operationActions: WritableSignal<OperationAction[]>;
|
package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.d.ts
CHANGED
|
@@ -12,9 +12,13 @@ interface ConnectionCondition {
|
|
|
12
12
|
export declare class ConditionsPopupComponent {
|
|
13
13
|
private state;
|
|
14
14
|
visible: boolean;
|
|
15
|
+
/** Decision node the branch leaves from. */
|
|
15
16
|
decisionNodeId: string;
|
|
17
|
+
/** Connection awaiting a condition. */
|
|
16
18
|
newConnectionId: string;
|
|
19
|
+
/** Viewport X — not canvas X. */
|
|
17
20
|
popupX: number;
|
|
21
|
+
/** Viewport Y — not canvas Y. */
|
|
18
22
|
popupY: number;
|
|
19
23
|
closed: EventEmitter<any>;
|
|
20
24
|
saved: EventEmitter<{
|
|
@@ -10,8 +10,11 @@ interface ConnectionCondition {
|
|
|
10
10
|
export declare class DecisionPopupComponent {
|
|
11
11
|
private state;
|
|
12
12
|
visible: boolean;
|
|
13
|
+
/** Decision node whose branches are shown. */
|
|
13
14
|
decisionNodeId: string;
|
|
15
|
+
/** Viewport X — not canvas X. */
|
|
14
16
|
popupX: number;
|
|
17
|
+
/** Viewport Y — not canvas Y. */
|
|
15
18
|
popupY: number;
|
|
16
19
|
closed: EventEmitter<any>;
|
|
17
20
|
showDuration: boolean;
|
|
@@ -4,28 +4,68 @@ import { WorkflowDataService } from '../workflow-data.service';
|
|
|
4
4
|
import { WorkflowDesignerState } from '../workflow-designer.state';
|
|
5
5
|
import { Connection, ConnectionPoint, Node, SwimlaneItem, ToolType, Node as WFNode } from '../workflow-designer.types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* The SVG editing surface. Renders the entire scene — swimlanes, nodes,
|
|
9
|
+
* connections, and overlaid popups — from {@link WorkflowDesignerState}, and
|
|
10
|
+
* owns nearly all pointer interaction: placing nodes, dragging them within and
|
|
11
|
+
* between lanes, and the connection drag/drop pipeline.
|
|
12
|
+
*
|
|
13
|
+
* This is the largest file in the module. It reads and mutates the shared
|
|
14
|
+
* `state` singleton directly rather than holding its own model.
|
|
15
|
+
*
|
|
16
|
+
* ## Coordinate spaces used here
|
|
17
|
+
*
|
|
18
|
+
* - {@link getMousePosition} returns **absolute canvas** coordinates — the space
|
|
19
|
+
* `state.addNode` and `Math.floor(y / 263)` expect.
|
|
20
|
+
* - {@link getViewportPosition} additionally subtracts scroll offsets and is
|
|
21
|
+
* used **only** to position HTML popups over the SVG. Never feed its output
|
|
22
|
+
* into node or connection math.
|
|
23
|
+
*
|
|
24
|
+
* Read `../docs/02-coordinate-system.md` before changing anything positional.
|
|
25
|
+
*
|
|
26
|
+
* ## Popups
|
|
27
|
+
*
|
|
28
|
+
* Popup visibility is tracked with local booleans here, even though a
|
|
29
|
+
* `PopupService` exists. Only `StageDialogComponent` uses that service; the two
|
|
30
|
+
* mechanisms coexist. See `../docs/06-known-issues.md` section C.
|
|
31
|
+
*
|
|
32
|
+
* @see ../docs/04-interactions.md — the user-facing flows this component implements
|
|
33
|
+
*/
|
|
7
34
|
export declare class DesignerCanvasComponent implements OnInit {
|
|
8
35
|
state: WorkflowDesignerState;
|
|
9
36
|
private dataService;
|
|
37
|
+
/** Active toolbar tool; `null` means pointer mode. */
|
|
10
38
|
selectedTool: ToolType;
|
|
39
|
+
/**
|
|
40
|
+
* Canvas click position in **absolute** coordinates, for the parent to act on
|
|
41
|
+
* per the selected tool.
|
|
42
|
+
*
|
|
43
|
+
* Also carries a sentinel: `{ x: -1, y: laneIndex }` means "edit the swimlane
|
|
44
|
+
* at `laneIndex`" (the lane's pencil button), not a placement.
|
|
45
|
+
*/
|
|
11
46
|
clickedPosition: EventEmitter<{
|
|
12
47
|
x: number;
|
|
13
48
|
y: number;
|
|
14
49
|
}>;
|
|
50
|
+
/** Emitted when a workflow is chosen for a subflow node. */
|
|
15
51
|
subflowSelected: EventEmitter<any>;
|
|
52
|
+
/** Where a stage will be created once the stage dialog is confirmed. */
|
|
16
53
|
pendingStagePosition: {
|
|
17
54
|
swimlaneIndex: number;
|
|
18
55
|
x: number;
|
|
19
56
|
y: number;
|
|
20
57
|
} | null;
|
|
58
|
+
/** A stage node's properties were edited on the canvas. */
|
|
21
59
|
stagePropertiesUpdated: EventEmitter<{
|
|
22
60
|
nodeId: string;
|
|
23
61
|
stageData: Partial<WorkflowStage>;
|
|
24
62
|
}>;
|
|
63
|
+
/** A connection's action properties were edited on the canvas. */
|
|
25
64
|
actionPropertiesUpdated: EventEmitter<{
|
|
26
65
|
connectionId: string;
|
|
27
66
|
actionData: Partial<WorkflowAction>;
|
|
28
67
|
}>;
|
|
68
|
+
/** The SVG root; its bounding box defines absolute canvas space. */
|
|
29
69
|
canvasRef: ElementRef<SVGElement>;
|
|
30
70
|
onWindowMouseUp(event: MouseEvent): void;
|
|
31
71
|
canvasWidth: number;
|
|
@@ -105,7 +145,23 @@ export declare class DesignerCanvasComponent implements OnInit {
|
|
|
105
145
|
onStageDialogSaved(stageData: Partial<WorkflowStage>): void;
|
|
106
146
|
onActionDialogSaved(actionData: Connection): void;
|
|
107
147
|
updateCanvasSize(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Converts a DOM mouse event into **absolute canvas coordinates**, relative
|
|
150
|
+
* to the SVG's bounding box.
|
|
151
|
+
*
|
|
152
|
+
* This is the space that `state.addNode`, `Math.floor(y / 263)`, and all
|
|
153
|
+
* connection math expect. Use this — not {@link getViewportPosition} — for
|
|
154
|
+
* anything positional.
|
|
155
|
+
*/
|
|
108
156
|
private getMousePosition;
|
|
157
|
+
/**
|
|
158
|
+
* Converts absolute canvas coordinates into **viewport coordinates** by
|
|
159
|
+
* subtracting the scroll container's offsets.
|
|
160
|
+
*
|
|
161
|
+
* Used **only** to position HTML popups overlaid on the SVG. Feeding this
|
|
162
|
+
* into node or connection math produces elements that drift as the canvas
|
|
163
|
+
* scrolls.
|
|
164
|
+
*/
|
|
109
165
|
private getViewportPosition;
|
|
110
166
|
showConnectionPoints(nodeId: string, swimlaneIndex: number): void;
|
|
111
167
|
isMouseOverNode(event: MouseEvent, node: WFNode, swimlaneIndex: number): boolean;
|
|
@@ -146,7 +202,35 @@ export declare class DesignerCanvasComponent implements OnInit {
|
|
|
146
202
|
getCursorForNode(nodeId: string): string;
|
|
147
203
|
onMouseMove: (event: MouseEvent) => void;
|
|
148
204
|
updateConnectionDrag(currentX: number, currentY: number): void;
|
|
205
|
+
/**
|
|
206
|
+
* Terminates a connection drag. Three outcomes, evaluated in order:
|
|
207
|
+
*
|
|
208
|
+
* 1. **Dropped on an existing connection point** — if the source and target
|
|
209
|
+
* are different nodes and `state.canConnect` allows the type pairing, the
|
|
210
|
+
* connection is created immediately.
|
|
211
|
+
* 2. **Dropped inside a swimlane but not on a point** — opens the node-type
|
|
212
|
+
* popup ({@link showConnectionPopup}), offering only the types permitted by
|
|
213
|
+
* `state.getAllowedTargetNodeTypes()`. The node is created later, by
|
|
214
|
+
* {@link createNodeConnection}.
|
|
215
|
+
* 3. **Dropped outside every swimlane** — the drag is cancelled.
|
|
216
|
+
*
|
|
217
|
+
* Always detaches the document-level move/up listeners first, so an early
|
|
218
|
+
* return cannot leave them attached.
|
|
219
|
+
*/
|
|
149
220
|
onMouseUp: (event: MouseEvent) => void;
|
|
221
|
+
/**
|
|
222
|
+
* Hit-tests an absolute canvas position against every node's connection
|
|
223
|
+
* points, resolving each to absolute space as
|
|
224
|
+
* `node.y + swimlaneIndex * 263 + point.y` — the inverse of the render
|
|
225
|
+
* formula.
|
|
226
|
+
*
|
|
227
|
+
* Returns the first point within `tolerance` pixels, or `null`. Scans all
|
|
228
|
+
* lanes and all nodes linearly.
|
|
229
|
+
*
|
|
230
|
+
* @param x Absolute canvas X (from {@link getMousePosition}).
|
|
231
|
+
* @param y Absolute canvas Y.
|
|
232
|
+
* @param tolerance Hit radius in pixels.
|
|
233
|
+
*/
|
|
150
234
|
findConnectionPointAtPosition(x: number, y: number, tolerance?: number): {
|
|
151
235
|
point: ConnectionPoint;
|
|
152
236
|
nodeId: string;
|
|
@@ -155,6 +239,26 @@ export declare class DesignerCanvasComponent implements OnInit {
|
|
|
155
239
|
isPositionInsideSwimlane(y: number): boolean;
|
|
156
240
|
showConnectionPopup(x: number, y: number): void;
|
|
157
241
|
hideConnectionPopup(): void;
|
|
242
|
+
/**
|
|
243
|
+
* Creates a new node at the drop point and connects the dragged edge to it —
|
|
244
|
+
* the path taken when the user picks a type from the node-type popup.
|
|
245
|
+
*
|
|
246
|
+
* ## The coordinate contract this method must honour
|
|
247
|
+
*
|
|
248
|
+
* The target swimlane is derived from the **drop** Y
|
|
249
|
+
* (`Math.floor(endY / 263)`, clamped to the lane range), and `endY` is passed
|
|
250
|
+
* to `state.addNode` **absolute and unconverted**. `addNode` performs the
|
|
251
|
+
* lane-relative conversion itself.
|
|
252
|
+
*
|
|
253
|
+
* This method previously did the opposite — pre-converting `endY` and passing
|
|
254
|
+
* the *source* lane — which made `addNode` subtract the lane offset twice, so
|
|
255
|
+
* the new stage rendered one lane too high and attached to the wrong
|
|
256
|
+
* swimlane. `designer-canvas.connection-drop.spec.ts` guards against the
|
|
257
|
+
* regression. Do not reintroduce a conversion here.
|
|
258
|
+
*
|
|
259
|
+
* Connecting a decision to a stage defers node creation until the branch
|
|
260
|
+
* condition is supplied, via {@link pendingDecisionConnection}.
|
|
261
|
+
*/
|
|
158
262
|
createNodeConnection(nodeType: string): void;
|
|
159
263
|
onDecisionConditionSaved(event: {
|
|
160
264
|
connectionId: string;
|