@posiwise/flows 0.0.2 → 0.0.4
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/fesm2022/posiwise-flows.mjs +2002 -635
- package/fesm2022/posiwise-flows.mjs.map +1 -1
- package/package.json +1 -1
- package/types/posiwise-flows.d.ts +635 -150
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Injectable, Input, NgModule, Output, ViewChild } from "@angular/core";
|
|
3
|
-
import * as
|
|
2
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, HostListener, Injectable, Input, NgModule, Output, ViewChild, afterEveryRender } from "@angular/core";
|
|
3
|
+
import * as i8 from "@angular/router";
|
|
4
4
|
import { RouterModule } from "@angular/router";
|
|
5
5
|
import * as i3$1 from "@posiwise/core-guards";
|
|
6
6
|
import { PageAccessGuard, TrackDirtyFormDirective } from "@posiwise/core-guards";
|
|
7
7
|
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
8
|
-
import { Subject, combineLatest, forkJoin, throwError, timer } from "rxjs";
|
|
9
|
-
import { catchError, distinctUntilChanged, exhaustMap, finalize, map, shareReplay, takeUntil, takeWhile, tap } from "rxjs/operators";
|
|
10
|
-
import { faArrowAltCircleLeft, faBolt, faCircleCheck, faCircleExclamation, faCode, faCodeBranch, faCopy, faDiagramProject, faExpand, faEye,
|
|
8
|
+
import { Subject, combineLatest, forkJoin, of, throwError, timer } from "rxjs";
|
|
9
|
+
import { catchError, distinctUntilChanged, exhaustMap, finalize, map, shareReplay, switchMap, takeUntil, takeWhile, tap } from "rxjs/operators";
|
|
10
|
+
import { faArrowAltCircleLeft, faBolt, faChevronDown, faChevronRight, faCircleCheck, faCircleExclamation, faCode, faCodeBranch, faCopy, faDiagramProject, faExpand, faEye, faMagnifyingGlass, faPaperPlane, faPenToSquare, faPlusCircle, faTableList, faTrash, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
|
|
11
11
|
import { FLOWS_NODES_PATH, FLOWS_RUNS_PATH, FLOWS_RUN_POLL_INTERVAL_MS, FLOWS_VERSIONS_PATH, FLOWS_WORKFLOWS_PATH } from "@posiwise/flows-shared";
|
|
12
|
+
import * as i1$3 from "@posiwise/shared-product-services";
|
|
12
13
|
import { HelperService } from "@posiwise/helper-service";
|
|
13
|
-
import * as
|
|
14
|
-
import * as i2$2 from "@posiwise/app-loader";
|
|
14
|
+
import * as i4$1 from "@posiwise/app-loader";
|
|
15
15
|
import { AppLoaderModule } from "@posiwise/app-loader";
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as i5 from "@posiwise/shared-components";
|
|
16
|
+
import * as i5 from "primeng/table";
|
|
17
|
+
import * as i6$1 from "@posiwise/shared-components";
|
|
19
18
|
import { SharedComponentsModule } from "@posiwise/shared-components";
|
|
20
|
-
import * as
|
|
19
|
+
import * as i2$3 from "@fortawesome/angular-fontawesome";
|
|
21
20
|
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
|
|
22
|
-
import * as
|
|
21
|
+
import * as i1$2 from "@angular/common";
|
|
23
22
|
import { CommonModule } from "@angular/common";
|
|
24
|
-
import * as
|
|
23
|
+
import * as i2$4 from "@jsverse/transloco";
|
|
25
24
|
import { TRANSLOCO_SCOPE } from "@jsverse/transloco";
|
|
25
|
+
import * as i1$1 from "primeng/tooltip";
|
|
26
|
+
import * as i13 from "@posiwise/pipes";
|
|
27
|
+
import { PipesModule } from "@posiwise/pipes";
|
|
26
28
|
import * as i3$2 from "@angular/forms";
|
|
27
29
|
import { FormsModule, ReactiveFormsModule, UntypedFormBuilder, Validators } from "@angular/forms";
|
|
28
30
|
import * as i4 from "primeng/select";
|
|
@@ -30,13 +32,16 @@ import * as i1 from "@posiwise/common-services";
|
|
|
30
32
|
import { PERMISSION_NAMES } from "@posiwise/common-utilities";
|
|
31
33
|
import { AreaExtensions, AreaPlugin } from "rete-area-plugin";
|
|
32
34
|
import { ClassicPreset, NodeEditor } from "rete";
|
|
33
|
-
import * as i2$
|
|
35
|
+
import * as i2$2 from "rete-angular-plugin/22";
|
|
34
36
|
import { AngularPlugin, Presets, ReteModule } from "rete-angular-plugin/22";
|
|
35
37
|
import { ConnectionPlugin, Presets as Presets$1 } from "rete-connection-plugin";
|
|
36
|
-
import * as i2 from "@posiwise/utils";
|
|
38
|
+
import * as i2$1 from "@posiwise/utils";
|
|
39
|
+
import * as i6 from "@posiwise/directives";
|
|
40
|
+
import { DirectivesModule } from "@posiwise/directives";
|
|
37
41
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
38
42
|
import * as i3 from "primeng/autocomplete";
|
|
39
43
|
import { AutoCompleteModule } from "primeng/autocomplete";
|
|
44
|
+
import * as i2 from "ngx-ui-switch";
|
|
40
45
|
import * as i9 from "primeng/iconfield";
|
|
41
46
|
import { IconFieldModule } from "primeng/iconfield";
|
|
42
47
|
import * as i10 from "primeng/inputicon";
|
|
@@ -51,14 +56,15 @@ const FLOWS_ICONS = {
|
|
|
51
56
|
create: faPlusCircle,
|
|
52
57
|
edit: faPenToSquare,
|
|
53
58
|
delete: faTrash,
|
|
54
|
-
versions: faLayerGroup,
|
|
55
59
|
search: faMagnifyingGlass,
|
|
56
60
|
publish: faCircleCheck,
|
|
57
61
|
duplicate: faCopy,
|
|
58
62
|
fit: faExpand,
|
|
59
63
|
diagram: faDiagramProject,
|
|
60
64
|
json: faCode,
|
|
61
|
-
warning: faTriangleExclamation
|
|
65
|
+
warning: faTriangleExclamation,
|
|
66
|
+
collapsed: faChevronRight,
|
|
67
|
+
expanded: faChevronDown
|
|
62
68
|
};
|
|
63
69
|
const FLOW_CATEGORY_ICONS = {
|
|
64
70
|
trigger: faBolt,
|
|
@@ -66,6 +72,57 @@ const FLOW_CATEGORY_ICONS = {
|
|
|
66
72
|
data: faTableList,
|
|
67
73
|
action: faPaperPlane
|
|
68
74
|
};
|
|
75
|
+
const FLOW_NODE_CATEGORIES = [
|
|
76
|
+
"trigger",
|
|
77
|
+
"logic",
|
|
78
|
+
"data",
|
|
79
|
+
"action"
|
|
80
|
+
];
|
|
81
|
+
const DEFAULT_FLOW_BRANCH = "next";
|
|
82
|
+
const FLOW_RETRY_DEFAULT = {
|
|
83
|
+
times: 3,
|
|
84
|
+
wait_seconds: 30
|
|
85
|
+
};
|
|
86
|
+
function emptyFlowGraph() {
|
|
87
|
+
return {
|
|
88
|
+
nodes: [],
|
|
89
|
+
edges: []
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function isRecord(value) {
|
|
93
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
94
|
+
}
|
|
95
|
+
function toFlowGraph(value) {
|
|
96
|
+
if (!isRecord(value)) return emptyFlowGraph();
|
|
97
|
+
const nodes = Array.isArray(value["nodes"]) ? value["nodes"] : [];
|
|
98
|
+
const edges = Array.isArray(value["edges"]) ? value["edges"] : [];
|
|
99
|
+
return {
|
|
100
|
+
nodes: nodes.filter((node) => isRecord(node) && typeof node["id"] === "string" && typeof node["type"] === "string"),
|
|
101
|
+
edges: edges.filter((edge) => isRecord(edge) && typeof edge["from"] === "string" && typeof edge["to"] === "string")
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function nextId(prefix, taken) {
|
|
105
|
+
const pattern = new RegExp(String.raw`^${prefix}(\d+)$`);
|
|
106
|
+
return `${prefix}${taken.reduce((max, id) => {
|
|
107
|
+
const match = pattern.exec(id);
|
|
108
|
+
return match ? Math.max(max, Number(match[1])) : max;
|
|
109
|
+
}, 0) + 1}`;
|
|
110
|
+
}
|
|
111
|
+
function nextFlowNodeId(nodes) {
|
|
112
|
+
return nextId("n", nodes.map((node) => node.id));
|
|
113
|
+
}
|
|
114
|
+
function nextFlowEdgeId(edges) {
|
|
115
|
+
return nextId("e", edges.map((edge) => edge.id ?? ""));
|
|
116
|
+
}
|
|
117
|
+
function flowNodeLabelKey(type) {
|
|
118
|
+
return `Flows.Nodes.${type}`;
|
|
119
|
+
}
|
|
120
|
+
function flowNodeWithRetry(node, retry) {
|
|
121
|
+
const next = { ...node };
|
|
122
|
+
if (retry) next.retry = retry;
|
|
123
|
+
else delete next.retry;
|
|
124
|
+
return next;
|
|
125
|
+
}
|
|
69
126
|
const BADGE_BASE = "pw-flow-badge";
|
|
70
127
|
function flowBadgeClass(tone) {
|
|
71
128
|
return `${BADGE_BASE} ${BADGE_BASE}--${tone}`;
|
|
@@ -102,6 +159,74 @@ function flowRunStepBadgeClass(status) {
|
|
|
102
159
|
default: return flowBadgeClass("info");
|
|
103
160
|
}
|
|
104
161
|
}
|
|
162
|
+
function flowRunScheduledFor(run) {
|
|
163
|
+
const payload = run?.trigger_payload;
|
|
164
|
+
return typeof payload?.scheduled_for === "string" ? payload.scheduled_for : null;
|
|
165
|
+
}
|
|
166
|
+
var FlowsNodeService = class FlowsNodeService {
|
|
167
|
+
constructor(api) {
|
|
168
|
+
this.api = api;
|
|
169
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
170
|
+
}
|
|
171
|
+
getNodes(subscriptionId) {
|
|
172
|
+
let nodes = this.cache.get(subscriptionId);
|
|
173
|
+
if (!nodes) {
|
|
174
|
+
nodes = this.api.getWithParams(FLOWS_NODES_PATH, { subscription_id: subscriptionId }).pipe(map((response) => response.flow_nodes), catchError((error) => {
|
|
175
|
+
this.cache.delete(subscriptionId);
|
|
176
|
+
return throwError(() => error);
|
|
177
|
+
}), shareReplay({
|
|
178
|
+
bufferSize: 1,
|
|
179
|
+
refCount: false
|
|
180
|
+
}));
|
|
181
|
+
this.cache.set(subscriptionId, nodes);
|
|
182
|
+
}
|
|
183
|
+
return nodes;
|
|
184
|
+
}
|
|
185
|
+
static {
|
|
186
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
187
|
+
minVersion: "12.0.0",
|
|
188
|
+
version: "22.2.0",
|
|
189
|
+
ngImport: i0,
|
|
190
|
+
type: FlowsNodeService,
|
|
191
|
+
deps: [{ token: i1$3.ProductsHttpService }],
|
|
192
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
static {
|
|
196
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
197
|
+
minVersion: "12.0.0",
|
|
198
|
+
version: "22.2.0",
|
|
199
|
+
ngImport: i0,
|
|
200
|
+
type: FlowsNodeService,
|
|
201
|
+
providedIn: "root"
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
206
|
+
minVersion: "12.0.0",
|
|
207
|
+
version: "22.2.0",
|
|
208
|
+
ngImport: i0,
|
|
209
|
+
type: FlowsNodeService,
|
|
210
|
+
decorators: [{
|
|
211
|
+
type: Injectable,
|
|
212
|
+
args: [{ providedIn: "root" }]
|
|
213
|
+
}],
|
|
214
|
+
ctorParameters: () => [{ type: i1$3.ProductsHttpService }]
|
|
215
|
+
});
|
|
216
|
+
const NO_FLOW_WORKFLOW_FIELDS = {
|
|
217
|
+
byNode: {},
|
|
218
|
+
ran: false
|
|
219
|
+
};
|
|
220
|
+
function flowNodeFieldsKey(nodeId, type) {
|
|
221
|
+
return `${nodeId}|${type ?? ""}`;
|
|
222
|
+
}
|
|
223
|
+
function toFlowWorkflowFields(rows) {
|
|
224
|
+
const list = rows ?? [];
|
|
225
|
+
return {
|
|
226
|
+
byNode: Object.fromEntries(list.map((row) => [flowNodeFieldsKey(row.node_id, row.node_type), row.item_fields])),
|
|
227
|
+
ran: list.length > 0
|
|
228
|
+
};
|
|
229
|
+
}
|
|
105
230
|
var FlowsRunService = class FlowsRunService {
|
|
106
231
|
constructor(api) {
|
|
107
232
|
this.api = api;
|
|
@@ -135,6 +260,9 @@ var FlowsRunService = class FlowsRunService {
|
|
|
135
260
|
hasUnsettledRun(response) {
|
|
136
261
|
return (response?.flow_runs ?? []).some((run) => !isFlowRunTerminal(run));
|
|
137
262
|
}
|
|
263
|
+
getWorkflowFields(workflowId, subscriptionId) {
|
|
264
|
+
return this.api.getWithParams(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/fields`, { subscription_id: subscriptionId }).pipe(map((response) => toFlowWorkflowFields(response.flow_workflow_fields)), catchError(() => of(NO_FLOW_WORKFLOW_FIELDS)));
|
|
265
|
+
}
|
|
138
266
|
definedQuery(query) {
|
|
139
267
|
const params = {};
|
|
140
268
|
if (query.status) params["status"] = query.status;
|
|
@@ -148,7 +276,7 @@ var FlowsRunService = class FlowsRunService {
|
|
|
148
276
|
version: "22.2.0",
|
|
149
277
|
ngImport: i0,
|
|
150
278
|
type: FlowsRunService,
|
|
151
|
-
deps: [{ token: i1$
|
|
279
|
+
deps: [{ token: i1$3.ProductsHttpService }],
|
|
152
280
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
153
281
|
});
|
|
154
282
|
}
|
|
@@ -171,90 +299,157 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
171
299
|
type: Injectable,
|
|
172
300
|
args: [{ providedIn: "root" }]
|
|
173
301
|
}],
|
|
174
|
-
ctorParameters: () => [{ type: i1$
|
|
302
|
+
ctorParameters: () => [{ type: i1$3.ProductsHttpService }]
|
|
175
303
|
});
|
|
176
|
-
var
|
|
177
|
-
constructor(
|
|
178
|
-
|
|
179
|
-
this.flowsRunService = flowsRunService;
|
|
180
|
-
this.cdr = cdr;
|
|
181
|
-
this.destroy$ = new Subject();
|
|
182
|
-
this.loading = true;
|
|
183
|
-
this.notFound = false;
|
|
184
|
-
this.steps = [];
|
|
185
|
-
this.icons = FLOWS_ICONS;
|
|
186
|
-
this.openSteps = /* @__PURE__ */ new Set();
|
|
187
|
-
this.trackByStep = (_, step) => step.id;
|
|
304
|
+
var FlowsWorkflowService = class FlowsWorkflowService {
|
|
305
|
+
constructor(api) {
|
|
306
|
+
this.api = api;
|
|
188
307
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
this.watch(subscriptionId);
|
|
308
|
+
getWorkflows(subscriptionId, status, paging) {
|
|
309
|
+
return this.api.getWithParams(`${FLOWS_WORKFLOWS_PATH}/get_all`, {
|
|
310
|
+
subscription_id: subscriptionId,
|
|
311
|
+
...status ? { status } : {},
|
|
312
|
+
...HelperService.getPagingParams(paging)
|
|
197
313
|
});
|
|
198
314
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
this.watch$?.unsubscribe();
|
|
202
|
-
this.destroy$.next();
|
|
203
|
-
this.destroy$.complete();
|
|
315
|
+
getWorkflow(id, subscriptionId) {
|
|
316
|
+
return this.api.getWithParams(`${FLOWS_WORKFLOWS_PATH}/${id}`, { subscription_id: subscriptionId });
|
|
204
317
|
}
|
|
205
|
-
|
|
206
|
-
this.
|
|
318
|
+
getVersion(id, subscriptionId) {
|
|
319
|
+
return this.api.getWithParams(`${FLOWS_VERSIONS_PATH}/${id}`, { subscription_id: subscriptionId });
|
|
207
320
|
}
|
|
208
|
-
|
|
209
|
-
return
|
|
321
|
+
createWorkflow(subscriptionId, attrs) {
|
|
322
|
+
return this.api.post(FLOWS_WORKFLOWS_PATH, {
|
|
323
|
+
subscription_id: subscriptionId,
|
|
324
|
+
...attrs
|
|
325
|
+
});
|
|
210
326
|
}
|
|
211
|
-
|
|
212
|
-
return
|
|
327
|
+
updateWorkflow(id, subscriptionId, attrs) {
|
|
328
|
+
return this.api.put(`${FLOWS_WORKFLOWS_PATH}/${id}`, {
|
|
329
|
+
subscription_id: subscriptionId,
|
|
330
|
+
...attrs
|
|
331
|
+
});
|
|
213
332
|
}
|
|
214
|
-
|
|
215
|
-
return
|
|
333
|
+
deleteWorkflow(id, subscriptionId) {
|
|
334
|
+
return this.api.delete(`${FLOWS_WORKFLOWS_PATH}/${id}`, { params: { subscription_id: String(subscriptionId) } });
|
|
216
335
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
336
|
+
getVersions(workflowId, subscriptionId, paging) {
|
|
337
|
+
return this.api.getWithParams(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/versions`, {
|
|
338
|
+
subscription_id: subscriptionId,
|
|
339
|
+
...HelperService.getPagingParams(paging)
|
|
340
|
+
});
|
|
220
341
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
342
|
+
createVersion(workflowId, subscriptionId, graph) {
|
|
343
|
+
return this.api.post(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/versions`, {
|
|
344
|
+
subscription_id: subscriptionId,
|
|
345
|
+
graph
|
|
346
|
+
});
|
|
224
347
|
}
|
|
225
|
-
|
|
226
|
-
this.
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
this.run = detail.run;
|
|
230
|
-
this.steps = detail.steps?.flow_run_steps ?? [];
|
|
231
|
-
this.notFound = false;
|
|
232
|
-
this.settle();
|
|
233
|
-
},
|
|
234
|
-
error: () => this.fail()
|
|
348
|
+
updateVersion(id, subscriptionId, graph) {
|
|
349
|
+
return this.api.put(`${FLOWS_VERSIONS_PATH}/${id}`, {
|
|
350
|
+
subscription_id: subscriptionId,
|
|
351
|
+
graph
|
|
235
352
|
});
|
|
236
353
|
}
|
|
237
|
-
|
|
238
|
-
this.
|
|
354
|
+
checkGraph(workflowId, subscriptionId, graph) {
|
|
355
|
+
return this.api.post(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/versions/check`, {
|
|
356
|
+
subscription_id: subscriptionId,
|
|
357
|
+
graph
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
publishVersion(id, subscriptionId) {
|
|
361
|
+
return this.api.put(`${FLOWS_VERSIONS_PATH}/${id}/publish`, { subscription_id: subscriptionId });
|
|
362
|
+
}
|
|
363
|
+
publishChecked(workflowId, version, subscriptionId) {
|
|
364
|
+
return this.checkGraph(workflowId, subscriptionId, version.graph).pipe(switchMap((check) => check.valid ? this.publishVersion(version.id, subscriptionId) : of(check)));
|
|
365
|
+
}
|
|
366
|
+
static {
|
|
367
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
368
|
+
minVersion: "12.0.0",
|
|
369
|
+
version: "22.2.0",
|
|
370
|
+
ngImport: i0,
|
|
371
|
+
type: FlowsWorkflowService,
|
|
372
|
+
deps: [{ token: i1$3.ProductsHttpService }],
|
|
373
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
static {
|
|
377
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
378
|
+
minVersion: "12.0.0",
|
|
379
|
+
version: "22.2.0",
|
|
380
|
+
ngImport: i0,
|
|
381
|
+
type: FlowsWorkflowService,
|
|
382
|
+
providedIn: "root"
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
387
|
+
minVersion: "12.0.0",
|
|
388
|
+
version: "22.2.0",
|
|
389
|
+
ngImport: i0,
|
|
390
|
+
type: FlowsWorkflowService,
|
|
391
|
+
decorators: [{
|
|
392
|
+
type: Injectable,
|
|
393
|
+
args: [{ providedIn: "root" }]
|
|
394
|
+
}],
|
|
395
|
+
ctorParameters: () => [{ type: i1$3.ProductsHttpService }]
|
|
396
|
+
});
|
|
397
|
+
function flowRunProgress(steps, nodeIds) {
|
|
398
|
+
const count = (...statuses) => steps.filter((step) => statuses.includes(step.status)).length;
|
|
399
|
+
const stepped = new Set(steps.map((step) => step.node_id));
|
|
400
|
+
const waiting = nodeIds.filter((id) => !stepped.has(id)).length;
|
|
401
|
+
const total = steps.length + waiting;
|
|
402
|
+
const done = count("succeeded");
|
|
403
|
+
const failed = count("failed");
|
|
404
|
+
const skipped = count("skipped");
|
|
405
|
+
const settled = done + failed + skipped;
|
|
406
|
+
return {
|
|
407
|
+
done,
|
|
408
|
+
failed,
|
|
409
|
+
skipped,
|
|
410
|
+
settled,
|
|
411
|
+
running: count("pending", "running", "awaiting"),
|
|
412
|
+
waiting,
|
|
413
|
+
total,
|
|
414
|
+
percent: total ? Math.round(settled / total * 100) : 0
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
var FlowsRunProgressComponent = class FlowsRunProgressComponent {
|
|
418
|
+
constructor(cdr) {
|
|
419
|
+
this.cdr = cdr;
|
|
239
420
|
this.steps = [];
|
|
240
|
-
this.
|
|
241
|
-
this.
|
|
421
|
+
this.nodeIds = [];
|
|
422
|
+
this.progress = flowRunProgress([], []);
|
|
423
|
+
this.elapsed = null;
|
|
242
424
|
}
|
|
243
|
-
|
|
244
|
-
this.
|
|
245
|
-
|
|
425
|
+
get ended() {
|
|
426
|
+
return isFlowRunTerminal(this.run);
|
|
427
|
+
}
|
|
428
|
+
ngOnChanges() {
|
|
429
|
+
this.progress = flowRunProgress(this.steps, this.nodeIds);
|
|
430
|
+
this.updateElapsed();
|
|
431
|
+
if (this.ended) {
|
|
432
|
+
this.tick$?.unsubscribe();
|
|
433
|
+
this.tick$ = void 0;
|
|
434
|
+
} else if (!this.tick$) this.tick$ = timer(1e3, 1e3).subscribe(() => {
|
|
435
|
+
this.updateElapsed();
|
|
436
|
+
this.cdr.markForCheck();
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
ngOnDestroy() {
|
|
440
|
+
this.tick$?.unsubscribe();
|
|
441
|
+
}
|
|
442
|
+
updateElapsed() {
|
|
443
|
+
const until = this.ended ? this.run.finished_at : (/* @__PURE__ */ new Date()).toISOString();
|
|
444
|
+
this.elapsed = elapsedMs(this.run.started_at, until);
|
|
246
445
|
}
|
|
247
446
|
static {
|
|
248
447
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
249
448
|
minVersion: "12.0.0",
|
|
250
449
|
version: "22.2.0",
|
|
251
450
|
ngImport: i0,
|
|
252
|
-
type:
|
|
253
|
-
deps: [
|
|
254
|
-
{ token: i0.Injector },
|
|
255
|
-
{ token: FlowsRunService },
|
|
256
|
-
{ token: i0.ChangeDetectorRef }
|
|
257
|
-
],
|
|
451
|
+
type: FlowsRunProgressComponent,
|
|
452
|
+
deps: [{ token: i0.ChangeDetectorRef }],
|
|
258
453
|
target: i0.ɵɵFactoryTarget.Component
|
|
259
454
|
});
|
|
260
455
|
}
|
|
@@ -262,27 +457,143 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
262
457
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
263
458
|
minVersion: "17.0.0",
|
|
264
459
|
version: "22.2.0",
|
|
265
|
-
type:
|
|
460
|
+
type: FlowsRunProgressComponent,
|
|
266
461
|
isStandalone: false,
|
|
267
|
-
selector: "pw-flows-run-
|
|
268
|
-
|
|
462
|
+
selector: "pw-flows-run-progress",
|
|
463
|
+
inputs: {
|
|
464
|
+
run: "run",
|
|
465
|
+
steps: "steps",
|
|
466
|
+
nodeIds: "nodeIds"
|
|
467
|
+
},
|
|
468
|
+
usesOnChanges: true,
|
|
269
469
|
ngImport: i0,
|
|
270
|
-
template: "<div class=\"
|
|
271
|
-
styles: [".pw-
|
|
272
|
-
dependencies: [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
470
|
+
template: "<div class=\"pw-run-progress\"\n data-testid=\"flow-run-progress\">\n <div class=\"pw-run-progress__head\">\n <span class=\"pw-run-progress__label\">\n {{ (ended ? 'Flows.Run.Progress.Finished' : 'Flows.Run.Progress.Running') | transloco: { settled: progress.settled, total: progress.total } }}\n </span>\n @if (elapsed !== null) {\n <span class=\"pw-run-progress__elapsed\">\n {{ elapsed / 1000 | number: '1.0-0' }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n </span>\n }\n </div>\n\n <div class=\"progress pw-run-progress__bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"progress.percent\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'Flows.Run.Progress.Label' | transloco\">\n <!-- Width is the run's own percentage, so it cannot live in the stylesheet. -->\n <div class=\"progress-bar\"\n [class.is-failed]=\"progress.failed > 0\"\n [class.is-live]=\"!ended\"\n [style.width.%]=\"progress.percent\"></div>\n </div>\n\n <ul class=\"pw-run-progress__counts\">\n <li>{{ 'Flows.Run.Progress.Done' | transloco: { count: progress.done } }}</li>\n @if (progress.running) {\n <li class=\"is-running\">{{ 'Flows.Run.Progress.InProgress' | transloco: { count: progress.running } }}</li>\n }\n @if (progress.failed) {\n <li class=\"is-failed\">{{ 'Flows.Run.Progress.Failed' | transloco: { count: progress.failed } }}</li>\n }\n @if (progress.skipped) {\n <li>{{ 'Flows.Run.Progress.Skipped' | transloco: { count: progress.skipped } }}</li>\n }\n @if (progress.waiting) {\n <li>{{ (ended ? 'Flows.Run.Progress.NotRun' : 'Flows.Run.Progress.Waiting') | transloco: { count: progress.waiting } }}</li>\n }\n </ul>\n</div>\n",
|
|
471
|
+
styles: [".pw-run-progress{margin-bottom:16px}.pw-run-progress__head{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}.pw-run-progress__label{font-weight:600;color:#1a1d21}.pw-run-progress__elapsed{color:#5a6473}.pw-run-progress__bar{height:8px}.pw-run-progress__bar .progress-bar{background-color:var(--first);transition:width .4s ease}.pw-run-progress__bar .progress-bar.is-failed{background-color:#c0392b}.pw-run-progress__bar .progress-bar.is-live{background-image:linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%);background-size:16px 16px;animation:pw-run-progress-stripes 1s linear infinite}.pw-run-progress__counts{display:flex;flex-wrap:wrap;gap:4px 16px;list-style:none;padding:0;margin:8px 0 0;font-size:12px;color:#5a6473}.pw-run-progress__counts .is-running{color:#1a1d21}.pw-run-progress__counts .is-failed{color:#c0392b}@keyframes pw-run-progress-stripes{0%{background-position:16px 0}to{background-position:0 0}}@media(prefers-reduced-motion:reduce){.pw-run-progress__bar .progress-bar{transition:none}.pw-run-progress__bar .progress-bar.is-live{animation:none}}\n"],
|
|
472
|
+
dependencies: [{
|
|
473
|
+
kind: "pipe",
|
|
474
|
+
type: i1$2.DecimalPipe,
|
|
475
|
+
name: "number"
|
|
476
|
+
}, {
|
|
477
|
+
kind: "pipe",
|
|
478
|
+
type: i2$4.TranslocoPipe,
|
|
479
|
+
name: "transloco"
|
|
480
|
+
}]
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
485
|
+
minVersion: "12.0.0",
|
|
486
|
+
version: "22.2.0",
|
|
487
|
+
ngImport: i0,
|
|
488
|
+
type: FlowsRunProgressComponent,
|
|
489
|
+
decorators: [{
|
|
490
|
+
type: Component,
|
|
491
|
+
args: [{
|
|
492
|
+
selector: "pw-flows-run-progress",
|
|
493
|
+
standalone: false,
|
|
494
|
+
template: "<div class=\"pw-run-progress\"\n data-testid=\"flow-run-progress\">\n <div class=\"pw-run-progress__head\">\n <span class=\"pw-run-progress__label\">\n {{ (ended ? 'Flows.Run.Progress.Finished' : 'Flows.Run.Progress.Running') | transloco: { settled: progress.settled, total: progress.total } }}\n </span>\n @if (elapsed !== null) {\n <span class=\"pw-run-progress__elapsed\">\n {{ elapsed / 1000 | number: '1.0-0' }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n </span>\n }\n </div>\n\n <div class=\"progress pw-run-progress__bar\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"progress.percent\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"'Flows.Run.Progress.Label' | transloco\">\n <!-- Width is the run's own percentage, so it cannot live in the stylesheet. -->\n <div class=\"progress-bar\"\n [class.is-failed]=\"progress.failed > 0\"\n [class.is-live]=\"!ended\"\n [style.width.%]=\"progress.percent\"></div>\n </div>\n\n <ul class=\"pw-run-progress__counts\">\n <li>{{ 'Flows.Run.Progress.Done' | transloco: { count: progress.done } }}</li>\n @if (progress.running) {\n <li class=\"is-running\">{{ 'Flows.Run.Progress.InProgress' | transloco: { count: progress.running } }}</li>\n }\n @if (progress.failed) {\n <li class=\"is-failed\">{{ 'Flows.Run.Progress.Failed' | transloco: { count: progress.failed } }}</li>\n }\n @if (progress.skipped) {\n <li>{{ 'Flows.Run.Progress.Skipped' | transloco: { count: progress.skipped } }}</li>\n }\n @if (progress.waiting) {\n <li>{{ (ended ? 'Flows.Run.Progress.NotRun' : 'Flows.Run.Progress.Waiting') | transloco: { count: progress.waiting } }}</li>\n }\n </ul>\n</div>\n",
|
|
495
|
+
styles: [".pw-run-progress{margin-bottom:16px}.pw-run-progress__head{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}.pw-run-progress__label{font-weight:600;color:#1a1d21}.pw-run-progress__elapsed{color:#5a6473}.pw-run-progress__bar{height:8px}.pw-run-progress__bar .progress-bar{background-color:var(--first);transition:width .4s ease}.pw-run-progress__bar .progress-bar.is-failed{background-color:#c0392b}.pw-run-progress__bar .progress-bar.is-live{background-image:linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%);background-size:16px 16px;animation:pw-run-progress-stripes 1s linear infinite}.pw-run-progress__counts{display:flex;flex-wrap:wrap;gap:4px 16px;list-style:none;padding:0;margin:8px 0 0;font-size:12px;color:#5a6473}.pw-run-progress__counts .is-running{color:#1a1d21}.pw-run-progress__counts .is-failed{color:#c0392b}@keyframes pw-run-progress-stripes{0%{background-position:16px 0}to{background-position:0 0}}@media(prefers-reduced-motion:reduce){.pw-run-progress__bar .progress-bar{transition:none}.pw-run-progress__bar .progress-bar.is-live{animation:none}}\n"]
|
|
496
|
+
}]
|
|
497
|
+
}],
|
|
498
|
+
ctorParameters: () => [{ type: i0.ChangeDetectorRef }],
|
|
499
|
+
propDecorators: {
|
|
500
|
+
run: [{
|
|
501
|
+
type: Input,
|
|
502
|
+
args: [{ required: true }]
|
|
503
|
+
}],
|
|
504
|
+
steps: [{ type: Input }],
|
|
505
|
+
nodeIds: [{ type: Input }]
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
const PREFIX = "Flows.Run.Errors.";
|
|
509
|
+
const BY_CODE = {
|
|
510
|
+
awaiting_timeout: "Timeout",
|
|
511
|
+
no_credentials: "NoCredentials",
|
|
512
|
+
no_crm: "NoCrm",
|
|
513
|
+
output_too_large: "OutputTooLarge",
|
|
514
|
+
unsupported_action: "CannotRunHere",
|
|
515
|
+
unsupported_connector: "CannotRunHere",
|
|
516
|
+
unsupported_request: "CannotRunHere",
|
|
517
|
+
unsupported_shard: "CannotRunHere",
|
|
518
|
+
task_request_failed: "NotSent",
|
|
519
|
+
task_received_no_items: "NoItems",
|
|
520
|
+
email_recipients_invalid: "EmailRecipients",
|
|
521
|
+
no_shard_for_email: "EmailNotSent",
|
|
522
|
+
delivery_failed: "EmailNotSent",
|
|
523
|
+
user_not_in_subscription: "UserNotInSubscription",
|
|
524
|
+
split_out_requires_a_field: "FieldNotSet",
|
|
525
|
+
aggregate_requires_a_field: "FieldNotSet",
|
|
526
|
+
split_out_field_missing: "FieldMissing",
|
|
527
|
+
split_out_field_not_a_list: "FieldNotAList",
|
|
528
|
+
template_path_missing: "PlaceholderMissing",
|
|
529
|
+
set_fields_requires_an_object: "SetFieldsInvalid",
|
|
530
|
+
set_fields_received_a_non_object_item: "SetFieldsInvalid",
|
|
531
|
+
evaluation_failed: "ConditionFailed"
|
|
532
|
+
};
|
|
533
|
+
function callFailure(detail) {
|
|
534
|
+
const status = Number(/\b([45]\d\d)\b/.exec(detail)?.[1]);
|
|
535
|
+
if (status === 401 || status === 403) return "SignInRefused";
|
|
536
|
+
if (status === 404) return "NotFound";
|
|
537
|
+
if (status === 429) return "RateLimited";
|
|
538
|
+
return status >= 500 ? "ServiceError" : "CallFailed";
|
|
539
|
+
}
|
|
540
|
+
function flowStepErrorText(error) {
|
|
541
|
+
if (!error) return null;
|
|
542
|
+
const colon = error.indexOf(":");
|
|
543
|
+
const code = (colon === -1 ? error : error.slice(0, colon)).trim();
|
|
544
|
+
const detail = colon === -1 ? "" : error.slice(colon + 1).trim();
|
|
545
|
+
if (code === "integration_call_failed") return {
|
|
546
|
+
key: PREFIX + callFailure(detail),
|
|
547
|
+
params: {}
|
|
548
|
+
};
|
|
549
|
+
const known = BY_CODE[code];
|
|
550
|
+
return known ? {
|
|
551
|
+
key: PREFIX + known,
|
|
552
|
+
params: { detail }
|
|
553
|
+
} : {
|
|
554
|
+
key: PREFIX + "Unknown",
|
|
555
|
+
params: { detail: error }
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
var FlowsStepErrorComponent = class FlowsStepErrorComponent {
|
|
559
|
+
constructor() {
|
|
560
|
+
this.error = null;
|
|
561
|
+
this.retrying = false;
|
|
562
|
+
this.icons = FLOWS_ICONS;
|
|
563
|
+
this.text = null;
|
|
564
|
+
}
|
|
565
|
+
ngOnChanges() {
|
|
566
|
+
this.text = flowStepErrorText(this.error);
|
|
567
|
+
}
|
|
568
|
+
static {
|
|
569
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
570
|
+
minVersion: "12.0.0",
|
|
571
|
+
version: "22.2.0",
|
|
572
|
+
ngImport: i0,
|
|
573
|
+
type: FlowsStepErrorComponent,
|
|
574
|
+
deps: [],
|
|
575
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
static {
|
|
579
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
580
|
+
minVersion: "17.0.0",
|
|
581
|
+
version: "22.2.0",
|
|
582
|
+
type: FlowsStepErrorComponent,
|
|
583
|
+
isStandalone: false,
|
|
584
|
+
selector: "pw-flows-step-error",
|
|
585
|
+
inputs: {
|
|
586
|
+
error: "error",
|
|
587
|
+
retrying: "retrying"
|
|
588
|
+
},
|
|
589
|
+
usesOnChanges: true,
|
|
590
|
+
ngImport: i0,
|
|
591
|
+
template: "@if (text) {\n@let reason = text.key | transloco: text.params;\n<span class=\"pw-step-error\"\n [class.is-retrying]=\"retrying\"\n [pTooltip]=\"error\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon [icon]=\"retrying ? icons.warning : icons.error\"\n aria-hidden=\"true\"></fa-icon>\n</span>\n<small class=\"pw-step-error__text\"\n [class.is-retrying]=\"retrying\"\n data-testid=\"flow-step-error-text\">\n {{ retrying ? ('Flows.Run.Errors.LastTry' | transloco: { reason }) : reason }}\n</small>\n}\n",
|
|
592
|
+
styles: [":host{display:contents}.pw-step-error{margin-left:6px;color:#c0392b;cursor:help}.pw-step-error__text{display:block;max-width:280px;margin-top:4px;color:#c0392b;white-space:normal;overflow-wrap:anywhere}.pw-step-error.is-retrying,.pw-step-error__text.is-retrying{color:#8a6d00}\n"],
|
|
593
|
+
dependencies: [
|
|
283
594
|
{
|
|
284
595
|
kind: "directive",
|
|
285
|
-
type:
|
|
596
|
+
type: i1$1.Tooltip,
|
|
286
597
|
selector: "[pTooltip]",
|
|
287
598
|
inputs: [
|
|
288
599
|
"tooltipPosition",
|
|
@@ -310,7 +621,205 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
310
621
|
},
|
|
311
622
|
{
|
|
312
623
|
kind: "component",
|
|
313
|
-
type:
|
|
624
|
+
type: i2$3.FaIconComponent,
|
|
625
|
+
selector: "fa-icon",
|
|
626
|
+
inputs: [
|
|
627
|
+
"icon",
|
|
628
|
+
"title",
|
|
629
|
+
"animation",
|
|
630
|
+
"mask",
|
|
631
|
+
"flip",
|
|
632
|
+
"size",
|
|
633
|
+
"pull",
|
|
634
|
+
"border",
|
|
635
|
+
"inverse",
|
|
636
|
+
"symbol",
|
|
637
|
+
"rotate",
|
|
638
|
+
"fixedWidth",
|
|
639
|
+
"transform",
|
|
640
|
+
"a11yRole"
|
|
641
|
+
],
|
|
642
|
+
outputs: [
|
|
643
|
+
"iconChange",
|
|
644
|
+
"titleChange",
|
|
645
|
+
"animationChange",
|
|
646
|
+
"maskChange",
|
|
647
|
+
"flipChange",
|
|
648
|
+
"sizeChange",
|
|
649
|
+
"pullChange",
|
|
650
|
+
"borderChange",
|
|
651
|
+
"inverseChange",
|
|
652
|
+
"symbolChange",
|
|
653
|
+
"rotateChange",
|
|
654
|
+
"fixedWidthChange",
|
|
655
|
+
"transformChange",
|
|
656
|
+
"a11yRoleChange"
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
kind: "pipe",
|
|
661
|
+
type: i2$4.TranslocoPipe,
|
|
662
|
+
name: "transloco"
|
|
663
|
+
}
|
|
664
|
+
]
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
669
|
+
minVersion: "12.0.0",
|
|
670
|
+
version: "22.2.0",
|
|
671
|
+
ngImport: i0,
|
|
672
|
+
type: FlowsStepErrorComponent,
|
|
673
|
+
decorators: [{
|
|
674
|
+
type: Component,
|
|
675
|
+
args: [{
|
|
676
|
+
selector: "pw-flows-step-error",
|
|
677
|
+
standalone: false,
|
|
678
|
+
template: "@if (text) {\n@let reason = text.key | transloco: text.params;\n<span class=\"pw-step-error\"\n [class.is-retrying]=\"retrying\"\n [pTooltip]=\"error\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon [icon]=\"retrying ? icons.warning : icons.error\"\n aria-hidden=\"true\"></fa-icon>\n</span>\n<small class=\"pw-step-error__text\"\n [class.is-retrying]=\"retrying\"\n data-testid=\"flow-step-error-text\">\n {{ retrying ? ('Flows.Run.Errors.LastTry' | transloco: { reason }) : reason }}\n</small>\n}\n",
|
|
679
|
+
styles: [":host{display:contents}.pw-step-error{margin-left:6px;color:#c0392b;cursor:help}.pw-step-error__text{display:block;max-width:280px;margin-top:4px;color:#c0392b;white-space:normal;overflow-wrap:anywhere}.pw-step-error.is-retrying,.pw-step-error__text.is-retrying{color:#8a6d00}\n"]
|
|
680
|
+
}]
|
|
681
|
+
}],
|
|
682
|
+
propDecorators: {
|
|
683
|
+
error: [{ type: Input }],
|
|
684
|
+
retrying: [{ type: Input }]
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBaseComponent {
|
|
688
|
+
constructor(injector, flowsRunService, workflowService, nodeService, cdr) {
|
|
689
|
+
super(injector);
|
|
690
|
+
this.flowsRunService = flowsRunService;
|
|
691
|
+
this.workflowService = workflowService;
|
|
692
|
+
this.nodeService = nodeService;
|
|
693
|
+
this.cdr = cdr;
|
|
694
|
+
this.destroy$ = new Subject();
|
|
695
|
+
this.loading = true;
|
|
696
|
+
this.notFound = false;
|
|
697
|
+
this.steps = [];
|
|
698
|
+
this.icons = FLOWS_ICONS;
|
|
699
|
+
this.openSteps = /* @__PURE__ */ new Set();
|
|
700
|
+
this.trackByStep = (_, step) => step.id;
|
|
701
|
+
this.labelKey = flowNodeLabelKey;
|
|
702
|
+
this.scheduledFor = flowRunScheduledFor;
|
|
703
|
+
this.nodeTypes = {};
|
|
704
|
+
this.nodeIds = [];
|
|
705
|
+
this.definitions = {};
|
|
706
|
+
}
|
|
707
|
+
ngOnInit() {
|
|
708
|
+
combineLatest([this.route.params.pipe(map((params) => Number(params["id"]))), this.getUserSubscriptionId()]).pipe(distinctUntilChanged(([prevRun, prevSub], [nextRun, nextSub]) => prevRun === nextRun && prevSub === nextSub), takeUntil(this.destroy$)).subscribe(([runId, subscriptionId]) => {
|
|
709
|
+
this.runId = runId;
|
|
710
|
+
if (!subscriptionId || !this.runId) {
|
|
711
|
+
this.fail();
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
this.watch(subscriptionId);
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
ngOnDestroy() {
|
|
718
|
+
super.ngOnDestroy();
|
|
719
|
+
this.watch$?.unsubscribe();
|
|
720
|
+
this.destroy$.next();
|
|
721
|
+
this.destroy$.complete();
|
|
722
|
+
}
|
|
723
|
+
back() {
|
|
724
|
+
this.router.navigate(["runs"], { relativeTo: this.route.parent });
|
|
725
|
+
}
|
|
726
|
+
runBadgeClass(status) {
|
|
727
|
+
return flowRunBadgeClass(status);
|
|
728
|
+
}
|
|
729
|
+
stepBadgeClass(status) {
|
|
730
|
+
return flowRunStepBadgeClass(status);
|
|
731
|
+
}
|
|
732
|
+
elapsed(from, to) {
|
|
733
|
+
return elapsedMs(from, to);
|
|
734
|
+
}
|
|
735
|
+
toggleItems(stepId) {
|
|
736
|
+
if (!this.openSteps.delete(stepId)) this.openSteps.add(stepId);
|
|
737
|
+
}
|
|
738
|
+
asJson(value) {
|
|
739
|
+
if (value === null || value === void 0) return "—";
|
|
740
|
+
return JSON.stringify(value, null, 2);
|
|
741
|
+
}
|
|
742
|
+
watch(subscriptionId) {
|
|
743
|
+
this.watch$?.unsubscribe();
|
|
744
|
+
this.watch$ = this.flowsRunService.watchRun(this.runId, subscriptionId).pipe(takeUntil(this.destroy$)).subscribe({
|
|
745
|
+
next: (detail) => {
|
|
746
|
+
this.run = detail.run;
|
|
747
|
+
this.steps = detail.steps?.flow_run_steps ?? [];
|
|
748
|
+
this.nameNodes(subscriptionId);
|
|
749
|
+
this.notFound = false;
|
|
750
|
+
this.settle();
|
|
751
|
+
},
|
|
752
|
+
error: () => this.fail()
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
nameNodes(subscriptionId) {
|
|
756
|
+
const versionId = this.run?.flow_version_id;
|
|
757
|
+
if (!versionId || versionId === this.namedVersionId) return;
|
|
758
|
+
this.namedVersionId = versionId;
|
|
759
|
+
forkJoin({
|
|
760
|
+
version: this.workflowService.getVersion(versionId, subscriptionId),
|
|
761
|
+
nodes: this.nodeService.getNodes(subscriptionId)
|
|
762
|
+
}).pipe(takeUntil(this.destroy$)).subscribe({
|
|
763
|
+
next: ({ version, nodes }) => {
|
|
764
|
+
this.nodeTypes = Object.fromEntries(toFlowGraph(version.graph).nodes.map((node) => [node.id, node.type]));
|
|
765
|
+
this.nodeIds = Object.keys(this.nodeTypes);
|
|
766
|
+
this.definitions = Object.fromEntries(nodes.map((node) => [node.type, node]));
|
|
767
|
+
this.cdr.markForCheck();
|
|
768
|
+
},
|
|
769
|
+
error: () => void 0
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
fail() {
|
|
773
|
+
this.run = void 0;
|
|
774
|
+
this.steps = [];
|
|
775
|
+
this.notFound = true;
|
|
776
|
+
this.settle();
|
|
777
|
+
}
|
|
778
|
+
settle() {
|
|
779
|
+
this.loading = false;
|
|
780
|
+
this.cdr.markForCheck();
|
|
781
|
+
}
|
|
782
|
+
static {
|
|
783
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
784
|
+
minVersion: "12.0.0",
|
|
785
|
+
version: "22.2.0",
|
|
786
|
+
ngImport: i0,
|
|
787
|
+
type: FlowsRunInspectorComponent,
|
|
788
|
+
deps: [
|
|
789
|
+
{ token: i0.Injector },
|
|
790
|
+
{ token: FlowsRunService },
|
|
791
|
+
{ token: FlowsWorkflowService },
|
|
792
|
+
{ token: FlowsNodeService },
|
|
793
|
+
{ token: i0.ChangeDetectorRef }
|
|
794
|
+
],
|
|
795
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
static {
|
|
799
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
800
|
+
minVersion: "17.0.0",
|
|
801
|
+
version: "22.2.0",
|
|
802
|
+
type: FlowsRunInspectorComponent,
|
|
803
|
+
isStandalone: false,
|
|
804
|
+
selector: "pw-flows-run-inspector",
|
|
805
|
+
usesInheritance: true,
|
|
806
|
+
ngImport: i0,
|
|
807
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex align-items-center\">\n <a href=\"javascript:void(0)\"\n class=\"previous\"\n [attr.aria-label]=\"'Flows.Run.Back' | transloco\"\n (click)=\"back()\"><fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <!-- 🔴 Id only from the resolved run: showing it from the URL confirms a foreign run exists. -->\n <span>{{\n run\n ? ('Flows.Run.Title' | transloco: { id: runId })\n : ('Flows.Run.TitleUnknown' | transloco)\n }}</span>\n </h3>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound || !run) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Run.NotFound' | transloco\"></pw-no-data>\n} @else {\n<div class=\"row mt-3\">\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Status' | transloco }}</span>\n <span class=\"pw-run-meta__value\">\n <span [class]=\"runBadgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Version' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Started' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ run.started_at ? (run.started_at | dateFormat: 'datetime') : '—' }}</span>\n </div>\n </div>\n\n @if (scheduledFor(run); as slot) {\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\"\n data-testid=\"flow-run-scheduled-for\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Run.ScheduledFor' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ slot | dateFormat: 'datetime' }}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Finished' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ run.finished_at ? (run.finished_at | dateFormat: 'datetime') : '—' }}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Duration' | transloco }}</span>\n <span class=\"pw-run-meta__value\">\n @if (elapsed(run.started_at, run.finished_at) !== null) {\n {{ elapsed(run.started_at, run.finished_at) / 1000 | number: '1.0-1'\n }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </span>\n </div>\n </div>\n\n @if (run.error) {\n <div class=\"col-12\">\n <div class=\"pw-run-error\"\n role=\"alert\">\n <span class=\"pw-run-error__label\">{{ 'Flows.Run.Meta.Error' | transloco }}</span>\n <span class=\"pw-run-error__message\">{{ run.error }}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12\">\n <details class=\"pw-run-payload\">\n <summary>{{ 'Flows.Run.Meta.TriggerPayload' | transloco }}</summary>\n <pre class=\"pw-run-payload__json\">{{ asJson(run.trigger_payload) }}</pre>\n </details>\n </div>\n</div>\n\n<div class=\"row mt-4\">\n <div class=\"col-12\">\n <pw-flows-run-progress [run]=\"run\" [steps]=\"steps\" [nodeIds]=\"nodeIds\"></pw-flows-run-progress>\n <h4>{{ 'Flows.Run.Steps.Title' | transloco }}</h4>\n </div>\n</div>\n\n@if (steps.length) {\n<div class=\"primeng-datatable-container table-responsive mt-2\">\n <p-table [value]=\"steps\"\n dataKey=\"id\"\n [rowTrackBy]=\"trackByStep\">\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Node' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Attempts' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Items' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-step>\n <tr>\n <td data-head=\"Node\">\n @let type = nodeTypes[step.node_id];\n @if (type) {\n @let key = labelKey(type);\n @let translated = key | transloco;\n {{ translated === key ? (definitions[type]?.label ?? type) : translated }}\n <small class=\"text-muted ms-1\">{{ step.node_id }}</small>\n } @else {\n {{ step.node_id }}\n }\n </td>\n <td data-head=\"Status\">\n <span [class]=\"stepBadgeClass(step.status)\">\n {{ (step.retry_at ? 'Flows.Status.retrying' : 'Flows.Status.' + step.status) | transloco }}\n </span>\n <pw-flows-step-error [error]=\"step.error\" [retrying]=\"!!step.retry_at\"></pw-flows-step-error>\n @if (step.retry_at) {\n <small class=\"d-block mt-1 text-muted\"\n data-testid=\"flow-step-next-try\">\n {{ 'Flows.Run.Steps.NextTry' | transloco: { time: (step.retry_at | dateFormat: 'datetime') } }}\n </small>\n }\n </td>\n <td data-head=\"Attempts\">{{ step.attempts }}</td>\n <td data-head=\"Started\">{{ step.started_at ? (step.started_at | dateFormat) : '—' }}</td>\n <td data-head=\"Duration\">\n @if (elapsed(step.started_at, step.finished_at) !== null) {\n {{ elapsed(step.started_at, step.finished_at) / 1000 | number: '1.0-1'\n }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </td>\n <td data-head=\"Items\">\n <button type=\"button\"\n class=\"btn btn-link p-0 pw-step-toggle\"\n [attr.aria-expanded]=\"openSteps.has(step.id)\"\n [attr.aria-controls]=\"'flow-step-items-' + step.id\"\n (click)=\"toggleItems(step.id)\">\n <fa-icon [icon]=\"openSteps.has(step.id) ? icons.expanded : icons.collapsed\" aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Run.Steps.Column.Items' | transloco }}\n </button>\n </td>\n </tr>\n <!-- Its own full-width row, so opening a step never resizes the columns above. -->\n @if (openSteps.has(step.id)) {\n <tr class=\"pw-step-items-row\">\n <td colspan=\"6\"\n [id]=\"'flow-step-items-' + step.id\">\n <div class=\"pw-step-items\">\n <span class=\"pw-step-items__label\">{{ 'Flows.Run.Steps.Input' | transloco }}</span>\n <pre class=\"pw-step-items__json\">{{ asJson(step.input_items) }}</pre>\n <span class=\"pw-step-items__label\">{{ 'Flows.Run.Steps.Output' | transloco }}</span>\n <pre class=\"pw-step-items__json\">{{ asJson(step.output_items) }}</pre>\n </div>\n </td>\n </tr>\n }\n </ng-template>\n </p-table>\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Run.Steps.Empty' | transloco\"></pw-no-data>\n}\n}\n}\n",
|
|
808
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-run-meta{display:flex;flex-direction:column;margin-bottom:16px}.pw-run-meta__label{height:18px;line-height:18px;margin-bottom:8px;font-size:11px;font-weight:600;letter-spacing:.01em;color:#5a6473}.pw-run-meta__value{line-height:18px;color:#1a1d21;overflow-wrap:anywhere}.pw-run-error{display:flex;flex-direction:column;gap:2px;background-color:#fbeae8;border:1px solid #f3d3cf;border-radius:6px;padding:10px 12px;margin-bottom:12px}.pw-run-error__label{font-size:11px;font-weight:600;letter-spacing:.01em;color:#c0392b}.pw-run-error__message{color:#1a1d21;overflow-wrap:anywhere}.pw-run-payload{margin-bottom:8px}.pw-run-payload__json{max-height:240px;overflow:auto;background-color:#f5f7fa;border:1px solid #e2e5ea;border-radius:6px;padding:8px 10px;margin:6px 0 0}.pw-step-items{display:flex;flex-direction:column;gap:2px}.pw-step-items__label{font-size:11px;font-weight:600;color:#5a6473;letter-spacing:.01em}.pw-step-items__json{max-height:320px;overflow:auto;background-color:#f5f7fa;border:1px solid #e2e5ea;border-radius:6px;padding:6px 8px;margin:0 0 6px}.pw-step-toggle{display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none}.pw-step-items-row td{padding-top:0}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"],
|
|
809
|
+
dependencies: [
|
|
810
|
+
{
|
|
811
|
+
kind: "component",
|
|
812
|
+
type: i4$1.AppLoaderComponent,
|
|
813
|
+
selector: "pw-loader",
|
|
814
|
+
inputs: [
|
|
815
|
+
"isVisible",
|
|
816
|
+
"closeOnOutsideClick",
|
|
817
|
+
"autoCloseTimeOut"
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
kind: "component",
|
|
822
|
+
type: i5.Table,
|
|
314
823
|
selector: "p-table",
|
|
315
824
|
inputs: [
|
|
316
825
|
"frozenColumns",
|
|
@@ -423,7 +932,7 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
423
932
|
},
|
|
424
933
|
{
|
|
425
934
|
kind: "component",
|
|
426
|
-
type:
|
|
935
|
+
type: i6$1.NoDataComponent,
|
|
427
936
|
selector: "pw-no-data",
|
|
428
937
|
inputs: [
|
|
429
938
|
"message",
|
|
@@ -433,7 +942,7 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
433
942
|
},
|
|
434
943
|
{
|
|
435
944
|
kind: "component",
|
|
436
|
-
type:
|
|
945
|
+
type: i2$3.FaIconComponent,
|
|
437
946
|
selector: "fa-icon",
|
|
438
947
|
inputs: [
|
|
439
948
|
"icon",
|
|
@@ -470,7 +979,7 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
470
979
|
},
|
|
471
980
|
{
|
|
472
981
|
kind: "directive",
|
|
473
|
-
type:
|
|
982
|
+
type: i8.RouterLink,
|
|
474
983
|
selector: "[routerLink]",
|
|
475
984
|
inputs: [
|
|
476
985
|
"target",
|
|
@@ -487,20 +996,36 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
|
|
|
487
996
|
"routerLink"
|
|
488
997
|
]
|
|
489
998
|
},
|
|
999
|
+
{
|
|
1000
|
+
kind: "component",
|
|
1001
|
+
type: FlowsRunProgressComponent,
|
|
1002
|
+
selector: "pw-flows-run-progress",
|
|
1003
|
+
inputs: [
|
|
1004
|
+
"run",
|
|
1005
|
+
"steps",
|
|
1006
|
+
"nodeIds"
|
|
1007
|
+
]
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
kind: "component",
|
|
1011
|
+
type: FlowsStepErrorComponent,
|
|
1012
|
+
selector: "pw-flows-step-error",
|
|
1013
|
+
inputs: ["error", "retrying"]
|
|
1014
|
+
},
|
|
490
1015
|
{
|
|
491
1016
|
kind: "pipe",
|
|
492
|
-
type:
|
|
1017
|
+
type: i1$2.DecimalPipe,
|
|
493
1018
|
name: "number"
|
|
494
1019
|
},
|
|
495
1020
|
{
|
|
496
1021
|
kind: "pipe",
|
|
497
|
-
type:
|
|
498
|
-
name: "
|
|
1022
|
+
type: i2$4.TranslocoPipe,
|
|
1023
|
+
name: "transloco"
|
|
499
1024
|
},
|
|
500
1025
|
{
|
|
501
1026
|
kind: "pipe",
|
|
502
|
-
type:
|
|
503
|
-
name: "
|
|
1027
|
+
type: i13.DateFormatPipe,
|
|
1028
|
+
name: "dateFormat"
|
|
504
1029
|
}
|
|
505
1030
|
]
|
|
506
1031
|
});
|
|
@@ -516,114 +1041,35 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
516
1041
|
args: [{
|
|
517
1042
|
selector: "pw-flows-run-inspector",
|
|
518
1043
|
standalone: false,
|
|
519
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex align-items-center\">\n <a href=\"javascript:void(0)\"\n class=\"previous\"\n [attr.aria-label]=\"'Flows.Run.Back' | transloco\"\n (click)=\"back()\"><fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <!-- 🔴 Id only from the resolved run: showing it from the URL confirms a foreign run exists. -->\n <span>{{\n run\n ? ('Flows.Run.Title' | transloco: { id: runId })\n : ('Flows.Run.TitleUnknown' | transloco)\n }}</span>\n </h3>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound || !run) {\n<pw-no-data [message]=\"'Flows.Run.NotFound' | transloco\"></pw-no-data>\n} @else {\n<div class=\"row mt-3\">\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Status' | transloco }}</span>\n <span class=\"pw-run-meta__value\">\n <span [class]=\"runBadgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Version' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Started' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ run.started_at ? (run.started_at |
|
|
520
|
-
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-run-meta{display:flex;flex-direction:column;margin-bottom:16px}.pw-run-meta__label{height:18px;line-height:18px;margin-bottom:8px;font-size:11px;font-weight:600;letter-spacing:.01em;color:#5a6473}.pw-run-meta__value{line-height:18px;color:#1a1d21;overflow-wrap:anywhere}.pw-run-error{display:flex;flex-direction:column;gap:2px;background-color:#fbeae8;border:1px solid #f3d3cf;border-radius:6px;padding:10px 12px;margin-bottom:12px}.pw-run-error__label{font-size:11px;font-weight:600;letter-spacing:.01em;color:#c0392b}.pw-run-error__message{color:#1a1d21;overflow-wrap:anywhere}.pw-run-payload{margin-bottom:8px}.pw-run-payload__json{max-height:240px;overflow:auto;background-color:#f5f7fa;border:1px solid #e2e5ea;border-radius:6px;padding:8px 10px;margin:6px 0 0}.pw-step-
|
|
1044
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex align-items-center\">\n <a href=\"javascript:void(0)\"\n class=\"previous\"\n [attr.aria-label]=\"'Flows.Run.Back' | transloco\"\n (click)=\"back()\"><fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n <!-- 🔴 Id only from the resolved run: showing it from the URL confirms a foreign run exists. -->\n <span>{{\n run\n ? ('Flows.Run.Title' | transloco: { id: runId })\n : ('Flows.Run.TitleUnknown' | transloco)\n }}</span>\n </h3>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound || !run) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Run.NotFound' | transloco\"></pw-no-data>\n} @else {\n<div class=\"row mt-3\">\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Status' | transloco }}</span>\n <span class=\"pw-run-meta__value\">\n <span [class]=\"runBadgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Version' | transloco }}</span>\n <a class=\"pw-run-meta__value\"\n [routerLink]=\"['../../workflows', run.flow_workflow_id, 'versions']\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Started' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ run.started_at ? (run.started_at | dateFormat: 'datetime') : '—' }}</span>\n </div>\n </div>\n\n @if (scheduledFor(run); as slot) {\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\"\n data-testid=\"flow-run-scheduled-for\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Run.ScheduledFor' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ slot | dateFormat: 'datetime' }}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Finished' | transloco }}</span>\n <span class=\"pw-run-meta__value\">{{ run.finished_at ? (run.finished_at | dateFormat: 'datetime') : '—' }}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-4\">\n <div class=\"pw-run-meta\">\n <span class=\"pw-run-meta__label\">{{ 'Flows.Runs.Column.Duration' | transloco }}</span>\n <span class=\"pw-run-meta__value\">\n @if (elapsed(run.started_at, run.finished_at) !== null) {\n {{ elapsed(run.started_at, run.finished_at) / 1000 | number: '1.0-1'\n }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </span>\n </div>\n </div>\n\n @if (run.error) {\n <div class=\"col-12\">\n <div class=\"pw-run-error\"\n role=\"alert\">\n <span class=\"pw-run-error__label\">{{ 'Flows.Run.Meta.Error' | transloco }}</span>\n <span class=\"pw-run-error__message\">{{ run.error }}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12\">\n <details class=\"pw-run-payload\">\n <summary>{{ 'Flows.Run.Meta.TriggerPayload' | transloco }}</summary>\n <pre class=\"pw-run-payload__json\">{{ asJson(run.trigger_payload) }}</pre>\n </details>\n </div>\n</div>\n\n<div class=\"row mt-4\">\n <div class=\"col-12\">\n <pw-flows-run-progress [run]=\"run\" [steps]=\"steps\" [nodeIds]=\"nodeIds\"></pw-flows-run-progress>\n <h4>{{ 'Flows.Run.Steps.Title' | transloco }}</h4>\n </div>\n</div>\n\n@if (steps.length) {\n<div class=\"primeng-datatable-container table-responsive mt-2\">\n <p-table [value]=\"steps\"\n dataKey=\"id\"\n [rowTrackBy]=\"trackByStep\">\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Node' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Attempts' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Run.Steps.Column.Items' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-step>\n <tr>\n <td data-head=\"Node\">\n @let type = nodeTypes[step.node_id];\n @if (type) {\n @let key = labelKey(type);\n @let translated = key | transloco;\n {{ translated === key ? (definitions[type]?.label ?? type) : translated }}\n <small class=\"text-muted ms-1\">{{ step.node_id }}</small>\n } @else {\n {{ step.node_id }}\n }\n </td>\n <td data-head=\"Status\">\n <span [class]=\"stepBadgeClass(step.status)\">\n {{ (step.retry_at ? 'Flows.Status.retrying' : 'Flows.Status.' + step.status) | transloco }}\n </span>\n <pw-flows-step-error [error]=\"step.error\" [retrying]=\"!!step.retry_at\"></pw-flows-step-error>\n @if (step.retry_at) {\n <small class=\"d-block mt-1 text-muted\"\n data-testid=\"flow-step-next-try\">\n {{ 'Flows.Run.Steps.NextTry' | transloco: { time: (step.retry_at | dateFormat: 'datetime') } }}\n </small>\n }\n </td>\n <td data-head=\"Attempts\">{{ step.attempts }}</td>\n <td data-head=\"Started\">{{ step.started_at ? (step.started_at | dateFormat) : '—' }}</td>\n <td data-head=\"Duration\">\n @if (elapsed(step.started_at, step.finished_at) !== null) {\n {{ elapsed(step.started_at, step.finished_at) / 1000 | number: '1.0-1'\n }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </td>\n <td data-head=\"Items\">\n <button type=\"button\"\n class=\"btn btn-link p-0 pw-step-toggle\"\n [attr.aria-expanded]=\"openSteps.has(step.id)\"\n [attr.aria-controls]=\"'flow-step-items-' + step.id\"\n (click)=\"toggleItems(step.id)\">\n <fa-icon [icon]=\"openSteps.has(step.id) ? icons.expanded : icons.collapsed\" aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Run.Steps.Column.Items' | transloco }}\n </button>\n </td>\n </tr>\n <!-- Its own full-width row, so opening a step never resizes the columns above. -->\n @if (openSteps.has(step.id)) {\n <tr class=\"pw-step-items-row\">\n <td colspan=\"6\"\n [id]=\"'flow-step-items-' + step.id\">\n <div class=\"pw-step-items\">\n <span class=\"pw-step-items__label\">{{ 'Flows.Run.Steps.Input' | transloco }}</span>\n <pre class=\"pw-step-items__json\">{{ asJson(step.input_items) }}</pre>\n <span class=\"pw-step-items__label\">{{ 'Flows.Run.Steps.Output' | transloco }}</span>\n <pre class=\"pw-step-items__json\">{{ asJson(step.output_items) }}</pre>\n </div>\n </td>\n </tr>\n }\n </ng-template>\n </p-table>\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Run.Steps.Empty' | transloco\"></pw-no-data>\n}\n}\n}\n",
|
|
1045
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-run-meta{display:flex;flex-direction:column;margin-bottom:16px}.pw-run-meta__label{height:18px;line-height:18px;margin-bottom:8px;font-size:11px;font-weight:600;letter-spacing:.01em;color:#5a6473}.pw-run-meta__value{line-height:18px;color:#1a1d21;overflow-wrap:anywhere}.pw-run-error{display:flex;flex-direction:column;gap:2px;background-color:#fbeae8;border:1px solid #f3d3cf;border-radius:6px;padding:10px 12px;margin-bottom:12px}.pw-run-error__label{font-size:11px;font-weight:600;letter-spacing:.01em;color:#c0392b}.pw-run-error__message{color:#1a1d21;overflow-wrap:anywhere}.pw-run-payload{margin-bottom:8px}.pw-run-payload__json{max-height:240px;overflow:auto;background-color:#f5f7fa;border:1px solid #e2e5ea;border-radius:6px;padding:8px 10px;margin:6px 0 0}.pw-step-items{display:flex;flex-direction:column;gap:2px}.pw-step-items__label{font-size:11px;font-weight:600;color:#5a6473;letter-spacing:.01em}.pw-step-items__json{max-height:320px;overflow:auto;background-color:#f5f7fa;border:1px solid #e2e5ea;border-radius:6px;padding:6px 8px;margin:0 0 6px}.pw-step-toggle{display:inline-flex;align-items:center;gap:6px;color:inherit;text-decoration:none}.pw-step-items-row td{padding-top:0}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"]
|
|
521
1046
|
}]
|
|
522
1047
|
}],
|
|
523
1048
|
ctorParameters: () => [
|
|
524
1049
|
{ type: i0.Injector },
|
|
525
1050
|
{ type: FlowsRunService },
|
|
1051
|
+
{ type: FlowsWorkflowService },
|
|
1052
|
+
{ type: FlowsNodeService },
|
|
526
1053
|
{ type: i0.ChangeDetectorRef }
|
|
527
1054
|
]
|
|
528
1055
|
});
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
...attrs
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
updateWorkflow(id, subscriptionId, attrs) {
|
|
550
|
-
return this.api.put(`${FLOWS_WORKFLOWS_PATH}/${id}`, {
|
|
551
|
-
subscription_id: subscriptionId,
|
|
552
|
-
...attrs
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
deleteWorkflow(id, subscriptionId) {
|
|
556
|
-
return this.api.delete(`${FLOWS_WORKFLOWS_PATH}/${id}`, { params: { subscription_id: String(subscriptionId) } });
|
|
557
|
-
}
|
|
558
|
-
getVersions(workflowId, subscriptionId, paging) {
|
|
559
|
-
return this.api.getWithParams(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/versions`, {
|
|
560
|
-
subscription_id: subscriptionId,
|
|
561
|
-
...HelperService.getPagingParams(paging)
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
createVersion(workflowId, subscriptionId, graph) {
|
|
565
|
-
return this.api.post(`${FLOWS_WORKFLOWS_PATH}/${workflowId}/versions`, {
|
|
566
|
-
subscription_id: subscriptionId,
|
|
567
|
-
graph
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
updateVersion(id, subscriptionId, graph) {
|
|
571
|
-
return this.api.put(`${FLOWS_VERSIONS_PATH}/${id}`, {
|
|
572
|
-
subscription_id: subscriptionId,
|
|
573
|
-
graph
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
publishVersion(id, subscriptionId) {
|
|
577
|
-
return this.api.put(`${FLOWS_VERSIONS_PATH}/${id}/publish`, { subscription_id: subscriptionId });
|
|
578
|
-
}
|
|
579
|
-
static {
|
|
580
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
581
|
-
minVersion: "12.0.0",
|
|
582
|
-
version: "22.2.0",
|
|
583
|
-
ngImport: i0,
|
|
584
|
-
type: FlowsWorkflowService,
|
|
585
|
-
deps: [{ token: i1$1.ProductsHttpService }],
|
|
586
|
-
target: i0.ɵɵFactoryTarget.Injectable
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
static {
|
|
590
|
-
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
591
|
-
minVersion: "12.0.0",
|
|
592
|
-
version: "22.2.0",
|
|
593
|
-
ngImport: i0,
|
|
594
|
-
type: FlowsWorkflowService,
|
|
595
|
-
providedIn: "root"
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
600
|
-
minVersion: "12.0.0",
|
|
601
|
-
version: "22.2.0",
|
|
602
|
-
ngImport: i0,
|
|
603
|
-
type: FlowsWorkflowService,
|
|
604
|
-
decorators: [{
|
|
605
|
-
type: Injectable,
|
|
606
|
-
args: [{ providedIn: "root" }]
|
|
607
|
-
}],
|
|
608
|
-
ctorParameters: () => [{ type: i1$1.ProductsHttpService }]
|
|
609
|
-
});
|
|
610
|
-
const OPTIONS_PAGE = {
|
|
611
|
-
page: 1,
|
|
612
|
-
page_size: 200
|
|
613
|
-
};
|
|
614
|
-
var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
|
|
615
|
-
constructor(translation, workflowService, cdr) {
|
|
616
|
-
this.translation = translation;
|
|
617
|
-
this.workflowService = workflowService;
|
|
618
|
-
this.cdr = cdr;
|
|
619
|
-
this.queryChange = new EventEmitter();
|
|
620
|
-
this.destroy$ = new Subject();
|
|
621
|
-
this.status = null;
|
|
622
|
-
this.workflowId = null;
|
|
623
|
-
this.versionId = null;
|
|
624
|
-
this.statusOptions = [];
|
|
625
|
-
this.workflowOptions = [];
|
|
626
|
-
this.versionOptions = [];
|
|
1056
|
+
const OPTIONS_PAGE = {
|
|
1057
|
+
page: 1,
|
|
1058
|
+
page_size: 200
|
|
1059
|
+
};
|
|
1060
|
+
var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
|
|
1061
|
+
constructor(translation, workflowService, cdr) {
|
|
1062
|
+
this.translation = translation;
|
|
1063
|
+
this.workflowService = workflowService;
|
|
1064
|
+
this.cdr = cdr;
|
|
1065
|
+
this.queryChange = new EventEmitter();
|
|
1066
|
+
this.destroy$ = new Subject();
|
|
1067
|
+
this.status = null;
|
|
1068
|
+
this.workflowId = null;
|
|
1069
|
+
this.versionId = null;
|
|
1070
|
+
this.statusOptions = [];
|
|
1071
|
+
this.workflowOptions = [];
|
|
1072
|
+
this.versionOptions = [];
|
|
627
1073
|
}
|
|
628
1074
|
ngOnInit() {
|
|
629
1075
|
this.translation.selectTranslation("flows").pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
@@ -684,7 +1130,7 @@ var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
|
|
|
684
1130
|
ngImport: i0,
|
|
685
1131
|
type: FlowsRunsFiltersComponent,
|
|
686
1132
|
deps: [
|
|
687
|
-
{ token:
|
|
1133
|
+
{ token: i2$4.TranslocoService },
|
|
688
1134
|
{ token: FlowsWorkflowService },
|
|
689
1135
|
{ token: i0.ChangeDetectorRef }
|
|
690
1136
|
],
|
|
@@ -793,7 +1239,7 @@ var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
|
|
|
793
1239
|
},
|
|
794
1240
|
{
|
|
795
1241
|
kind: "pipe",
|
|
796
|
-
type:
|
|
1242
|
+
type: i2$4.TranslocoPipe,
|
|
797
1243
|
name: "transloco"
|
|
798
1244
|
}
|
|
799
1245
|
]
|
|
@@ -814,7 +1260,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
814
1260
|
}]
|
|
815
1261
|
}],
|
|
816
1262
|
ctorParameters: () => [
|
|
817
|
-
{ type:
|
|
1263
|
+
{ type: i2$4.TranslocoService },
|
|
818
1264
|
{ type: FlowsWorkflowService },
|
|
819
1265
|
{ type: i0.ChangeDetectorRef }
|
|
820
1266
|
],
|
|
@@ -932,12 +1378,12 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
932
1378
|
selector: "pw-flows-runs",
|
|
933
1379
|
usesInheritance: true,
|
|
934
1380
|
ngImport: i0,
|
|
935
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Runs.Title' | transloco }}</h2>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"7\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"runs\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template #caption>\n <pw-flows-runs-filters [subscriptionId]=\"subscriptionId\"\n (queryChange)=\"onQuery($event)\" />\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Run' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-two\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-run>\n <tr>\n <td data-head=\"Run\">#{{ run.id }}</td>\n <td data-head=\"Workflow\">\n <a [routerLink]=\"versionsLink(run)\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </td>\n <td data-head=\"Version\">\n <a [routerLink]=\"versionsLink(run)\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </td>\n <td data-head=\"Started\">{{ run.started_at ? (run.started_at |
|
|
1381
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Runs.Title' | transloco }}</h2>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"7\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"runs\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template #caption>\n <pw-flows-runs-filters [subscriptionId]=\"subscriptionId\"\n (queryChange)=\"onQuery($event)\" />\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Run' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-two\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-run>\n <tr>\n <td data-head=\"Run\">#{{ run.id }}</td>\n <td data-head=\"Workflow\">\n <a [routerLink]=\"versionsLink(run)\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </td>\n <td data-head=\"Version\">\n <a [routerLink]=\"versionsLink(run)\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </td>\n <td data-head=\"Started\">{{ run.started_at ? (run.started_at | dateFormat) : '—' }}</td>\n <td data-head=\"Duration\">\n @if (duration(run) !== null) {\n {{ duration(run) / 1000 | number: '1.0-1' }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"'Flows.Runs.Inspect' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.inspect\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Runs.Inspect' | transloco\"\n (click)=\"inspect(run)\"\n (keydown.enter)=\"inspect(run)\"></fa-icon>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"runs.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Runs.Empty' | transloco\" [description]=\"'Flows.Runs.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n",
|
|
936
1382
|
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"],
|
|
937
1383
|
dependencies: [
|
|
938
1384
|
{
|
|
939
1385
|
kind: "component",
|
|
940
|
-
type:
|
|
1386
|
+
type: i4$1.SkeletonTableComponent,
|
|
941
1387
|
selector: "pw-skeleton-table",
|
|
942
1388
|
inputs: [
|
|
943
1389
|
"rows",
|
|
@@ -950,7 +1396,7 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
950
1396
|
},
|
|
951
1397
|
{
|
|
952
1398
|
kind: "directive",
|
|
953
|
-
type:
|
|
1399
|
+
type: i1$1.Tooltip,
|
|
954
1400
|
selector: "[pTooltip]",
|
|
955
1401
|
inputs: [
|
|
956
1402
|
"tooltipPosition",
|
|
@@ -978,7 +1424,7 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
978
1424
|
},
|
|
979
1425
|
{
|
|
980
1426
|
kind: "component",
|
|
981
|
-
type:
|
|
1427
|
+
type: i5.Table,
|
|
982
1428
|
selector: "p-table",
|
|
983
1429
|
inputs: [
|
|
984
1430
|
"frozenColumns",
|
|
@@ -1091,7 +1537,7 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
1091
1537
|
},
|
|
1092
1538
|
{
|
|
1093
1539
|
kind: "component",
|
|
1094
|
-
type:
|
|
1540
|
+
type: i6$1.NoDataComponent,
|
|
1095
1541
|
selector: "pw-no-data",
|
|
1096
1542
|
inputs: [
|
|
1097
1543
|
"message",
|
|
@@ -1101,13 +1547,13 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
1101
1547
|
},
|
|
1102
1548
|
{
|
|
1103
1549
|
kind: "component",
|
|
1104
|
-
type:
|
|
1550
|
+
type: i6$1.RecordsSummaryComponent,
|
|
1105
1551
|
selector: "pw-records-summary",
|
|
1106
1552
|
inputs: ["showing", "total"]
|
|
1107
1553
|
},
|
|
1108
1554
|
{
|
|
1109
1555
|
kind: "component",
|
|
1110
|
-
type:
|
|
1556
|
+
type: i2$3.FaIconComponent,
|
|
1111
1557
|
selector: "fa-icon",
|
|
1112
1558
|
inputs: [
|
|
1113
1559
|
"icon",
|
|
@@ -1144,7 +1590,7 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
1144
1590
|
},
|
|
1145
1591
|
{
|
|
1146
1592
|
kind: "directive",
|
|
1147
|
-
type:
|
|
1593
|
+
type: i8.RouterLink,
|
|
1148
1594
|
selector: "[routerLink]",
|
|
1149
1595
|
inputs: [
|
|
1150
1596
|
"target",
|
|
@@ -1170,18 +1616,18 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
|
|
|
1170
1616
|
},
|
|
1171
1617
|
{
|
|
1172
1618
|
kind: "pipe",
|
|
1173
|
-
type:
|
|
1619
|
+
type: i1$2.DecimalPipe,
|
|
1174
1620
|
name: "number"
|
|
1175
1621
|
},
|
|
1176
1622
|
{
|
|
1177
1623
|
kind: "pipe",
|
|
1178
|
-
type:
|
|
1179
|
-
name: "
|
|
1624
|
+
type: i2$4.TranslocoPipe,
|
|
1625
|
+
name: "transloco"
|
|
1180
1626
|
},
|
|
1181
1627
|
{
|
|
1182
1628
|
kind: "pipe",
|
|
1183
|
-
type:
|
|
1184
|
-
name: "
|
|
1629
|
+
type: i13.DateFormatPipe,
|
|
1630
|
+
name: "dateFormat"
|
|
1185
1631
|
}
|
|
1186
1632
|
]
|
|
1187
1633
|
});
|
|
@@ -1197,7 +1643,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1197
1643
|
args: [{
|
|
1198
1644
|
selector: "pw-flows-runs",
|
|
1199
1645
|
standalone: false,
|
|
1200
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Runs.Title' | transloco }}</h2>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"7\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"runs\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template #caption>\n <pw-flows-runs-filters [subscriptionId]=\"subscriptionId\"\n (queryChange)=\"onQuery($event)\" />\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Run' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-two\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-run>\n <tr>\n <td data-head=\"Run\">#{{ run.id }}</td>\n <td data-head=\"Workflow\">\n <a [routerLink]=\"versionsLink(run)\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </td>\n <td data-head=\"Version\">\n <a [routerLink]=\"versionsLink(run)\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </td>\n <td data-head=\"Started\">{{ run.started_at ? (run.started_at |
|
|
1646
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Runs.Title' | transloco }}</h2>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"7\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"runs\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template #caption>\n <pw-flows-runs-filters [subscriptionId]=\"subscriptionId\"\n (queryChange)=\"onQuery($event)\" />\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Run' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Workflow' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Started' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Runs.Column.Duration' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-two\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-run>\n <tr>\n <td data-head=\"Run\">#{{ run.id }}</td>\n <td data-head=\"Workflow\">\n <a [routerLink]=\"versionsLink(run)\">{{ run.flow_workflow_name || '#' + run.flow_workflow_id }}</a>\n </td>\n <td data-head=\"Version\">\n <a [routerLink]=\"versionsLink(run)\"\n [queryParams]=\"{ version: run.flow_version_id }\">{{ 'Flows.Runs.VersionLabel' | transloco: { number: run.flow_version_number } }}</a>\n </td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(run.status)\">\n {{ 'Flows.Status.' + run.status | transloco }}\n </span>\n </td>\n <td data-head=\"Started\">{{ run.started_at ? (run.started_at | dateFormat) : '—' }}</td>\n <td data-head=\"Duration\">\n @if (duration(run) !== null) {\n {{ duration(run) / 1000 | number: '1.0-1' }}{{ 'Flows.Runs.SecondsSuffix' | transloco }}\n } @else {\n —\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"'Flows.Runs.Inspect' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.inspect\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Runs.Inspect' | transloco\"\n (click)=\"inspect(run)\"\n (keydown.enter)=\"inspect(run)\"></fa-icon>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"runs.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Runs.Empty' | transloco\" [description]=\"'Flows.Runs.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n",
|
|
1201
1647
|
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"]
|
|
1202
1648
|
}]
|
|
1203
1649
|
}],
|
|
@@ -1243,7 +1689,7 @@ var FlowsTabsComponent = class FlowsTabsComponent {
|
|
|
1243
1689
|
isInline: true,
|
|
1244
1690
|
dependencies: [{
|
|
1245
1691
|
kind: "component",
|
|
1246
|
-
type:
|
|
1692
|
+
type: i6$1.PwTabsComponent,
|
|
1247
1693
|
selector: "pw-tabs",
|
|
1248
1694
|
inputs: ["items", "withSubscription"]
|
|
1249
1695
|
}]
|
|
@@ -1349,9 +1795,9 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1349
1795
|
this.saving = true;
|
|
1350
1796
|
const attrs = this.form.value;
|
|
1351
1797
|
(this.isEdit ? this.workflowService.updateWorkflow(this.workflowId, this.subscriptionId, attrs) : this.workflowService.createWorkflow(this.subscriptionId, attrs)).pipe(takeUntil(this.destroy$)).subscribe({
|
|
1352
|
-
next: () => {
|
|
1798
|
+
next: (workflow) => {
|
|
1353
1799
|
this.form.markAsPristine();
|
|
1354
|
-
this.
|
|
1800
|
+
this.leave(workflow);
|
|
1355
1801
|
},
|
|
1356
1802
|
error: () => {
|
|
1357
1803
|
this.saving = false;
|
|
@@ -1362,6 +1808,14 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1362
1808
|
back() {
|
|
1363
1809
|
this.router.navigate(["workflows"], { relativeTo: this.route.parent });
|
|
1364
1810
|
}
|
|
1811
|
+
leave(workflow) {
|
|
1812
|
+
if (this.isEdit) this.back();
|
|
1813
|
+
else this.router.navigate([
|
|
1814
|
+
"workflows",
|
|
1815
|
+
workflow.id,
|
|
1816
|
+
"versions"
|
|
1817
|
+
], { relativeTo: this.route.parent });
|
|
1818
|
+
}
|
|
1365
1819
|
loadStatusOptions() {
|
|
1366
1820
|
this.translation.selectTranslation("flows").pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1367
1821
|
this.statusOptions = flowWorkflowStatusOptions(this.translation.translate(FLOW_WORKFLOW_STATUS_KEYS));
|
|
@@ -1412,8 +1866,8 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1412
1866
|
selector: "pw-flows-workflow-form",
|
|
1413
1867
|
usesInheritance: true,
|
|
1414
1868
|
ngImport: i0,
|
|
1415
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">\n {{ (isEdit ? 'Flows.WorkflowForm.EditTitle' : 'Flows.WorkflowForm.CreateTitle') | transloco }}\n </h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [message]=\"'Flows.WorkflowForm.NotFound' | transloco\"></pw-no-data>\n} @else {\n<form [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n class=\"mt-3\">\n <h3>{{ 'Flows.WorkflowForm.Section.Details' | transloco }}</h3>\n <div class=\"row\">\n <!-- md-8/md-4 rather than the pattern default so the row fills the page. -->\n <pw-input-container class=\"col-12 col-md-8\"\n [label]=\"'Flows.WorkflowForm.Name' | transloco\"\n name=\"name\"\n controlId=\"flows-workflow-name\"\n [required]=\"true\"\n errorMsg=\"Flows.WorkflowForm.NameError\">\n <input type=\"text\"\n id=\"flows-workflow-name\"\n class=\"form-control\"\n maxlength=\"255\"\n [placeholder]=\"'Flows.WorkflowForm.NamePlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Name' | transloco\"\n formControlName=\"name\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n [label]=\"'Flows.WorkflowForm.Status' | transloco\"\n name=\"status\"\n controlId=\"flows-workflow-status\"\n [required]=\"true\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Flows.WorkflowForm.StatusError\">\n <!-- No [showClear]: Grape restricts status to STATUSES, so a blank 400s. -->\n <p-select inputId=\"flows-workflow-status\"\n styleClass=\"w-100\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n formControlName=\"status\"\n [attr.aria-labelledby]=\"'flows-workflow-status-label'\"\n appendTo=\"body\">\n </p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n [label]=\"'Flows.WorkflowForm.Description' | transloco\"\n name=\"description\"\n controlId=\"flows-workflow-description\">\n <textarea id=\"flows-workflow-description\"\n class=\"form-control\"\n rows=\"3\"\n [placeholder]=\"'Flows.WorkflowForm.DescriptionPlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Description' | transloco\"\n formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"saving\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n</form>\n}\n}\n",
|
|
1416
|
-
styles: [":host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}\n"],
|
|
1869
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">\n {{ (isEdit ? 'Flows.WorkflowForm.EditTitle' : 'Flows.WorkflowForm.CreateTitle') | transloco }}\n </h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.WorkflowForm.NotFound' | transloco\"></pw-no-data>\n} @else {\n<form [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n class=\"mt-3\">\n <h3>{{ 'Flows.WorkflowForm.Section.Details' | transloco }}</h3>\n <div class=\"row\">\n <!-- md-8/md-4 rather than the pattern default so the row fills the page. -->\n <pw-input-container class=\"col-12 col-md-8\"\n [label]=\"'Flows.WorkflowForm.Name' | transloco\"\n name=\"name\"\n controlId=\"flows-workflow-name\"\n [required]=\"true\"\n errorMsg=\"Flows.WorkflowForm.NameError\">\n <input type=\"text\"\n id=\"flows-workflow-name\"\n class=\"form-control\"\n maxlength=\"255\"\n [placeholder]=\"'Flows.WorkflowForm.NamePlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Name' | transloco\"\n formControlName=\"name\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n [label]=\"'Flows.WorkflowForm.Status' | transloco\"\n name=\"status\"\n controlId=\"flows-workflow-status\"\n [required]=\"true\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.WorkflowForm.StatusHint' | transloco\"\n errorMsg=\"Flows.WorkflowForm.StatusError\">\n <!-- No [showClear]: Grape restricts status to STATUSES, so a blank 400s. -->\n <p-select inputId=\"flows-workflow-status\"\n styleClass=\"w-100\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n formControlName=\"status\"\n [attr.aria-labelledby]=\"'flows-workflow-status-label'\"\n appendTo=\"body\">\n </p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n [label]=\"'Flows.WorkflowForm.Description' | transloco\"\n name=\"description\"\n controlId=\"flows-workflow-description\">\n <textarea id=\"flows-workflow-description\"\n class=\"form-control\"\n rows=\"3\"\n [placeholder]=\"'Flows.WorkflowForm.DescriptionPlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Description' | transloco\"\n formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"saving\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n</form>\n}\n}\n",
|
|
1870
|
+
styles: [":host ::ng-deep .info-circle{display:inline-block;margin-left:.35em;vertical-align:baseline}:host ::ng-deep .info-circle:after{position:static;font-size:inherit;line-height:inherit}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}\n"],
|
|
1417
1871
|
dependencies: [
|
|
1418
1872
|
{
|
|
1419
1873
|
kind: "directive",
|
|
@@ -1467,7 +1921,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1467
1921
|
},
|
|
1468
1922
|
{
|
|
1469
1923
|
kind: "component",
|
|
1470
|
-
type:
|
|
1924
|
+
type: i4$1.AppLoaderComponent,
|
|
1471
1925
|
selector: "pw-loader",
|
|
1472
1926
|
inputs: [
|
|
1473
1927
|
"isVisible",
|
|
@@ -1547,7 +2001,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1547
2001
|
},
|
|
1548
2002
|
{
|
|
1549
2003
|
kind: "component",
|
|
1550
|
-
type:
|
|
2004
|
+
type: i6$1.InputContainerComponent,
|
|
1551
2005
|
selector: "pw-input-container",
|
|
1552
2006
|
inputs: [
|
|
1553
2007
|
"name",
|
|
@@ -1570,7 +2024,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1570
2024
|
},
|
|
1571
2025
|
{
|
|
1572
2026
|
kind: "component",
|
|
1573
|
-
type:
|
|
2027
|
+
type: i6$1.NoDataComponent,
|
|
1574
2028
|
selector: "pw-no-data",
|
|
1575
2029
|
inputs: [
|
|
1576
2030
|
"message",
|
|
@@ -1580,7 +2034,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1580
2034
|
},
|
|
1581
2035
|
{
|
|
1582
2036
|
kind: "component",
|
|
1583
|
-
type:
|
|
2037
|
+
type: i2$3.FaIconComponent,
|
|
1584
2038
|
selector: "fa-icon",
|
|
1585
2039
|
inputs: [
|
|
1586
2040
|
"icon",
|
|
@@ -1617,7 +2071,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
|
|
|
1617
2071
|
},
|
|
1618
2072
|
{
|
|
1619
2073
|
kind: "pipe",
|
|
1620
|
-
type:
|
|
2074
|
+
type: i2$4.TranslocoPipe,
|
|
1621
2075
|
name: "transloco"
|
|
1622
2076
|
}
|
|
1623
2077
|
]
|
|
@@ -1634,8 +2088,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1634
2088
|
args: [{
|
|
1635
2089
|
selector: "pw-flows-workflow-form",
|
|
1636
2090
|
standalone: false,
|
|
1637
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">\n {{ (isEdit ? 'Flows.WorkflowForm.EditTitle' : 'Flows.WorkflowForm.CreateTitle') | transloco }}\n </h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [message]=\"'Flows.WorkflowForm.NotFound' | transloco\"></pw-no-data>\n} @else {\n<form [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n class=\"mt-3\">\n <h3>{{ 'Flows.WorkflowForm.Section.Details' | transloco }}</h3>\n <div class=\"row\">\n <!-- md-8/md-4 rather than the pattern default so the row fills the page. -->\n <pw-input-container class=\"col-12 col-md-8\"\n [label]=\"'Flows.WorkflowForm.Name' | transloco\"\n name=\"name\"\n controlId=\"flows-workflow-name\"\n [required]=\"true\"\n errorMsg=\"Flows.WorkflowForm.NameError\">\n <input type=\"text\"\n id=\"flows-workflow-name\"\n class=\"form-control\"\n maxlength=\"255\"\n [placeholder]=\"'Flows.WorkflowForm.NamePlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Name' | transloco\"\n formControlName=\"name\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n [label]=\"'Flows.WorkflowForm.Status' | transloco\"\n name=\"status\"\n controlId=\"flows-workflow-status\"\n [required]=\"true\"\n [useAriaLabelledbyOnly]=\"true\"\n errorMsg=\"Flows.WorkflowForm.StatusError\">\n <!-- No [showClear]: Grape restricts status to STATUSES, so a blank 400s. -->\n <p-select inputId=\"flows-workflow-status\"\n styleClass=\"w-100\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n formControlName=\"status\"\n [attr.aria-labelledby]=\"'flows-workflow-status-label'\"\n appendTo=\"body\">\n </p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n [label]=\"'Flows.WorkflowForm.Description' | transloco\"\n name=\"description\"\n controlId=\"flows-workflow-description\">\n <textarea id=\"flows-workflow-description\"\n class=\"form-control\"\n rows=\"3\"\n [placeholder]=\"'Flows.WorkflowForm.DescriptionPlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Description' | transloco\"\n formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"saving\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n</form>\n}\n}\n",
|
|
1638
|
-
styles: [":host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}\n"]
|
|
2091
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">\n {{ (isEdit ? 'Flows.WorkflowForm.EditTitle' : 'Flows.WorkflowForm.CreateTitle') | transloco }}\n </h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n</div>\n\n<pw-loader [isVisible]=\"loading\"></pw-loader>\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.WorkflowForm.NotFound' | transloco\"></pw-no-data>\n} @else {\n<form [formGroup]=\"form\"\n (ngSubmit)=\"save()\"\n class=\"mt-3\">\n <h3>{{ 'Flows.WorkflowForm.Section.Details' | transloco }}</h3>\n <div class=\"row\">\n <!-- md-8/md-4 rather than the pattern default so the row fills the page. -->\n <pw-input-container class=\"col-12 col-md-8\"\n [label]=\"'Flows.WorkflowForm.Name' | transloco\"\n name=\"name\"\n controlId=\"flows-workflow-name\"\n [required]=\"true\"\n errorMsg=\"Flows.WorkflowForm.NameError\">\n <input type=\"text\"\n id=\"flows-workflow-name\"\n class=\"form-control\"\n maxlength=\"255\"\n [placeholder]=\"'Flows.WorkflowForm.NamePlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Name' | transloco\"\n formControlName=\"name\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-4\"\n [label]=\"'Flows.WorkflowForm.Status' | transloco\"\n name=\"status\"\n controlId=\"flows-workflow-status\"\n [required]=\"true\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.WorkflowForm.StatusHint' | transloco\"\n errorMsg=\"Flows.WorkflowForm.StatusError\">\n <!-- No [showClear]: Grape restricts status to STATUSES, so a blank 400s. -->\n <p-select inputId=\"flows-workflow-status\"\n styleClass=\"w-100\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n formControlName=\"status\"\n [attr.aria-labelledby]=\"'flows-workflow-status-label'\"\n appendTo=\"body\">\n </p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n [label]=\"'Flows.WorkflowForm.Description' | transloco\"\n name=\"description\"\n controlId=\"flows-workflow-description\">\n <textarea id=\"flows-workflow-description\"\n class=\"form-control\"\n rows=\"3\"\n [placeholder]=\"'Flows.WorkflowForm.DescriptionPlaceholder' | transloco\"\n [attr.aria-label]=\"'Flows.WorkflowForm.Description' | transloco\"\n formControlName=\"description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button name=\"submit\"\n type=\"submit\"\n class=\"btn btn-primary\"\n [disabled]=\"saving\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n</form>\n}\n}\n",
|
|
2092
|
+
styles: [":host ::ng-deep .info-circle{display:inline-block;margin-left:.35em;vertical-align:baseline}:host ::ng-deep .info-circle:after{position:static;font-size:inherit;line-height:inherit}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}\n"]
|
|
1639
2093
|
}]
|
|
1640
2094
|
}],
|
|
1641
2095
|
ctorParameters: () => [
|
|
@@ -1644,83 +2098,136 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1644
2098
|
{ type: i0.ChangeDetectorRef }
|
|
1645
2099
|
]
|
|
1646
2100
|
});
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
"logic",
|
|
1650
|
-
"data",
|
|
1651
|
-
"action"
|
|
1652
|
-
];
|
|
1653
|
-
const DEFAULT_FLOW_BRANCH = "next";
|
|
1654
|
-
function emptyFlowGraph() {
|
|
1655
|
-
return {
|
|
1656
|
-
nodes: [],
|
|
1657
|
-
edges: []
|
|
1658
|
-
};
|
|
1659
|
-
}
|
|
1660
|
-
function isRecord(value) {
|
|
1661
|
-
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
1662
|
-
}
|
|
1663
|
-
function toFlowGraph(value) {
|
|
1664
|
-
if (!isRecord(value)) return emptyFlowGraph();
|
|
1665
|
-
const nodes = Array.isArray(value["nodes"]) ? value["nodes"] : [];
|
|
1666
|
-
const edges = Array.isArray(value["edges"]) ? value["edges"] : [];
|
|
1667
|
-
return {
|
|
1668
|
-
nodes: nodes.filter((node) => isRecord(node) && typeof node["id"] === "string" && typeof node["type"] === "string"),
|
|
1669
|
-
edges: edges.filter((edge) => isRecord(edge) && typeof edge["from"] === "string" && typeof edge["to"] === "string")
|
|
1670
|
-
};
|
|
1671
|
-
}
|
|
1672
|
-
function nextId(prefix, taken) {
|
|
1673
|
-
const pattern = new RegExp(String.raw`^${prefix}(\d+)$`);
|
|
1674
|
-
return `${prefix}${taken.reduce((max, id) => {
|
|
1675
|
-
const match = pattern.exec(id);
|
|
1676
|
-
return match ? Math.max(max, Number(match[1])) : max;
|
|
1677
|
-
}, 0) + 1}`;
|
|
1678
|
-
}
|
|
1679
|
-
function nextFlowNodeId(nodes) {
|
|
1680
|
-
return nextId("n", nodes.map((node) => node.id));
|
|
1681
|
-
}
|
|
1682
|
-
function nextFlowEdgeId(edges) {
|
|
1683
|
-
return nextId("e", edges.map((edge) => edge.id ?? ""));
|
|
1684
|
-
}
|
|
1685
|
-
function flowNodeLabelKey(type) {
|
|
1686
|
-
return `Flows.Nodes.${type}`;
|
|
2101
|
+
function flowVersionOnArrival(versions, requestedId) {
|
|
2102
|
+
return versions.find(({ id }) => id === requestedId) ?? versions.find((version) => !isFlowVersionPublished(version)) ?? versions[0] ?? null;
|
|
1687
2103
|
}
|
|
1688
|
-
var
|
|
1689
|
-
constructor(
|
|
1690
|
-
this.
|
|
1691
|
-
this.
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
2104
|
+
var FlowVersionEditorState = class {
|
|
2105
|
+
constructor() {
|
|
2106
|
+
this.open = false;
|
|
2107
|
+
this.version = null;
|
|
2108
|
+
this.duplicateOf = null;
|
|
2109
|
+
this.check = null;
|
|
2110
|
+
}
|
|
2111
|
+
show(version, duplicateOf = null, check = null) {
|
|
2112
|
+
this.open = true;
|
|
2113
|
+
this.version = version;
|
|
2114
|
+
this.duplicateOf = duplicateOf;
|
|
2115
|
+
this.check = check;
|
|
2116
|
+
}
|
|
2117
|
+
close() {
|
|
2118
|
+
this.show(null);
|
|
2119
|
+
this.open = false;
|
|
2120
|
+
}
|
|
2121
|
+
published(version) {
|
|
2122
|
+
if (this.open && this.version?.id === version.id) {
|
|
2123
|
+
this.version = version;
|
|
2124
|
+
this.check = null;
|
|
1704
2125
|
}
|
|
1705
|
-
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
var FlowsWorkflowStatusComponent = class FlowsWorkflowStatusComponent {
|
|
2129
|
+
constructor(workflowService, confirmDialog, cdr) {
|
|
2130
|
+
this.workflowService = workflowService;
|
|
2131
|
+
this.confirmDialog = confirmDialog;
|
|
2132
|
+
this.cdr = cdr;
|
|
2133
|
+
this.hasPublished = false;
|
|
2134
|
+
this.workflowChange = new EventEmitter();
|
|
2135
|
+
this.badgeClass = flowWorkflowBadgeClass;
|
|
2136
|
+
this.saving = false;
|
|
2137
|
+
}
|
|
2138
|
+
get isOn() {
|
|
2139
|
+
return this.workflow.status === "active";
|
|
2140
|
+
}
|
|
2141
|
+
toggle() {
|
|
2142
|
+
this.confirm(this.isOn ? "TurnOff" : "TurnOn");
|
|
2143
|
+
}
|
|
2144
|
+
offerTurnOn(versionNumber) {
|
|
2145
|
+
if (!this.isOn) this.confirm("Published", versionNumber);
|
|
2146
|
+
}
|
|
2147
|
+
confirm(prompt, number) {
|
|
2148
|
+
const turnOff = prompt === "TurnOff";
|
|
2149
|
+
this.confirmDialog.open({
|
|
2150
|
+
titleKey: `Flows.Switch.${prompt}Confirm.Title`,
|
|
2151
|
+
titleParams: { number },
|
|
2152
|
+
textKey: `Flows.Switch.${prompt}Confirm.Text`,
|
|
2153
|
+
confirmLabelKey: turnOff ? "Flows.Switch.TurnOff" : "Flows.Switch.TurnOn",
|
|
2154
|
+
cancelLabelKey: prompt === "Published" ? "Flows.Switch.NotNow" : void 0,
|
|
2155
|
+
tone: turnOff ? "neutral" : "info"
|
|
2156
|
+
}).then((confirmed) => confirmed && this.save(turnOff ? "paused" : "active"));
|
|
2157
|
+
}
|
|
2158
|
+
save(status) {
|
|
2159
|
+
if (this.saving) return;
|
|
2160
|
+
this.saving = true;
|
|
2161
|
+
this.workflowService.updateWorkflow(this.workflow.id, this.subscriptionId, { status }).pipe(finalize(() => {
|
|
2162
|
+
this.saving = false;
|
|
2163
|
+
this.cdr.markForCheck();
|
|
2164
|
+
})).subscribe({
|
|
2165
|
+
next: (workflow) => this.workflowChange.emit(workflow),
|
|
2166
|
+
error: () => null
|
|
2167
|
+
});
|
|
1706
2168
|
}
|
|
1707
2169
|
static {
|
|
1708
2170
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1709
2171
|
minVersion: "12.0.0",
|
|
1710
2172
|
version: "22.2.0",
|
|
1711
2173
|
ngImport: i0,
|
|
1712
|
-
type:
|
|
1713
|
-
deps: [
|
|
1714
|
-
|
|
2174
|
+
type: FlowsWorkflowStatusComponent,
|
|
2175
|
+
deps: [
|
|
2176
|
+
{ token: FlowsWorkflowService },
|
|
2177
|
+
{ token: i6$1.ConfirmDialogService },
|
|
2178
|
+
{ token: i0.ChangeDetectorRef }
|
|
2179
|
+
],
|
|
2180
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1715
2181
|
});
|
|
1716
2182
|
}
|
|
1717
2183
|
static {
|
|
1718
|
-
this.ɵ
|
|
1719
|
-
minVersion: "
|
|
2184
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2185
|
+
minVersion: "14.0.0",
|
|
1720
2186
|
version: "22.2.0",
|
|
2187
|
+
type: FlowsWorkflowStatusComponent,
|
|
2188
|
+
isStandalone: false,
|
|
2189
|
+
selector: "pw-flows-workflow-status",
|
|
2190
|
+
inputs: {
|
|
2191
|
+
workflow: "workflow",
|
|
2192
|
+
subscriptionId: "subscriptionId",
|
|
2193
|
+
hasPublished: "hasPublished"
|
|
2194
|
+
},
|
|
2195
|
+
outputs: { workflowChange: "workflowChange" },
|
|
1721
2196
|
ngImport: i0,
|
|
1722
|
-
type:
|
|
1723
|
-
|
|
2197
|
+
template: "<div class=\"pw-workflow-status\"\n data-testid=\"flow-workflow-status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n @let blocked = !isOn && !hasPublished;\n <!-- The wrapper carries the tooltip: a disabled button fires no hover events. -->\n <span [pTooltip]=\"blocked ? ('Flows.Switch.PublishFirst' | transloco) : ''\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-sm text-nowrap\"\n data-testid=\"flow-workflow-toggle\"\n [class.btn-outline-secondary]=\"isOn\"\n [class.btn-outline-primary]=\"!isOn\"\n [disabled]=\"saving || blocked\"\n (click)=\"toggle()\">\n {{ (isOn ? 'Flows.Switch.TurnOff' : 'Flows.Switch.TurnOn') | transloco }}\n </button>\n </span>\n</div>\n",
|
|
2198
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-workflow-status{display:inline-flex;align-items:center;gap:8px}\n"],
|
|
2199
|
+
dependencies: [{
|
|
2200
|
+
kind: "directive",
|
|
2201
|
+
type: i1$1.Tooltip,
|
|
2202
|
+
selector: "[pTooltip]",
|
|
2203
|
+
inputs: [
|
|
2204
|
+
"tooltipPosition",
|
|
2205
|
+
"tooltipEvent",
|
|
2206
|
+
"positionStyle",
|
|
2207
|
+
"tooltipStyleClass",
|
|
2208
|
+
"tooltipZIndex",
|
|
2209
|
+
"escape",
|
|
2210
|
+
"showDelay",
|
|
2211
|
+
"hideDelay",
|
|
2212
|
+
"life",
|
|
2213
|
+
"positionTop",
|
|
2214
|
+
"positionLeft",
|
|
2215
|
+
"autoHide",
|
|
2216
|
+
"fitContent",
|
|
2217
|
+
"hideOnEscape",
|
|
2218
|
+
"showOnEllipsis",
|
|
2219
|
+
"pTooltip",
|
|
2220
|
+
"tooltipDisabled",
|
|
2221
|
+
"tooltipOptions",
|
|
2222
|
+
"appendTo",
|
|
2223
|
+
"pTooltipPT",
|
|
2224
|
+
"pTooltipUnstyled"
|
|
2225
|
+
]
|
|
2226
|
+
}, {
|
|
2227
|
+
kind: "pipe",
|
|
2228
|
+
type: i2$4.TranslocoPipe,
|
|
2229
|
+
name: "transloco"
|
|
2230
|
+
}]
|
|
1724
2231
|
});
|
|
1725
2232
|
}
|
|
1726
2233
|
};
|
|
@@ -1728,18 +2235,28 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1728
2235
|
minVersion: "12.0.0",
|
|
1729
2236
|
version: "22.2.0",
|
|
1730
2237
|
ngImport: i0,
|
|
1731
|
-
type:
|
|
2238
|
+
type: FlowsWorkflowStatusComponent,
|
|
1732
2239
|
decorators: [{
|
|
1733
|
-
type:
|
|
1734
|
-
args: [{
|
|
2240
|
+
type: Component,
|
|
2241
|
+
args: [{
|
|
2242
|
+
selector: "pw-flows-workflow-status",
|
|
2243
|
+
standalone: false,
|
|
2244
|
+
template: "<div class=\"pw-workflow-status\"\n data-testid=\"flow-workflow-status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n @let blocked = !isOn && !hasPublished;\n <!-- The wrapper carries the tooltip: a disabled button fires no hover events. -->\n <span [pTooltip]=\"blocked ? ('Flows.Switch.PublishFirst' | transloco) : ''\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-sm text-nowrap\"\n data-testid=\"flow-workflow-toggle\"\n [class.btn-outline-secondary]=\"isOn\"\n [class.btn-outline-primary]=\"!isOn\"\n [disabled]=\"saving || blocked\"\n (click)=\"toggle()\">\n {{ (isOn ? 'Flows.Switch.TurnOff' : 'Flows.Switch.TurnOn') | transloco }}\n </button>\n </span>\n</div>\n",
|
|
2245
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-workflow-status{display:inline-flex;align-items:center;gap:8px}\n"]
|
|
2246
|
+
}]
|
|
1735
2247
|
}],
|
|
1736
|
-
ctorParameters: () => [
|
|
2248
|
+
ctorParameters: () => [
|
|
2249
|
+
{ type: FlowsWorkflowService },
|
|
2250
|
+
{ type: i6$1.ConfirmDialogService },
|
|
2251
|
+
{ type: i0.ChangeDetectorRef }
|
|
2252
|
+
],
|
|
2253
|
+
propDecorators: {
|
|
2254
|
+
workflow: [{ type: Input }],
|
|
2255
|
+
subscriptionId: [{ type: Input }],
|
|
2256
|
+
hasPublished: [{ type: Input }],
|
|
2257
|
+
workflowChange: [{ type: Output }]
|
|
2258
|
+
}
|
|
1737
2259
|
});
|
|
1738
|
-
const FLOW_SCHEDULE_PAYLOAD_FIELDS = [
|
|
1739
|
-
"trigger_id",
|
|
1740
|
-
"trigger_type",
|
|
1741
|
-
"scheduled_for"
|
|
1742
|
-
];
|
|
1743
2260
|
function upstreamOf(graph, nodeId) {
|
|
1744
2261
|
const seen = /* @__PURE__ */ new Set();
|
|
1745
2262
|
const queue = [nodeId];
|
|
@@ -1758,21 +2275,28 @@ function conditionFieldSuggestions(graph, nodeId) {
|
|
|
1758
2275
|
const fields = node.params?.["fields"];
|
|
1759
2276
|
return fields && typeof fields === "object" && !Array.isArray(fields) ? Object.keys(fields) : [];
|
|
1760
2277
|
});
|
|
1761
|
-
return [
|
|
2278
|
+
return [...new Set(setKeys)];
|
|
2279
|
+
}
|
|
2280
|
+
function flowIncoming(graph, walk) {
|
|
2281
|
+
const entering = /* @__PURE__ */ new Set();
|
|
2282
|
+
const into = (id) => {
|
|
2283
|
+
if (entering.has(id)) return walk.none();
|
|
2284
|
+
entering.add(id);
|
|
2285
|
+
const found = walk.combine(graph.edges.filter((edge) => edge.to === id).map((edge) => edge.branch === "error" ? walk.failed(edge.from, into(edge.from)) : walk.outOf(edge.from)));
|
|
2286
|
+
entering.delete(id);
|
|
2287
|
+
return found;
|
|
2288
|
+
};
|
|
2289
|
+
return into;
|
|
1762
2290
|
}
|
|
1763
2291
|
const NONE = {
|
|
1764
2292
|
names: [],
|
|
1765
2293
|
lists: {}
|
|
1766
2294
|
};
|
|
1767
|
-
const
|
|
1768
|
-
"
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
"action.in_app_note",
|
|
1773
|
-
"action.push_notification",
|
|
1774
|
-
"action.websocket"
|
|
1775
|
-
];
|
|
2295
|
+
const FLOW_ERROR_FIELDS = {
|
|
2296
|
+
names: ["error"],
|
|
2297
|
+
lists: {}
|
|
2298
|
+
};
|
|
2299
|
+
const NO_FIELDS = ["trigger.schedule", "trigger.manual"];
|
|
1776
2300
|
function unique(names) {
|
|
1777
2301
|
return [...new Set(names)];
|
|
1778
2302
|
}
|
|
@@ -1795,12 +2319,7 @@ function setKeys(node) {
|
|
|
1795
2319
|
return fields && typeof fields === "object" && !Array.isArray(fields) ? Object.keys(fields) : [];
|
|
1796
2320
|
}
|
|
1797
2321
|
function leaving(node, incoming, definition) {
|
|
1798
|
-
if (definition?.item_fields) return definition.item_fields;
|
|
1799
2322
|
switch (node.type) {
|
|
1800
|
-
case "trigger.schedule": return {
|
|
1801
|
-
names: [...FLOW_SCHEDULE_PAYLOAD_FIELDS],
|
|
1802
|
-
lists: {}
|
|
1803
|
-
};
|
|
1804
2323
|
case "data.split_out": return {
|
|
1805
2324
|
names: incoming.lists[text(node, "field")] ?? [],
|
|
1806
2325
|
lists: {}
|
|
@@ -1813,26 +2332,126 @@ function leaving(node, incoming, definition) {
|
|
|
1813
2332
|
names: unique([...incoming.names, ...setKeys(node)]),
|
|
1814
2333
|
lists: incoming.lists
|
|
1815
2334
|
};
|
|
1816
|
-
default:
|
|
2335
|
+
default: {
|
|
2336
|
+
const own = definition?.item_fields ?? NONE;
|
|
2337
|
+
return definition?.passes_items ? union([incoming, own]) : own;
|
|
2338
|
+
}
|
|
1817
2339
|
}
|
|
1818
2340
|
}
|
|
1819
|
-
function
|
|
2341
|
+
function flowFieldWalk(graph, definitions, learned = {}) {
|
|
1820
2342
|
const byType = new Map(definitions.map((definition) => [definition.type, definition]));
|
|
1821
2343
|
const nodes = new Map(graph.nodes.map((node) => [node.id, node]));
|
|
1822
2344
|
const known = /* @__PURE__ */ new Map();
|
|
1823
|
-
const walking = /* @__PURE__ */ new Set(
|
|
1824
|
-
const into = (
|
|
2345
|
+
const walking = /* @__PURE__ */ new Set();
|
|
2346
|
+
const into = flowIncoming(graph, {
|
|
2347
|
+
outOf: (id) => outOf(id),
|
|
2348
|
+
failed: (_, reached) => union([reached, FLOW_ERROR_FIELDS]),
|
|
2349
|
+
combine: union,
|
|
2350
|
+
none: () => NONE
|
|
2351
|
+
});
|
|
1825
2352
|
const outOf = (id) => {
|
|
1826
2353
|
const node = nodes.get(id);
|
|
1827
|
-
if (!node || walking.has(id)) return NONE;
|
|
2354
|
+
if (!node || walking.has(id) || NO_FIELDS.includes(node.type)) return NONE;
|
|
1828
2355
|
if (!known.has(id)) {
|
|
1829
2356
|
walking.add(id);
|
|
1830
|
-
|
|
2357
|
+
const expected = leaving(node, into(id), byType.get(node.type));
|
|
2358
|
+
const seen = learned[flowNodeFieldsKey(id, node.type)];
|
|
2359
|
+
known.set(id, seen ? union([expected, seen]) : expected);
|
|
1831
2360
|
walking.delete(id);
|
|
1832
2361
|
}
|
|
1833
2362
|
return known.get(id);
|
|
1834
2363
|
};
|
|
1835
|
-
return
|
|
2364
|
+
return {
|
|
2365
|
+
into,
|
|
2366
|
+
outOf
|
|
2367
|
+
};
|
|
2368
|
+
}
|
|
2369
|
+
function flowFieldsInto(graph, nodeId, definitions, learned = {}) {
|
|
2370
|
+
return flowFieldWalk(graph, definitions, learned).into(nodeId);
|
|
2371
|
+
}
|
|
2372
|
+
function flowFieldsPossible(graph, nodeId) {
|
|
2373
|
+
const types = new Map(graph.nodes.map((node) => [node.id, node.type]));
|
|
2374
|
+
const before = (id) => graph.edges.filter((e) => e.to === id).map((e) => e.from);
|
|
2375
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2376
|
+
const queue = before(nodeId);
|
|
2377
|
+
while (queue.length) {
|
|
2378
|
+
const id = queue.pop();
|
|
2379
|
+
if (!seen.has(id)) {
|
|
2380
|
+
seen.add(id);
|
|
2381
|
+
if (!NO_FIELDS.includes(types.get(id) ?? "")) return true;
|
|
2382
|
+
queue.push(...before(id));
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
return false;
|
|
2386
|
+
}
|
|
2387
|
+
const RESHAPES = ["data.split_out", "data.aggregate"];
|
|
2388
|
+
function merge(groups) {
|
|
2389
|
+
const merged = /* @__PURE__ */ new Map();
|
|
2390
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2391
|
+
groups.forEach((group) => group.forEach((fields, source) => {
|
|
2392
|
+
const names = fields.names.filter((name) => !seen.has(name));
|
|
2393
|
+
names.forEach((name) => seen.add(name));
|
|
2394
|
+
const before = merged.get(source) ?? {
|
|
2395
|
+
names: [],
|
|
2396
|
+
lists: {}
|
|
2397
|
+
};
|
|
2398
|
+
const lists = Object.fromEntries(names.filter((n) => fields.lists[n]).map((n) => [n, fields.lists[n]]));
|
|
2399
|
+
merged.set(source, {
|
|
2400
|
+
names: [...before.names, ...names],
|
|
2401
|
+
lists: {
|
|
2402
|
+
...before.lists,
|
|
2403
|
+
...lists
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
}));
|
|
2407
|
+
return merged;
|
|
2408
|
+
}
|
|
2409
|
+
function flowFieldSources(graph, nodeId, definitions, learned = {}) {
|
|
2410
|
+
const walk = flowFieldWalk(graph, definitions, learned);
|
|
2411
|
+
const byType = new Map(definitions.map((definition) => [definition.type, definition]));
|
|
2412
|
+
const nodes = new Map(graph.nodes.map((node) => [node.id, node]));
|
|
2413
|
+
const known = /* @__PURE__ */ new Map();
|
|
2414
|
+
const into = flowIncoming(graph, {
|
|
2415
|
+
outOf: (id) => outOf(id),
|
|
2416
|
+
failed: (id, reached) => merge([/* @__PURE__ */ new Map([[id, FLOW_ERROR_FIELDS]]), reached]),
|
|
2417
|
+
combine: merge,
|
|
2418
|
+
none: () => /* @__PURE__ */ new Map()
|
|
2419
|
+
});
|
|
2420
|
+
const outOf = (id) => {
|
|
2421
|
+
const node = nodes.get(id);
|
|
2422
|
+
if (!node || known.has(id)) return known.get(id) ?? /* @__PURE__ */ new Map();
|
|
2423
|
+
known.set(id, /* @__PURE__ */ new Map());
|
|
2424
|
+
const passes = !RESHAPES.includes(node.type) && !!byType.get(node.type)?.passes_items;
|
|
2425
|
+
const before = node.type === "data.set_fields" || passes ? into(id) : /* @__PURE__ */ new Map();
|
|
2426
|
+
const inherited = new Set([...before.values()].flatMap((fields) => fields.names));
|
|
2427
|
+
const leaving = walk.outOf(id);
|
|
2428
|
+
const made = {
|
|
2429
|
+
...leaving,
|
|
2430
|
+
names: leaving.names.filter((name) => !inherited.has(name))
|
|
2431
|
+
};
|
|
2432
|
+
known.set(id, merge([/* @__PURE__ */ new Map([[id, made]]), before]));
|
|
2433
|
+
return known.get(id);
|
|
2434
|
+
};
|
|
2435
|
+
return [...into(nodeId)].filter(([, fields]) => fields.names.length).map(([source, fields]) => {
|
|
2436
|
+
const type = nodes.get(source)?.type ?? "";
|
|
2437
|
+
return {
|
|
2438
|
+
nodeId: source,
|
|
2439
|
+
type,
|
|
2440
|
+
label: byType.get(type)?.label ?? type,
|
|
2441
|
+
...fields
|
|
2442
|
+
};
|
|
2443
|
+
});
|
|
2444
|
+
}
|
|
2445
|
+
function flowNodeSelection(graph, node, definition, definitions, workflowFields) {
|
|
2446
|
+
const learned = workflowFields?.byNode ?? {};
|
|
2447
|
+
const incoming = flowFieldsInto(graph, node.id, definitions, learned);
|
|
2448
|
+
return {
|
|
2449
|
+
node,
|
|
2450
|
+
definition,
|
|
2451
|
+
fieldSuggestions: [.../* @__PURE__ */ new Set([...conditionFieldSuggestions(graph, node.id), ...incoming.names])],
|
|
2452
|
+
listSuggestions: Object.keys(incoming.lists),
|
|
2453
|
+
fieldSources: flowFieldsPossible(graph, node.id) ? flowFieldSources(graph, node.id, definitions, learned) : null
|
|
2454
|
+
};
|
|
1836
2455
|
}
|
|
1837
2456
|
const FLOW_SOCKET = new ClassicPreset.Socket("flow");
|
|
1838
2457
|
var FlowCanvasNode = class extends ClassicPreset.Node {
|
|
@@ -2064,7 +2683,7 @@ var FlowsCanvasNodeComponent = class FlowsCanvasNodeComponent {
|
|
|
2064
2683
|
dependencies: [
|
|
2065
2684
|
{
|
|
2066
2685
|
kind: "component",
|
|
2067
|
-
type:
|
|
2686
|
+
type: i2$3.FaIconComponent,
|
|
2068
2687
|
selector: "fa-icon",
|
|
2069
2688
|
inputs: [
|
|
2070
2689
|
"icon",
|
|
@@ -2101,13 +2720,13 @@ var FlowsCanvasNodeComponent = class FlowsCanvasNodeComponent {
|
|
|
2101
2720
|
},
|
|
2102
2721
|
{
|
|
2103
2722
|
kind: "directive",
|
|
2104
|
-
type: i2$
|
|
2723
|
+
type: i2$2.RefDirective,
|
|
2105
2724
|
selector: "[refComponent]",
|
|
2106
2725
|
inputs: ["data", "emit"]
|
|
2107
2726
|
},
|
|
2108
2727
|
{
|
|
2109
2728
|
kind: "pipe",
|
|
2110
|
-
type:
|
|
2729
|
+
type: i2$4.TranslocoPipe,
|
|
2111
2730
|
name: "transloco"
|
|
2112
2731
|
}
|
|
2113
2732
|
]
|
|
@@ -2229,11 +2848,12 @@ function setupFlowCanvas(container, injector) {
|
|
|
2229
2848
|
area.use(connection);
|
|
2230
2849
|
area.use(render);
|
|
2231
2850
|
AreaExtensions.simpleNodesOrder(area);
|
|
2232
|
-
AreaExtensions.selectableNodes(area, AreaExtensions.selector(), { accumulating: { active: () => false } });
|
|
2851
|
+
const selectable = AreaExtensions.selectableNodes(area, AreaExtensions.selector(), { accumulating: { active: () => false } });
|
|
2233
2852
|
return {
|
|
2234
2853
|
editor,
|
|
2235
2854
|
area,
|
|
2236
|
-
connection
|
|
2855
|
+
connection,
|
|
2856
|
+
selectNode: (nodeId) => selectable.select(nodeId, false)
|
|
2237
2857
|
};
|
|
2238
2858
|
}
|
|
2239
2859
|
const GRID_GAP = {
|
|
@@ -2292,8 +2912,15 @@ var FlowCanvasEditor = class {
|
|
|
2292
2912
|
async addNode(node) {
|
|
2293
2913
|
await this.rete.editor.addNode(node);
|
|
2294
2914
|
await this.rete.area.translate(node.id, node.flowNode.position ?? placementFor(this.rete, this.container, node));
|
|
2915
|
+
await this.rete.selectNode(node.id);
|
|
2295
2916
|
this.listener.selected(node.id);
|
|
2296
2917
|
}
|
|
2918
|
+
async selectNode(nodeId) {
|
|
2919
|
+
if (this.rete.editor.getNode(nodeId)) {
|
|
2920
|
+
await this.rete.selectNode(nodeId);
|
|
2921
|
+
this.listener.selected(nodeId);
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2297
2924
|
async removeNode(nodeId) {
|
|
2298
2925
|
const attached = this.rete.editor.getConnections().filter((c) => c.source === nodeId || c.target === nodeId);
|
|
2299
2926
|
for (const connection of attached) await this.rete.editor.removeConnection(connection.id);
|
|
@@ -2341,17 +2968,23 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2341
2968
|
this.cdr = cdr;
|
|
2342
2969
|
this.graph = emptyFlowGraph();
|
|
2343
2970
|
this.definitions = [];
|
|
2971
|
+
this.workflowFields = null;
|
|
2344
2972
|
this.readOnly = false;
|
|
2345
2973
|
this.selectionChange = new EventEmitter();
|
|
2346
2974
|
this.graphChange = new EventEmitter();
|
|
2347
2975
|
this.dropped = new EventEmitter();
|
|
2348
2976
|
this.drawFailed = false;
|
|
2977
|
+
this.selected = null;
|
|
2349
2978
|
this.pending = Promise.resolve();
|
|
2350
2979
|
}
|
|
2351
2980
|
ngAfterViewInit() {
|
|
2352
2981
|
this.editor = new FlowCanvasEditor(this.host.nativeElement, this.injector, {
|
|
2353
|
-
selected: (nodeId) => this.selectionChange.emit(nodeId),
|
|
2354
|
-
changed: () =>
|
|
2982
|
+
selected: (nodeId) => this.selectionChange.emit(this.selected = nodeId),
|
|
2983
|
+
changed: () => {
|
|
2984
|
+
this.graphChange.emit();
|
|
2985
|
+
clearTimeout(this.reselect);
|
|
2986
|
+
this.reselect = setTimeout(() => this.selected && this.selectionChange.emit(this.selected));
|
|
2987
|
+
}
|
|
2355
2988
|
});
|
|
2356
2989
|
this.editor.setReadOnly(this.readOnly);
|
|
2357
2990
|
this.reload();
|
|
@@ -2360,6 +2993,7 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2360
2993
|
if (!this.editor) return;
|
|
2361
2994
|
if (changes["readOnly"]) this.editor.setReadOnly(this.readOnly);
|
|
2362
2995
|
if (changes["graph"] || changes["definitions"]) this.reload();
|
|
2996
|
+
else if (changes["workflowFields"] && this.selected) this.selectionChange.emit(this.selected);
|
|
2363
2997
|
}
|
|
2364
2998
|
addNode(type) {
|
|
2365
2999
|
const definition = this.definitions.find((d) => d.type === type);
|
|
@@ -2367,11 +3001,15 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2367
3001
|
return this.queue((editor) => {
|
|
2368
3002
|
const node = {
|
|
2369
3003
|
id: nextFlowNodeId(editor.toGraph().nodes),
|
|
2370
|
-
type
|
|
3004
|
+
type,
|
|
3005
|
+
...definition.category === "action" ? { retry: { ...FLOW_RETRY_DEFAULT } } : {}
|
|
2371
3006
|
};
|
|
2372
3007
|
return editor.addNode(createFlowCanvasNode(node, definition, definition.label));
|
|
2373
3008
|
});
|
|
2374
3009
|
}
|
|
3010
|
+
focusNode(nodeId) {
|
|
3011
|
+
return this.queue((editor) => editor.selectNode(nodeId));
|
|
3012
|
+
}
|
|
2375
3013
|
removeNode(nodeId) {
|
|
2376
3014
|
return this.queue((editor) => editor.removeNode(nodeId));
|
|
2377
3015
|
}
|
|
@@ -2381,14 +3019,7 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2381
3019
|
selection(nodeId) {
|
|
2382
3020
|
const node = this.editor?.node(nodeId);
|
|
2383
3021
|
if (!node) return null;
|
|
2384
|
-
|
|
2385
|
-
const incoming = flowFieldsInto(graph, nodeId, this.definitions);
|
|
2386
|
-
return {
|
|
2387
|
-
node: node.flowNode,
|
|
2388
|
-
definition: node.definition,
|
|
2389
|
-
fieldSuggestions: [.../* @__PURE__ */ new Set([...conditionFieldSuggestions(graph, nodeId), ...incoming.names])],
|
|
2390
|
-
listSuggestions: Object.keys(incoming.lists)
|
|
2391
|
-
};
|
|
3022
|
+
return flowNodeSelection(this.toGraph(), node.flowNode, node.definition, this.definitions, this.workflowFields);
|
|
2392
3023
|
}
|
|
2393
3024
|
toGraph() {
|
|
2394
3025
|
return this.editor?.toGraph() ?? emptyFlowGraph();
|
|
@@ -2397,6 +3028,7 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2397
3028
|
return this.queue((editor) => editor.zoomToFit());
|
|
2398
3029
|
}
|
|
2399
3030
|
ngOnDestroy() {
|
|
3031
|
+
clearTimeout(this.reselect);
|
|
2400
3032
|
this.editor?.destroy();
|
|
2401
3033
|
this.editor = void 0;
|
|
2402
3034
|
}
|
|
@@ -2432,6 +3064,7 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2432
3064
|
inputs: {
|
|
2433
3065
|
graph: "graph",
|
|
2434
3066
|
definitions: "definitions",
|
|
3067
|
+
workflowFields: "workflowFields",
|
|
2435
3068
|
readOnly: "readOnly"
|
|
2436
3069
|
},
|
|
2437
3070
|
outputs: {
|
|
@@ -2461,7 +3094,7 @@ var FlowsGraphCanvasComponent = class FlowsGraphCanvasComponent {
|
|
|
2461
3094
|
styles: [":host{display:block;position:relative;height:100%;overflow:hidden;background-color:#f7f8fa;background-image:radial-gradient(#cfd4dc 1px,transparent 1px);background-size:16px 16px}.pw-graph-canvas{width:100%;height:100%}.pw-graph-canvas__error{position:absolute;top:12px;left:12px;right:12px;margin:0;padding:8px 12px;border:1px solid #c0392b;border-radius:4px;background:#fff;color:#c0392b}\n"],
|
|
2462
3095
|
dependencies: [{
|
|
2463
3096
|
kind: "pipe",
|
|
2464
|
-
type:
|
|
3097
|
+
type: i2$4.TranslocoPipe,
|
|
2465
3098
|
name: "transloco"
|
|
2466
3099
|
}]
|
|
2467
3100
|
});
|
|
@@ -2492,6 +3125,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2492
3125
|
propDecorators: {
|
|
2493
3126
|
graph: [{ type: Input }],
|
|
2494
3127
|
definitions: [{ type: Input }],
|
|
3128
|
+
workflowFields: [{ type: Input }],
|
|
2495
3129
|
readOnly: [{
|
|
2496
3130
|
type: HostBinding,
|
|
2497
3131
|
args: ["class.is-read-only"]
|
|
@@ -2505,6 +3139,191 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2505
3139
|
}]
|
|
2506
3140
|
}
|
|
2507
3141
|
});
|
|
3142
|
+
const FIELD_KINDS = {
|
|
3143
|
+
"trigger.schedule": {
|
|
3144
|
+
cron: "cron",
|
|
3145
|
+
timezone: "timezone"
|
|
3146
|
+
},
|
|
3147
|
+
"trigger.webhook": { path: "text" },
|
|
3148
|
+
"data.set_fields": { fields: "pairs" },
|
|
3149
|
+
"data.merge": { mode: "mode" },
|
|
3150
|
+
"data.split_out": { field: "list" },
|
|
3151
|
+
"action.email": {
|
|
3152
|
+
to: "email",
|
|
3153
|
+
subject: "text",
|
|
3154
|
+
body: "textarea"
|
|
3155
|
+
},
|
|
3156
|
+
"action.in_app_note": {
|
|
3157
|
+
user_id: "member",
|
|
3158
|
+
message: "textarea"
|
|
3159
|
+
},
|
|
3160
|
+
"action.push_notification": {
|
|
3161
|
+
user_id: "member",
|
|
3162
|
+
title: "text",
|
|
3163
|
+
message: "textarea"
|
|
3164
|
+
},
|
|
3165
|
+
"action.websocket": {
|
|
3166
|
+
user_ids: "members",
|
|
3167
|
+
payload: "json"
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
function flowNodeFields(definition) {
|
|
3171
|
+
const kinds = FIELD_KINDS[definition.type] ?? {};
|
|
3172
|
+
return definition.params.map((key) => {
|
|
3173
|
+
const details = definition.param_details?.[key] ?? {};
|
|
3174
|
+
return {
|
|
3175
|
+
...details,
|
|
3176
|
+
key,
|
|
3177
|
+
kind: details.kind ?? kinds[key] ?? "text"
|
|
3178
|
+
};
|
|
3179
|
+
});
|
|
3180
|
+
}
|
|
3181
|
+
function flowNumberValue(value) {
|
|
3182
|
+
const text = typeof value === "string" ? value.trim() : value;
|
|
3183
|
+
return typeof text === "string" && /^-?\d+(\.\d+)?$/.test(text) ? Number(text) : text;
|
|
3184
|
+
}
|
|
3185
|
+
const FLOW_MERGE_MODES = ["append"];
|
|
3186
|
+
function flowParamLabelKey(key) {
|
|
3187
|
+
return `Flows.Params.${key}`;
|
|
3188
|
+
}
|
|
3189
|
+
function flowParamHelpKey(type, key) {
|
|
3190
|
+
return `Flows.ParamHelp.${type}.${key}`;
|
|
3191
|
+
}
|
|
3192
|
+
var FlowsGraphCheckComponent = class FlowsGraphCheckComponent {
|
|
3193
|
+
constructor(translation) {
|
|
3194
|
+
this.translation = translation;
|
|
3195
|
+
this.definitions = [];
|
|
3196
|
+
this.graph = null;
|
|
3197
|
+
this.result = null;
|
|
3198
|
+
this.icons = FLOWS_ICONS;
|
|
3199
|
+
this.rows = [];
|
|
3200
|
+
}
|
|
3201
|
+
ngOnChanges() {
|
|
3202
|
+
const nodes = this.graph?.nodes ?? [];
|
|
3203
|
+
const row = (issue, severity) => ({
|
|
3204
|
+
issue,
|
|
3205
|
+
severity,
|
|
3206
|
+
place: this.place(nodes.find((node) => node.id === issue.node_id)),
|
|
3207
|
+
text: this.describe(issue)
|
|
3208
|
+
});
|
|
3209
|
+
this.rows = this.result ? [...this.result.errors.map((i) => row(i, "error")), ...this.result.warnings.map((i) => row(i, "warning"))] : [];
|
|
3210
|
+
}
|
|
3211
|
+
goTo(issue) {
|
|
3212
|
+
if (!issue.node_id) return;
|
|
3213
|
+
const fieldId = issue.field ? `flow-node-${issue.node_id}-${issue.field}` : null;
|
|
3214
|
+
this.canvas.focusNode(issue.node_id).then(() => {
|
|
3215
|
+
setTimeout(() => fieldId ? document.getElementById(fieldId)?.focus() : void 0);
|
|
3216
|
+
});
|
|
3217
|
+
}
|
|
3218
|
+
place(node) {
|
|
3219
|
+
if (!node) return "";
|
|
3220
|
+
const key = flowNodeLabelKey(node.type);
|
|
3221
|
+
const label = this.translation.translate(key);
|
|
3222
|
+
return `${label === key ? this.definitions.find((d) => d.type === node.type)?.label ?? node.type : label} (${node.id})`;
|
|
3223
|
+
}
|
|
3224
|
+
describe(issue) {
|
|
3225
|
+
const fieldKey = issue.field ? flowParamLabelKey(issue.field) : "";
|
|
3226
|
+
const fieldLabel = fieldKey ? this.translation.translate(fieldKey) : "";
|
|
3227
|
+
const key = `Flows.Check.Codes.${issue.code}`;
|
|
3228
|
+
const text = this.translation.translate(key, { field: fieldLabel === fieldKey ? issue.field : fieldLabel });
|
|
3229
|
+
return text === key ? issue.message : text;
|
|
3230
|
+
}
|
|
3231
|
+
static {
|
|
3232
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
3233
|
+
minVersion: "12.0.0",
|
|
3234
|
+
version: "22.2.0",
|
|
3235
|
+
ngImport: i0,
|
|
3236
|
+
type: FlowsGraphCheckComponent,
|
|
3237
|
+
deps: [{ token: i2$4.TranslocoService }],
|
|
3238
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
static {
|
|
3242
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3243
|
+
minVersion: "17.0.0",
|
|
3244
|
+
version: "22.2.0",
|
|
3245
|
+
type: FlowsGraphCheckComponent,
|
|
3246
|
+
isStandalone: false,
|
|
3247
|
+
selector: "pw-flows-graph-check",
|
|
3248
|
+
inputs: {
|
|
3249
|
+
canvas: "canvas",
|
|
3250
|
+
definitions: "definitions",
|
|
3251
|
+
graph: "graph",
|
|
3252
|
+
result: "result"
|
|
3253
|
+
},
|
|
3254
|
+
usesOnChanges: true,
|
|
3255
|
+
ngImport: i0,
|
|
3256
|
+
template: "@if (rows.length) {\n<div class=\"pw-graph-check\"\n role=\"alert\"\n data-testid=\"flow-check-result\">\n <p class=\"pw-graph-check__summary is-blocking\">\n {{ 'Flows.Check.Blocking' | transloco: { count: result?.errors?.length } }}\n </p>\n <ul class=\"pw-graph-check__list\">\n @for (row of rows; track $index) {\n <li [class]=\"'pw-graph-check__item is-' + row.severity\">\n <fa-icon [icon]=\"row.severity === 'error' ? icons.error : icons.warning\"\n aria-hidden=\"true\"></fa-icon>\n @if (row.issue.node_id) {\n <button type=\"button\"\n class=\"btn btn-link p-0 pw-graph-check__place\"\n data-testid=\"flow-check-go-to\"\n (click)=\"goTo(row.issue)\">{{ row.place || row.issue.node_id }}</button>\n }\n <span>{{ row.text }}</span>\n </li>\n }\n </ul>\n</div>\n}\n",
|
|
3257
|
+
styles: [":host{display:block}.pw-graph-check{border:1px solid #e2e5ea;border-radius:6px;padding:10px 12px;margin-bottom:8px}.pw-graph-check__summary{margin:0 0 6px;font-weight:600;color:#8a6d00}.pw-graph-check__summary.is-blocking{color:#c0392b}.pw-graph-check__list{list-style:none;padding:0;margin:0}.pw-graph-check__item{display:flex;align-items:baseline;gap:6px;padding:2px 0}.pw-graph-check__item.is-error fa-icon{color:#c0392b}.pw-graph-check__item.is-warning fa-icon{color:#b8860b}.pw-graph-check__place{white-space:nowrap}\n"],
|
|
3258
|
+
dependencies: [{
|
|
3259
|
+
kind: "component",
|
|
3260
|
+
type: i2$3.FaIconComponent,
|
|
3261
|
+
selector: "fa-icon",
|
|
3262
|
+
inputs: [
|
|
3263
|
+
"icon",
|
|
3264
|
+
"title",
|
|
3265
|
+
"animation",
|
|
3266
|
+
"mask",
|
|
3267
|
+
"flip",
|
|
3268
|
+
"size",
|
|
3269
|
+
"pull",
|
|
3270
|
+
"border",
|
|
3271
|
+
"inverse",
|
|
3272
|
+
"symbol",
|
|
3273
|
+
"rotate",
|
|
3274
|
+
"fixedWidth",
|
|
3275
|
+
"transform",
|
|
3276
|
+
"a11yRole"
|
|
3277
|
+
],
|
|
3278
|
+
outputs: [
|
|
3279
|
+
"iconChange",
|
|
3280
|
+
"titleChange",
|
|
3281
|
+
"animationChange",
|
|
3282
|
+
"maskChange",
|
|
3283
|
+
"flipChange",
|
|
3284
|
+
"sizeChange",
|
|
3285
|
+
"pullChange",
|
|
3286
|
+
"borderChange",
|
|
3287
|
+
"inverseChange",
|
|
3288
|
+
"symbolChange",
|
|
3289
|
+
"rotateChange",
|
|
3290
|
+
"fixedWidthChange",
|
|
3291
|
+
"transformChange",
|
|
3292
|
+
"a11yRoleChange"
|
|
3293
|
+
]
|
|
3294
|
+
}, {
|
|
3295
|
+
kind: "pipe",
|
|
3296
|
+
type: i2$4.TranslocoPipe,
|
|
3297
|
+
name: "transloco"
|
|
3298
|
+
}]
|
|
3299
|
+
});
|
|
3300
|
+
}
|
|
3301
|
+
};
|
|
3302
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
3303
|
+
minVersion: "12.0.0",
|
|
3304
|
+
version: "22.2.0",
|
|
3305
|
+
ngImport: i0,
|
|
3306
|
+
type: FlowsGraphCheckComponent,
|
|
3307
|
+
decorators: [{
|
|
3308
|
+
type: Component,
|
|
3309
|
+
args: [{
|
|
3310
|
+
selector: "pw-flows-graph-check",
|
|
3311
|
+
standalone: false,
|
|
3312
|
+
template: "@if (rows.length) {\n<div class=\"pw-graph-check\"\n role=\"alert\"\n data-testid=\"flow-check-result\">\n <p class=\"pw-graph-check__summary is-blocking\">\n {{ 'Flows.Check.Blocking' | transloco: { count: result?.errors?.length } }}\n </p>\n <ul class=\"pw-graph-check__list\">\n @for (row of rows; track $index) {\n <li [class]=\"'pw-graph-check__item is-' + row.severity\">\n <fa-icon [icon]=\"row.severity === 'error' ? icons.error : icons.warning\"\n aria-hidden=\"true\"></fa-icon>\n @if (row.issue.node_id) {\n <button type=\"button\"\n class=\"btn btn-link p-0 pw-graph-check__place\"\n data-testid=\"flow-check-go-to\"\n (click)=\"goTo(row.issue)\">{{ row.place || row.issue.node_id }}</button>\n }\n <span>{{ row.text }}</span>\n </li>\n }\n </ul>\n</div>\n}\n",
|
|
3313
|
+
styles: [":host{display:block}.pw-graph-check{border:1px solid #e2e5ea;border-radius:6px;padding:10px 12px;margin-bottom:8px}.pw-graph-check__summary{margin:0 0 6px;font-weight:600;color:#8a6d00}.pw-graph-check__summary.is-blocking{color:#c0392b}.pw-graph-check__list{list-style:none;padding:0;margin:0}.pw-graph-check__item{display:flex;align-items:baseline;gap:6px;padding:2px 0}.pw-graph-check__item.is-error fa-icon{color:#c0392b}.pw-graph-check__item.is-warning fa-icon{color:#b8860b}.pw-graph-check__place{white-space:nowrap}\n"]
|
|
3314
|
+
}]
|
|
3315
|
+
}],
|
|
3316
|
+
ctorParameters: () => [{ type: i2$4.TranslocoService }],
|
|
3317
|
+
propDecorators: {
|
|
3318
|
+
canvas: [{
|
|
3319
|
+
type: Input,
|
|
3320
|
+
args: [{ required: true }]
|
|
3321
|
+
}],
|
|
3322
|
+
definitions: [{ type: Input }],
|
|
3323
|
+
graph: [{ type: Input }],
|
|
3324
|
+
result: [{ type: Input }]
|
|
3325
|
+
}
|
|
3326
|
+
});
|
|
2508
3327
|
var FlowsNodePaletteComponent = class FlowsNodePaletteComponent {
|
|
2509
3328
|
constructor() {
|
|
2510
3329
|
this.definitions = [];
|
|
@@ -2516,7 +3335,7 @@ var FlowsNodePaletteComponent = class FlowsNodePaletteComponent {
|
|
|
2516
3335
|
ngOnChanges() {
|
|
2517
3336
|
this.groups = FLOW_NODE_CATEGORIES.map((category) => ({
|
|
2518
3337
|
category,
|
|
2519
|
-
nodes: this.definitions.filter((d) => d.category === category)
|
|
3338
|
+
nodes: this.definitions.filter((d) => d.category === category && !d.retired)
|
|
2520
3339
|
})).filter((group) => group.nodes.length);
|
|
2521
3340
|
}
|
|
2522
3341
|
static {
|
|
@@ -2544,7 +3363,7 @@ var FlowsNodePaletteComponent = class FlowsNodePaletteComponent {
|
|
|
2544
3363
|
styles: [".pw-node-palette{display:flex;flex-direction:column;gap:2px;padding:12px}.pw-node-palette__heading{margin:12px 0 4px;color:#7c8696;font-size:12px;font-weight:500;letter-spacing:.04em;text-transform:uppercase}.pw-node-palette__heading:first-child{margin-top:0}.pw-node-palette__item{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:1px solid transparent;border-radius:4px;background:none;color:#1a1d21;text-align:left;transition:background-color .15s ease-out,border-color .15s ease-out}.pw-node-palette__item:hover{background:#eef0f3}.pw-node-palette__item:focus-visible{border-color:var(--first);outline:none}.pw-node-palette__icon{width:16px;color:#5a6473}\n"],
|
|
2545
3364
|
dependencies: [{
|
|
2546
3365
|
kind: "component",
|
|
2547
|
-
type:
|
|
3366
|
+
type: i2$3.FaIconComponent,
|
|
2548
3367
|
selector: "fa-icon",
|
|
2549
3368
|
inputs: [
|
|
2550
3369
|
"icon",
|
|
@@ -2580,7 +3399,7 @@ var FlowsNodePaletteComponent = class FlowsNodePaletteComponent {
|
|
|
2580
3399
|
]
|
|
2581
3400
|
}, {
|
|
2582
3401
|
kind: "pipe",
|
|
2583
|
-
type:
|
|
3402
|
+
type: i2$4.TranslocoPipe,
|
|
2584
3403
|
name: "transloco"
|
|
2585
3404
|
}]
|
|
2586
3405
|
});
|
|
@@ -2605,53 +3424,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2605
3424
|
add: [{ type: Output }]
|
|
2606
3425
|
}
|
|
2607
3426
|
});
|
|
2608
|
-
const FIELD_KINDS = {
|
|
2609
|
-
"trigger.schedule": {
|
|
2610
|
-
cron: "cron",
|
|
2611
|
-
timezone: "timezone"
|
|
2612
|
-
},
|
|
2613
|
-
"trigger.webhook": { path: "text" },
|
|
2614
|
-
"data.set_fields": { fields: "pairs" },
|
|
2615
|
-
"data.merge": { mode: "mode" },
|
|
2616
|
-
"data.split_out": { field: "list" },
|
|
2617
|
-
"action.email": {
|
|
2618
|
-
to: "email",
|
|
2619
|
-
subject: "text",
|
|
2620
|
-
body: "textarea"
|
|
2621
|
-
},
|
|
2622
|
-
"action.in_app_note": {
|
|
2623
|
-
user_id: "member",
|
|
2624
|
-
message: "textarea"
|
|
2625
|
-
},
|
|
2626
|
-
"action.push_notification": {
|
|
2627
|
-
user_id: "member",
|
|
2628
|
-
title: "text",
|
|
2629
|
-
message: "textarea"
|
|
2630
|
-
},
|
|
2631
|
-
"action.websocket": {
|
|
2632
|
-
user_ids: "members",
|
|
2633
|
-
payload: "json"
|
|
2634
|
-
}
|
|
2635
|
-
};
|
|
2636
|
-
function flowNodeFields(definition) {
|
|
2637
|
-
const kinds = FIELD_KINDS[definition.type] ?? {};
|
|
2638
|
-
return definition.params.map((key) => {
|
|
2639
|
-
const details = definition.param_details?.[key] ?? {};
|
|
2640
|
-
return {
|
|
2641
|
-
...details,
|
|
2642
|
-
key,
|
|
2643
|
-
kind: details.kind ?? kinds[key] ?? "text"
|
|
2644
|
-
};
|
|
2645
|
-
});
|
|
2646
|
-
}
|
|
2647
|
-
function flowNumberValue(value) {
|
|
2648
|
-
const text = typeof value === "string" ? value.trim() : value;
|
|
2649
|
-
return typeof text === "string" && /^-?\d+(\.\d+)?$/.test(text) ? Number(text) : text;
|
|
2650
|
-
}
|
|
2651
|
-
const FLOW_MERGE_MODES = ["append"];
|
|
2652
|
-
function flowParamLabelKey(key) {
|
|
2653
|
-
return `Flows.Params.${key}`;
|
|
2654
|
-
}
|
|
2655
3427
|
const FLOW_CRON_MODES = [
|
|
2656
3428
|
"minutes",
|
|
2657
3429
|
"hourly",
|
|
@@ -2821,7 +3593,7 @@ var FlowsCronFieldComponent = class FlowsCronFieldComponent {
|
|
|
2821
3593
|
version: "22.2.0",
|
|
2822
3594
|
ngImport: i0,
|
|
2823
3595
|
type: FlowsCronFieldComponent,
|
|
2824
|
-
deps: [{ token:
|
|
3596
|
+
deps: [{ token: i2$4.TranslocoService }],
|
|
2825
3597
|
target: i0.ɵɵFactoryTarget.Component
|
|
2826
3598
|
});
|
|
2827
3599
|
}
|
|
@@ -2902,7 +3674,7 @@ var FlowsCronFieldComponent = class FlowsCronFieldComponent {
|
|
|
2902
3674
|
},
|
|
2903
3675
|
{
|
|
2904
3676
|
kind: "pipe",
|
|
2905
|
-
type:
|
|
3677
|
+
type: i2$4.TranslocoPipe,
|
|
2906
3678
|
name: "transloco"
|
|
2907
3679
|
}
|
|
2908
3680
|
]
|
|
@@ -2922,7 +3694,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2922
3694
|
template: "<div class=\"d-flex flex-column gap-2\">\n <select class=\"form-select\"\n [id]=\"inputId\"\n [disabled]=\"readOnly\"\n [ngModel]=\"schedule.mode\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setMode($event)\">\n @for (mode of modes; track mode) {\n <option [ngValue]=\"mode\">{{ 'Flows.Schedule.Mode.' + mode | transloco }}</option>\n }\n </select>\n\n @switch (schedule.mode) {\n @case ('minutes') {\n <select class=\"form-select\"\n [attr.aria-label]=\"'Flows.Schedule.Every' | transloco\"\n [disabled]=\"readOnly\"\n [ngModel]=\"schedule.every\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"update({ every: $event })\">\n @for (every of everyOptions; track every) {\n <option [ngValue]=\"every\">{{ 'Flows.Schedule.EveryMinutes' | transloco: { count: every } }}</option>\n }\n </select>\n }\n @case ('hourly') {\n <input class=\"form-control\"\n type=\"number\"\n min=\"0\"\n max=\"59\"\n [attr.aria-label]=\"'Flows.Schedule.Minute' | transloco\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"schedule.minute\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"update({ minute: +$event })\" />\n }\n @case ('custom') {\n <input class=\"form-control\"\n type=\"text\"\n placeholder=\"0 9 * * 1-5\"\n [attr.aria-label]=\"'Flows.Schedule.Mode.custom' | transloco\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"schedule.custom\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"update({ custom: $event })\" />\n }\n @default {\n <div class=\"d-flex gap-2\">\n @if (schedule.mode === 'weekly') {\n <select class=\"form-select\"\n [attr.aria-label]=\"'Flows.Schedule.Weekday' | transloco\"\n [disabled]=\"readOnly\"\n [ngModel]=\"schedule.weekday\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"update({ weekday: $event })\">\n @for (day of weekdays; track day.value) {\n <option [ngValue]=\"day.value\">{{ day.label }}</option>\n }\n </select>\n }\n @if (schedule.mode === 'monthly') {\n <select class=\"form-select\"\n [attr.aria-label]=\"'Flows.Schedule.Monthday' | transloco\"\n [disabled]=\"readOnly\"\n [ngModel]=\"schedule.monthday\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"update({ monthday: $event })\">\n @for (day of monthdays; track day) {\n <option [ngValue]=\"day\">{{ day }}</option>\n }\n </select>\n }\n <input class=\"form-control\"\n type=\"time\"\n [attr.aria-label]=\"'Flows.Schedule.Time' | transloco\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"time\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setTime($event)\" />\n </div>\n }\n }\n\n @if (schedule.mode !== 'custom') {\n <small class=\"text-muted\">\n {{ 'Flows.Schedule.Summary.' + schedule.mode | transloco: { count: schedule.every, minute: schedule.minute, time: time, weekday: weekdayLabel, day: schedule.monthday } }}\n </small>\n }\n</div>\n"
|
|
2923
3695
|
}]
|
|
2924
3696
|
}],
|
|
2925
|
-
ctorParameters: () => [{ type:
|
|
3697
|
+
ctorParameters: () => [{ type: i2$4.TranslocoService }],
|
|
2926
3698
|
propDecorators: {
|
|
2927
3699
|
value: [{ type: Input }],
|
|
2928
3700
|
inputId: [{ type: Input }],
|
|
@@ -3072,7 +3844,7 @@ var FlowsTimezoneFieldComponent = class FlowsTimezoneFieldComponent {
|
|
|
3072
3844
|
},
|
|
3073
3845
|
{
|
|
3074
3846
|
kind: "pipe",
|
|
3075
|
-
type:
|
|
3847
|
+
type: i2$4.TranslocoPipe,
|
|
3076
3848
|
name: "transloco"
|
|
3077
3849
|
}
|
|
3078
3850
|
]
|
|
@@ -3212,13 +3984,13 @@ var FlowsJsonFieldComponent = class FlowsJsonFieldComponent {
|
|
|
3212
3984
|
},
|
|
3213
3985
|
{
|
|
3214
3986
|
kind: "component",
|
|
3215
|
-
type: i2.FieldErrorDisplayComponent,
|
|
3987
|
+
type: i2$1.FieldErrorDisplayComponent,
|
|
3216
3988
|
selector: "pw-field-error-display",
|
|
3217
3989
|
inputs: ["errorMsg", "displayError"]
|
|
3218
3990
|
},
|
|
3219
3991
|
{
|
|
3220
3992
|
kind: "pipe",
|
|
3221
|
-
type:
|
|
3993
|
+
type: i2$4.TranslocoPipe,
|
|
3222
3994
|
name: "transloco"
|
|
3223
3995
|
}
|
|
3224
3996
|
]
|
|
@@ -3478,7 +4250,7 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
|
|
|
3478
4250
|
ngImport: i0,
|
|
3479
4251
|
type: FlowsConditionFieldComponent,
|
|
3480
4252
|
deps: [
|
|
3481
|
-
{ token:
|
|
4253
|
+
{ token: i2$4.TranslocoService },
|
|
3482
4254
|
{ token: i0.ChangeDetectorRef },
|
|
3483
4255
|
{ token: i0.DestroyRef }
|
|
3484
4256
|
],
|
|
@@ -3541,7 +4313,7 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
|
|
|
3541
4313
|
},
|
|
3542
4314
|
{
|
|
3543
4315
|
kind: "directive",
|
|
3544
|
-
type:
|
|
4316
|
+
type: i1$1.Tooltip,
|
|
3545
4317
|
selector: "[pTooltip]",
|
|
3546
4318
|
inputs: [
|
|
3547
4319
|
"tooltipPosition",
|
|
@@ -3639,7 +4411,7 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
|
|
|
3639
4411
|
},
|
|
3640
4412
|
{
|
|
3641
4413
|
kind: "component",
|
|
3642
|
-
type:
|
|
4414
|
+
type: i2$3.FaIconComponent,
|
|
3643
4415
|
selector: "fa-icon",
|
|
3644
4416
|
inputs: [
|
|
3645
4417
|
"icon",
|
|
@@ -3687,7 +4459,7 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
|
|
|
3687
4459
|
},
|
|
3688
4460
|
{
|
|
3689
4461
|
kind: "pipe",
|
|
3690
|
-
type:
|
|
4462
|
+
type: i2$4.TranslocoPipe,
|
|
3691
4463
|
name: "transloco"
|
|
3692
4464
|
}
|
|
3693
4465
|
]
|
|
@@ -3709,7 +4481,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3709
4481
|
}]
|
|
3710
4482
|
}],
|
|
3711
4483
|
ctorParameters: () => [
|
|
3712
|
-
{ type:
|
|
4484
|
+
{ type: i2$4.TranslocoService },
|
|
3713
4485
|
{ type: i0.ChangeDetectorRef },
|
|
3714
4486
|
{ type: i0.DestroyRef }
|
|
3715
4487
|
],
|
|
@@ -3810,7 +4582,7 @@ var FlowsPairsFieldComponent = class FlowsPairsFieldComponent {
|
|
|
3810
4582
|
},
|
|
3811
4583
|
{
|
|
3812
4584
|
kind: "directive",
|
|
3813
|
-
type:
|
|
4585
|
+
type: i1$1.Tooltip,
|
|
3814
4586
|
selector: "[pTooltip]",
|
|
3815
4587
|
inputs: [
|
|
3816
4588
|
"tooltipPosition",
|
|
@@ -3838,7 +4610,7 @@ var FlowsPairsFieldComponent = class FlowsPairsFieldComponent {
|
|
|
3838
4610
|
},
|
|
3839
4611
|
{
|
|
3840
4612
|
kind: "component",
|
|
3841
|
-
type:
|
|
4613
|
+
type: i2$3.FaIconComponent,
|
|
3842
4614
|
selector: "fa-icon",
|
|
3843
4615
|
inputs: [
|
|
3844
4616
|
"icon",
|
|
@@ -3875,7 +4647,7 @@ var FlowsPairsFieldComponent = class FlowsPairsFieldComponent {
|
|
|
3875
4647
|
},
|
|
3876
4648
|
{
|
|
3877
4649
|
kind: "pipe",
|
|
3878
|
-
type:
|
|
4650
|
+
type: i2$4.TranslocoPipe,
|
|
3879
4651
|
name: "transloco"
|
|
3880
4652
|
}
|
|
3881
4653
|
]
|
|
@@ -3996,16 +4768,561 @@ var FlowsMemberFieldComponent = class FlowsMemberFieldComponent {
|
|
|
3996
4768
|
if (Array.isArray(selection)) this.valueChange.emit(selection.map((member) => member.id));
|
|
3997
4769
|
else this.valueChange.emit(selection?.id);
|
|
3998
4770
|
}
|
|
3999
|
-
ngOnDestroy() {
|
|
4000
|
-
this.search?.unsubscribe();
|
|
4771
|
+
ngOnDestroy() {
|
|
4772
|
+
this.search?.unsubscribe();
|
|
4773
|
+
}
|
|
4774
|
+
static {
|
|
4775
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4776
|
+
minVersion: "12.0.0",
|
|
4777
|
+
version: "22.2.0",
|
|
4778
|
+
ngImport: i0,
|
|
4779
|
+
type: FlowsMemberFieldComponent,
|
|
4780
|
+
deps: [{ token: FlowsMemberService }, { token: i0.ChangeDetectorRef }],
|
|
4781
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
4782
|
+
});
|
|
4783
|
+
}
|
|
4784
|
+
static {
|
|
4785
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4786
|
+
minVersion: "17.0.0",
|
|
4787
|
+
version: "22.2.0",
|
|
4788
|
+
type: FlowsMemberFieldComponent,
|
|
4789
|
+
isStandalone: false,
|
|
4790
|
+
selector: "pw-flows-member-field",
|
|
4791
|
+
inputs: {
|
|
4792
|
+
value: "value",
|
|
4793
|
+
multiple: "multiple",
|
|
4794
|
+
subscriptionId: "subscriptionId",
|
|
4795
|
+
inputId: "inputId",
|
|
4796
|
+
readOnly: "readOnly"
|
|
4797
|
+
},
|
|
4798
|
+
outputs: { valueChange: "valueChange" },
|
|
4799
|
+
usesOnChanges: true,
|
|
4800
|
+
ngImport: i0,
|
|
4801
|
+
template: "<p-auto-complete class=\"w-100\"\n [inputId]=\"inputId\"\n [ngModel]=\"selection\"\n [ngModelOptions]=\"{ standalone: true }\"\n [suggestions]=\"suggestions\"\n [multiple]=\"multiple\"\n [forceSelection]=\"true\"\n [disabled]=\"readOnly\"\n [minQueryLength]=\"1\"\n [delay]=\"250\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'Flows.Inspector.NoMembers' | transloco\"\n optionLabel=\"name\"\n dataKey=\"id\"\n appendTo=\"body\"\n (completeMethod)=\"complete($event.query)\"\n (ngModelChange)=\"changed($event)\">\n <ng-template let-member\n #item>\n <div class=\"d-flex flex-column\">\n <span>{{ member.name }}</span>\n <small class=\"text-muted\">{{ member.email }}</small>\n </div>\n </ng-template>\n</p-auto-complete>\n@if (failed) {\n<pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Inspector.MembersUnavailable' | transloco\">\n</pw-field-error-display>\n}\n",
|
|
4802
|
+
dependencies: [
|
|
4803
|
+
{
|
|
4804
|
+
kind: "directive",
|
|
4805
|
+
type: i3$2.NgControlStatus,
|
|
4806
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
4807
|
+
},
|
|
4808
|
+
{
|
|
4809
|
+
kind: "directive",
|
|
4810
|
+
type: i3$2.NgModel,
|
|
4811
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
4812
|
+
inputs: [
|
|
4813
|
+
"name",
|
|
4814
|
+
"disabled",
|
|
4815
|
+
"ngModel",
|
|
4816
|
+
"ngModelOptions"
|
|
4817
|
+
],
|
|
4818
|
+
outputs: ["ngModelChange"],
|
|
4819
|
+
exportAs: ["ngModel"]
|
|
4820
|
+
},
|
|
4821
|
+
{
|
|
4822
|
+
kind: "component",
|
|
4823
|
+
type: i3.AutoComplete,
|
|
4824
|
+
selector: "p-autocomplete, p-auto-complete",
|
|
4825
|
+
inputs: [
|
|
4826
|
+
"minQueryLength",
|
|
4827
|
+
"delay",
|
|
4828
|
+
"panelStyle",
|
|
4829
|
+
"panelStyleClass",
|
|
4830
|
+
"inputStyle",
|
|
4831
|
+
"inputId",
|
|
4832
|
+
"inputStyleClass",
|
|
4833
|
+
"placeholder",
|
|
4834
|
+
"readonly",
|
|
4835
|
+
"scrollHeight",
|
|
4836
|
+
"lazy",
|
|
4837
|
+
"virtualScroll",
|
|
4838
|
+
"virtualScrollItemSize",
|
|
4839
|
+
"virtualScrollOptions",
|
|
4840
|
+
"autoHighlight",
|
|
4841
|
+
"forceSelection",
|
|
4842
|
+
"type",
|
|
4843
|
+
"autoZIndex",
|
|
4844
|
+
"baseZIndex",
|
|
4845
|
+
"ariaLabel",
|
|
4846
|
+
"dropdownAriaLabel",
|
|
4847
|
+
"ariaLabelledBy",
|
|
4848
|
+
"dropdownIcon",
|
|
4849
|
+
"unique",
|
|
4850
|
+
"group",
|
|
4851
|
+
"completeOnFocus",
|
|
4852
|
+
"showClear",
|
|
4853
|
+
"dropdown",
|
|
4854
|
+
"showEmptyMessage",
|
|
4855
|
+
"dropdownMode",
|
|
4856
|
+
"multiple",
|
|
4857
|
+
"addOnTab",
|
|
4858
|
+
"tabindex",
|
|
4859
|
+
"dataKey",
|
|
4860
|
+
"emptyMessage",
|
|
4861
|
+
"autofocus",
|
|
4862
|
+
"autocomplete",
|
|
4863
|
+
"optionGroupChildren",
|
|
4864
|
+
"optionGroupLabel",
|
|
4865
|
+
"overlayOptions",
|
|
4866
|
+
"suggestions",
|
|
4867
|
+
"optionLabel",
|
|
4868
|
+
"optionValue",
|
|
4869
|
+
"id",
|
|
4870
|
+
"searchMessage",
|
|
4871
|
+
"emptySelectionMessage",
|
|
4872
|
+
"selectionMessage",
|
|
4873
|
+
"autoOptionFocus",
|
|
4874
|
+
"selectOnFocus",
|
|
4875
|
+
"searchLocale",
|
|
4876
|
+
"optionDisabled",
|
|
4877
|
+
"focusOnHover",
|
|
4878
|
+
"typeahead",
|
|
4879
|
+
"addOnBlur",
|
|
4880
|
+
"separator",
|
|
4881
|
+
"appendTo",
|
|
4882
|
+
"motionOptions"
|
|
4883
|
+
],
|
|
4884
|
+
outputs: [
|
|
4885
|
+
"completeMethod",
|
|
4886
|
+
"onSelect",
|
|
4887
|
+
"onUnselect",
|
|
4888
|
+
"onAdd",
|
|
4889
|
+
"onFocus",
|
|
4890
|
+
"onBlur",
|
|
4891
|
+
"onDropdownClick",
|
|
4892
|
+
"onClear",
|
|
4893
|
+
"onInputKeydown",
|
|
4894
|
+
"onKeyUp",
|
|
4895
|
+
"onShow",
|
|
4896
|
+
"onHide",
|
|
4897
|
+
"onLazyLoad"
|
|
4898
|
+
]
|
|
4899
|
+
},
|
|
4900
|
+
{
|
|
4901
|
+
kind: "component",
|
|
4902
|
+
type: i2$1.FieldErrorDisplayComponent,
|
|
4903
|
+
selector: "pw-field-error-display",
|
|
4904
|
+
inputs: ["errorMsg", "displayError"]
|
|
4905
|
+
},
|
|
4906
|
+
{
|
|
4907
|
+
kind: "pipe",
|
|
4908
|
+
type: i2$4.TranslocoPipe,
|
|
4909
|
+
name: "transloco"
|
|
4910
|
+
}
|
|
4911
|
+
]
|
|
4912
|
+
});
|
|
4913
|
+
}
|
|
4914
|
+
};
|
|
4915
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
4916
|
+
minVersion: "12.0.0",
|
|
4917
|
+
version: "22.2.0",
|
|
4918
|
+
ngImport: i0,
|
|
4919
|
+
type: FlowsMemberFieldComponent,
|
|
4920
|
+
decorators: [{
|
|
4921
|
+
type: Component,
|
|
4922
|
+
args: [{
|
|
4923
|
+
selector: "pw-flows-member-field",
|
|
4924
|
+
standalone: false,
|
|
4925
|
+
template: "<p-auto-complete class=\"w-100\"\n [inputId]=\"inputId\"\n [ngModel]=\"selection\"\n [ngModelOptions]=\"{ standalone: true }\"\n [suggestions]=\"suggestions\"\n [multiple]=\"multiple\"\n [forceSelection]=\"true\"\n [disabled]=\"readOnly\"\n [minQueryLength]=\"1\"\n [delay]=\"250\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'Flows.Inspector.NoMembers' | transloco\"\n optionLabel=\"name\"\n dataKey=\"id\"\n appendTo=\"body\"\n (completeMethod)=\"complete($event.query)\"\n (ngModelChange)=\"changed($event)\">\n <ng-template let-member\n #item>\n <div class=\"d-flex flex-column\">\n <span>{{ member.name }}</span>\n <small class=\"text-muted\">{{ member.email }}</small>\n </div>\n </ng-template>\n</p-auto-complete>\n@if (failed) {\n<pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Inspector.MembersUnavailable' | transloco\">\n</pw-field-error-display>\n}\n"
|
|
4926
|
+
}]
|
|
4927
|
+
}],
|
|
4928
|
+
ctorParameters: () => [{ type: FlowsMemberService }, { type: i0.ChangeDetectorRef }],
|
|
4929
|
+
propDecorators: {
|
|
4930
|
+
value: [{ type: Input }],
|
|
4931
|
+
multiple: [{ type: Input }],
|
|
4932
|
+
subscriptionId: [{ type: Input }],
|
|
4933
|
+
inputId: [{ type: Input }],
|
|
4934
|
+
readOnly: [{ type: Input }],
|
|
4935
|
+
valueChange: [{ type: Output }]
|
|
4936
|
+
}
|
|
4937
|
+
});
|
|
4938
|
+
function toIds(value) {
|
|
4939
|
+
return (Array.isArray(value) ? value : [value]).map(Number).filter((id) => Number.isInteger(id) && id > 0);
|
|
4940
|
+
}
|
|
4941
|
+
var FlowsRetryFieldComponent = class FlowsRetryFieldComponent {
|
|
4942
|
+
constructor() {
|
|
4943
|
+
this.readOnly = false;
|
|
4944
|
+
this.valueChange = new EventEmitter();
|
|
4945
|
+
}
|
|
4946
|
+
toggle(on) {
|
|
4947
|
+
this.valueChange.emit(on ? { ...FLOW_RETRY_DEFAULT } : void 0);
|
|
4948
|
+
}
|
|
4949
|
+
set(key, text, max) {
|
|
4950
|
+
const number = Math.min(Math.max(Math.round(Number(text)) || 1, 1), max);
|
|
4951
|
+
this.valueChange.emit({
|
|
4952
|
+
...this.value ?? FLOW_RETRY_DEFAULT,
|
|
4953
|
+
[key]: number
|
|
4954
|
+
});
|
|
4955
|
+
}
|
|
4956
|
+
static {
|
|
4957
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4958
|
+
minVersion: "12.0.0",
|
|
4959
|
+
version: "22.2.0",
|
|
4960
|
+
ngImport: i0,
|
|
4961
|
+
type: FlowsRetryFieldComponent,
|
|
4962
|
+
deps: [],
|
|
4963
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
4964
|
+
});
|
|
4965
|
+
}
|
|
4966
|
+
static {
|
|
4967
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4968
|
+
minVersion: "17.0.0",
|
|
4969
|
+
version: "22.2.0",
|
|
4970
|
+
type: FlowsRetryFieldComponent,
|
|
4971
|
+
isStandalone: false,
|
|
4972
|
+
selector: "pw-flows-retry-field",
|
|
4973
|
+
inputs: {
|
|
4974
|
+
value: "value",
|
|
4975
|
+
inputId: "inputId",
|
|
4976
|
+
readOnly: "readOnly"
|
|
4977
|
+
},
|
|
4978
|
+
outputs: { valueChange: "valueChange" },
|
|
4979
|
+
ngImport: i0,
|
|
4980
|
+
template: "<pw-input-container [label]=\"'Flows.Inspector.Retry' | transloco\"\n name=\"retry\"\n [controlId]=\"inputId\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryHint' | transloco\">\n <ui-switch size=\"small\"\n [id]=\"inputId\"\n [checked]=\"!!value\"\n [disabled]=\"readOnly\"\n [attr.aria-labelledby]=\"inputId + '-label'\"\n (change)=\"toggle($event)\"></ui-switch>\n</pw-input-container>\n\n@if (value) {\n<pw-input-container [label]=\"'Flows.Inspector.RetryTimes' | transloco\"\n name=\"retry_times\"\n [controlId]=\"inputId + '-times'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryTimesHint' | transloco\">\n <input class=\"form-control\"\n type=\"number\"\n min=\"1\"\n max=\"5\"\n [id]=\"inputId + '-times'\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"value.times\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"set('times', $event, 5)\" />\n</pw-input-container>\n\n<pw-input-container [label]=\"'Flows.Inspector.RetryWait' | transloco\"\n name=\"retry_wait_seconds\"\n [controlId]=\"inputId + '-wait'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryWaitHint' | transloco\">\n <input class=\"form-control\"\n type=\"number\"\n min=\"1\"\n max=\"300\"\n [id]=\"inputId + '-wait'\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"value.wait_seconds\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"set('wait_seconds', $event, 300)\" />\n</pw-input-container>\n}\n",
|
|
4981
|
+
dependencies: [
|
|
4982
|
+
{
|
|
4983
|
+
kind: "directive",
|
|
4984
|
+
type: i3$2.DefaultValueAccessor,
|
|
4985
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
kind: "directive",
|
|
4989
|
+
type: i3$2.NumberValueAccessor,
|
|
4990
|
+
selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
|
|
4991
|
+
},
|
|
4992
|
+
{
|
|
4993
|
+
kind: "directive",
|
|
4994
|
+
type: i3$2.NgControlStatus,
|
|
4995
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
4996
|
+
},
|
|
4997
|
+
{
|
|
4998
|
+
kind: "directive",
|
|
4999
|
+
type: i3$2.MinValidator,
|
|
5000
|
+
selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
|
|
5001
|
+
inputs: ["min"]
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
kind: "directive",
|
|
5005
|
+
type: i3$2.MaxValidator,
|
|
5006
|
+
selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",
|
|
5007
|
+
inputs: ["max"]
|
|
5008
|
+
},
|
|
5009
|
+
{
|
|
5010
|
+
kind: "directive",
|
|
5011
|
+
type: i3$2.NgModel,
|
|
5012
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
5013
|
+
inputs: [
|
|
5014
|
+
"name",
|
|
5015
|
+
"disabled",
|
|
5016
|
+
"ngModel",
|
|
5017
|
+
"ngModelOptions"
|
|
5018
|
+
],
|
|
5019
|
+
outputs: ["ngModelChange"],
|
|
5020
|
+
exportAs: ["ngModel"]
|
|
5021
|
+
},
|
|
5022
|
+
{
|
|
5023
|
+
kind: "component",
|
|
5024
|
+
type: i2.UiSwitchComponent,
|
|
5025
|
+
selector: "ui-switch",
|
|
5026
|
+
inputs: [
|
|
5027
|
+
"size",
|
|
5028
|
+
"color",
|
|
5029
|
+
"switchOffColor",
|
|
5030
|
+
"switchColor",
|
|
5031
|
+
"defaultBgColor",
|
|
5032
|
+
"defaultBoColor",
|
|
5033
|
+
"checkedLabel",
|
|
5034
|
+
"uncheckedLabel",
|
|
5035
|
+
"checkedTextColor",
|
|
5036
|
+
"uncheckedTextColor",
|
|
5037
|
+
"beforeChange",
|
|
5038
|
+
"ariaLabel",
|
|
5039
|
+
"checked",
|
|
5040
|
+
"disabled",
|
|
5041
|
+
"reverse",
|
|
5042
|
+
"loading"
|
|
5043
|
+
],
|
|
5044
|
+
outputs: [
|
|
5045
|
+
"change",
|
|
5046
|
+
"changeEvent",
|
|
5047
|
+
"valueChange"
|
|
5048
|
+
]
|
|
5049
|
+
},
|
|
5050
|
+
{
|
|
5051
|
+
kind: "component",
|
|
5052
|
+
type: i6$1.InputContainerComponent,
|
|
5053
|
+
selector: "pw-input-container",
|
|
5054
|
+
inputs: [
|
|
5055
|
+
"name",
|
|
5056
|
+
"controlId",
|
|
5057
|
+
"useAriaLabelledbyOnly",
|
|
5058
|
+
"label",
|
|
5059
|
+
"labelClass",
|
|
5060
|
+
"tooltipPosition",
|
|
5061
|
+
"required",
|
|
5062
|
+
"errorMsg",
|
|
5063
|
+
"isReadOnly",
|
|
5064
|
+
"showTooltip",
|
|
5065
|
+
"tooltipText",
|
|
5066
|
+
"showTriangle",
|
|
5067
|
+
"afterLabel",
|
|
5068
|
+
"showAfterLabel",
|
|
5069
|
+
"showTriangleText",
|
|
5070
|
+
"isLeftTooltip"
|
|
5071
|
+
]
|
|
5072
|
+
},
|
|
5073
|
+
{
|
|
5074
|
+
kind: "pipe",
|
|
5075
|
+
type: i2$4.TranslocoPipe,
|
|
5076
|
+
name: "transloco"
|
|
5077
|
+
}
|
|
5078
|
+
]
|
|
5079
|
+
});
|
|
5080
|
+
}
|
|
5081
|
+
};
|
|
5082
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5083
|
+
minVersion: "12.0.0",
|
|
5084
|
+
version: "22.2.0",
|
|
5085
|
+
ngImport: i0,
|
|
5086
|
+
type: FlowsRetryFieldComponent,
|
|
5087
|
+
decorators: [{
|
|
5088
|
+
type: Component,
|
|
5089
|
+
args: [{
|
|
5090
|
+
selector: "pw-flows-retry-field",
|
|
5091
|
+
standalone: false,
|
|
5092
|
+
template: "<pw-input-container [label]=\"'Flows.Inspector.Retry' | transloco\"\n name=\"retry\"\n [controlId]=\"inputId\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryHint' | transloco\">\n <ui-switch size=\"small\"\n [id]=\"inputId\"\n [checked]=\"!!value\"\n [disabled]=\"readOnly\"\n [attr.aria-labelledby]=\"inputId + '-label'\"\n (change)=\"toggle($event)\"></ui-switch>\n</pw-input-container>\n\n@if (value) {\n<pw-input-container [label]=\"'Flows.Inspector.RetryTimes' | transloco\"\n name=\"retry_times\"\n [controlId]=\"inputId + '-times'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryTimesHint' | transloco\">\n <input class=\"form-control\"\n type=\"number\"\n min=\"1\"\n max=\"5\"\n [id]=\"inputId + '-times'\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"value.times\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"set('times', $event, 5)\" />\n</pw-input-container>\n\n<pw-input-container [label]=\"'Flows.Inspector.RetryWait' | transloco\"\n name=\"retry_wait_seconds\"\n [controlId]=\"inputId + '-wait'\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.RetryWaitHint' | transloco\">\n <input class=\"form-control\"\n type=\"number\"\n min=\"1\"\n max=\"300\"\n [id]=\"inputId + '-wait'\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"value.wait_seconds\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"set('wait_seconds', $event, 300)\" />\n</pw-input-container>\n}\n"
|
|
5093
|
+
}]
|
|
5094
|
+
}],
|
|
5095
|
+
propDecorators: {
|
|
5096
|
+
value: [{ type: Input }],
|
|
5097
|
+
inputId: [{ type: Input }],
|
|
5098
|
+
readOnly: [{ type: Input }],
|
|
5099
|
+
valueChange: [{ type: Output }]
|
|
5100
|
+
}
|
|
5101
|
+
});
|
|
5102
|
+
const TEXT_TYPES = [
|
|
5103
|
+
"text",
|
|
5104
|
+
"search",
|
|
5105
|
+
"url"
|
|
5106
|
+
];
|
|
5107
|
+
const FIELD_NAME_BOX = "-field";
|
|
5108
|
+
const SEARCH_FROM = 12;
|
|
5109
|
+
function isTextBox(element) {
|
|
5110
|
+
return element instanceof HTMLTextAreaElement || element instanceof HTMLInputElement && TEXT_TYPES.includes(element.type);
|
|
5111
|
+
}
|
|
5112
|
+
var FlowsAvailableFieldsComponent = class FlowsAvailableFieldsComponent {
|
|
5113
|
+
constructor(host, cdr) {
|
|
5114
|
+
this.host = host;
|
|
5115
|
+
this.sources = [];
|
|
5116
|
+
this.readOnly = false;
|
|
5117
|
+
this.firstRun = false;
|
|
5118
|
+
this.nodeType = "";
|
|
5119
|
+
this.labelKey = flowNodeLabelKey;
|
|
5120
|
+
this.query = "";
|
|
5121
|
+
this.names = false;
|
|
5122
|
+
afterEveryRender(() => {
|
|
5123
|
+
const names = this.takesNames();
|
|
5124
|
+
if (names !== this.names) {
|
|
5125
|
+
this.names = names;
|
|
5126
|
+
cdr.markForCheck();
|
|
5127
|
+
}
|
|
5128
|
+
});
|
|
5129
|
+
}
|
|
5130
|
+
get searchable() {
|
|
5131
|
+
const count = (source) => source.names.filter((name) => this.fits(source.lists[name] ? "list" : "value", this.names)).length + (this.fits("entry", this.names) ? Object.values(source.lists).flat().length : 0);
|
|
5132
|
+
return this.sources.reduce((total, source) => total + count(source), 0) > SEARCH_FROM;
|
|
5133
|
+
}
|
|
5134
|
+
remember(target) {
|
|
5135
|
+
const panel = this.host.nativeElement.closest(".pw-node-inspector");
|
|
5136
|
+
if (isTextBox(target) && panel?.contains(target) && !target.closest("pw-flows-condition-field") && !this.host.nativeElement.contains(target)) {
|
|
5137
|
+
this.box = target;
|
|
5138
|
+
this.names = this.takesNames();
|
|
5139
|
+
}
|
|
5140
|
+
}
|
|
5141
|
+
takesNames() {
|
|
5142
|
+
return !!this.target()?.id.endsWith(FIELD_NAME_BOX);
|
|
5143
|
+
}
|
|
5144
|
+
offers(source, names) {
|
|
5145
|
+
const lists = Object.keys(source.lists);
|
|
5146
|
+
return source.names.some((name) => this.fits(lists.includes(name) ? "list" : "value", names)) || lists.length > 0 && this.fits("entry", names);
|
|
5147
|
+
}
|
|
5148
|
+
matches(name) {
|
|
5149
|
+
return !this.query || name.toLowerCase().includes(this.query.trim().toLowerCase());
|
|
5150
|
+
}
|
|
5151
|
+
fits(kind, names) {
|
|
5152
|
+
if (!names) return true;
|
|
5153
|
+
return this.nodeType === "data.split_out" ? kind === "list" : kind !== "entry";
|
|
5154
|
+
}
|
|
5155
|
+
placeholder(field, names) {
|
|
5156
|
+
return names ? field : `{{${field}}}`;
|
|
5157
|
+
}
|
|
5158
|
+
entry(list, key) {
|
|
5159
|
+
return `${list}.*.${key}`;
|
|
5160
|
+
}
|
|
5161
|
+
insert(field) {
|
|
5162
|
+
const box = this.target();
|
|
5163
|
+
const names = this.takesNames();
|
|
5164
|
+
if (this.readOnly || !box?.isConnected || box.readOnly) return;
|
|
5165
|
+
box.focus();
|
|
5166
|
+
if (names) box.value = field;
|
|
5167
|
+
else box.setRangeText(this.placeholder(field, names), box.selectionStart ?? box.value.length, box.selectionEnd ?? box.value.length, "end");
|
|
5168
|
+
box.dispatchEvent(new Event("input", { bubbles: true }));
|
|
5169
|
+
}
|
|
5170
|
+
target() {
|
|
5171
|
+
return this.box?.isConnected ? this.box : this.onlyBox();
|
|
5172
|
+
}
|
|
5173
|
+
onlyBox() {
|
|
5174
|
+
const boxes = [...this.host.nativeElement.closest(".pw-node-inspector")?.querySelectorAll("input, textarea") ?? []].filter((element) => isTextBox(element) && !element.closest("pw-flows-condition-field") && !this.host.nativeElement.contains(element));
|
|
5175
|
+
return boxes.length === 1 ? boxes[0] : void 0;
|
|
5176
|
+
}
|
|
5177
|
+
static {
|
|
5178
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
5179
|
+
minVersion: "12.0.0",
|
|
5180
|
+
version: "22.2.0",
|
|
5181
|
+
ngImport: i0,
|
|
5182
|
+
type: FlowsAvailableFieldsComponent,
|
|
5183
|
+
deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }],
|
|
5184
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
5185
|
+
});
|
|
5186
|
+
}
|
|
5187
|
+
static {
|
|
5188
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5189
|
+
minVersion: "17.0.0",
|
|
5190
|
+
version: "22.2.0",
|
|
5191
|
+
type: FlowsAvailableFieldsComponent,
|
|
5192
|
+
isStandalone: false,
|
|
5193
|
+
selector: "pw-flows-available-fields",
|
|
5194
|
+
inputs: {
|
|
5195
|
+
sources: "sources",
|
|
5196
|
+
inputId: "inputId",
|
|
5197
|
+
readOnly: "readOnly",
|
|
5198
|
+
firstRun: "firstRun",
|
|
5199
|
+
nodeType: "nodeType"
|
|
5200
|
+
},
|
|
5201
|
+
host: { listeners: { "document:focusin": "remember($event.target)" } },
|
|
5202
|
+
ngImport: i0,
|
|
5203
|
+
template: "<pw-input-container [label]=\"'Flows.Inspector.AvailableFields' | transloco\"\n name=\"available_fields\"\n [controlId]=\"inputId\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.AvailableFieldsHint' | transloco\">\n @if (sources.length) {\n <div [id]=\"inputId\"\n class=\"pw-available-fields\"\n role=\"group\"\n [attr.aria-labelledby]=\"inputId + '-label'\">\n @if (searchable) {\n <input type=\"search\"\n class=\"form-control form-control-sm pw-available-fields__search\"\n data-testid=\"flow-available-fields-search\"\n [placeholder]=\"'Flows.Inspector.SearchFields' | transloco\"\n [attr.aria-label]=\"'Flows.Inspector.SearchFields' | transloco\"\n [value]=\"query\"\n (input)=\"query = $any($event.target).value\">\n }\n <div class=\"pw-available-fields__groups\"\n data-testid=\"flow-available-fields-groups\">\n @for (source of sources; track source.nodeId) {\n @if (offers(source, names)) {\n @let key = labelKey(source.type);\n @let translated = key | transloco;\n <section class=\"pw-available-fields__group\">\n <p class=\"pw-available-fields__from\"\n [attr.data-testid]=\"'flow-available-fields-from-' + source.nodeId\">\n {{ translated === key ? source.label : translated }}\n <span class=\"pw-available-fields__id\">{{ source.nodeId }}</span>\n </p>\n <div class=\"pw-available-fields__chips\">\n @for (field of source.names; track field) {\n @let kind = source.lists[field] ? 'list' : 'value';\n @if (matches(field) && fits(kind, names)) {\n <button type=\"button\"\n class=\"pw-available-fields__chip\"\n [disabled]=\"readOnly\"\n [attr.data-testid]=\"'flow-available-field-' + field\"\n [pTooltip]=\"placeholder(field, names)\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"insert(field)\">{{ field }}</button>\n }\n }\n </div>\n @if (fits('entry', names)) {\n @for (list of source.lists | keyvalue; track list.key) {\n <details class=\"pw-available-fields__list\"\n [open]=\"!!query\">\n <summary>{{ 'Flows.Inspector.FieldsIn' | transloco: { list: list.key, count: list.value.length } }}</summary>\n <div class=\"pw-available-fields__chips\">\n @for (field of list.value; track field) {\n @if (matches(field)) {\n <button type=\"button\"\n class=\"pw-available-fields__chip\"\n [disabled]=\"readOnly\"\n [attr.data-testid]=\"'flow-available-field-' + entry(list.key, field)\"\n [pTooltip]=\"placeholder(entry(list.key, field), names)\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"insert(entry(list.key, field))\">{{ field }}</button>\n }\n }\n </div>\n </details>\n }\n }\n </section>\n }\n }\n </div>\n </div>\n } @else {\n <p class=\"pw-available-fields__none\"\n data-testid=\"flow-available-fields-none\">{{ (firstRun ? 'Flows.Inspector.FirstRunFields' : 'Flows.Inspector.NoAvailableFields') | transloco }}</p>\n }\n</pw-input-container>\n",
|
|
5204
|
+
styles: [".pw-available-fields{display:flex;flex-direction:column;gap:10px}.pw-available-fields__search{max-width:100%}.pw-available-fields__groups{display:flex;flex-direction:column;gap:10px;max-height:220px;overflow-y:auto;padding-right:4px}.pw-available-fields__group+.pw-available-fields__group{border-top:1px solid #e2e5ea;padding-top:10px}.pw-available-fields__from{margin:0 0 6px;font-size:12px;font-weight:600;color:#1a1d21}.pw-available-fields__id{margin-left:4px;font-weight:400;color:#7c8696}.pw-available-fields__chips{display:flex;flex-wrap:wrap;gap:4px}.pw-available-fields__chip{border:1px solid #d5dae1;border-radius:4px;background-color:#f5f7fa;color:#1a1d21;padding:1px 8px;font-size:12px;line-height:20px;cursor:pointer}.pw-available-fields__chip:hover:not(:disabled){border-color:var(--first);background-color:#fff}.pw-available-fields__chip:disabled{cursor:not-allowed;opacity:.4}.pw-available-fields__list{margin-top:6px}.pw-available-fields__list summary{cursor:pointer;margin-bottom:4px;font-size:12px;color:#5a6473}.pw-available-fields__none{margin:0;color:#5a6473;font-size:12px}\n"],
|
|
5205
|
+
dependencies: [
|
|
5206
|
+
{
|
|
5207
|
+
kind: "directive",
|
|
5208
|
+
type: i1$1.Tooltip,
|
|
5209
|
+
selector: "[pTooltip]",
|
|
5210
|
+
inputs: [
|
|
5211
|
+
"tooltipPosition",
|
|
5212
|
+
"tooltipEvent",
|
|
5213
|
+
"positionStyle",
|
|
5214
|
+
"tooltipStyleClass",
|
|
5215
|
+
"tooltipZIndex",
|
|
5216
|
+
"escape",
|
|
5217
|
+
"showDelay",
|
|
5218
|
+
"hideDelay",
|
|
5219
|
+
"life",
|
|
5220
|
+
"positionTop",
|
|
5221
|
+
"positionLeft",
|
|
5222
|
+
"autoHide",
|
|
5223
|
+
"fitContent",
|
|
5224
|
+
"hideOnEscape",
|
|
5225
|
+
"showOnEllipsis",
|
|
5226
|
+
"pTooltip",
|
|
5227
|
+
"tooltipDisabled",
|
|
5228
|
+
"tooltipOptions",
|
|
5229
|
+
"appendTo",
|
|
5230
|
+
"pTooltipPT",
|
|
5231
|
+
"pTooltipUnstyled"
|
|
5232
|
+
]
|
|
5233
|
+
},
|
|
5234
|
+
{
|
|
5235
|
+
kind: "component",
|
|
5236
|
+
type: i6$1.InputContainerComponent,
|
|
5237
|
+
selector: "pw-input-container",
|
|
5238
|
+
inputs: [
|
|
5239
|
+
"name",
|
|
5240
|
+
"controlId",
|
|
5241
|
+
"useAriaLabelledbyOnly",
|
|
5242
|
+
"label",
|
|
5243
|
+
"labelClass",
|
|
5244
|
+
"tooltipPosition",
|
|
5245
|
+
"required",
|
|
5246
|
+
"errorMsg",
|
|
5247
|
+
"isReadOnly",
|
|
5248
|
+
"showTooltip",
|
|
5249
|
+
"tooltipText",
|
|
5250
|
+
"showTriangle",
|
|
5251
|
+
"afterLabel",
|
|
5252
|
+
"showAfterLabel",
|
|
5253
|
+
"showTriangleText",
|
|
5254
|
+
"isLeftTooltip"
|
|
5255
|
+
]
|
|
5256
|
+
},
|
|
5257
|
+
{
|
|
5258
|
+
kind: "pipe",
|
|
5259
|
+
type: i1$2.KeyValuePipe,
|
|
5260
|
+
name: "keyvalue"
|
|
5261
|
+
},
|
|
5262
|
+
{
|
|
5263
|
+
kind: "pipe",
|
|
5264
|
+
type: i2$4.TranslocoPipe,
|
|
5265
|
+
name: "transloco"
|
|
5266
|
+
}
|
|
5267
|
+
]
|
|
5268
|
+
});
|
|
5269
|
+
}
|
|
5270
|
+
};
|
|
5271
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5272
|
+
minVersion: "12.0.0",
|
|
5273
|
+
version: "22.2.0",
|
|
5274
|
+
ngImport: i0,
|
|
5275
|
+
type: FlowsAvailableFieldsComponent,
|
|
5276
|
+
decorators: [{
|
|
5277
|
+
type: Component,
|
|
5278
|
+
args: [{
|
|
5279
|
+
selector: "pw-flows-available-fields",
|
|
5280
|
+
standalone: false,
|
|
5281
|
+
template: "<pw-input-container [label]=\"'Flows.Inspector.AvailableFields' | transloco\"\n name=\"available_fields\"\n [controlId]=\"inputId\"\n [useAriaLabelledbyOnly]=\"true\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Flows.Inspector.AvailableFieldsHint' | transloco\">\n @if (sources.length) {\n <div [id]=\"inputId\"\n class=\"pw-available-fields\"\n role=\"group\"\n [attr.aria-labelledby]=\"inputId + '-label'\">\n @if (searchable) {\n <input type=\"search\"\n class=\"form-control form-control-sm pw-available-fields__search\"\n data-testid=\"flow-available-fields-search\"\n [placeholder]=\"'Flows.Inspector.SearchFields' | transloco\"\n [attr.aria-label]=\"'Flows.Inspector.SearchFields' | transloco\"\n [value]=\"query\"\n (input)=\"query = $any($event.target).value\">\n }\n <div class=\"pw-available-fields__groups\"\n data-testid=\"flow-available-fields-groups\">\n @for (source of sources; track source.nodeId) {\n @if (offers(source, names)) {\n @let key = labelKey(source.type);\n @let translated = key | transloco;\n <section class=\"pw-available-fields__group\">\n <p class=\"pw-available-fields__from\"\n [attr.data-testid]=\"'flow-available-fields-from-' + source.nodeId\">\n {{ translated === key ? source.label : translated }}\n <span class=\"pw-available-fields__id\">{{ source.nodeId }}</span>\n </p>\n <div class=\"pw-available-fields__chips\">\n @for (field of source.names; track field) {\n @let kind = source.lists[field] ? 'list' : 'value';\n @if (matches(field) && fits(kind, names)) {\n <button type=\"button\"\n class=\"pw-available-fields__chip\"\n [disabled]=\"readOnly\"\n [attr.data-testid]=\"'flow-available-field-' + field\"\n [pTooltip]=\"placeholder(field, names)\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"insert(field)\">{{ field }}</button>\n }\n }\n </div>\n @if (fits('entry', names)) {\n @for (list of source.lists | keyvalue; track list.key) {\n <details class=\"pw-available-fields__list\"\n [open]=\"!!query\">\n <summary>{{ 'Flows.Inspector.FieldsIn' | transloco: { list: list.key, count: list.value.length } }}</summary>\n <div class=\"pw-available-fields__chips\">\n @for (field of list.value; track field) {\n @if (matches(field)) {\n <button type=\"button\"\n class=\"pw-available-fields__chip\"\n [disabled]=\"readOnly\"\n [attr.data-testid]=\"'flow-available-field-' + entry(list.key, field)\"\n [pTooltip]=\"placeholder(entry(list.key, field), names)\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"insert(entry(list.key, field))\">{{ field }}</button>\n }\n }\n </div>\n </details>\n }\n }\n </section>\n }\n }\n </div>\n </div>\n } @else {\n <p class=\"pw-available-fields__none\"\n data-testid=\"flow-available-fields-none\">{{ (firstRun ? 'Flows.Inspector.FirstRunFields' : 'Flows.Inspector.NoAvailableFields') | transloco }}</p>\n }\n</pw-input-container>\n",
|
|
5282
|
+
styles: [".pw-available-fields{display:flex;flex-direction:column;gap:10px}.pw-available-fields__search{max-width:100%}.pw-available-fields__groups{display:flex;flex-direction:column;gap:10px;max-height:220px;overflow-y:auto;padding-right:4px}.pw-available-fields__group+.pw-available-fields__group{border-top:1px solid #e2e5ea;padding-top:10px}.pw-available-fields__from{margin:0 0 6px;font-size:12px;font-weight:600;color:#1a1d21}.pw-available-fields__id{margin-left:4px;font-weight:400;color:#7c8696}.pw-available-fields__chips{display:flex;flex-wrap:wrap;gap:4px}.pw-available-fields__chip{border:1px solid #d5dae1;border-radius:4px;background-color:#f5f7fa;color:#1a1d21;padding:1px 8px;font-size:12px;line-height:20px;cursor:pointer}.pw-available-fields__chip:hover:not(:disabled){border-color:var(--first);background-color:#fff}.pw-available-fields__chip:disabled{cursor:not-allowed;opacity:.4}.pw-available-fields__list{margin-top:6px}.pw-available-fields__list summary{cursor:pointer;margin-bottom:4px;font-size:12px;color:#5a6473}.pw-available-fields__none{margin:0;color:#5a6473;font-size:12px}\n"]
|
|
5283
|
+
}]
|
|
5284
|
+
}],
|
|
5285
|
+
ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }],
|
|
5286
|
+
propDecorators: {
|
|
5287
|
+
sources: [{ type: Input }],
|
|
5288
|
+
inputId: [{ type: Input }],
|
|
5289
|
+
readOnly: [{ type: Input }],
|
|
5290
|
+
firstRun: [{ type: Input }],
|
|
5291
|
+
nodeType: [{ type: Input }],
|
|
5292
|
+
remember: [{
|
|
5293
|
+
type: HostListener,
|
|
5294
|
+
args: ["document:focusin", ["$event.target"]]
|
|
5295
|
+
}]
|
|
5296
|
+
}
|
|
5297
|
+
});
|
|
5298
|
+
const PLACEHOLDER = /\{\{\s*([A-Za-z0-9_*]+(?:\.[A-Za-z0-9_*]+)*)\s*\}\}/g;
|
|
5299
|
+
function texts(value) {
|
|
5300
|
+
if (typeof value === "string") return [value];
|
|
5301
|
+
if (value && typeof value === "object") return Object.values(value).flatMap(texts);
|
|
5302
|
+
return [];
|
|
5303
|
+
}
|
|
5304
|
+
function flowUnknownPlaceholders(value, known) {
|
|
5305
|
+
if (!known.length) return [];
|
|
5306
|
+
const roots = new Set(known.map((name) => name.split(".")[0]));
|
|
5307
|
+
const paths = texts(value).flatMap((text) => [...text.matchAll(PLACEHOLDER)].map((m) => m[1]));
|
|
5308
|
+
return [...new Set(paths.filter((path) => !roots.has(path.split(".")[0])))];
|
|
5309
|
+
}
|
|
5310
|
+
var FlowsUnknownFieldsComponent = class FlowsUnknownFieldsComponent {
|
|
5311
|
+
constructor() {
|
|
5312
|
+
this.known = [];
|
|
5313
|
+
this.icons = FLOWS_ICONS;
|
|
5314
|
+
this.unknown = "";
|
|
5315
|
+
}
|
|
5316
|
+
ngOnChanges() {
|
|
5317
|
+
this.unknown = flowUnknownPlaceholders(this.value, this.known).join(", ");
|
|
4001
5318
|
}
|
|
4002
5319
|
static {
|
|
4003
5320
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
4004
5321
|
minVersion: "12.0.0",
|
|
4005
5322
|
version: "22.2.0",
|
|
4006
5323
|
ngImport: i0,
|
|
4007
|
-
type:
|
|
4008
|
-
deps: [
|
|
5324
|
+
type: FlowsUnknownFieldsComponent,
|
|
5325
|
+
deps: [],
|
|
4009
5326
|
target: i0.ɵɵFactoryTarget.Component
|
|
4010
5327
|
});
|
|
4011
5328
|
}
|
|
@@ -4013,130 +5330,58 @@ var FlowsMemberFieldComponent = class FlowsMemberFieldComponent {
|
|
|
4013
5330
|
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4014
5331
|
minVersion: "17.0.0",
|
|
4015
5332
|
version: "22.2.0",
|
|
4016
|
-
type:
|
|
5333
|
+
type: FlowsUnknownFieldsComponent,
|
|
4017
5334
|
isStandalone: false,
|
|
4018
|
-
selector: "pw-flows-
|
|
5335
|
+
selector: "pw-flows-unknown-fields",
|
|
4019
5336
|
inputs: {
|
|
4020
5337
|
value: "value",
|
|
4021
|
-
|
|
4022
|
-
subscriptionId: "subscriptionId",
|
|
4023
|
-
inputId: "inputId",
|
|
4024
|
-
readOnly: "readOnly"
|
|
5338
|
+
known: "known"
|
|
4025
5339
|
},
|
|
4026
|
-
outputs: { valueChange: "valueChange" },
|
|
4027
5340
|
usesOnChanges: true,
|
|
4028
5341
|
ngImport: i0,
|
|
4029
|
-
template: "<p
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
"baseZIndex",
|
|
4073
|
-
"ariaLabel",
|
|
4074
|
-
"dropdownAriaLabel",
|
|
4075
|
-
"ariaLabelledBy",
|
|
4076
|
-
"dropdownIcon",
|
|
4077
|
-
"unique",
|
|
4078
|
-
"group",
|
|
4079
|
-
"completeOnFocus",
|
|
4080
|
-
"showClear",
|
|
4081
|
-
"dropdown",
|
|
4082
|
-
"showEmptyMessage",
|
|
4083
|
-
"dropdownMode",
|
|
4084
|
-
"multiple",
|
|
4085
|
-
"addOnTab",
|
|
4086
|
-
"tabindex",
|
|
4087
|
-
"dataKey",
|
|
4088
|
-
"emptyMessage",
|
|
4089
|
-
"autofocus",
|
|
4090
|
-
"autocomplete",
|
|
4091
|
-
"optionGroupChildren",
|
|
4092
|
-
"optionGroupLabel",
|
|
4093
|
-
"overlayOptions",
|
|
4094
|
-
"suggestions",
|
|
4095
|
-
"optionLabel",
|
|
4096
|
-
"optionValue",
|
|
4097
|
-
"id",
|
|
4098
|
-
"searchMessage",
|
|
4099
|
-
"emptySelectionMessage",
|
|
4100
|
-
"selectionMessage",
|
|
4101
|
-
"autoOptionFocus",
|
|
4102
|
-
"selectOnFocus",
|
|
4103
|
-
"searchLocale",
|
|
4104
|
-
"optionDisabled",
|
|
4105
|
-
"focusOnHover",
|
|
4106
|
-
"typeahead",
|
|
4107
|
-
"addOnBlur",
|
|
4108
|
-
"separator",
|
|
4109
|
-
"appendTo",
|
|
4110
|
-
"motionOptions"
|
|
4111
|
-
],
|
|
4112
|
-
outputs: [
|
|
4113
|
-
"completeMethod",
|
|
4114
|
-
"onSelect",
|
|
4115
|
-
"onUnselect",
|
|
4116
|
-
"onAdd",
|
|
4117
|
-
"onFocus",
|
|
4118
|
-
"onBlur",
|
|
4119
|
-
"onDropdownClick",
|
|
4120
|
-
"onClear",
|
|
4121
|
-
"onInputKeydown",
|
|
4122
|
-
"onKeyUp",
|
|
4123
|
-
"onShow",
|
|
4124
|
-
"onHide",
|
|
4125
|
-
"onLazyLoad"
|
|
4126
|
-
]
|
|
4127
|
-
},
|
|
4128
|
-
{
|
|
4129
|
-
kind: "component",
|
|
4130
|
-
type: i2.FieldErrorDisplayComponent,
|
|
4131
|
-
selector: "pw-field-error-display",
|
|
4132
|
-
inputs: ["errorMsg", "displayError"]
|
|
4133
|
-
},
|
|
4134
|
-
{
|
|
4135
|
-
kind: "pipe",
|
|
4136
|
-
type: i9$1.TranslocoPipe,
|
|
4137
|
-
name: "transloco"
|
|
4138
|
-
}
|
|
4139
|
-
]
|
|
5342
|
+
template: "@if (unknown) {\n<p class=\"pw-unknown-fields\"\n role=\"status\"\n data-testid=\"flow-unknown-fields\">\n <fa-icon [icon]=\"icons.warning\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Inspector.UnknownFields' | transloco: { fields: unknown } }}\n</p>\n}\n",
|
|
5343
|
+
styles: [".pw-unknown-fields{display:flex;align-items:baseline;gap:6px;margin:4px 0 0;color:#8a5a00;font-size:12px}\n"],
|
|
5344
|
+
dependencies: [{
|
|
5345
|
+
kind: "component",
|
|
5346
|
+
type: i2$3.FaIconComponent,
|
|
5347
|
+
selector: "fa-icon",
|
|
5348
|
+
inputs: [
|
|
5349
|
+
"icon",
|
|
5350
|
+
"title",
|
|
5351
|
+
"animation",
|
|
5352
|
+
"mask",
|
|
5353
|
+
"flip",
|
|
5354
|
+
"size",
|
|
5355
|
+
"pull",
|
|
5356
|
+
"border",
|
|
5357
|
+
"inverse",
|
|
5358
|
+
"symbol",
|
|
5359
|
+
"rotate",
|
|
5360
|
+
"fixedWidth",
|
|
5361
|
+
"transform",
|
|
5362
|
+
"a11yRole"
|
|
5363
|
+
],
|
|
5364
|
+
outputs: [
|
|
5365
|
+
"iconChange",
|
|
5366
|
+
"titleChange",
|
|
5367
|
+
"animationChange",
|
|
5368
|
+
"maskChange",
|
|
5369
|
+
"flipChange",
|
|
5370
|
+
"sizeChange",
|
|
5371
|
+
"pullChange",
|
|
5372
|
+
"borderChange",
|
|
5373
|
+
"inverseChange",
|
|
5374
|
+
"symbolChange",
|
|
5375
|
+
"rotateChange",
|
|
5376
|
+
"fixedWidthChange",
|
|
5377
|
+
"transformChange",
|
|
5378
|
+
"a11yRoleChange"
|
|
5379
|
+
]
|
|
5380
|
+
}, {
|
|
5381
|
+
kind: "pipe",
|
|
5382
|
+
type: i2$4.TranslocoPipe,
|
|
5383
|
+
name: "transloco"
|
|
5384
|
+
}]
|
|
4140
5385
|
});
|
|
4141
5386
|
}
|
|
4142
5387
|
};
|
|
@@ -4144,28 +5389,21 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4144
5389
|
minVersion: "12.0.0",
|
|
4145
5390
|
version: "22.2.0",
|
|
4146
5391
|
ngImport: i0,
|
|
4147
|
-
type:
|
|
5392
|
+
type: FlowsUnknownFieldsComponent,
|
|
4148
5393
|
decorators: [{
|
|
4149
5394
|
type: Component,
|
|
4150
5395
|
args: [{
|
|
4151
|
-
selector: "pw-flows-
|
|
5396
|
+
selector: "pw-flows-unknown-fields",
|
|
4152
5397
|
standalone: false,
|
|
4153
|
-
template: "<p
|
|
5398
|
+
template: "@if (unknown) {\n<p class=\"pw-unknown-fields\"\n role=\"status\"\n data-testid=\"flow-unknown-fields\">\n <fa-icon [icon]=\"icons.warning\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Inspector.UnknownFields' | transloco: { fields: unknown } }}\n</p>\n}\n",
|
|
5399
|
+
styles: [".pw-unknown-fields{display:flex;align-items:baseline;gap:6px;margin:4px 0 0;color:#8a5a00;font-size:12px}\n"]
|
|
4154
5400
|
}]
|
|
4155
5401
|
}],
|
|
4156
|
-
ctorParameters: () => [{ type: FlowsMemberService }, { type: i0.ChangeDetectorRef }],
|
|
4157
5402
|
propDecorators: {
|
|
4158
5403
|
value: [{ type: Input }],
|
|
4159
|
-
|
|
4160
|
-
subscriptionId: [{ type: Input }],
|
|
4161
|
-
inputId: [{ type: Input }],
|
|
4162
|
-
readOnly: [{ type: Input }],
|
|
4163
|
-
valueChange: [{ type: Output }]
|
|
5404
|
+
known: [{ type: Input }]
|
|
4164
5405
|
}
|
|
4165
5406
|
});
|
|
4166
|
-
function toIds(value) {
|
|
4167
|
-
return (Array.isArray(value) ? value : [value]).map(Number).filter((id) => Number.isInteger(id) && id > 0);
|
|
4168
|
-
}
|
|
4169
5407
|
var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
4170
5408
|
constructor(translation, cdr, destroyRef, host) {
|
|
4171
5409
|
this.host = host;
|
|
@@ -4173,6 +5411,8 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4173
5411
|
this.readOnly = false;
|
|
4174
5412
|
this.fieldSuggestions = [];
|
|
4175
5413
|
this.listSuggestions = [];
|
|
5414
|
+
this.fieldSources = [];
|
|
5415
|
+
this.firstRun = false;
|
|
4176
5416
|
this.nodeChange = new EventEmitter();
|
|
4177
5417
|
this.remove = new EventEmitter();
|
|
4178
5418
|
this.icons = FLOWS_ICONS;
|
|
@@ -4180,6 +5420,7 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4180
5420
|
this.defaultMergeMode = FLOW_MERGE_MODES[0];
|
|
4181
5421
|
this.labelKey = flowNodeLabelKey;
|
|
4182
5422
|
this.paramLabelKey = flowParamLabelKey;
|
|
5423
|
+
this.paramHelpKey = flowParamHelpKey;
|
|
4183
5424
|
this.numberValue = flowNumberValue;
|
|
4184
5425
|
this.fields = [];
|
|
4185
5426
|
this.conditionNotAnObject = false;
|
|
@@ -4229,6 +5470,9 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4229
5470
|
params
|
|
4230
5471
|
});
|
|
4231
5472
|
}
|
|
5473
|
+
setRetry(retry) {
|
|
5474
|
+
this.emit(flowNodeWithRetry(this.leaving ?? this.node, retry));
|
|
5475
|
+
}
|
|
4232
5476
|
setCondition(condition) {
|
|
4233
5477
|
const next = { ...this.leaving ?? this.node };
|
|
4234
5478
|
this.conditionNotAnObject = false;
|
|
@@ -4252,7 +5496,7 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4252
5496
|
ngImport: i0,
|
|
4253
5497
|
type: FlowsNodeInspectorComponent,
|
|
4254
5498
|
deps: [
|
|
4255
|
-
{ token:
|
|
5499
|
+
{ token: i2$4.TranslocoService },
|
|
4256
5500
|
{ token: i0.ChangeDetectorRef },
|
|
4257
5501
|
{ token: i0.DestroyRef },
|
|
4258
5502
|
{ token: i0.ElementRef }
|
|
@@ -4273,7 +5517,9 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4273
5517
|
subscriptionId: "subscriptionId",
|
|
4274
5518
|
readOnly: "readOnly",
|
|
4275
5519
|
fieldSuggestions: "fieldSuggestions",
|
|
4276
|
-
listSuggestions: "listSuggestions"
|
|
5520
|
+
listSuggestions: "listSuggestions",
|
|
5521
|
+
fieldSources: "fieldSources",
|
|
5522
|
+
firstRun: "firstRun"
|
|
4277
5523
|
},
|
|
4278
5524
|
outputs: {
|
|
4279
5525
|
nodeChange: "nodeChange",
|
|
@@ -4281,8 +5527,8 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4281
5527
|
},
|
|
4282
5528
|
usesOnChanges: true,
|
|
4283
5529
|
ngImport: i0,
|
|
4284
|
-
template: "<aside class=\"pw-node-inspector\"\n data-testid=\"flow-inspector\">\n @let key = labelKey(node.type);\n @let translated = key | transloco;\n <header class=\"pw-node-inspector__head\">\n <div>\n <h4 class=\"pw-node-inspector__title\">{{ translated === key ? (definition?.label ?? node.type) : translated }}</h4>\n <span class=\"pw-node-inspector__id\">{{ node.id }} · {{ node.type }}</span>\n </div>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-link pw-node-inspector__remove\"\n data-testid=\"flow-node-remove\"\n [attr.aria-label]=\"'Flows.Inspector.RemoveNode' | transloco\"\n [pTooltip]=\"'Flows.Inspector.RemoveNode' | transloco\"\n appendTo=\"body\"\n (click)=\"remove.emit()\">\n <fa-icon [icon]=\"icons.delete\"></fa-icon>\n </button>\n }\n </header>\n\n @if (!definition) {\n <p class=\"pw-node-inspector__note\"\n data-testid=\"flow-node-unknown\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Inspector.UnknownType' | transloco }}\n </p>\n }\n\n @for (field of fields; track field.id) {\n @let id = field.id;\n @let paramKey = paramLabelKey(field.key);\n @let paramLabel = paramKey | transloco;\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"field.label || (paramLabel === paramKey ? field.key : paramLabel)\"\n [required]=\"!!field.required\"\n [name]=\"field.key\"\n [controlId]=\"id\">\n @switch (kindOf(field)) {\n @case ('textarea') {\n <textarea class=\"form-control\"
|
|
4285
|
-
styles: [".pw-node-inspector{display:flex;flex-direction:column;gap:16px;padding:16px}.pw-node-inspector__head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:12px;border-bottom:1px solid #e2e5ea}.pw-node-inspector__title{margin:0}.pw-node-inspector__id{color:#7c8696;font-size:12px;font-variant-numeric:tabular-nums}.pw-node-inspector__remove{color:#5a6473}.pw-node-inspector__field{display:block}.pw-node-inspector__note
|
|
5530
|
+
template: "<aside class=\"pw-node-inspector\"\n data-testid=\"flow-inspector\">\n @let key = labelKey(node.type);\n @let translated = key | transloco;\n <header class=\"pw-node-inspector__head\">\n <div>\n <h4 class=\"pw-node-inspector__title\">{{ translated === key ? (definition?.label ?? node.type) : translated }}</h4>\n <span class=\"pw-node-inspector__id\">{{ node.id }} · {{ node.type }}</span>\n </div>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-link pw-node-inspector__remove\"\n data-testid=\"flow-node-remove\"\n [attr.aria-label]=\"'Flows.Inspector.RemoveNode' | transloco\"\n [pTooltip]=\"'Flows.Inspector.RemoveNode' | transloco\"\n appendTo=\"body\"\n (click)=\"remove.emit()\">\n <fa-icon [icon]=\"icons.delete\"></fa-icon>\n </button>\n }\n </header>\n\n @if (!definition) {\n <p class=\"pw-node-inspector__note\"\n data-testid=\"flow-node-unknown\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Inspector.UnknownType' | transloco }}\n </p>\n }\n\n @if (definition && definition.category !== 'trigger' && fieldSources) {\n <pw-flows-available-fields class=\"pw-node-inspector__field\"\n data-testid=\"flow-available-fields\"\n [inputId]=\"fieldId('available-fields')\"\n [sources]=\"fieldSources\" [firstRun]=\"firstRun\" [nodeType]=\"node.type\"\n [readOnly]=\"readOnly\"></pw-flows-available-fields>\n }\n\n @for (field of fields; track field.id) {\n @let id = field.id;\n @let paramKey = paramLabelKey(field.key);\n @let paramLabel = paramKey | transloco;\n @let helpKey = paramHelpKey(node.type, field.key);\n @let helpText = helpKey | transloco;\n @let help = field.description || (helpText === helpKey ? '' : helpText);\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"field.label || (paramLabel === paramKey ? field.key : paramLabel)\"\n [required]=\"!!field.required\"\n [name]=\"field.key\"\n [controlId]=\"id\"\n [showTooltip]=\"!!help\"\n [tooltipText]=\"help\">\n @switch (kindOf(field)) {\n @case ('textarea') {\n <textarea class=\"form-control\" rows=\"4\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, $event)\"></textarea>\n }\n @case ('cron') {\n <pw-flows-cron-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-cron-field>\n }\n @case ('timezone') {\n <pw-flows-timezone-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-timezone-field>\n }\n @case ('pairs') {\n <pw-flows-pairs-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-pairs-field>\n }\n @case ('json') {\n <pw-flows-json-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-json-field>\n }\n @case ('member') {\n <pw-flows-member-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-member-field>\n }\n @case ('members') {\n <pw-flows-member-field [inputId]=\"id\"\n [multiple]=\"true\"\n [value]=\"param(field.key)\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-member-field>\n }\n @case ('mode') {\n <p-select [inputId]=\"id\"\n [options]=\"mergeModes\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key) ?? defaultMergeMode\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event)\"></p-select>\n }\n @case ('list') {\n <p-select [inputId]=\"id\"\n [options]=\"listSuggestions\"\n [editable]=\"true\"\n [placeholder]=\"'Flows.Inspector.SelectList' | transloco\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event ?? undefined)\"></p-select>\n }\n @case ('select') {\n <p-select [inputId]=\"id\"\n [options]=\"field.options ?? []\"\n [placeholder]=\"field.placeholder ?? ''\"\n [showClear]=\"!field.required\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event ?? undefined)\"></p-select>\n }\n @case ('number') {\n <input class=\"form-control\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, numberValue($event))\" />\n }\n @default {\n <input class=\"form-control\" type=\"text\" autocomplete=\"off\"\n [attr.inputmode]=\"field.kind === 'email' ? 'email' : null\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, $event)\" />\n }\n }\n <pw-flows-unknown-fields [value]=\"param(field.key)\" [known]=\"fieldSuggestions\"></pw-flows-unknown-fields>\n </pw-input-container>\n }\n\n @if (definition?.condition) {\n @let conditionKey = paramHelpKey(node.type, 'condition');\n @let conditionText = conditionKey | transloco;\n @let conditionHelp = conditionText === conditionKey ? '' : conditionText;\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"'Flows.Inspector.Condition' | transloco\"\n name=\"condition\"\n [controlId]=\"fieldId('condition')\"\n [showTooltip]=\"!!conditionHelp\"\n [tooltipText]=\"conditionHelp\">\n <pw-flows-condition-field [inputId]=\"fieldId('condition')\"\n [value]=\"node.condition\"\n [suggestions]=\"fieldSuggestions\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setCondition($event)\"></pw-flows-condition-field>\n @if (conditionNotAnObject) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Inspector.ConditionNotAnObject' | transloco\">\n </pw-field-error-display>\n }\n </pw-input-container>\n }\n\n @if (definition?.category === 'action') {\n <div class=\"pw-node-inspector__field\"\n data-testid=\"flow-node-retry\">\n <pw-flows-retry-field [inputId]=\"fieldId('retry')\"\n [value]=\"node.retry\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setRetry($event)\"></pw-flows-retry-field>\n </div>\n }\n\n @if (definition && !fields.length && !definition.condition) {\n <p class=\"pw-node-inspector__note\">{{ 'Flows.Inspector.NoSettings' | transloco }}</p>\n }\n</aside>\n",
|
|
5531
|
+
styles: [".pw-node-inspector ::ng-deep .info-circle{display:inline-block;margin-left:.35em;vertical-align:baseline}.pw-node-inspector ::ng-deep .info-circle:after{position:static;font-size:inherit;line-height:inherit}.pw-node-inspector{display:flex;flex-direction:column;gap:16px;padding:16px}.pw-node-inspector__head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:12px;border-bottom:1px solid #e2e5ea}.pw-node-inspector__title{margin:0}.pw-node-inspector__id{color:#7c8696;font-size:12px;font-variant-numeric:tabular-nums}.pw-node-inspector__remove{color:#5a6473}.pw-node-inspector__field{display:block}.pw-node-inspector__note{margin:0;color:#5a6473;font-size:12px}\n"],
|
|
4286
5532
|
dependencies: [
|
|
4287
5533
|
{
|
|
4288
5534
|
kind: "directive",
|
|
@@ -4309,7 +5555,7 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4309
5555
|
},
|
|
4310
5556
|
{
|
|
4311
5557
|
kind: "directive",
|
|
4312
|
-
type:
|
|
5558
|
+
type: i1$1.Tooltip,
|
|
4313
5559
|
selector: "[pTooltip]",
|
|
4314
5560
|
inputs: [
|
|
4315
5561
|
"tooltipPosition",
|
|
@@ -4407,13 +5653,13 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4407
5653
|
},
|
|
4408
5654
|
{
|
|
4409
5655
|
kind: "component",
|
|
4410
|
-
type: i2.FieldErrorDisplayComponent,
|
|
5656
|
+
type: i2$1.FieldErrorDisplayComponent,
|
|
4411
5657
|
selector: "pw-field-error-display",
|
|
4412
5658
|
inputs: ["errorMsg", "displayError"]
|
|
4413
5659
|
},
|
|
4414
5660
|
{
|
|
4415
5661
|
kind: "component",
|
|
4416
|
-
type:
|
|
5662
|
+
type: i6$1.InputContainerComponent,
|
|
4417
5663
|
selector: "pw-input-container",
|
|
4418
5664
|
inputs: [
|
|
4419
5665
|
"name",
|
|
@@ -4436,7 +5682,7 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4436
5682
|
},
|
|
4437
5683
|
{
|
|
4438
5684
|
kind: "component",
|
|
4439
|
-
type:
|
|
5685
|
+
type: i2$3.FaIconComponent,
|
|
4440
5686
|
selector: "fa-icon",
|
|
4441
5687
|
inputs: [
|
|
4442
5688
|
"icon",
|
|
@@ -4540,9 +5786,38 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
|
|
|
4540
5786
|
],
|
|
4541
5787
|
outputs: ["valueChange"]
|
|
4542
5788
|
},
|
|
5789
|
+
{
|
|
5790
|
+
kind: "component",
|
|
5791
|
+
type: FlowsRetryFieldComponent,
|
|
5792
|
+
selector: "pw-flows-retry-field",
|
|
5793
|
+
inputs: [
|
|
5794
|
+
"value",
|
|
5795
|
+
"inputId",
|
|
5796
|
+
"readOnly"
|
|
5797
|
+
],
|
|
5798
|
+
outputs: ["valueChange"]
|
|
5799
|
+
},
|
|
5800
|
+
{
|
|
5801
|
+
kind: "component",
|
|
5802
|
+
type: FlowsAvailableFieldsComponent,
|
|
5803
|
+
selector: "pw-flows-available-fields",
|
|
5804
|
+
inputs: [
|
|
5805
|
+
"sources",
|
|
5806
|
+
"inputId",
|
|
5807
|
+
"readOnly",
|
|
5808
|
+
"firstRun",
|
|
5809
|
+
"nodeType"
|
|
5810
|
+
]
|
|
5811
|
+
},
|
|
5812
|
+
{
|
|
5813
|
+
kind: "component",
|
|
5814
|
+
type: FlowsUnknownFieldsComponent,
|
|
5815
|
+
selector: "pw-flows-unknown-fields",
|
|
5816
|
+
inputs: ["value", "known"]
|
|
5817
|
+
},
|
|
4543
5818
|
{
|
|
4544
5819
|
kind: "pipe",
|
|
4545
|
-
type:
|
|
5820
|
+
type: i2$4.TranslocoPipe,
|
|
4546
5821
|
name: "transloco"
|
|
4547
5822
|
}
|
|
4548
5823
|
]
|
|
@@ -4559,12 +5834,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4559
5834
|
args: [{
|
|
4560
5835
|
selector: "pw-flows-node-inspector",
|
|
4561
5836
|
standalone: false,
|
|
4562
|
-
template: "<aside class=\"pw-node-inspector\"\n data-testid=\"flow-inspector\">\n @let key = labelKey(node.type);\n @let translated = key | transloco;\n <header class=\"pw-node-inspector__head\">\n <div>\n <h4 class=\"pw-node-inspector__title\">{{ translated === key ? (definition?.label ?? node.type) : translated }}</h4>\n <span class=\"pw-node-inspector__id\">{{ node.id }} · {{ node.type }}</span>\n </div>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-link pw-node-inspector__remove\"\n data-testid=\"flow-node-remove\"\n [attr.aria-label]=\"'Flows.Inspector.RemoveNode' | transloco\"\n [pTooltip]=\"'Flows.Inspector.RemoveNode' | transloco\"\n appendTo=\"body\"\n (click)=\"remove.emit()\">\n <fa-icon [icon]=\"icons.delete\"></fa-icon>\n </button>\n }\n </header>\n\n @if (!definition) {\n <p class=\"pw-node-inspector__note\"\n data-testid=\"flow-node-unknown\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Inspector.UnknownType' | transloco }}\n </p>\n }\n\n @for (field of fields; track field.id) {\n @let id = field.id;\n @let paramKey = paramLabelKey(field.key);\n @let paramLabel = paramKey | transloco;\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"field.label || (paramLabel === paramKey ? field.key : paramLabel)\"\n [required]=\"!!field.required\"\n [name]=\"field.key\"\n [controlId]=\"id\">\n @switch (kindOf(field)) {\n @case ('textarea') {\n <textarea class=\"form-control\"
|
|
4563
|
-
styles: [".pw-node-inspector{display:flex;flex-direction:column;gap:16px;padding:16px}.pw-node-inspector__head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:12px;border-bottom:1px solid #e2e5ea}.pw-node-inspector__title{margin:0}.pw-node-inspector__id{color:#7c8696;font-size:12px;font-variant-numeric:tabular-nums}.pw-node-inspector__remove{color:#5a6473}.pw-node-inspector__field{display:block}.pw-node-inspector__note
|
|
5837
|
+
template: "<aside class=\"pw-node-inspector\"\n data-testid=\"flow-inspector\">\n @let key = labelKey(node.type);\n @let translated = key | transloco;\n <header class=\"pw-node-inspector__head\">\n <div>\n <h4 class=\"pw-node-inspector__title\">{{ translated === key ? (definition?.label ?? node.type) : translated }}</h4>\n <span class=\"pw-node-inspector__id\">{{ node.id }} · {{ node.type }}</span>\n </div>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-link pw-node-inspector__remove\"\n data-testid=\"flow-node-remove\"\n [attr.aria-label]=\"'Flows.Inspector.RemoveNode' | transloco\"\n [pTooltip]=\"'Flows.Inspector.RemoveNode' | transloco\"\n appendTo=\"body\"\n (click)=\"remove.emit()\">\n <fa-icon [icon]=\"icons.delete\"></fa-icon>\n </button>\n }\n </header>\n\n @if (!definition) {\n <p class=\"pw-node-inspector__note\"\n data-testid=\"flow-node-unknown\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Inspector.UnknownType' | transloco }}\n </p>\n }\n\n @if (definition && definition.category !== 'trigger' && fieldSources) {\n <pw-flows-available-fields class=\"pw-node-inspector__field\"\n data-testid=\"flow-available-fields\"\n [inputId]=\"fieldId('available-fields')\"\n [sources]=\"fieldSources\" [firstRun]=\"firstRun\" [nodeType]=\"node.type\"\n [readOnly]=\"readOnly\"></pw-flows-available-fields>\n }\n\n @for (field of fields; track field.id) {\n @let id = field.id;\n @let paramKey = paramLabelKey(field.key);\n @let paramLabel = paramKey | transloco;\n @let helpKey = paramHelpKey(node.type, field.key);\n @let helpText = helpKey | transloco;\n @let help = field.description || (helpText === helpKey ? '' : helpText);\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"field.label || (paramLabel === paramKey ? field.key : paramLabel)\"\n [required]=\"!!field.required\"\n [name]=\"field.key\"\n [controlId]=\"id\"\n [showTooltip]=\"!!help\"\n [tooltipText]=\"help\">\n @switch (kindOf(field)) {\n @case ('textarea') {\n <textarea class=\"form-control\" rows=\"4\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, $event)\"></textarea>\n }\n @case ('cron') {\n <pw-flows-cron-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-cron-field>\n }\n @case ('timezone') {\n <pw-flows-timezone-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-timezone-field>\n }\n @case ('pairs') {\n <pw-flows-pairs-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-pairs-field>\n }\n @case ('json') {\n <pw-flows-json-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-json-field>\n }\n @case ('member') {\n <pw-flows-member-field [inputId]=\"id\"\n [value]=\"param(field.key)\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-member-field>\n }\n @case ('members') {\n <pw-flows-member-field [inputId]=\"id\"\n [multiple]=\"true\"\n [value]=\"param(field.key)\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setParam(field.key, $event)\"></pw-flows-member-field>\n }\n @case ('mode') {\n <p-select [inputId]=\"id\"\n [options]=\"mergeModes\"\n optionLabel=\"label\"\n optionValue=\"value\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key) ?? defaultMergeMode\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event)\"></p-select>\n }\n @case ('list') {\n <p-select [inputId]=\"id\"\n [options]=\"listSuggestions\"\n [editable]=\"true\"\n [placeholder]=\"'Flows.Inspector.SelectList' | transloco\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event ?? undefined)\"></p-select>\n }\n @case ('select') {\n <p-select [inputId]=\"id\"\n [options]=\"field.options ?? []\"\n [placeholder]=\"field.placeholder ?? ''\"\n [showClear]=\"!field.required\"\n appendTo=\"body\"\n styleClass=\"w-100\"\n [disabled]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setParam(field.key, $event ?? undefined)\"></p-select>\n }\n @case ('number') {\n <input class=\"form-control\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, numberValue($event))\" />\n }\n @default {\n <input class=\"form-control\" type=\"text\" autocomplete=\"off\"\n [attr.inputmode]=\"field.kind === 'email' ? 'email' : null\"\n [id]=\"id\"\n [placeholder]=\"field.placeholder ?? ''\"\n [readOnly]=\"readOnly\"\n [ngModel]=\"param(field.key)\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'blur' }\"\n (ngModelChange)=\"setParam(field.key, $event)\" />\n }\n }\n <pw-flows-unknown-fields [value]=\"param(field.key)\" [known]=\"fieldSuggestions\"></pw-flows-unknown-fields>\n </pw-input-container>\n }\n\n @if (definition?.condition) {\n @let conditionKey = paramHelpKey(node.type, 'condition');\n @let conditionText = conditionKey | transloco;\n @let conditionHelp = conditionText === conditionKey ? '' : conditionText;\n <pw-input-container class=\"pw-node-inspector__field\"\n [label]=\"'Flows.Inspector.Condition' | transloco\"\n name=\"condition\"\n [controlId]=\"fieldId('condition')\"\n [showTooltip]=\"!!conditionHelp\"\n [tooltipText]=\"conditionHelp\">\n <pw-flows-condition-field [inputId]=\"fieldId('condition')\"\n [value]=\"node.condition\"\n [suggestions]=\"fieldSuggestions\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setCondition($event)\"></pw-flows-condition-field>\n @if (conditionNotAnObject) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Inspector.ConditionNotAnObject' | transloco\">\n </pw-field-error-display>\n }\n </pw-input-container>\n }\n\n @if (definition?.category === 'action') {\n <div class=\"pw-node-inspector__field\"\n data-testid=\"flow-node-retry\">\n <pw-flows-retry-field [inputId]=\"fieldId('retry')\"\n [value]=\"node.retry\"\n [readOnly]=\"readOnly\"\n (valueChange)=\"setRetry($event)\"></pw-flows-retry-field>\n </div>\n }\n\n @if (definition && !fields.length && !definition.condition) {\n <p class=\"pw-node-inspector__note\">{{ 'Flows.Inspector.NoSettings' | transloco }}</p>\n }\n</aside>\n",
|
|
5838
|
+
styles: [".pw-node-inspector ::ng-deep .info-circle{display:inline-block;margin-left:.35em;vertical-align:baseline}.pw-node-inspector ::ng-deep .info-circle:after{position:static;font-size:inherit;line-height:inherit}.pw-node-inspector{display:flex;flex-direction:column;gap:16px;padding:16px}.pw-node-inspector__head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-bottom:12px;border-bottom:1px solid #e2e5ea}.pw-node-inspector__title{margin:0}.pw-node-inspector__id{color:#7c8696;font-size:12px;font-variant-numeric:tabular-nums}.pw-node-inspector__remove{color:#5a6473}.pw-node-inspector__field{display:block}.pw-node-inspector__note{margin:0;color:#5a6473;font-size:12px}\n"]
|
|
4564
5839
|
}]
|
|
4565
5840
|
}],
|
|
4566
5841
|
ctorParameters: () => [
|
|
4567
|
-
{ type:
|
|
5842
|
+
{ type: i2$4.TranslocoService },
|
|
4568
5843
|
{ type: i0.ChangeDetectorRef },
|
|
4569
5844
|
{ type: i0.DestroyRef },
|
|
4570
5845
|
{ type: i0.ElementRef }
|
|
@@ -4576,18 +5851,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4576
5851
|
readOnly: [{ type: Input }],
|
|
4577
5852
|
fieldSuggestions: [{ type: Input }],
|
|
4578
5853
|
listSuggestions: [{ type: Input }],
|
|
5854
|
+
fieldSources: [{ type: Input }],
|
|
5855
|
+
firstRun: [{ type: Input }],
|
|
4579
5856
|
nodeChange: [{ type: Output }],
|
|
4580
5857
|
remove: [{ type: Output }]
|
|
4581
5858
|
}
|
|
4582
5859
|
});
|
|
4583
5860
|
var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
4584
|
-
constructor(workflowService, nodeService, cdr) {
|
|
5861
|
+
constructor(workflowService, nodeService, runService, cdr) {
|
|
4585
5862
|
this.workflowService = workflowService;
|
|
4586
5863
|
this.nodeService = nodeService;
|
|
5864
|
+
this.runService = runService;
|
|
4587
5865
|
this.cdr = cdr;
|
|
4588
5866
|
this.destroy$ = new Subject();
|
|
4589
5867
|
this.version = null;
|
|
4590
5868
|
this.duplicateOf = null;
|
|
5869
|
+
this.check = null;
|
|
4591
5870
|
this.saved = new EventEmitter();
|
|
4592
5871
|
this.cancelled = new EventEmitter();
|
|
4593
5872
|
this.icons = FLOWS_ICONS;
|
|
@@ -4608,6 +5887,7 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4608
5887
|
return flowVersionEditorTitleKey(this.version, this.duplicateOf);
|
|
4609
5888
|
}
|
|
4610
5889
|
ngOnInit() {
|
|
5890
|
+
this.workflowFields$ = this.runService.getWorkflowFields(this.workflowId, this.subscriptionId).pipe(shareReplay(1));
|
|
4611
5891
|
this.nodeService.getNodes(this.subscriptionId).pipe(finalize(() => {
|
|
4612
5892
|
this.loading = false;
|
|
4613
5893
|
this.cdr.markForCheck();
|
|
@@ -4670,6 +5950,7 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4670
5950
|
deps: [
|
|
4671
5951
|
{ token: FlowsWorkflowService },
|
|
4672
5952
|
{ token: FlowsNodeService },
|
|
5953
|
+
{ token: FlowsRunService },
|
|
4673
5954
|
{ token: i0.ChangeDetectorRef }
|
|
4674
5955
|
],
|
|
4675
5956
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -4686,7 +5967,8 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4686
5967
|
version: "version",
|
|
4687
5968
|
duplicateOf: "duplicateOf",
|
|
4688
5969
|
workflowId: "workflowId",
|
|
4689
|
-
subscriptionId: "subscriptionId"
|
|
5970
|
+
subscriptionId: "subscriptionId",
|
|
5971
|
+
check: "check"
|
|
4690
5972
|
},
|
|
4691
5973
|
outputs: {
|
|
4692
5974
|
saved: "saved",
|
|
@@ -4700,12 +5982,12 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4700
5982
|
}],
|
|
4701
5983
|
usesOnChanges: true,
|
|
4702
5984
|
ngImport: i0,
|
|
4703
|
-
template: "<div class=\"pw-version-editor mt-3\">\n <h3>{{ headingKey | transloco: { number: duplicateOf?.version } }}</h3>\n\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Canvas.LoadFailed' | transloco\">\n </pw-field-error-display>\n } @else {\n <div class=\"pw-version-editor__toolbar\">\n <div class=\"btn-group\"\n role=\"tablist\">\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-canvas\"\n [class.active]=\"view === 'canvas'\"\n [attr.aria-selected]=\"view === 'canvas'\"\n (click)=\"show('canvas')\">\n <fa-icon [icon]=\"icons.diagram\"></fa-icon>\n {{ 'Flows.Canvas.Diagram' | transloco }}\n </button>\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-json\"\n [class.active]=\"view === 'json'\"\n [attr.aria-selected]=\"view === 'json'\"\n (click)=\"show('json')\">\n <fa-icon [icon]=\"icons.json\"></fa-icon>\n {{ 'Flows.Canvas.Json' | transloco }}\n </button>\n </div>\n @if (view === 'canvas') {\n <button type=\"button\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-fit\"\n (click)=\"canvas.zoomToFit()\">\n <fa-icon [icon]=\"icons.fit\"></fa-icon>\n {{ 'Flows.Canvas.Fit' | transloco }}\n </button>\n }\n </div>\n\n @if (dropped.length) {\n <p class=\"pw-version-editor__warning\"\n role=\"alert\"\n data-testid=\"flow-dropped-edges\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Canvas.Dropped' | transloco: { count: dropped.length } }}\n </p>\n }\n\n <div class=\"pw-version-editor__workspace\"\n [class.is-read-only]=\"readOnly\"\n [hidden]=\"view !== 'canvas'\">\n @if (!readOnly) {\n <pw-flows-node-palette class=\"pw-version-editor__palette\"\n [definitions]=\"definitions\"\n (add)=\"canvas.addNode($event)\"></pw-flows-node-palette>\n }\n <pw-flows-graph-canvas #canvas\n class=\"pw-version-editor__canvas\"\n [graph]=\"graph\"\n [definitions]=\"definitions\"\n [readOnly]=\"readOnly\"\n (selectionChange)=\"select($event)\"\n (dropped)=\"dropped = $event\"></pw-flows-graph-canvas>\n <div class=\"pw-version-editor__side\">\n @if (selection) {\n <pw-flows-node-inspector [node]=\"selection.node\"\n [definition]=\"selection.definition\"\n [fieldSuggestions]=\"selection.fieldSuggestions\"\n [listSuggestions]=\"selection.listSuggestions\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (nodeChange)=\"updateSelected($event)\"\n (remove)=\"removeSelected()\"></pw-flows-node-inspector>\n } @else {\n <p class=\"pw-version-editor__hint\">{{ (readOnly ? 'Flows.Canvas.SelectToView' : 'Flows.Canvas.SelectToEdit') | transloco }}</p>\n }\n </div>\n </div>\n\n @if (view === 'json') {\n <pre class=\"pw-version-editor__json\"\n data-testid=\"flow-json\">{{ json }}</pre>\n }\n }\n }\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"cancel()\">\n {{ (readOnly ? 'Flows.Versions.Editor.Close' : 'Button.Cancel') | transloco }}\n </button>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"saving || loading || loadFailed\"\n (click)=\"save()\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n</div>\n",
|
|
4704
|
-
styles: [":host .pw-version-editor>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}.pw-version-editor__toolbar{display:flex;align-items:center;
|
|
5985
|
+
template: "<div class=\"pw-version-editor mt-3\">\n <h3>{{ headingKey | transloco: { number: duplicateOf?.version } }}</h3>\n\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Canvas.LoadFailed' | transloco\">\n </pw-field-error-display>\n } @else {\n <div class=\"pw-version-editor__toolbar\">\n <!-- The raw graph is for support work; members build on the diagram. -->\n <div class=\"btn-group me-auto\"\n *rbacAllow=\"'SuperAdmin'\"\n role=\"tablist\">\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-canvas\"\n [class.active]=\"view === 'canvas'\"\n [attr.aria-selected]=\"view === 'canvas'\"\n (click)=\"show('canvas')\">\n <fa-icon [icon]=\"icons.diagram\"></fa-icon>\n {{ 'Flows.Canvas.Diagram' | transloco }}\n </button>\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-json\"\n [class.active]=\"view === 'json'\"\n [attr.aria-selected]=\"view === 'json'\"\n (click)=\"show('json')\">\n <fa-icon [icon]=\"icons.json\"></fa-icon>\n {{ 'Flows.Canvas.Json' | transloco }}\n </button>\n </div>\n @if (view === 'canvas') {\n <button type=\"button\"\n class=\"btn btn-outline-default btn-sm ms-auto\"\n data-testid=\"flow-fit\"\n (click)=\"canvas.zoomToFit()\">\n <fa-icon [icon]=\"icons.fit\"></fa-icon>\n {{ 'Flows.Canvas.Fit' | transloco }}\n </button>\n }\n </div>\n\n @if (check && !readOnly) {\n <pw-flows-graph-check [canvas]=\"canvas\"\n [definitions]=\"definitions\"\n [graph]=\"graph\"\n [result]=\"check\"></pw-flows-graph-check>\n }\n\n @if (dropped.length) {\n <p class=\"pw-version-editor__warning\"\n role=\"alert\"\n data-testid=\"flow-dropped-edges\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Canvas.Dropped' | transloco: { count: dropped.length } }}\n </p>\n }\n\n @let fields = workflowFields$ | async;\n <div class=\"pw-version-editor__workspace\"\n [class.is-read-only]=\"readOnly\"\n [hidden]=\"view !== 'canvas'\">\n @if (!readOnly) {\n <pw-flows-node-palette class=\"pw-version-editor__palette\"\n [definitions]=\"definitions\"\n (add)=\"canvas.addNode($event)\"></pw-flows-node-palette>\n }\n <pw-flows-graph-canvas #canvas\n class=\"pw-version-editor__canvas\"\n [graph]=\"graph\"\n [definitions]=\"definitions\"\n [workflowFields]=\"fields\"\n [readOnly]=\"readOnly\"\n (selectionChange)=\"select($event)\"\n (dropped)=\"dropped = $event\"></pw-flows-graph-canvas>\n <div class=\"pw-version-editor__side\">\n @if (selection) {\n <pw-flows-node-inspector [node]=\"selection.node\"\n [definition]=\"selection.definition\"\n [fieldSuggestions]=\"selection.fieldSuggestions\"\n [fieldSources]=\"selection.fieldSources\"\n [listSuggestions]=\"selection.listSuggestions\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n [firstRun]=\"!!fields && !fields.ran\"\n (nodeChange)=\"updateSelected($event)\"\n (remove)=\"removeSelected()\"></pw-flows-node-inspector>\n } @else {\n <p class=\"pw-version-editor__hint\">{{ (readOnly ? 'Flows.Canvas.SelectToView' : 'Flows.Canvas.SelectToEdit') | transloco }}</p>\n }\n </div>\n </div>\n\n @if (view === 'json') {\n <pre class=\"pw-version-editor__json\"\n data-testid=\"flow-json\">{{ json }}</pre>\n }\n }\n }\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"cancel()\">\n {{ (readOnly ? 'Flows.Versions.Editor.Close' : 'Button.Cancel') | transloco }}\n </button>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"saving || loading || loadFailed\"\n (click)=\"save()\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n</div>\n",
|
|
5986
|
+
styles: [":host .pw-version-editor>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}.pw-version-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}.pw-version-editor__warning{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #b7791f;border-radius:4px;color:#b7791f}.pw-version-editor__workspace{display:grid;grid-template-columns:200px minmax(0,1fr) 300px;height:560px;border:1px solid #e2e5ea;border-radius:8px;overflow:hidden}.pw-version-editor__workspace.is-read-only{grid-template-columns:minmax(0,1fr) 300px}.pw-version-editor__palette,.pw-version-editor__side{overflow-y:auto;background:#fff}.pw-version-editor__palette{border-right:1px solid #e2e5ea}.pw-version-editor__side{border-left:1px solid #e2e5ea}.pw-version-editor__hint{margin:0;padding:16px;color:#7c8696}.pw-version-editor__json{max-height:560px;margin:0;padding:12px;overflow:auto;border:1px solid #e2e5ea;border-radius:8px;background:#f7f8fa}@media(max-width:991px){.pw-version-editor__workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 420px auto;height:auto}.pw-version-editor__workspace.is-read-only{grid-template-columns:minmax(0,1fr);grid-template-rows:420px auto}.pw-version-editor__palette{max-height:200px;border-right:0;border-bottom:1px solid #e2e5ea}.pw-version-editor__side{border-left:0;border-top:1px solid #e2e5ea}}\n"],
|
|
4705
5987
|
dependencies: [
|
|
4706
5988
|
{
|
|
4707
5989
|
kind: "component",
|
|
4708
|
-
type:
|
|
5990
|
+
type: i4$1.AppLoaderComponent,
|
|
4709
5991
|
selector: "pw-loader",
|
|
4710
5992
|
inputs: [
|
|
4711
5993
|
"isVisible",
|
|
@@ -4715,13 +5997,19 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4715
5997
|
},
|
|
4716
5998
|
{
|
|
4717
5999
|
kind: "component",
|
|
4718
|
-
type: i2.FieldErrorDisplayComponent,
|
|
6000
|
+
type: i2$1.FieldErrorDisplayComponent,
|
|
4719
6001
|
selector: "pw-field-error-display",
|
|
4720
6002
|
inputs: ["errorMsg", "displayError"]
|
|
4721
6003
|
},
|
|
6004
|
+
{
|
|
6005
|
+
kind: "directive",
|
|
6006
|
+
type: i6.RbacAllowDirective,
|
|
6007
|
+
selector: "[rbacAllow]",
|
|
6008
|
+
inputs: ["rbacAllow"]
|
|
6009
|
+
},
|
|
4722
6010
|
{
|
|
4723
6011
|
kind: "component",
|
|
4724
|
-
type:
|
|
6012
|
+
type: i2$3.FaIconComponent,
|
|
4725
6013
|
selector: "fa-icon",
|
|
4726
6014
|
inputs: [
|
|
4727
6015
|
"icon",
|
|
@@ -4756,6 +6044,17 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4756
6044
|
"a11yRoleChange"
|
|
4757
6045
|
]
|
|
4758
6046
|
},
|
|
6047
|
+
{
|
|
6048
|
+
kind: "component",
|
|
6049
|
+
type: FlowsGraphCheckComponent,
|
|
6050
|
+
selector: "pw-flows-graph-check",
|
|
6051
|
+
inputs: [
|
|
6052
|
+
"canvas",
|
|
6053
|
+
"definitions",
|
|
6054
|
+
"graph",
|
|
6055
|
+
"result"
|
|
6056
|
+
]
|
|
6057
|
+
},
|
|
4759
6058
|
{
|
|
4760
6059
|
kind: "component",
|
|
4761
6060
|
type: FlowsGraphCanvasComponent,
|
|
@@ -4763,6 +6062,7 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4763
6062
|
inputs: [
|
|
4764
6063
|
"graph",
|
|
4765
6064
|
"definitions",
|
|
6065
|
+
"workflowFields",
|
|
4766
6066
|
"readOnly"
|
|
4767
6067
|
],
|
|
4768
6068
|
outputs: [
|
|
@@ -4788,13 +6088,20 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
|
|
|
4788
6088
|
"subscriptionId",
|
|
4789
6089
|
"readOnly",
|
|
4790
6090
|
"fieldSuggestions",
|
|
4791
|
-
"listSuggestions"
|
|
6091
|
+
"listSuggestions",
|
|
6092
|
+
"fieldSources",
|
|
6093
|
+
"firstRun"
|
|
4792
6094
|
],
|
|
4793
6095
|
outputs: ["nodeChange", "remove"]
|
|
4794
6096
|
},
|
|
4795
6097
|
{
|
|
4796
6098
|
kind: "pipe",
|
|
4797
|
-
type:
|
|
6099
|
+
type: i1$2.AsyncPipe,
|
|
6100
|
+
name: "async"
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
kind: "pipe",
|
|
6104
|
+
type: i2$4.TranslocoPipe,
|
|
4798
6105
|
name: "transloco"
|
|
4799
6106
|
}
|
|
4800
6107
|
]
|
|
@@ -4811,13 +6118,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4811
6118
|
args: [{
|
|
4812
6119
|
selector: "pw-flows-version-editor",
|
|
4813
6120
|
standalone: false,
|
|
4814
|
-
template: "<div class=\"pw-version-editor mt-3\">\n <h3>{{ headingKey | transloco: { number: duplicateOf?.version } }}</h3>\n\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Canvas.LoadFailed' | transloco\">\n </pw-field-error-display>\n } @else {\n <div class=\"pw-version-editor__toolbar\">\n <div class=\"btn-group\"\n role=\"tablist\">\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-canvas\"\n [class.active]=\"view === 'canvas'\"\n [attr.aria-selected]=\"view === 'canvas'\"\n (click)=\"show('canvas')\">\n <fa-icon [icon]=\"icons.diagram\"></fa-icon>\n {{ 'Flows.Canvas.Diagram' | transloco }}\n </button>\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-json\"\n [class.active]=\"view === 'json'\"\n [attr.aria-selected]=\"view === 'json'\"\n (click)=\"show('json')\">\n <fa-icon [icon]=\"icons.json\"></fa-icon>\n {{ 'Flows.Canvas.Json' | transloco }}\n </button>\n </div>\n @if (view === 'canvas') {\n <button type=\"button\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-fit\"\n (click)=\"canvas.zoomToFit()\">\n <fa-icon [icon]=\"icons.fit\"></fa-icon>\n {{ 'Flows.Canvas.Fit' | transloco }}\n </button>\n }\n </div>\n\n @if (dropped.length) {\n <p class=\"pw-version-editor__warning\"\n role=\"alert\"\n data-testid=\"flow-dropped-edges\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Canvas.Dropped' | transloco: { count: dropped.length } }}\n </p>\n }\n\n <div class=\"pw-version-editor__workspace\"\n [class.is-read-only]=\"readOnly\"\n [hidden]=\"view !== 'canvas'\">\n @if (!readOnly) {\n <pw-flows-node-palette class=\"pw-version-editor__palette\"\n [definitions]=\"definitions\"\n (add)=\"canvas.addNode($event)\"></pw-flows-node-palette>\n }\n <pw-flows-graph-canvas #canvas\n class=\"pw-version-editor__canvas\"\n [graph]=\"graph\"\n [definitions]=\"definitions\"\n [readOnly]=\"readOnly\"\n (selectionChange)=\"select($event)\"\n (dropped)=\"dropped = $event\"></pw-flows-graph-canvas>\n <div class=\"pw-version-editor__side\">\n @if (selection) {\n <pw-flows-node-inspector [node]=\"selection.node\"\n [definition]=\"selection.definition\"\n [fieldSuggestions]=\"selection.fieldSuggestions\"\n [listSuggestions]=\"selection.listSuggestions\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n (nodeChange)=\"updateSelected($event)\"\n (remove)=\"removeSelected()\"></pw-flows-node-inspector>\n } @else {\n <p class=\"pw-version-editor__hint\">{{ (readOnly ? 'Flows.Canvas.SelectToView' : 'Flows.Canvas.SelectToEdit') | transloco }}</p>\n }\n </div>\n </div>\n\n @if (view === 'json') {\n <pre class=\"pw-version-editor__json\"\n data-testid=\"flow-json\">{{ json }}</pre>\n }\n }\n }\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"cancel()\">\n {{ (readOnly ? 'Flows.Versions.Editor.Close' : 'Button.Cancel') | transloco }}\n </button>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"saving || loading || loadFailed\"\n (click)=\"save()\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n</div>\n",
|
|
4815
|
-
styles: [":host .pw-version-editor>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}.pw-version-editor__toolbar{display:flex;align-items:center;
|
|
6121
|
+
template: "<div class=\"pw-version-editor mt-3\">\n <h3>{{ headingKey | transloco: { number: duplicateOf?.version } }}</h3>\n\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-field-error-display [displayError]=\"true\"\n [errorMsg]=\"'Flows.Canvas.LoadFailed' | transloco\">\n </pw-field-error-display>\n } @else {\n <div class=\"pw-version-editor__toolbar\">\n <!-- The raw graph is for support work; members build on the diagram. -->\n <div class=\"btn-group me-auto\"\n *rbacAllow=\"'SuperAdmin'\"\n role=\"tablist\">\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-canvas\"\n [class.active]=\"view === 'canvas'\"\n [attr.aria-selected]=\"view === 'canvas'\"\n (click)=\"show('canvas')\">\n <fa-icon [icon]=\"icons.diagram\"></fa-icon>\n {{ 'Flows.Canvas.Diagram' | transloco }}\n </button>\n <button type=\"button\"\n role=\"tab\"\n class=\"btn btn-outline-default btn-sm\"\n data-testid=\"flow-view-json\"\n [class.active]=\"view === 'json'\"\n [attr.aria-selected]=\"view === 'json'\"\n (click)=\"show('json')\">\n <fa-icon [icon]=\"icons.json\"></fa-icon>\n {{ 'Flows.Canvas.Json' | transloco }}\n </button>\n </div>\n @if (view === 'canvas') {\n <button type=\"button\"\n class=\"btn btn-outline-default btn-sm ms-auto\"\n data-testid=\"flow-fit\"\n (click)=\"canvas.zoomToFit()\">\n <fa-icon [icon]=\"icons.fit\"></fa-icon>\n {{ 'Flows.Canvas.Fit' | transloco }}\n </button>\n }\n </div>\n\n @if (check && !readOnly) {\n <pw-flows-graph-check [canvas]=\"canvas\"\n [definitions]=\"definitions\"\n [graph]=\"graph\"\n [result]=\"check\"></pw-flows-graph-check>\n }\n\n @if (dropped.length) {\n <p class=\"pw-version-editor__warning\"\n role=\"alert\"\n data-testid=\"flow-dropped-edges\">\n <fa-icon [icon]=\"icons.warning\"></fa-icon>\n {{ 'Flows.Canvas.Dropped' | transloco: { count: dropped.length } }}\n </p>\n }\n\n @let fields = workflowFields$ | async;\n <div class=\"pw-version-editor__workspace\"\n [class.is-read-only]=\"readOnly\"\n [hidden]=\"view !== 'canvas'\">\n @if (!readOnly) {\n <pw-flows-node-palette class=\"pw-version-editor__palette\"\n [definitions]=\"definitions\"\n (add)=\"canvas.addNode($event)\"></pw-flows-node-palette>\n }\n <pw-flows-graph-canvas #canvas\n class=\"pw-version-editor__canvas\"\n [graph]=\"graph\"\n [definitions]=\"definitions\"\n [workflowFields]=\"fields\"\n [readOnly]=\"readOnly\"\n (selectionChange)=\"select($event)\"\n (dropped)=\"dropped = $event\"></pw-flows-graph-canvas>\n <div class=\"pw-version-editor__side\">\n @if (selection) {\n <pw-flows-node-inspector [node]=\"selection.node\"\n [definition]=\"selection.definition\"\n [fieldSuggestions]=\"selection.fieldSuggestions\"\n [fieldSources]=\"selection.fieldSources\"\n [listSuggestions]=\"selection.listSuggestions\"\n [subscriptionId]=\"subscriptionId\"\n [readOnly]=\"readOnly\"\n [firstRun]=\"!!fields && !fields.ran\"\n (nodeChange)=\"updateSelected($event)\"\n (remove)=\"removeSelected()\"></pw-flows-node-inspector>\n } @else {\n <p class=\"pw-version-editor__hint\">{{ (readOnly ? 'Flows.Canvas.SelectToView' : 'Flows.Canvas.SelectToEdit') | transloco }}</p>\n }\n </div>\n </div>\n\n @if (view === 'json') {\n <pre class=\"pw-version-editor__json\"\n data-testid=\"flow-json\">{{ json }}</pre>\n }\n }\n }\n\n <div class=\"mb-3 col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"cancel()\">\n {{ (readOnly ? 'Flows.Versions.Editor.Close' : 'Button.Cancel') | transloco }}\n </button>\n @if (!readOnly) {\n <button type=\"button\"\n class=\"btn btn-primary\"\n [disabled]=\"saving || loading || loadFailed\"\n (click)=\"save()\">\n {{ 'Button.Submit' | transloco }}\n </button>\n }\n </div>\n</div>\n",
|
|
6122
|
+
styles: [":host .pw-version-editor>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}.pw-version-editor__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:8px}.pw-version-editor__warning{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #b7791f;border-radius:4px;color:#b7791f}.pw-version-editor__workspace{display:grid;grid-template-columns:200px minmax(0,1fr) 300px;height:560px;border:1px solid #e2e5ea;border-radius:8px;overflow:hidden}.pw-version-editor__workspace.is-read-only{grid-template-columns:minmax(0,1fr) 300px}.pw-version-editor__palette,.pw-version-editor__side{overflow-y:auto;background:#fff}.pw-version-editor__palette{border-right:1px solid #e2e5ea}.pw-version-editor__side{border-left:1px solid #e2e5ea}.pw-version-editor__hint{margin:0;padding:16px;color:#7c8696}.pw-version-editor__json{max-height:560px;margin:0;padding:12px;overflow:auto;border:1px solid #e2e5ea;border-radius:8px;background:#f7f8fa}@media(max-width:991px){.pw-version-editor__workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 420px auto;height:auto}.pw-version-editor__workspace.is-read-only{grid-template-columns:minmax(0,1fr);grid-template-rows:420px auto}.pw-version-editor__palette{max-height:200px;border-right:0;border-bottom:1px solid #e2e5ea}.pw-version-editor__side{border-left:0;border-top:1px solid #e2e5ea}}\n"]
|
|
4816
6123
|
}]
|
|
4817
6124
|
}],
|
|
4818
6125
|
ctorParameters: () => [
|
|
4819
6126
|
{ type: FlowsWorkflowService },
|
|
4820
6127
|
{ type: FlowsNodeService },
|
|
6128
|
+
{ type: FlowsRunService },
|
|
4821
6129
|
{ type: i0.ChangeDetectorRef }
|
|
4822
6130
|
],
|
|
4823
6131
|
propDecorators: {
|
|
@@ -4825,6 +6133,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4825
6133
|
duplicateOf: [{ type: Input }],
|
|
4826
6134
|
workflowId: [{ type: Input }],
|
|
4827
6135
|
subscriptionId: [{ type: Input }],
|
|
6136
|
+
check: [{ type: Input }],
|
|
4828
6137
|
saved: [{ type: Output }],
|
|
4829
6138
|
cancelled: [{ type: Output }],
|
|
4830
6139
|
canvas: [{
|
|
@@ -4842,13 +6151,11 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4842
6151
|
this.loading = true;
|
|
4843
6152
|
this.publishing = false;
|
|
4844
6153
|
this.notFound = false;
|
|
4845
|
-
this.
|
|
6154
|
+
this.workflow = null;
|
|
4846
6155
|
this.versions = [];
|
|
4847
6156
|
this.totalRecords = 0;
|
|
4848
|
-
this.
|
|
4849
|
-
this.
|
|
4850
|
-
this.editorDuplicateOf = null;
|
|
4851
|
-
this.requestedVersionId = null;
|
|
6157
|
+
this.editor = new FlowVersionEditorState();
|
|
6158
|
+
this.arrived = false;
|
|
4852
6159
|
this.icons = FLOWS_ICONS;
|
|
4853
6160
|
this.isPublished = isFlowVersionPublished;
|
|
4854
6161
|
this.badgeClass = flowVersionBadgeClass;
|
|
@@ -4862,7 +6169,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4862
6169
|
return;
|
|
4863
6170
|
}
|
|
4864
6171
|
this.workflowId = Number(id);
|
|
4865
|
-
this.
|
|
6172
|
+
this.arrived = false;
|
|
4866
6173
|
this.subscriptionId = subscriptionId;
|
|
4867
6174
|
this.loadWorkflow();
|
|
4868
6175
|
this.load();
|
|
@@ -4874,47 +6181,44 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4874
6181
|
this.destroy$.complete();
|
|
4875
6182
|
}
|
|
4876
6183
|
openEditor(version = null, duplicateOf = null) {
|
|
4877
|
-
this.
|
|
4878
|
-
this.editorDuplicateOf = duplicateOf;
|
|
4879
|
-
this.editorOpen = true;
|
|
6184
|
+
this.editor.show(version, duplicateOf);
|
|
4880
6185
|
}
|
|
4881
6186
|
duplicate(version) {
|
|
4882
6187
|
this.openEditor(null, version);
|
|
4883
6188
|
}
|
|
4884
|
-
closeEditor() {
|
|
4885
|
-
this.editorOpen = false;
|
|
4886
|
-
this.editorVersion = null;
|
|
4887
|
-
this.editorDuplicateOf = null;
|
|
4888
|
-
}
|
|
4889
6189
|
onVersionSaved() {
|
|
4890
|
-
this.
|
|
6190
|
+
this.editor.close();
|
|
4891
6191
|
this.load();
|
|
4892
6192
|
}
|
|
4893
6193
|
publish(version) {
|
|
4894
6194
|
if (this.publishing) return;
|
|
4895
6195
|
this.publishing = true;
|
|
4896
|
-
this.workflowService.
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
error: () => {
|
|
4903
|
-
this.publishing = false;
|
|
4904
|
-
this.cdr.markForCheck();
|
|
4905
|
-
}
|
|
6196
|
+
this.workflowService.publishChecked(this.workflowId, version, this.subscriptionId).pipe(finalize(() => {
|
|
6197
|
+
this.publishing = false;
|
|
6198
|
+
this.cdr.markForCheck();
|
|
6199
|
+
}), takeUntil(this.destroy$)).subscribe({
|
|
6200
|
+
next: (outcome) => this.publishOutcome(version, outcome),
|
|
6201
|
+
error: () => null
|
|
4906
6202
|
});
|
|
4907
6203
|
}
|
|
6204
|
+
publishOutcome(version, outcome) {
|
|
6205
|
+
if ("valid" in outcome) this.editor.show(version, null, outcome);
|
|
6206
|
+
else {
|
|
6207
|
+
this.editor.published(outcome);
|
|
6208
|
+
this.load();
|
|
6209
|
+
this.status?.offerTurnOn(outcome.version);
|
|
6210
|
+
}
|
|
6211
|
+
}
|
|
4908
6212
|
back() {
|
|
4909
6213
|
this.router.navigate(["workflows"], { relativeTo: this.route.parent });
|
|
4910
6214
|
}
|
|
4911
6215
|
loadWorkflow() {
|
|
4912
6216
|
this.workflowService.getWorkflow(this.workflowId, this.subscriptionId).pipe(takeUntil(this.destroy$)).subscribe({
|
|
4913
6217
|
next: (workflow) => {
|
|
4914
|
-
this.
|
|
6218
|
+
this.workflow = workflow;
|
|
4915
6219
|
this.cdr.markForCheck();
|
|
4916
6220
|
},
|
|
4917
|
-
error: () =>
|
|
6221
|
+
error: () => null
|
|
4918
6222
|
});
|
|
4919
6223
|
}
|
|
4920
6224
|
load() {
|
|
@@ -4923,7 +6227,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4923
6227
|
this.versions = response.flow_versions ?? [];
|
|
4924
6228
|
this.totalRecords = response.object_count ?? 0;
|
|
4925
6229
|
this.notFound = false;
|
|
4926
|
-
this.
|
|
6230
|
+
this.openOnArrival();
|
|
4927
6231
|
this.settle();
|
|
4928
6232
|
},
|
|
4929
6233
|
error: () => {
|
|
@@ -4933,10 +6237,12 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4933
6237
|
}
|
|
4934
6238
|
});
|
|
4935
6239
|
}
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
6240
|
+
openOnArrival() {
|
|
6241
|
+
if (!this.arrived) {
|
|
6242
|
+
this.arrived = true;
|
|
6243
|
+
const requested = Number(this.route.snapshot.queryParamMap.get("version")) || null;
|
|
6244
|
+
this.openEditor(flowVersionOnArrival(this.versions, requested));
|
|
6245
|
+
}
|
|
4940
6246
|
}
|
|
4941
6247
|
settle() {
|
|
4942
6248
|
this.loading = false;
|
|
@@ -4964,14 +6270,20 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4964
6270
|
type: FlowsWorkflowVersionsComponent,
|
|
4965
6271
|
isStandalone: false,
|
|
4966
6272
|
selector: "pw-flows-workflow-versions",
|
|
6273
|
+
viewQueries: [{
|
|
6274
|
+
propertyName: "status",
|
|
6275
|
+
first: true,
|
|
6276
|
+
predicate: FlowsWorkflowStatusComponent,
|
|
6277
|
+
descendants: true
|
|
6278
|
+
}],
|
|
4967
6279
|
usesInheritance: true,
|
|
4968
6280
|
ngImport: i0,
|
|
4969
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\"
|
|
4970
|
-
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-versions-
|
|
6281
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-wrap align-items-center gap-3\">\n <h2 class=\"card-title p-0\">{{ workflow?.name ?? ('Flows.Versions.Builder' | transloco) }}</h2>\n @if (workflow) {\n <pw-flows-workflow-status [workflow]=\"workflow\"\n [subscriptionId]=\"subscriptionId\"\n [hasPublished]=\"versions.some(isPublished)\"\n (workflowChange)=\"workflow = $event\"></pw-flows-workflow-status>\n }\n </div>\n <div>\n <!-- A published version is read-only, so leaving it loses nothing. -->\n @let draftOpen = editor.open && !(editor.version && isPublished(editor.version));\n <span [pTooltip]=\"draftOpen ? ('Flows.Versions.CloseFirst' | transloco) : ''\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n data-testid=\"flow-version-create\"\n [disabled]=\"draftOpen\"\n (click)=\"openEditor()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Versions.Create' | transloco }}\n </button>\n </span>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"false\" />\n}\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Versions.NotFound' | transloco\"></pw-no-data>\n} @else {\n@if (editor.open) {\n<pw-flows-version-editor [version]=\"editor.version\"\n [duplicateOf]=\"editor.duplicateOf\"\n [workflowId]=\"workflowId\"\n [subscriptionId]=\"subscriptionId\"\n [check]=\"editor.check\"\n (saved)=\"onVersionSaved()\"\n (cancelled)=\"editor.close()\">\n</pw-flows-version-editor>\n}\n\n@if (versions.length > 0) {\n<h3 class=\"pw-versions-history\">{{ 'Flows.Versions.Title' | transloco }}</h3>\n<div class=\"primeng-datatable-container table-responsive\">\n <p-table [value]=\"versions\">\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.State' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Published' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-version>\n <tr>\n <td data-head=\"Version\">{{ version.version }}</td>\n <td data-head=\"State\">\n <span [class]=\"badgeClass(version)\">\n {{ (isPublished(version) ? 'Flows.Versions.State.Published' : 'Flows.Versions.State.Draft') | transloco }}\n </span>\n </td>\n <td data-head=\"Published\">\n {{ version.published_at ? (version.published_at | dateFormat) : '—' }}\n </td>\n <td data-head=\"Created\">{{ version.created_at | dateFormat }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"(isPublished(version) ? 'Flows.Versions.Action.View' : 'Flows.Versions.Action.Edit') | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon [class]=\"isPublished(version) ? 'cta1-icon' : 'edit-icon'\"\n [icon]=\"isPublished(version) ? icons.inspect : icons.edit\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"(isPublished(version) ? 'Flows.Versions.Action.View' : 'Flows.Versions.Action.Edit') | transloco\"\n (click)=\"openEditor(version)\"\n (keydown.enter)=\"openEditor(version)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Versions.Action.Duplicate' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.duplicate\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Versions.Action.Duplicate' | transloco\"\n (click)=\"duplicate(version)\"\n (keydown.enter)=\"duplicate(version)\"></fa-icon>\n </li>\n <!-- Hiding this is courtesy; protect_endpoint! is the control. -->\n @if (!isPublished(version) && canPublish) {\n <li [pTooltip]=\"'Flows.Versions.Action.Publish' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.publish\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Versions.Action.Publish' | transloco\"\n (click)=\"publish(version)\"\n (keydown.enter)=\"publish(version)\"></fa-icon>\n </li>\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"versions.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else if (!editor.open) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Versions.Empty' | transloco\" [description]=\"'Flows.Versions.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n}\n",
|
|
6282
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-versions-history{display:block;margin-top:2rem}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"],
|
|
4971
6283
|
dependencies: [
|
|
4972
6284
|
{
|
|
4973
6285
|
kind: "component",
|
|
4974
|
-
type:
|
|
6286
|
+
type: i4$1.SkeletonTableComponent,
|
|
4975
6287
|
selector: "pw-skeleton-table",
|
|
4976
6288
|
inputs: [
|
|
4977
6289
|
"rows",
|
|
@@ -4984,7 +6296,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
4984
6296
|
},
|
|
4985
6297
|
{
|
|
4986
6298
|
kind: "directive",
|
|
4987
|
-
type:
|
|
6299
|
+
type: i1$1.Tooltip,
|
|
4988
6300
|
selector: "[pTooltip]",
|
|
4989
6301
|
inputs: [
|
|
4990
6302
|
"tooltipPosition",
|
|
@@ -5012,7 +6324,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
5012
6324
|
},
|
|
5013
6325
|
{
|
|
5014
6326
|
kind: "component",
|
|
5015
|
-
type:
|
|
6327
|
+
type: i5.Table,
|
|
5016
6328
|
selector: "p-table",
|
|
5017
6329
|
inputs: [
|
|
5018
6330
|
"frozenColumns",
|
|
@@ -5125,7 +6437,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
5125
6437
|
},
|
|
5126
6438
|
{
|
|
5127
6439
|
kind: "component",
|
|
5128
|
-
type:
|
|
6440
|
+
type: i6$1.NoDataComponent,
|
|
5129
6441
|
selector: "pw-no-data",
|
|
5130
6442
|
inputs: [
|
|
5131
6443
|
"message",
|
|
@@ -5135,13 +6447,13 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
5135
6447
|
},
|
|
5136
6448
|
{
|
|
5137
6449
|
kind: "component",
|
|
5138
|
-
type:
|
|
6450
|
+
type: i6$1.RecordsSummaryComponent,
|
|
5139
6451
|
selector: "pw-records-summary",
|
|
5140
6452
|
inputs: ["showing", "total"]
|
|
5141
6453
|
},
|
|
5142
6454
|
{
|
|
5143
6455
|
kind: "component",
|
|
5144
|
-
type:
|
|
6456
|
+
type: i2$3.FaIconComponent,
|
|
5145
6457
|
selector: "fa-icon",
|
|
5146
6458
|
inputs: [
|
|
5147
6459
|
"icon",
|
|
@@ -5184,19 +6496,31 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
|
|
|
5184
6496
|
"version",
|
|
5185
6497
|
"duplicateOf",
|
|
5186
6498
|
"workflowId",
|
|
5187
|
-
"subscriptionId"
|
|
6499
|
+
"subscriptionId",
|
|
6500
|
+
"check"
|
|
5188
6501
|
],
|
|
5189
6502
|
outputs: ["saved", "cancelled"]
|
|
5190
6503
|
},
|
|
5191
6504
|
{
|
|
5192
|
-
kind: "
|
|
5193
|
-
type:
|
|
5194
|
-
|
|
6505
|
+
kind: "component",
|
|
6506
|
+
type: FlowsWorkflowStatusComponent,
|
|
6507
|
+
selector: "pw-flows-workflow-status",
|
|
6508
|
+
inputs: [
|
|
6509
|
+
"workflow",
|
|
6510
|
+
"subscriptionId",
|
|
6511
|
+
"hasPublished"
|
|
6512
|
+
],
|
|
6513
|
+
outputs: ["workflowChange"]
|
|
5195
6514
|
},
|
|
5196
6515
|
{
|
|
5197
6516
|
kind: "pipe",
|
|
5198
|
-
type:
|
|
6517
|
+
type: i2$4.TranslocoPipe,
|
|
5199
6518
|
name: "transloco"
|
|
6519
|
+
},
|
|
6520
|
+
{
|
|
6521
|
+
kind: "pipe",
|
|
6522
|
+
type: i13.DateFormatPipe,
|
|
6523
|
+
name: "dateFormat"
|
|
5200
6524
|
}
|
|
5201
6525
|
]
|
|
5202
6526
|
});
|
|
@@ -5212,8 +6536,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5212
6536
|
args: [{
|
|
5213
6537
|
selector: "pw-flows-workflow-versions",
|
|
5214
6538
|
standalone: false,
|
|
5215
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\"
|
|
5216
|
-
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-versions-
|
|
6539
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center gap-2\">\n <div class=\"d-flex flex-wrap align-items-center gap-3\">\n <h2 class=\"card-title p-0\">{{ workflow?.name ?? ('Flows.Versions.Builder' | transloco) }}</h2>\n @if (workflow) {\n <pw-flows-workflow-status [workflow]=\"workflow\"\n [subscriptionId]=\"subscriptionId\"\n [hasPublished]=\"versions.some(isPublished)\"\n (workflowChange)=\"workflow = $event\"></pw-flows-workflow-status>\n }\n </div>\n <div>\n <!-- A published version is read-only, so leaving it loses nothing. -->\n @let draftOpen = editor.open && !(editor.version && isPublished(editor.version));\n <span [pTooltip]=\"draftOpen ? ('Flows.Versions.CloseFirst' | transloco) : ''\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n data-testid=\"flow-version-create\"\n [disabled]=\"draftOpen\"\n (click)=\"openEditor()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Versions.Create' | transloco }}\n </button>\n </span>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-secondary\"\n (click)=\"back()\">\n <fa-icon [icon]=\"icons.back\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Back' | transloco }}\n </button>\n </div>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"false\" />\n}\n\n@if (!loading) {\n@if (notFound) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Versions.NotFound' | transloco\"></pw-no-data>\n} @else {\n@if (editor.open) {\n<pw-flows-version-editor [version]=\"editor.version\"\n [duplicateOf]=\"editor.duplicateOf\"\n [workflowId]=\"workflowId\"\n [subscriptionId]=\"subscriptionId\"\n [check]=\"editor.check\"\n (saved)=\"onVersionSaved()\"\n (cancelled)=\"editor.close()\">\n</pw-flows-version-editor>\n}\n\n@if (versions.length > 0) {\n<h3 class=\"pw-versions-history\">{{ 'Flows.Versions.Title' | transloco }}</h3>\n<div class=\"primeng-datatable-container table-responsive\">\n <p-table [value]=\"versions\">\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Version' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.State' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Published' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Versions.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-version>\n <tr>\n <td data-head=\"Version\">{{ version.version }}</td>\n <td data-head=\"State\">\n <span [class]=\"badgeClass(version)\">\n {{ (isPublished(version) ? 'Flows.Versions.State.Published' : 'Flows.Versions.State.Draft') | transloco }}\n </span>\n </td>\n <td data-head=\"Published\">\n {{ version.published_at ? (version.published_at | dateFormat) : '—' }}\n </td>\n <td data-head=\"Created\">{{ version.created_at | dateFormat }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"(isPublished(version) ? 'Flows.Versions.Action.View' : 'Flows.Versions.Action.Edit') | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon [class]=\"isPublished(version) ? 'cta1-icon' : 'edit-icon'\"\n [icon]=\"isPublished(version) ? icons.inspect : icons.edit\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"(isPublished(version) ? 'Flows.Versions.Action.View' : 'Flows.Versions.Action.Edit') | transloco\"\n (click)=\"openEditor(version)\"\n (keydown.enter)=\"openEditor(version)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Versions.Action.Duplicate' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.duplicate\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Versions.Action.Duplicate' | transloco\"\n (click)=\"duplicate(version)\"\n (keydown.enter)=\"duplicate(version)\"></fa-icon>\n </li>\n <!-- Hiding this is courtesy; protect_endpoint! is the control. -->\n @if (!isPublished(version) && canPublish) {\n <li [pTooltip]=\"'Flows.Versions.Action.Publish' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.publish\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Versions.Action.Publish' | transloco\"\n (click)=\"publish(version)\"\n (keydown.enter)=\"publish(version)\"></fa-icon>\n </li>\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"versions.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else if (!editor.open) {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Versions.Empty' | transloco\" [description]=\"'Flows.Versions.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n}\n",
|
|
6540
|
+
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.pw-versions-history{display:block;margin-top:2rem}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}\n"]
|
|
5217
6541
|
}]
|
|
5218
6542
|
}],
|
|
5219
6543
|
ctorParameters: () => [
|
|
@@ -5221,7 +6545,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5221
6545
|
{ type: FlowsWorkflowService },
|
|
5222
6546
|
{ type: i1.PermissionService },
|
|
5223
6547
|
{ type: i0.ChangeDetectorRef }
|
|
5224
|
-
]
|
|
6548
|
+
],
|
|
6549
|
+
propDecorators: { status: [{
|
|
6550
|
+
type: ViewChild,
|
|
6551
|
+
args: [FlowsWorkflowStatusComponent]
|
|
6552
|
+
}] }
|
|
5225
6553
|
});
|
|
5226
6554
|
var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseComponent {
|
|
5227
6555
|
constructor(injector, workflowService, confirmDialog, cdr) {
|
|
@@ -5293,7 +6621,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5293
6621
|
"edit"
|
|
5294
6622
|
], { relativeTo: this.route.parent });
|
|
5295
6623
|
}
|
|
5296
|
-
|
|
6624
|
+
openBuilder(workflow) {
|
|
5297
6625
|
this.router.navigate([
|
|
5298
6626
|
"workflows",
|
|
5299
6627
|
workflow.id,
|
|
@@ -5338,7 +6666,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5338
6666
|
deps: [
|
|
5339
6667
|
{ token: i0.Injector },
|
|
5340
6668
|
{ token: FlowsWorkflowService },
|
|
5341
|
-
{ token:
|
|
6669
|
+
{ token: i6$1.ConfirmDialogService },
|
|
5342
6670
|
{ token: i0.ChangeDetectorRef }
|
|
5343
6671
|
],
|
|
5344
6672
|
target: i0.ɵɵFactoryTarget.Component
|
|
@@ -5353,7 +6681,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5353
6681
|
selector: "pw-flows-workflows",
|
|
5354
6682
|
usesInheritance: true,
|
|
5355
6683
|
ngImport: i0,
|
|
5356
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Workflows.Title' | transloco }}</h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary\"\n (click)=\"createWorkflow()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Create' | transloco }}\n </button>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"workflows\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n filterDelay=\"1000\">\n <ng-template #caption>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-select inputId=\"flows-workflows-status\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n [placeholder]=\"'Flows.Workflows.Filter.Status' | transloco\"\n [showClear]=\"true\"\n [(ngModel)]=\"status\"\n (onChange)=\"filterByStatus($event.value)\"\n appendTo=\"body\">\n </p-select>\n </div>\n <!-- No ngModel — onLazyLoad is the single writer of searchText. -->\n <div class=\"text-end\">\n <label for=\"flows-workflows-search\"\n class=\"visually-hidden\">{{ 'Flows.Workflows.Filter.SearchLabel' | transloco }}</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><fa-icon [icon]=\"icons.search\"\n aria-hidden=\"true\"></fa-icon></p-inputicon>\n <input #searchInput\n type=\"text\"\n id=\"flows-workflows-search\"\n name=\"flows-workflows-search\"\n pInputText\n [placeholder]=\"'Flows.Workflows.Filter.Search' | transloco\"\n (input)=\"dt.filterGlobal(searchInput.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Name' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Description' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-workflow>\n <tr>\n <td data-head=\"Name\">{{ workflow.name }}</td>\n <td data-head=\"Description\">{{ workflow.description || '—' }}</td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n </td>\n <td data-head=\"Created\">{{ workflow.created_at |
|
|
6684
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Workflows.Title' | transloco }}</h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary\"\n (click)=\"createWorkflow()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Create' | transloco }}\n </button>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"workflows\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n filterDelay=\"1000\">\n <ng-template #caption>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-select inputId=\"flows-workflows-status\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n [placeholder]=\"'Flows.Workflows.Filter.Status' | transloco\"\n [showClear]=\"true\"\n [(ngModel)]=\"status\"\n (onChange)=\"filterByStatus($event.value)\"\n appendTo=\"body\">\n </p-select>\n </div>\n <!-- No ngModel — onLazyLoad is the single writer of searchText. -->\n <div class=\"text-end\">\n <label for=\"flows-workflows-search\"\n class=\"visually-hidden\">{{ 'Flows.Workflows.Filter.SearchLabel' | transloco }}</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><fa-icon [icon]=\"icons.search\"\n aria-hidden=\"true\"></fa-icon></p-inputicon>\n <input #searchInput\n type=\"text\"\n id=\"flows-workflows-search\"\n name=\"flows-workflows-search\"\n pInputText\n [placeholder]=\"'Flows.Workflows.Filter.Search' | transloco\"\n (input)=\"dt.filterGlobal(searchInput.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Name' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Description' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-workflow>\n <tr>\n <td data-head=\"Name\">\n <a [routerLink]=\"[workflow.id, 'versions']\">{{ workflow.name }}</a>\n </td>\n <td data-head=\"Description\">{{ workflow.description || '—' }}</td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n </td>\n <td data-head=\"Created\">{{ workflow.created_at | dateFormat }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"'Flows.Workflows.Action.OpenBuilder' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.diagram\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.OpenBuilder' | transloco\"\n (click)=\"openBuilder(workflow)\"\n (keydown.enter)=\"openBuilder(workflow)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Workflows.Action.Edit' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"edit-icon\"\n [icon]=\"icons.edit\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.Edit' | transloco\"\n (click)=\"editWorkflow(workflow)\"\n (keydown.enter)=\"editWorkflow(workflow)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Workflows.Action.Delete' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"delete-icon\"\n [icon]=\"icons.delete\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.Delete' | transloco\"\n (click)=\"deleteWorkflow(workflow)\"\n (keydown.enter)=\"deleteWorkflow(workflow)\"></fa-icon>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"workflows.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Workflows.Empty' | transloco\" [description]=\"'Flows.Workflows.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n",
|
|
5357
6685
|
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}.primeng-datatable-container td[data-head=Name]{min-width:200px;font-weight:600;color:#1a1d21}.primeng-datatable-container td[data-head=Description]{min-width:220px;color:#5a6473}\n"],
|
|
5358
6686
|
dependencies: [
|
|
5359
6687
|
{
|
|
@@ -5376,7 +6704,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5376
6704
|
},
|
|
5377
6705
|
{
|
|
5378
6706
|
kind: "component",
|
|
5379
|
-
type:
|
|
6707
|
+
type: i4$1.SkeletonTableComponent,
|
|
5380
6708
|
selector: "pw-skeleton-table",
|
|
5381
6709
|
inputs: [
|
|
5382
6710
|
"rows",
|
|
@@ -5389,7 +6717,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5389
6717
|
},
|
|
5390
6718
|
{
|
|
5391
6719
|
kind: "directive",
|
|
5392
|
-
type:
|
|
6720
|
+
type: i1$1.Tooltip,
|
|
5393
6721
|
selector: "[pTooltip]",
|
|
5394
6722
|
inputs: [
|
|
5395
6723
|
"tooltipPosition",
|
|
@@ -5417,7 +6745,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5417
6745
|
},
|
|
5418
6746
|
{
|
|
5419
6747
|
kind: "component",
|
|
5420
|
-
type:
|
|
6748
|
+
type: i5.Table,
|
|
5421
6749
|
selector: "p-table",
|
|
5422
6750
|
inputs: [
|
|
5423
6751
|
"frozenColumns",
|
|
@@ -5600,7 +6928,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5600
6928
|
},
|
|
5601
6929
|
{
|
|
5602
6930
|
kind: "component",
|
|
5603
|
-
type:
|
|
6931
|
+
type: i6$1.NoDataComponent,
|
|
5604
6932
|
selector: "pw-no-data",
|
|
5605
6933
|
inputs: [
|
|
5606
6934
|
"message",
|
|
@@ -5610,13 +6938,13 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5610
6938
|
},
|
|
5611
6939
|
{
|
|
5612
6940
|
kind: "component",
|
|
5613
|
-
type:
|
|
6941
|
+
type: i6$1.RecordsSummaryComponent,
|
|
5614
6942
|
selector: "pw-records-summary",
|
|
5615
6943
|
inputs: ["showing", "total"]
|
|
5616
6944
|
},
|
|
5617
6945
|
{
|
|
5618
6946
|
kind: "component",
|
|
5619
|
-
type:
|
|
6947
|
+
type: i2$3.FaIconComponent,
|
|
5620
6948
|
selector: "fa-icon",
|
|
5621
6949
|
inputs: [
|
|
5622
6950
|
"icon",
|
|
@@ -5678,14 +7006,33 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
|
|
|
5678
7006
|
]
|
|
5679
7007
|
},
|
|
5680
7008
|
{
|
|
5681
|
-
kind: "
|
|
5682
|
-
type: i8.
|
|
5683
|
-
|
|
7009
|
+
kind: "directive",
|
|
7010
|
+
type: i8.RouterLink,
|
|
7011
|
+
selector: "[routerLink]",
|
|
7012
|
+
inputs: [
|
|
7013
|
+
"target",
|
|
7014
|
+
"queryParams",
|
|
7015
|
+
"fragment",
|
|
7016
|
+
"queryParamsHandling",
|
|
7017
|
+
"state",
|
|
7018
|
+
"info",
|
|
7019
|
+
"relativeTo",
|
|
7020
|
+
"preserveFragment",
|
|
7021
|
+
"skipLocationChange",
|
|
7022
|
+
"replaceUrl",
|
|
7023
|
+
"browserUrl",
|
|
7024
|
+
"routerLink"
|
|
7025
|
+
]
|
|
5684
7026
|
},
|
|
5685
7027
|
{
|
|
5686
7028
|
kind: "pipe",
|
|
5687
|
-
type:
|
|
7029
|
+
type: i2$4.TranslocoPipe,
|
|
5688
7030
|
name: "transloco"
|
|
7031
|
+
},
|
|
7032
|
+
{
|
|
7033
|
+
kind: "pipe",
|
|
7034
|
+
type: i13.DateFormatPipe,
|
|
7035
|
+
name: "dateFormat"
|
|
5689
7036
|
}
|
|
5690
7037
|
]
|
|
5691
7038
|
});
|
|
@@ -5701,14 +7048,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5701
7048
|
args: [{
|
|
5702
7049
|
selector: "pw-flows-workflows",
|
|
5703
7050
|
standalone: false,
|
|
5704
|
-
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Workflows.Title' | transloco }}</h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary\"\n (click)=\"createWorkflow()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Create' | transloco }}\n </button>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"workflows\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n filterDelay=\"1000\">\n <ng-template #caption>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-select inputId=\"flows-workflows-status\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n [placeholder]=\"'Flows.Workflows.Filter.Status' | transloco\"\n [showClear]=\"true\"\n [(ngModel)]=\"status\"\n (onChange)=\"filterByStatus($event.value)\"\n appendTo=\"body\">\n </p-select>\n </div>\n <!-- No ngModel — onLazyLoad is the single writer of searchText. -->\n <div class=\"text-end\">\n <label for=\"flows-workflows-search\"\n class=\"visually-hidden\">{{ 'Flows.Workflows.Filter.SearchLabel' | transloco }}</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><fa-icon [icon]=\"icons.search\"\n aria-hidden=\"true\"></fa-icon></p-inputicon>\n <input #searchInput\n type=\"text\"\n id=\"flows-workflows-search\"\n name=\"flows-workflows-search\"\n pInputText\n [placeholder]=\"'Flows.Workflows.Filter.Search' | transloco\"\n (input)=\"dt.filterGlobal(searchInput.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Name' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Description' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-workflow>\n <tr>\n <td data-head=\"Name\">{{ workflow.name }}</td>\n <td data-head=\"Description\">{{ workflow.description || '—' }}</td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n </td>\n <td data-head=\"Created\">{{ workflow.created_at |
|
|
7051
|
+
template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0\">{{ 'Flows.Workflows.Title' | transloco }}</h2>\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-primary\"\n (click)=\"createWorkflow()\">\n <fa-icon [icon]=\"icons.create\"\n aria-hidden=\"true\"></fa-icon>\n {{ 'Flows.Workflows.Create' | transloco }}\n </button>\n </div>\n</div>\n\n@if (loading) {\n<pw-skeleton-table [rows]=\"8\" [columns]=\"5\" [showCaption]=\"true\" />\n}\n\n@if (!loading) {\n@if (totalRecordsUnFilter > 0) {\n<div class=\"primeng-datatable-container table-responsive mt-3\">\n <p-table #dt\n [value]=\"workflows\"\n [paginator]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n filterDelay=\"1000\">\n <ng-template #caption>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-select inputId=\"flows-workflows-status\"\n [options]=\"statusOptions\"\n optionValue=\"value\"\n [placeholder]=\"'Flows.Workflows.Filter.Status' | transloco\"\n [showClear]=\"true\"\n [(ngModel)]=\"status\"\n (onChange)=\"filterByStatus($event.value)\"\n appendTo=\"body\">\n </p-select>\n </div>\n <!-- No ngModel — onLazyLoad is the single writer of searchText. -->\n <div class=\"text-end\">\n <label for=\"flows-workflows-search\"\n class=\"visually-hidden\">{{ 'Flows.Workflows.Filter.SearchLabel' | transloco }}</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><fa-icon [icon]=\"icons.search\"\n aria-hidden=\"true\"></fa-icon></p-inputicon>\n <input #searchInput\n type=\"text\"\n id=\"flows-workflows-search\"\n name=\"flows-workflows-search\"\n pInputText\n [placeholder]=\"'Flows.Workflows.Filter.Search' | transloco\"\n (input)=\"dt.filterGlobal(searchInput.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Name' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Description' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Status' | transloco }}</th>\n <th scope=\"col\">{{ 'Flows.Workflows.Column.Created' | transloco }}</th>\n <th scope=\"col\"\n class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n\n <ng-template #body\n let-workflow>\n <tr>\n <td data-head=\"Name\">\n <a [routerLink]=\"[workflow.id, 'versions']\">{{ workflow.name }}</a>\n </td>\n <td data-head=\"Description\">{{ workflow.description || '—' }}</td>\n <td data-head=\"Status\">\n <span [class]=\"badgeClass(workflow.status)\">\n {{ 'Flows.WorkflowStatus.' + workflow.status | transloco }}\n </span>\n </td>\n <td data-head=\"Created\">{{ workflow.created_at | dateFormat }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <li [pTooltip]=\"'Flows.Workflows.Action.OpenBuilder' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"cta1-icon\"\n [icon]=\"icons.diagram\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.OpenBuilder' | transloco\"\n (click)=\"openBuilder(workflow)\"\n (keydown.enter)=\"openBuilder(workflow)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Workflows.Action.Edit' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"edit-icon\"\n [icon]=\"icons.edit\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.Edit' | transloco\"\n (click)=\"editWorkflow(workflow)\"\n (keydown.enter)=\"editWorkflow(workflow)\"></fa-icon>\n </li>\n <li [pTooltip]=\"'Flows.Workflows.Action.Delete' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <fa-icon class=\"delete-icon\"\n [icon]=\"icons.delete\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"'Flows.Workflows.Action.Delete' | transloco\"\n (click)=\"deleteWorkflow(workflow)\"\n (keydown.enter)=\"deleteWorkflow(workflow)\"></fa-icon>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n\n <pw-records-summary [showing]=\"workflows.length\"\n [total]=\"totalRecords\" />\n</div>\n} @else {\n<pw-no-data [withImage]=\"true\" [message]=\"'Flows.Workflows.Empty' | transloco\" [description]=\"'Flows.Workflows.EmptyDescription' | transloco\"></pw-no-data>\n}\n}\n",
|
|
5705
7052
|
styles: [".pw-flow-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:2px 8px;border-radius:4px;letter-spacing:.01em;white-space:nowrap}.pw-flow-badge:before{content:\"\";width:6px;height:6px;border-radius:50%;background-color:currentColor;flex:0 0 auto}.pw-flow-badge--success{background-color:#e6f4ec;color:#0f6b3a}.pw-flow-badge--danger{background-color:#fbeae8;color:#c0392b}.pw-flow-badge--warning{background-color:#fbf1e3;color:#8a5a00}.pw-flow-badge--info{background-color:#e6f3f6;color:#1f6378}.pw-flow-badge--muted{background-color:#eef0f3;color:#5a6473}td[data-head=Run],td[data-head=Workflow],td[data-head=Version],td[data-head=Attempts],td[data-head=Duration]{color:#5a6473;font-variant-numeric:tabular-nums;white-space:nowrap}td[data-head=Node]{min-width:180px;font-weight:600;color:#1a1d21;overflow-wrap:anywhere}.primeng-datatable-container table tbody tr:hover{background-color:#f5f7fa}.primeng-datatable-container td[data-head=Name]{min-width:200px;font-weight:600;color:#1a1d21}.primeng-datatable-container td[data-head=Description]{min-width:220px;color:#5a6473}\n"]
|
|
5706
7053
|
}]
|
|
5707
7054
|
}],
|
|
5708
7055
|
ctorParameters: () => [
|
|
5709
7056
|
{ type: i0.Injector },
|
|
5710
7057
|
{ type: FlowsWorkflowService },
|
|
5711
|
-
{ type:
|
|
7058
|
+
{ type: i6$1.ConfirmDialogService },
|
|
5712
7059
|
{ type: i0.ChangeDetectorRef }
|
|
5713
7060
|
]
|
|
5714
7061
|
});
|
|
@@ -5770,7 +7117,7 @@ var FlowsPrivateRoutingModule = class FlowsPrivateRoutingModule {
|
|
|
5770
7117
|
version: "22.2.0",
|
|
5771
7118
|
ngImport: i0,
|
|
5772
7119
|
type: FlowsPrivateRoutingModule,
|
|
5773
|
-
imports: [
|
|
7120
|
+
imports: [i8.RouterModule],
|
|
5774
7121
|
exports: [RouterModule]
|
|
5775
7122
|
});
|
|
5776
7123
|
}
|
|
@@ -5820,11 +7167,14 @@ var FlowsPrivateModule = class FlowsPrivateModule {
|
|
|
5820
7167
|
FlowsWorkflowFormComponent,
|
|
5821
7168
|
FlowsWorkflowVersionsComponent,
|
|
5822
7169
|
FlowsVersionEditorComponent,
|
|
7170
|
+
FlowsGraphCheckComponent,
|
|
5823
7171
|
FlowsRunsComponent,
|
|
5824
7172
|
FlowsRunsFiltersComponent,
|
|
5825
7173
|
FlowsCronFieldComponent,
|
|
5826
7174
|
FlowsTimezoneFieldComponent,
|
|
5827
7175
|
FlowsRunInspectorComponent,
|
|
7176
|
+
FlowsRunProgressComponent,
|
|
7177
|
+
FlowsStepErrorComponent,
|
|
5828
7178
|
FlowsGraphCanvasComponent,
|
|
5829
7179
|
FlowsCanvasNodeComponent,
|
|
5830
7180
|
FlowsCanvasSocketComponent,
|
|
@@ -5834,7 +7184,11 @@ var FlowsPrivateModule = class FlowsPrivateModule {
|
|
|
5834
7184
|
FlowsJsonFieldComponent,
|
|
5835
7185
|
FlowsConditionFieldComponent,
|
|
5836
7186
|
FlowsPairsFieldComponent,
|
|
5837
|
-
FlowsMemberFieldComponent
|
|
7187
|
+
FlowsMemberFieldComponent,
|
|
7188
|
+
FlowsRetryFieldComponent,
|
|
7189
|
+
FlowsAvailableFieldsComponent,
|
|
7190
|
+
FlowsUnknownFieldsComponent,
|
|
7191
|
+
FlowsWorkflowStatusComponent
|
|
5838
7192
|
],
|
|
5839
7193
|
imports: [
|
|
5840
7194
|
CommonModule,
|
|
@@ -5844,6 +7198,8 @@ var FlowsPrivateModule = class FlowsPrivateModule {
|
|
|
5844
7198
|
CoreTranslocoModule,
|
|
5845
7199
|
AppLoaderModule,
|
|
5846
7200
|
SharedComponentsModule,
|
|
7201
|
+
DirectivesModule,
|
|
7202
|
+
PipesModule,
|
|
5847
7203
|
FontAwesomeModule,
|
|
5848
7204
|
IconFieldModule,
|
|
5849
7205
|
InputIconModule,
|
|
@@ -5874,6 +7230,8 @@ var FlowsPrivateModule = class FlowsPrivateModule {
|
|
|
5874
7230
|
CoreTranslocoModule,
|
|
5875
7231
|
AppLoaderModule,
|
|
5876
7232
|
SharedComponentsModule,
|
|
7233
|
+
DirectivesModule,
|
|
7234
|
+
PipesModule,
|
|
5877
7235
|
FontAwesomeModule,
|
|
5878
7236
|
IconFieldModule,
|
|
5879
7237
|
InputIconModule,
|
|
@@ -5901,6 +7259,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5901
7259
|
CoreTranslocoModule,
|
|
5902
7260
|
AppLoaderModule,
|
|
5903
7261
|
SharedComponentsModule,
|
|
7262
|
+
DirectivesModule,
|
|
7263
|
+
PipesModule,
|
|
5904
7264
|
FontAwesomeModule,
|
|
5905
7265
|
IconFieldModule,
|
|
5906
7266
|
InputIconModule,
|
|
@@ -5922,11 +7282,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5922
7282
|
FlowsWorkflowFormComponent,
|
|
5923
7283
|
FlowsWorkflowVersionsComponent,
|
|
5924
7284
|
FlowsVersionEditorComponent,
|
|
7285
|
+
FlowsGraphCheckComponent,
|
|
5925
7286
|
FlowsRunsComponent,
|
|
5926
7287
|
FlowsRunsFiltersComponent,
|
|
5927
7288
|
FlowsCronFieldComponent,
|
|
5928
7289
|
FlowsTimezoneFieldComponent,
|
|
5929
7290
|
FlowsRunInspectorComponent,
|
|
7291
|
+
FlowsRunProgressComponent,
|
|
7292
|
+
FlowsStepErrorComponent,
|
|
5930
7293
|
FlowsGraphCanvasComponent,
|
|
5931
7294
|
FlowsCanvasNodeComponent,
|
|
5932
7295
|
FlowsCanvasSocketComponent,
|
|
@@ -5936,7 +7299,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5936
7299
|
FlowsJsonFieldComponent,
|
|
5937
7300
|
FlowsConditionFieldComponent,
|
|
5938
7301
|
FlowsPairsFieldComponent,
|
|
5939
|
-
FlowsMemberFieldComponent
|
|
7302
|
+
FlowsMemberFieldComponent,
|
|
7303
|
+
FlowsRetryFieldComponent,
|
|
7304
|
+
FlowsAvailableFieldsComponent,
|
|
7305
|
+
FlowsUnknownFieldsComponent,
|
|
7306
|
+
FlowsWorkflowStatusComponent
|
|
5940
7307
|
]
|
|
5941
7308
|
}]
|
|
5942
7309
|
}]
|