verben-workflow-ui 0.7.7 → 0.7.9

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.
Files changed (85) hide show
  1. package/esm2022/src/lib/components/actors/actors.component.mjs +4 -3
  2. package/esm2022/src/lib/components/designer/components/label-editor.component.mjs +9 -4
  3. package/esm2022/src/lib/components/designer/components/swimlane-label.component.mjs +1 -1
  4. package/esm2022/src/lib/components/designer/components/wf-canvas.component.mjs +2 -2
  5. package/esm2022/src/lib/components/designer/models/types.mjs +1 -1
  6. package/esm2022/src/lib/components/designer/services/connection.service.mjs +260 -29
  7. package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +16 -2
  8. package/esm2022/src/lib/components/flowable-status/flowable-status.component.mjs +4 -3
  9. package/esm2022/src/lib/components/form-response/form-response.component.mjs +4 -3
  10. package/esm2022/src/lib/components/form-response/form-response.module.mjs +7 -3
  11. package/esm2022/src/lib/components/form-values/form-values.component.mjs +4 -3
  12. package/esm2022/src/lib/components/forms/forms.component.mjs +4 -3
  13. package/esm2022/src/lib/components/my-queue/my-queue.columns.mjs +6 -1
  14. package/esm2022/src/lib/components/my-queue/my-queue.component.mjs +4 -3
  15. package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +29 -7
  16. package/esm2022/src/lib/components/task-history/task-history.component.mjs +37 -8
  17. package/esm2022/src/lib/components/task-notification/task-notification.component.mjs +3 -3
  18. package/esm2022/src/lib/components/tasks/tasks.columns.mjs +6 -1
  19. package/esm2022/src/lib/components/tasks/tasks.component.mjs +4 -3
  20. package/esm2022/src/lib/components/tasks/tasks.form.component.mjs +13 -3
  21. package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +13 -3
  22. package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +400 -25
  23. package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +3 -1
  24. package/esm2022/src/lib/components/workflow-designer/workflow-data.service.mjs +67 -2
  25. package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +92 -31
  26. package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +3 -1
  27. package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +1 -1
  28. package/esm2022/src/lib/components/workflow-stage/workflow-stage.component.mjs +75 -14
  29. package/esm2022/src/lib/models/WorkflowAction.mjs +1 -1
  30. package/esm2022/src/lib/pipes/company-date.pipe.mjs +34 -0
  31. package/esm2022/src/lib/pipes/public-api.mjs +2 -1
  32. package/esm2022/src/lib/services/public-api.mjs +2 -1
  33. package/esm2022/src/lib/services/util.service.mjs +7 -1
  34. package/esm2022/src/lib/services/workflow-form.helper.mjs +58 -0
  35. package/esm2022/src/lib/shared/shared.module.mjs +7 -5
  36. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs +3 -2
  37. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs.map +1 -1
  38. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +284 -34
  39. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +1 -1
  40. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs +3 -2
  41. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs.map +1 -1
  42. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs +9 -4
  43. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs.map +1 -1
  44. package/fesm2022/verben-workflow-ui-src-lib-components-form-values.mjs +3 -2
  45. package/fesm2022/verben-workflow-ui-src-lib-components-form-values.mjs.map +1 -1
  46. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs +3 -2
  47. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs.map +1 -1
  48. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +36 -8
  49. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +1 -1
  50. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +37 -8
  51. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +1 -1
  52. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs +2 -2
  53. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs.map +1 -1
  54. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +20 -4
  55. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +1 -1
  56. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +572 -57
  57. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +1 -1
  58. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs +74 -13
  59. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs.map +1 -1
  60. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs +32 -1
  61. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs.map +1 -1
  62. package/fesm2022/verben-workflow-ui-src-lib-services.mjs +65 -1
  63. package/fesm2022/verben-workflow-ui-src-lib-services.mjs.map +1 -1
  64. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs +6 -4
  65. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs.map +1 -1
  66. package/package.json +31 -31
  67. package/src/lib/components/designer/components/label-editor.component.d.ts +2 -1
  68. package/src/lib/components/designer/models/types.d.ts +1 -0
  69. package/src/lib/components/designer/services/connection.service.d.ts +15 -0
  70. package/src/lib/components/form-response/form-response.module.d.ts +2 -1
  71. package/src/lib/components/my-queue/tasks.form.component.d.ts +3 -1
  72. package/src/lib/components/task-history/task-history.component.d.ts +3 -1
  73. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.d.ts +4 -2
  74. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.d.ts +5 -0
  75. package/src/lib/components/workflow-designer/workflow-data.service.d.ts +7 -0
  76. package/src/lib/components/workflow-designer/workflow-designer.component.d.ts +1 -0
  77. package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +1 -0
  78. package/src/lib/components/workflow-stage/workflow-stage.component.d.ts +4 -1
  79. package/src/lib/models/WorkflowAction.d.ts +1 -0
  80. package/src/lib/pipes/company-date.pipe.d.ts +11 -0
  81. package/src/lib/pipes/public-api.d.ts +1 -0
  82. package/src/lib/services/public-api.d.ts +1 -0
  83. package/src/lib/services/util.service.d.ts +4 -0
  84. package/src/lib/services/workflow-form.helper.d.ts +17 -0
  85. package/src/lib/shared/shared.module.d.ts +1 -1
@@ -267,6 +267,7 @@ export declare class DesignerCanvasComponent implements OnInit {
267
267
  onDecisionConditionCancelled(): void;
268
268
  getConnectionPath(): string;
269
269
  getConnectionPathForSavedConnection(connection: Connection): string;
270
+ private pointsToSvgPath;
270
271
  getOrthogonalPath(startX: number, startY: number, endX: number, endY: number, pointType: 'top' | 'right' | 'bottom' | 'left'): string;
271
272
  selectFormForStage(form: Form | null, node: Node): void;
272
273
  onStagePropertiesUpdated(event: {
@@ -282,10 +283,14 @@ export declare class DesignerCanvasComponent implements OnInit {
282
283
  selectSubflowWorkflow(workflow: Workflow): void;
283
284
  showDecisionConditionsPopup(event: MouseEvent, node: WFNode, swimlaneIndex: number): void;
284
285
  ensureSwimlaneInView(swimlaneIndex: number): void;
286
+ private connectionLayoutCache;
287
+ private lastLabelLayoutSignature;
285
288
  getLabelPosition(connection: Connection): {
286
289
  x: number;
287
290
  y: number;
288
291
  };
292
+ private getConnectionLayout;
293
+ private getBaseLabelPosition;
289
294
  saveConnectionLabel(connection: Connection, label: string): void;
290
295
  static ɵfac: i0.ɵɵFactoryDeclaration<DesignerCanvasComponent, never>;
291
296
  static ɵcmp: i0.ɵɵComponentDeclaration<DesignerCanvasComponent, "lib-designer-canvas", never, { "selectedTool": { "alias": "selectedTool"; "required": false; }; }, { "clickedPosition": "clickedPosition"; "subflowSelected": "subflowSelected"; "stagePropertiesUpdated": "stagePropertiesUpdated"; "actionPropertiesUpdated": "actionPropertiesUpdated"; }, never, never, false, never>;
@@ -1,3 +1,4 @@
1
+ import { DropdownLoadEvent } from 'verben-ng-ui';
1
2
  import { ActorTag, ErrorResponse, Escalation, FlowableStatus, Form, OperationAction, Paged, ReportSchedule, SwimLane, Tag, Workflow, WorkflowStage } from 'verben-workflow-ui/src/lib/models';
2
3
  import { EnvironmentService, HttpWebRequestService, UtilService } from 'verben-workflow-ui/src/lib/services';
3
4
  import * as i0 from "@angular/core";
@@ -39,7 +40,13 @@ export declare class WorkflowDataService {
39
40
  private withLoader;
40
41
  getWorkflowWithParam(param: string, skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<Workflow>>;
41
42
  getWorkflows(skip?: number, limit?: number): Promise<Paged<Workflow>>;
43
+ private readonly formPageSize;
42
44
  getForms(skip?: number, limit?: number): Promise<Paged<Form>>;
45
+ getAllForms(): Promise<Form[]>;
46
+ loadMoreForms(event: DropdownLoadEvent): Promise<Form[]>;
47
+ searchForms(param: string, event: DropdownLoadEvent): Promise<Form[]>;
48
+ getAsyncFormLabel(value: any): Promise<string>;
49
+ private loadFormsDynamic;
43
50
  getTags(skip?: number, limit?: number): Promise<Paged<Tag>>;
44
51
  saveWorkflows(requests: Partial<Workflow>[]): Promise<any | ErrorResponse>;
45
52
  deleteWorkflowStages(requests: WorkflowStage['Code'][]): Promise<any>;
@@ -86,6 +86,7 @@ export declare class WorkflowDesignerComponent {
86
86
  * `./docs/06-known-issues.md` section A.
87
87
  */
88
88
  parseWorkflowData(workflow: Workflow): void;
89
+ private ensureHorizontalArrowClearance;
89
90
  findSwimlaneIndexByLaneId(laneId: string): number;
90
91
  onToolSelected(tool: ToolType): void;
91
92
  openSwimlaneDialog(): void;
@@ -128,4 +128,5 @@ export interface Connection {
128
128
  targetStatus?: string;
129
129
  position: number;
130
130
  caption: string;
131
+ form?: string;
131
132
  }
@@ -25,6 +25,8 @@ export declare class WorkflowStageComponent {
25
25
  editorConfig: EditorConfig;
26
26
  isFormViewerVisible: boolean;
27
27
  activeForm: Form | null;
28
+ suppressFormDrawer: boolean;
29
+ private workflowActionsCache;
28
30
  hoveredStage: any;
29
31
  stageTooltipPos: {
30
32
  top: number;
@@ -113,7 +115,8 @@ export declare class WorkflowStageComponent {
113
115
  private pickTask;
114
116
  private reassignTask;
115
117
  closePopUp4(): void;
116
- loadFormIfExists(stage: string | undefined): Promise<void>;
118
+ loadFormIfExists(stage: string | undefined, historyItem?: ActionHistory): Promise<void>;
119
+ private getWorkflowActions;
117
120
  onFormViewerOpen(): void;
118
121
  onFormViewerClose(): void;
119
122
  closePopUp3(): void;
@@ -12,4 +12,5 @@ export interface WorkflowAction extends BaseModel {
12
12
  TargetStatus?: string;
13
13
  Position: number;
14
14
  Caption: string;
15
+ Form?: string;
15
16
  }
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { UtilService } from 'verben-workflow-ui/src/lib/services';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CompanyDatePipe implements PipeTransform {
5
+ private utilSvc;
6
+ constructor(utilSvc: UtilService);
7
+ private sanitize;
8
+ transform(value: string | Date): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<CompanyDatePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<CompanyDatePipe, "companyDate", true>;
11
+ }
@@ -1 +1,2 @@
1
1
  export * from './async-label.pipe';
2
+ export * from './company-date.pipe';
@@ -2,3 +2,4 @@ export * from './environment.service';
2
2
  export * from './http-web-request.service';
3
3
  export * from './label.service';
4
4
  export * from './util.service';
5
+ export * from './workflow-form.helper';
@@ -17,6 +17,10 @@ export declare class UtilService {
17
17
  saveUserPageConfig(option: any): Promise<any | null>;
18
18
  /** Load a page's saved config via the host app, or null when unsupported. */
19
19
  getUserPageConfig(ui: string): Promise<any | null>;
20
+ getCompanyLocale(): {
21
+ dateFormat: string;
22
+ locale: string;
23
+ } | undefined;
20
24
  static ɵfac: i0.ɵɵFactoryDeclaration<UtilService, [{ optional: true; }]>;
21
25
  static ɵprov: i0.ɵɵInjectableDeclaration<UtilService>;
22
26
  }
@@ -0,0 +1,17 @@
1
+ import { ActionHistory, Form, WorkflowAction } from 'verben-workflow-ui/src/lib/models';
2
+ /**
3
+ * Resolves which form (if any) from `forms` should be shown for `action` given its
4
+ * `siblingActions`:
5
+ * 1. If `action.Form` is set (non-empty after trim), returns the matching form in `forms`,
6
+ * or `null` if not found.
7
+ * 2. If `action` has no `Form`, checks whether any action in `siblingActions` references a form:
8
+ * - If any sibling references a form, returns the first form in `forms` not referenced
9
+ * by any sibling action (or `null` if none).
10
+ * - If no action references a form, falls back to `forms[0]`.
11
+ */
12
+ export declare function resolveFormForAction(action: WorkflowAction | null | undefined, siblingActions?: WorkflowAction[], forms?: Form[]): Form | null;
13
+ /**
14
+ * Resolves the form to display for a historical stage/action entry from the forms
15
+ * returned by `GetCurrentFormsForTask`.
16
+ */
17
+ export declare function resolveHistoryForm(historyItem: ActionHistory | undefined, stageCode: string | undefined, workflowActions?: WorkflowAction[], forms?: Form[]): Form | null;
@@ -6,6 +6,6 @@ import * as i4 from "@angular/forms";
6
6
  import * as i5 from "verben-reporting-ui";
7
7
  export declare class SharedModule {
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, never, [typeof i1.CommonModule, typeof i2.AsyncLabelPipe], [typeof i1.CommonModule, typeof i3.DataTableModule, typeof i3.CardModule, typeof i3.SvgModule, typeof i3.DataViewModule, typeof i3.CardDataViewModule, typeof i3.SortTableModule, typeof i3.VisibleColumnModule, typeof i3.TableFilterModule, typeof i3.DataExportModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i3.VerbenaInputModule, typeof i3.VerbenaButtonModule, typeof i3.VerbenaBadgeModule, typeof i3.VerbenDialogueModule, typeof i3.DropDownModule, typeof i3.VerbenaTextareaModule, typeof i3.VerbenaSwitchModule, typeof i3.VerbenPopUpModule, typeof i3.ChipModule, typeof i3.DatePickerModule, typeof i3.DataColumnsModule, typeof i3.DataXportModule, typeof i3.DataSortModule, typeof i3.DataFilterModule, typeof i2.AsyncLabelPipe, typeof i5.EditorModule]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, never, [typeof i1.CommonModule, typeof i2.AsyncLabelPipe, typeof i2.CompanyDatePipe], [typeof i1.CommonModule, typeof i3.DataTableModule, typeof i3.CardModule, typeof i3.SvgModule, typeof i3.DataViewModule, typeof i3.CardDataViewModule, typeof i3.SortTableModule, typeof i3.VisibleColumnModule, typeof i3.TableFilterModule, typeof i3.DataExportModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i3.VerbenaInputModule, typeof i3.VerbenaButtonModule, typeof i3.VerbenaBadgeModule, typeof i3.VerbenDialogueModule, typeof i3.DropDownModule, typeof i3.VerbenaTextareaModule, typeof i3.VerbenaSwitchModule, typeof i3.VerbenPopUpModule, typeof i3.ChipModule, typeof i3.DatePickerModule, typeof i3.DataColumnsModule, typeof i3.DataXportModule, typeof i3.DataSortModule, typeof i3.DataFilterModule, typeof i2.AsyncLabelPipe, typeof i5.EditorModule, typeof i2.CompanyDatePipe]>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
11
11
  }