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,49 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime types for the workflow designer.
|
|
3
|
+
*
|
|
4
|
+
* These interfaces are the live model — the class hierarchy in
|
|
5
|
+
* `workflow-designer.models.ts` is unused. See `./docs/03-data-model.md`.
|
|
6
|
+
*
|
|
7
|
+
* ## Coordinate spaces
|
|
8
|
+
*
|
|
9
|
+
* Three different spaces appear in these types, and mixing them is the most
|
|
10
|
+
* common source of bugs in this module:
|
|
11
|
+
*
|
|
12
|
+
* - **Absolute canvas space** — what the mouse reports. Y grows down across all
|
|
13
|
+
* swimlanes.
|
|
14
|
+
* - **Lane-relative space** — `Node.x/y`. Y is measured from the top of the
|
|
15
|
+
* node's own swimlane.
|
|
16
|
+
* - **Node-relative space** — `ConnectionPoint.x/y`. Measured from the node's
|
|
17
|
+
* own origin.
|
|
18
|
+
*
|
|
19
|
+
* Converting between them uses the swimlane height (263) and nothing else:
|
|
20
|
+
*
|
|
21
|
+
* ```
|
|
22
|
+
* absoluteY = node.y + swimlane.order * 263 // render a node
|
|
23
|
+
* node.y = absoluteY - swimlane.order * 263 // store a drop
|
|
24
|
+
* absoluteY = node.y + laneIndex * 263 + point.y // resolve a point
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* See `./docs/02-coordinate-system.md` before touching any of this.
|
|
28
|
+
*/
|
|
1
29
|
import { Tag, WorkflowStage } from 'verben-workflow-ui/src/lib/models';
|
|
30
|
+
/**
|
|
31
|
+
* Tools available in the designer toolbar. `null` means no tool is selected
|
|
32
|
+
* (pointer mode); re-selecting the active tool clears it back to `null`.
|
|
33
|
+
*
|
|
34
|
+
* Note: `'action'` is largely vestigial. Connections are created by dragging
|
|
35
|
+
* from a node's connection point, not by selecting this tool and clicking.
|
|
36
|
+
*/
|
|
2
37
|
export type ToolType = 'swimlane' | 'stage' | 'action' | 'form' | 'decision' | 'subflow' | null;
|
|
38
|
+
/**
|
|
39
|
+
* A horizontal band representing one role/actor group. Swimlanes own their
|
|
40
|
+
* nodes — there is no flat node list anywhere in the designer.
|
|
41
|
+
*/
|
|
3
42
|
export interface SwimlaneItem {
|
|
43
|
+
/**
|
|
44
|
+
* 0-based vertical position, and the multiplier for every coordinate
|
|
45
|
+
* conversion: this lane's band spans absolute Y `[order * 263, (order+1) * 263)`.
|
|
46
|
+
*/
|
|
4
47
|
order: number;
|
|
48
|
+
/** Display name shown in the lane header. */
|
|
5
49
|
label: string;
|
|
50
|
+
/** Actor tags that own this lane. */
|
|
6
51
|
tags: Tag[];
|
|
52
|
+
/** Nodes placed in this lane. */
|
|
7
53
|
nodes?: Node[];
|
|
54
|
+
/** Backend lane id. Absent for lanes created in-session until first save. */
|
|
8
55
|
id?: string;
|
|
9
56
|
}
|
|
57
|
+
/** A single element on the canvas: a stage, decision, form, or subflow. */
|
|
10
58
|
export interface Node {
|
|
59
|
+
/** Client-generated id. */
|
|
11
60
|
id: string;
|
|
61
|
+
/** Shape, connection-point layout, and connection rules all key off this. */
|
|
12
62
|
type: 'stage' | 'decision' | 'form' | 'subflow';
|
|
63
|
+
/** Canvas X. Plain — there is no per-lane X offset. */
|
|
13
64
|
x: number;
|
|
65
|
+
/**
|
|
66
|
+
* Y **relative to the owning swimlane**, not absolute.
|
|
67
|
+
* Render with `y + swimlane.order * 263`. This asymmetry with `x` is the
|
|
68
|
+
* single most misread part of the model.
|
|
69
|
+
*/
|
|
14
70
|
y: number;
|
|
71
|
+
/** Stage nodes are 169 wide, subflow nodes 150. */
|
|
15
72
|
width: number;
|
|
73
|
+
/** 100 for both stage and subflow nodes. */
|
|
16
74
|
height: number;
|
|
75
|
+
/** Whether this node is the workflow's entry point. */
|
|
17
76
|
isStartNode: boolean;
|
|
77
|
+
/** Attachment points, generated per shape by `generateConnectionPoints`. */
|
|
18
78
|
connectionPoints?: ConnectionPoint[];
|
|
79
|
+
/** Backing stage record. Populated for `type: 'stage'`. */
|
|
19
80
|
stageData?: Partial<WorkflowStage & {
|
|
20
81
|
formId?: string;
|
|
21
82
|
formName?: string;
|
|
22
83
|
}>;
|
|
84
|
+
/** Target workflow. Populated for `type: 'subflow'`. */
|
|
23
85
|
workflowData?: {
|
|
24
86
|
id: string;
|
|
25
87
|
name: string;
|
|
26
88
|
} | null;
|
|
89
|
+
/** Set when this node fans out to more than one target. */
|
|
27
90
|
hasMultipleConnectedStages?: boolean;
|
|
91
|
+
/** Whether outgoing branches execute in parallel. */
|
|
28
92
|
hasParallelStages?: boolean;
|
|
29
93
|
}
|
|
94
|
+
/** An attachment point on a node's edge, where connections start and end. */
|
|
30
95
|
export interface ConnectionPoint {
|
|
31
96
|
id: string;
|
|
97
|
+
/** The node this point belongs to. */
|
|
32
98
|
nodeId: string;
|
|
99
|
+
/** X relative to the **node's** origin — not the canvas, not the lane. */
|
|
33
100
|
x: number;
|
|
101
|
+
/** Y relative to the **node's** origin — not the canvas, not the lane. */
|
|
34
102
|
y: number;
|
|
103
|
+
/** Which edge the point sits on. */
|
|
35
104
|
type: 'top' | 'right' | 'bottom' | 'left';
|
|
36
105
|
}
|
|
106
|
+
/** An edge between two nodes; persists as a workflow action. */
|
|
37
107
|
export interface Connection {
|
|
38
108
|
id: string;
|
|
39
109
|
sourceNodeId: string;
|
|
40
110
|
targetNodeId: string;
|
|
41
111
|
sourcePointId: string;
|
|
42
112
|
targetPointId: string;
|
|
113
|
+
/**
|
|
114
|
+
* Denormalised lane index of the source node, used directly in endpoint math.
|
|
115
|
+
* ⚠️ Must be refreshed when the source node moves lanes, or the edge renders
|
|
116
|
+
* detached from its node.
|
|
117
|
+
*/
|
|
43
118
|
sourceSwimlaneIndex: number;
|
|
119
|
+
/** Denormalised lane index of the target node. Same caveat as above. */
|
|
44
120
|
targetSwimlaneIndex: number;
|
|
121
|
+
/** Branch condition. Set on edges leaving a decision node. */
|
|
45
122
|
condition?: string;
|
|
123
|
+
/** Edge label. */
|
|
46
124
|
label: string;
|
|
125
|
+
/** Backing workflow action. */
|
|
47
126
|
action: string | null;
|
|
127
|
+
/** Flowable status applied when this edge is traversed. */
|
|
48
128
|
targetStatus?: string;
|
|
49
129
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ErrorResponse, FormEntity, Paged, Tag, Workflow, WorkflowOperation } from 'verben-workflow-ui/src/lib/models';
|
|
2
|
+
import { EnvironmentService, HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Raw workflow endpoint access, independent of any page.
|
|
6
|
+
*
|
|
7
|
+
* `WorkflowsService` is provided **per component** (it carries the list page's
|
|
8
|
+
* base-page plumbing), so it cannot be injected by root-provided consumers. The
|
|
9
|
+
* workflow designer needs the same endpoints without any of the paging, filter
|
|
10
|
+
* or card state, so those calls live here and this service stays root-provided.
|
|
11
|
+
*
|
|
12
|
+
* `WorkflowsService` delegates its lookups here rather than duplicating them.
|
|
13
|
+
*/
|
|
14
|
+
export declare class WorkflowApiService {
|
|
15
|
+
private httpService;
|
|
16
|
+
private envSvc;
|
|
17
|
+
private static readonly LOOKUP_SORT;
|
|
18
|
+
constructor(httpService: HttpWebRequestService, envSvc: EnvironmentService);
|
|
19
|
+
/**
|
|
20
|
+
* Fetch workflows. `limit = 0` means "all" to this API.
|
|
21
|
+
*/
|
|
22
|
+
getWorkflows(skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<Workflow> | ErrorResponse>;
|
|
23
|
+
/** Look a workflow up by code. Returns a paged result with at most one row. */
|
|
24
|
+
getWorkflowWithParam(param: string, skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<Workflow> | ErrorResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* NOTE: post() is (url, body, overrideToken?, baseUrl?) — baseUrl is the
|
|
27
|
+
* fourth argument, unlike get()/delete() where it is the second.
|
|
28
|
+
*/
|
|
29
|
+
saveWorkflows(requests: Partial<Workflow>[]): Promise<Workflow[] | ErrorResponse>;
|
|
30
|
+
/** Approve or reject workflows. Returns the updated records. */
|
|
31
|
+
processWorkflows(requests: Workflow[], isApproval: boolean): Promise<Workflow[] | ErrorResponse>;
|
|
32
|
+
getWorkflowOperations(skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<WorkflowOperation> | ErrorResponse>;
|
|
33
|
+
getForms(skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<FormEntity> | ErrorResponse>;
|
|
34
|
+
/** Tags live on the Authentication API; `get()` takes baseUrl second. */
|
|
35
|
+
getTags(skip?: number, limit?: number, sortParam?: string, sortOrder?: string): Promise<Paged<Tag> | ErrorResponse>;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowApiService, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowApiService>;
|
|
38
|
+
}
|
|
@@ -1,49 +1,98 @@
|
|
|
1
|
-
import { ChangeDetectorRef, WritableSignal } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { CardData, IDataFilter } 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 { PermissionConfig, Status, TaskAssignmentType, Workflow, WorkflowOperation } from 'verben-workflow-ui/src/lib/models';
|
|
5
|
-
import { BaseDataViewComponent, DataViewConfig } from 'verben-workflow-ui/src/lib/shared';
|
|
6
|
-
import { WorkflowFacade } from './workflows.facade';
|
|
7
4
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class WorkflowsComponent
|
|
5
|
+
export declare class WorkflowsComponent implements OnInit {
|
|
9
6
|
private cdr;
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
cardDataView: CardDataViewComponent;
|
|
8
|
+
dataView: DataViewComponent;
|
|
12
9
|
designerUrl: import("@angular/core").InputSignal<string>;
|
|
13
10
|
permissionConfig: import("@angular/core").InputSignal<PermissionConfig | null>;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
private facade;
|
|
12
|
+
private destroyRef;
|
|
13
|
+
readonly config: import("verben-workflow-ui/src/lib/base").BasePageConfig<Workflow>;
|
|
14
|
+
readonly styles: import("verben-ng-ui").TableStyles;
|
|
15
|
+
data: import("@angular/core").Signal<Workflow[]>;
|
|
16
|
+
cardData: WritableSignal<CardData[]>;
|
|
17
|
+
readonly isTableView$: import("rxjs").Observable<boolean>;
|
|
18
|
+
readonly filters$: import("rxjs").Observable<FilterCondition[]>;
|
|
19
|
+
readonly restoredColumns$: import("rxjs").Observable<ColumnDefinition<Workflow>[]>;
|
|
20
|
+
operations: import("@angular/core").Signal<WorkflowOperation[]>;
|
|
21
|
+
formGroupConfig: WritableSignal<import("verben-ng-ui").FormGroupConfig<any>>;
|
|
16
22
|
assignmentTypes: TaskAssignmentType[];
|
|
17
23
|
statuses: Status[];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
visibleColumns: WritableSignal<ColumnDefinition<Workflow>[]>;
|
|
25
|
+
selectedColumnCount: number;
|
|
26
|
+
selectedSortCount: number;
|
|
27
|
+
selectedFilterTableCount: number;
|
|
28
|
+
/** Workflow queued for deletion, pending confirmation. */
|
|
29
|
+
pendingDelete: WritableSignal<Workflow | null>;
|
|
30
|
+
canExport: import("@angular/core").Signal<boolean>;
|
|
31
|
+
canCreate: import("@angular/core").Signal<boolean>;
|
|
32
|
+
canDesign: import("@angular/core").Signal<boolean>;
|
|
33
|
+
constructor(cdr: ChangeDetectorRef);
|
|
34
|
+
ngOnInit(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Tear down the card view's own selection.
|
|
37
|
+
*
|
|
38
|
+
* Nulling the facade's currentCardData only empties the form's fields — the
|
|
39
|
+
* CardDataViewComponent keeps a separate `currentItem`, and that is what holds
|
|
40
|
+
* the right-hand panel open. Without this the form goes blank after a search
|
|
41
|
+
* but the panel stays on screen.
|
|
42
|
+
*/
|
|
43
|
+
private clearCardView;
|
|
44
|
+
/**
|
|
45
|
+
* The record open in the detail form. Backed by the facade so a refetch can
|
|
46
|
+
* close it — loadData() clears the selection before replacing the list.
|
|
47
|
+
*/
|
|
48
|
+
get currentData(): CardData | null;
|
|
49
|
+
set currentData(value: CardData | null);
|
|
50
|
+
loadMore(): Promise<void>;
|
|
51
|
+
/** Backs lib-data-xport's dataQueryFunction; bound in the constructor. */
|
|
52
|
+
loadData(range: {
|
|
53
|
+
skip: number;
|
|
54
|
+
limit: number;
|
|
55
|
+
}): Promise<Workflow[]>;
|
|
35
56
|
handleSearch(event: {
|
|
36
57
|
key: string;
|
|
37
58
|
value: string;
|
|
38
59
|
}): void;
|
|
60
|
+
onFilterApplied(filters: FilterCondition[]): void;
|
|
61
|
+
onSortUpdated(sorts: SortCondition[]): void;
|
|
62
|
+
onColumnsUpdated(updatedColumns: ColumnDefinition<Workflow>[]): void;
|
|
63
|
+
onSave(data: Partial<Workflow>): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Commit an inline table-row edit. The table owns the row's form group (via
|
|
66
|
+
* config.formGroupConfig) and hands back its value, replacing the old
|
|
67
|
+
* per-row `editForms` Map.
|
|
68
|
+
*
|
|
69
|
+
* The edits must be merged over the row at `index` — not over the record open
|
|
70
|
+
* in the card form, which is what the old `(rowSave)="onSave($event.data)"`
|
|
71
|
+
* binding did on the sibling pages.
|
|
72
|
+
*/
|
|
73
|
+
onRowSave(event: {
|
|
74
|
+
index: number;
|
|
75
|
+
key: number | string;
|
|
76
|
+
data: Partial<Workflow>;
|
|
77
|
+
}): Promise<void>;
|
|
78
|
+
requestDelete(row: Workflow): void;
|
|
79
|
+
cancelDelete(): void;
|
|
80
|
+
confirmDelete(): Promise<void>;
|
|
81
|
+
onSelectionChange(_selectedRows: Workflow[]): void;
|
|
82
|
+
onViewChange(isTableView: boolean): void;
|
|
39
83
|
onStateChange(event: {
|
|
40
84
|
key: string;
|
|
41
85
|
value: boolean;
|
|
42
86
|
}): void;
|
|
43
|
-
|
|
87
|
+
cardClicked(item: CardData, toggleView?: boolean): void;
|
|
88
|
+
/** Open a table row's record in the card view. */
|
|
89
|
+
goToCardView(code: string): void;
|
|
90
|
+
handleExport(exportedData: Partial<Workflow>[]): void;
|
|
91
|
+
handleFetchedExport({ skip, limit }: {
|
|
44
92
|
skip: number;
|
|
45
93
|
limit: number;
|
|
46
|
-
}):
|
|
94
|
+
}): void;
|
|
95
|
+
private downloadCSV;
|
|
47
96
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowsComponent, never>;
|
|
48
97
|
static ɵcmp: i0.ɵɵComponentDeclaration<WorkflowsComponent, "lib-workflows", never, { "designerUrl": { "alias": "designerUrl"; "required": false; "isSignal": true; }; "permissionConfig": { "alias": "permissionConfig"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
|
49
98
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BasePageConfig } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { Workflow } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
+
/**
|
|
4
|
+
* Page configuration for workflows.
|
|
5
|
+
*
|
|
6
|
+
* This is the one page with a real POST search endpoint (`SearchWorkflow`), so
|
|
7
|
+
* `enableFilter` is on. Export and create are additionally gated at runtime by
|
|
8
|
+
* the component's `permissionConfig` input.
|
|
9
|
+
*/
|
|
10
|
+
export declare const WORKFLOW_CONFIG: BasePageConfig<Workflow>;
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BaseDataPageFacade, SearchHandlerService } from 'verben-workflow-ui/src/lib/base';
|
|
3
|
+
import { Workflow, WorkflowOperation } from 'verben-workflow-ui/src/lib/models';
|
|
4
4
|
import { UtilService } from 'verben-workflow-ui/src/lib/services';
|
|
5
5
|
import { WorkflowsService } from './workflows.service';
|
|
6
6
|
import { WorkflowsState } from './workflows.state';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Facade for the workflows page.
|
|
10
|
+
*/
|
|
11
|
+
export declare class WorkflowFacade extends BaseDataPageFacade<Workflow> {
|
|
9
12
|
private workflowService;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
private searchSubject;
|
|
13
|
-
private destroy$;
|
|
14
|
-
constructor(workflowService: WorkflowsService, workflowState: WorkflowsState, utilService: UtilService);
|
|
15
|
-
destroy(): void;
|
|
16
|
-
isUpdating$(): Observable<boolean>;
|
|
17
|
-
getRequests$(): Observable<Workflow[]>;
|
|
18
|
-
getOperations$(): Observable<WorkflowOperation[]>;
|
|
19
|
-
getFilterParams$(): Observable<IDataFilter[]>;
|
|
20
|
-
getQueryParams$(): Observable<QueryParams<Workflow>>;
|
|
21
|
-
getSearchTerm$(): Observable<string>;
|
|
22
|
-
search(term: string): void;
|
|
23
|
-
private handleSearch;
|
|
24
|
-
filter(filterParams: IDataFilter[]): Promise<void>;
|
|
25
|
-
loadMore(): Promise<void>;
|
|
26
|
-
loadData(skip: number, limit: number): Promise<Workflow[] | void>;
|
|
27
|
-
loadRequests(): Promise<void>;
|
|
13
|
+
constructor(state: WorkflowsState, service: WorkflowsService, searchHandler: SearchHandlerService, utilService: UtilService);
|
|
14
|
+
get operations$(): Observable<WorkflowOperation[]>;
|
|
28
15
|
loadOperations(): Promise<void>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A brand-new workflow must go up with Id and Code blank: the backend rejects
|
|
18
|
+
* a client-supplied Id, and the placeholder record carries a locally generated
|
|
19
|
+
* one. Established records keep theirs so the save lands as an update.
|
|
20
|
+
*/
|
|
21
|
+
protected withDataState(item: Workflow): Workflow;
|
|
22
|
+
/**
|
|
23
|
+
* Save the record currently open in the form, merged over whatever the form
|
|
24
|
+
* did not edit. Insert vs update is decided from the presence of a Code — see
|
|
25
|
+
* BaseDataPageFacade.withDataState.
|
|
26
|
+
*/
|
|
27
|
+
save(edits: Partial<Workflow>): Promise<boolean>;
|
|
28
|
+
/** Commit an inline table-row edit. Does not close the card form. */
|
|
29
|
+
saveRow(row: Workflow, edits: Partial<Workflow>): Promise<boolean>;
|
|
30
|
+
deleteWorkflow(code: string): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Approve or reject a workflow via `WorkflowAction/{isApproval}`, which
|
|
33
|
+
* returns the updated records rather than a paged result.
|
|
34
|
+
*/
|
|
35
|
+
processWorkflow(workflow: Workflow, isApproval: boolean): Promise<boolean>;
|
|
36
|
+
/** Prepend a blank workflow and open it in the form. */
|
|
37
|
+
startCreate(): Workflow;
|
|
38
|
+
private createEmpty;
|
|
36
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowFacade, never>;
|
|
37
40
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowFacade>;
|
|
38
41
|
}
|
|
@@ -1,78 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ErrorResponse, FormEntity,
|
|
3
|
-
import {
|
|
1
|
+
import { BaseDataPageService, FilterHandlerService, SortHandlerService } from 'verben-workflow-ui/src/lib/base';
|
|
2
|
+
import { ErrorResponse, FormEntity, Tag, Workflow, WorkflowOperation } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
+
import { HttpWebRequestService } from 'verben-workflow-ui/src/lib/services';
|
|
4
|
+
import { WorkflowApiService } from './workflows.api';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* Get user access requests with additional parameter, pagination and sorting
|
|
30
|
-
* @param params Filter parameters
|
|
31
|
-
* @param skip Number of records to skip
|
|
32
|
-
* @param limit Number of records to take
|
|
33
|
-
* @param sortParam Sort parameter
|
|
34
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
35
|
-
* @returns Promise containing the filtered user access requests
|
|
36
|
-
*/
|
|
37
|
-
getWorkflowByFilterParams(params: SearchPropertyValue[], skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<Workflow> | ErrorResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* Save multiple user access requests
|
|
40
|
-
* @param requests Array of user access requests to save
|
|
41
|
-
* @returns Promise containing the save operation result
|
|
42
|
-
*/
|
|
43
|
-
saveWorkflows(requests: Partial<Workflow>[]): Promise<any | ErrorResponse>;
|
|
44
|
-
/**
|
|
45
|
-
* Approve or reject multiple user access requests
|
|
46
|
-
* @param requests Array of user access requests to save
|
|
47
|
-
* @param isApproval True for approval, false for decline
|
|
48
|
-
* @returns Promise containing the save operation result
|
|
49
|
-
*/
|
|
50
|
-
processWorkflows(requests: Workflow[], isApproval: boolean): Promise<any | ErrorResponse>;
|
|
51
|
-
/**
|
|
52
|
-
* Delete multiple user access requests
|
|
53
|
-
* @param requestIds Array of request IDs to delete
|
|
54
|
-
* @returns Observable containing the delete operation result
|
|
55
|
-
*/
|
|
56
|
-
deleteWorkflows(requestIds: string[]): Observable<any | ErrorResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Get user access requests with pagination and sorting
|
|
59
|
-
* @param skip Number of records to skip
|
|
60
|
-
* @param limit Number of records to take
|
|
61
|
-
* @param sortParam Sort parameter
|
|
62
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
63
|
-
* @returns Promise containing the user access requests
|
|
64
|
-
*/
|
|
65
|
-
getForms(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<FormEntity> | ErrorResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* Get user access requests with pagination and sorting
|
|
68
|
-
* @param skip Number of records to skip
|
|
69
|
-
* @param limit Number of records to take
|
|
70
|
-
* @param sortParam Sort parameter
|
|
71
|
-
* @param sortOrder Sort order ('asc' or 'desc')
|
|
72
|
-
* @returns Promise containing the user access requests
|
|
73
|
-
*/
|
|
74
|
-
getTags(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<Tag> | ErrorResponse>;
|
|
75
|
-
getWorkflowOperations(skip: number, limit: number, sortParam: string, sortOrder: string): Promise<Paged<Tag> | ErrorResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* Service for workflow API operations.
|
|
8
|
+
*
|
|
9
|
+
* `GetWorkflows`, `GetWorkflowsWithParam` and `SaveWorkflows` follow the base's
|
|
10
|
+
* conventions for endpoint `Workflows`. Two do not, and are overridden below:
|
|
11
|
+
* the search endpoint is **singular** (`SearchWorkflow`), and delete takes a
|
|
12
|
+
* query string rather than a path segment.
|
|
13
|
+
*/
|
|
14
|
+
export declare class WorkflowsService extends BaseDataPageService<Workflow> {
|
|
15
|
+
private api;
|
|
16
|
+
constructor(server: HttpWebRequestService, filterHandler: FilterHandlerService, sortHandler: SortHandlerService, api: WorkflowApiService);
|
|
17
|
+
getEndpoint(): string;
|
|
18
|
+
/** Singular, unlike every other workflow endpoint. */
|
|
19
|
+
protected filterSearchUrl(skip: number, limit: number, sortParam: string, sortOrder: string): string;
|
|
20
|
+
/** Query string, not a path segment. */
|
|
21
|
+
protected deleteUrl(itemIds: string[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Approve or reject workflows. Distinct from save: it posts to
|
|
24
|
+
* `WorkflowAction/{isApproval}` and returns the updated records.
|
|
25
|
+
*/
|
|
26
|
+
processWorkflows(requests: Workflow[], isApproval: boolean): Promise<Workflow[] | ErrorResponse>;
|
|
27
|
+
getOperations(): Promise<WorkflowOperation[]>;
|
|
28
|
+
getForms(): Promise<FormEntity[]>;
|
|
29
|
+
getTags(): Promise<Tag[]>;
|
|
76
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowsService, never>;
|
|
77
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowsService>;
|
|
78
32
|
}
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BaseDataPageState } from 'verben-workflow-ui/src/lib/base';
|
|
3
|
+
import { Workflow, WorkflowOperation } from 'verben-workflow-ui/src/lib/models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private filterParams$;
|
|
5
|
+
/**
|
|
6
|
+
* State for the workflows page.
|
|
7
|
+
* Adds the operations lookup used by the form and the inline-edit dropdown.
|
|
8
|
+
*/
|
|
9
|
+
export declare class WorkflowsState extends BaseDataPageState<Workflow> {
|
|
11
10
|
private operations$;
|
|
12
|
-
isUpdating$(): Observable<boolean>;
|
|
13
|
-
setUpdating(isUpdating: boolean): void;
|
|
14
|
-
getRequests$(): Observable<Workflow[]>;
|
|
15
|
-
setRequests(requests: Workflow[]): void;
|
|
16
|
-
setOperations(operations: WorkflowOperation[]): void;
|
|
17
11
|
getOperations$(): Observable<WorkflowOperation[]>;
|
|
18
|
-
|
|
19
|
-
setFilterParams(params: IDataFilter[]): void;
|
|
20
|
-
appendRequests(newRequests: Workflow[]): void;
|
|
21
|
-
getSearchTerm$(): Observable<string>;
|
|
22
|
-
getSearchTermValue(): string;
|
|
23
|
-
setSearchTerm(term: string): void;
|
|
24
|
-
getQueryParams$(): Observable<QueryParams<Workflow>>;
|
|
25
|
-
getQueryParamsValue(): QueryParams<Workflow>;
|
|
26
|
-
updateQueryParams(params: Partial<QueryParams<Workflow>>): void;
|
|
27
|
-
resetPagination(): void;
|
|
28
|
-
addRequest(request: Workflow): void;
|
|
29
|
-
updateRequest(updatedRequest: Workflow): void;
|
|
30
|
-
removeRequest(requestId: string): void;
|
|
12
|
+
setOperations(operations: WorkflowOperation[]): void;
|
|
31
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowsState, never>;
|
|
32
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowsState>;
|
|
33
15
|
}
|
|
@@ -14,7 +14,7 @@ export declare class HttpWebRequestService {
|
|
|
14
14
|
private handleError;
|
|
15
15
|
private request;
|
|
16
16
|
get<T>(url: string, baseUrl?: string, overrideToken?: string): Promise<T>;
|
|
17
|
-
post<T>(url: string, body: any,
|
|
17
|
+
post<T>(url: string, body: any, baseUrl?: string, overrideToken?: string): Promise<T>;
|
|
18
18
|
postFile<T>(url: string, formData: FormData, baseUrl?: string): Promise<T>;
|
|
19
19
|
put<T>(url: string, body: any, baseUrl?: string, overrideToken?: string): Observable<T>;
|
|
20
20
|
delete<T>(url: string, baseUrl?: string, overrideToken?: string): Observable<T>;
|
|
@@ -7,6 +7,14 @@ export declare class UtilService {
|
|
|
7
7
|
showSuccess(message: string): void;
|
|
8
8
|
showError(message: string): void;
|
|
9
9
|
openFullRouteInNewWindow(url: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Persist a page's saved config via the host app (which stamps ownership and
|
|
12
|
+
* talks to the backend). Resolves the saved record, or null when the host
|
|
13
|
+
* doesn't implement persistence.
|
|
14
|
+
*/
|
|
15
|
+
saveUserPageConfig(option: any): Promise<any | null>;
|
|
16
|
+
/** Load a page's saved config via the host app, or null when unsupported. */
|
|
17
|
+
getUserPageConfig(ui: string): Promise<any | null>;
|
|
10
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<UtilService, [{ optional: true; }]>;
|
|
11
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<UtilService>;
|
|
12
20
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DataFilterType } from 'verben-ng-ui';
|
|
2
|
-
import { SearchPropertyValueType } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
-
export function convertDataFilterTypeToSearchPropertyValueType(type) {
|
|
4
|
-
switch (type) {
|
|
5
|
-
case DataFilterType.String:
|
|
6
|
-
return SearchPropertyValueType.String;
|
|
7
|
-
case DataFilterType.Integer:
|
|
8
|
-
return SearchPropertyValueType.Int;
|
|
9
|
-
case DataFilterType.Decimal:
|
|
10
|
-
return SearchPropertyValueType.Decimal;
|
|
11
|
-
case DataFilterType.Credit:
|
|
12
|
-
return SearchPropertyValueType.Float;
|
|
13
|
-
case DataFilterType.Date:
|
|
14
|
-
return SearchPropertyValueType.Date;
|
|
15
|
-
case DataFilterType.Bool:
|
|
16
|
-
return SearchPropertyValueType.Bool;
|
|
17
|
-
case DataFilterType.Number:
|
|
18
|
-
return SearchPropertyValueType.Int;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3dzLmhlbHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZlcmJlbi13b3JrZmxvdy11aS9zcmMvbGliL2NvbXBvbmVudHMvd29ya2Zsb3dzL3dvcmtmbG93cy5oZWxwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUM5QyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUU1RSxNQUFNLFVBQVUsOENBQThDLENBQzVELElBQW9CO0lBRXBCLFFBQVEsSUFBSSxFQUFFLENBQUM7UUFDYixLQUFLLGNBQWMsQ0FBQyxNQUFNO1lBQ3hCLE9BQU8sdUJBQXVCLENBQUMsTUFBTSxDQUFDO1FBQ3hDLEtBQUssY0FBYyxDQUFDLE9BQU87WUFDekIsT0FBTyx1QkFBdUIsQ0FBQyxHQUFHLENBQUM7UUFDckMsS0FBSyxjQUFjLENBQUMsT0FBTztZQUN6QixPQUFPLHVCQUF1QixDQUFDLE9BQU8sQ0FBQztRQUN6QyxLQUFLLGNBQWMsQ0FBQyxNQUFNO1lBQ3hCLE9BQU8sdUJBQXVCLENBQUMsS0FBSyxDQUFDO1FBQ3ZDLEtBQUssY0FBYyxDQUFDLElBQUk7WUFDdEIsT0FBTyx1QkFBdUIsQ0FBQyxJQUFJLENBQUM7UUFDdEMsS0FBSyxjQUFjLENBQUMsSUFBSTtZQUN0QixPQUFPLHVCQUF1QixDQUFDLElBQUksQ0FBQztRQUN0QyxLQUFLLGNBQWMsQ0FBQyxNQUFNO1lBQ3hCLE9BQU8sdUJBQXVCLENBQUMsR0FBRyxDQUFDO0lBQ3ZDLENBQUM7QUFDSCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRGF0YUZpbHRlclR5cGUgfSBmcm9tICd2ZXJiZW4tbmctdWknO1xuaW1wb3J0IHsgU2VhcmNoUHJvcGVydHlWYWx1ZVR5cGUgfSBmcm9tICd2ZXJiZW4td29ya2Zsb3ctdWkvc3JjL2xpYi9tb2RlbHMnO1xuXG5leHBvcnQgZnVuY3Rpb24gY29udmVydERhdGFGaWx0ZXJUeXBlVG9TZWFyY2hQcm9wZXJ0eVZhbHVlVHlwZShcbiAgdHlwZTogRGF0YUZpbHRlclR5cGVcbikge1xuICBzd2l0Y2ggKHR5cGUpIHtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLlN0cmluZzpcbiAgICAgIHJldHVybiBTZWFyY2hQcm9wZXJ0eVZhbHVlVHlwZS5TdHJpbmc7XG4gICAgY2FzZSBEYXRhRmlsdGVyVHlwZS5JbnRlZ2VyOlxuICAgICAgcmV0dXJuIFNlYXJjaFByb3BlcnR5VmFsdWVUeXBlLkludDtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLkRlY2ltYWw6XG4gICAgICByZXR1cm4gU2VhcmNoUHJvcGVydHlWYWx1ZVR5cGUuRGVjaW1hbDtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLkNyZWRpdDpcbiAgICAgIHJldHVybiBTZWFyY2hQcm9wZXJ0eVZhbHVlVHlwZS5GbG9hdDtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLkRhdGU6XG4gICAgICByZXR1cm4gU2VhcmNoUHJvcGVydHlWYWx1ZVR5cGUuRGF0ZTtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLkJvb2w6XG4gICAgICByZXR1cm4gU2VhcmNoUHJvcGVydHlWYWx1ZVR5cGUuQm9vbDtcbiAgICBjYXNlIERhdGFGaWx0ZXJUeXBlLk51bWJlcjpcbiAgICAgIHJldHVybiBTZWFyY2hQcm9wZXJ0eVZhbHVlVHlwZS5JbnQ7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DataFilterType } from 'verben-ng-ui';
|
|
2
|
-
import { SearchPropertyValueType } from 'verben-workflow-ui/src/lib/models';
|
|
3
|
-
export declare function convertDataFilterTypeToSearchPropertyValueType(type: DataFilterType): SearchPropertyValueType.Int | SearchPropertyValueType.Float | SearchPropertyValueType.Decimal | SearchPropertyValueType.String | SearchPropertyValueType.Bool | SearchPropertyValueType.Date;
|