@posiwise/flows 0.0.6 → 0.0.8

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.
@@ -2,20 +2,20 @@ import * as i0 from "@angular/core";
2
2
  import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, HostListener, Injectable, Input, NgModule, Output, Pipe, ViewChild, afterEveryRender } from "@angular/core";
3
3
  import * as i8 from "@angular/router";
4
4
  import { RouterModule } from "@angular/router";
5
- import * as i3$1 from "@posiwise/core-guards";
5
+ import * as i4 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, of, throwError, timer } from "rxjs";
9
- import { catchError, distinctUntilChanged, exhaustMap, finalize, map, shareReplay, switchMap, takeUntil, takeWhile, tap } from "rxjs/operators";
8
+ import { EMPTY, Subject, combineLatest, defer, forkJoin, of, throwError, timer } from "rxjs";
9
+ import { catchError, distinctUntilChanged, finalize, map, repeat, shareReplay, switchMap, takeUntil, takeWhile, tap } from "rxjs/operators";
10
10
  import { faArrowAltCircleLeft, faBolt, faChevronDown, faChevronRight, faCircleCheck, faCircleExclamation, faCode, faCodeBranch, faCopy, faDiagramProject, faExpand, faEye, faLayerGroup, faMagnifyingGlass, faPaperPlane, faPause, faPenToSquare, faPlay, 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
12
  import * as i1$3 from "@posiwise/shared-product-services";
13
13
  import { HelperService } from "@posiwise/helper-service";
14
- import * as i4$1 from "@posiwise/app-loader";
14
+ import * as i4$2 from "@posiwise/app-loader";
15
15
  import { AppLoaderModule } from "@posiwise/app-loader";
16
16
  import * as i5 from "primeng/table";
17
17
  import * as i6$1 from "@posiwise/shared-components";
18
- import { SharedComponentsModule } from "@posiwise/shared-components";
18
+ import { PwStickyActionsComponent, SharedComponentsModule } from "@posiwise/shared-components";
19
19
  import * as i2$3 from "@fortawesome/angular-fontawesome";
20
20
  import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
21
21
  import * as i1$2 from "@angular/common";
@@ -25,9 +25,9 @@ import { TRANSLOCO_SCOPE } from "@jsverse/transloco";
25
25
  import * as i1$1 from "primeng/tooltip";
26
26
  import * as i13 from "@posiwise/pipes";
27
27
  import { PipesModule } from "@posiwise/pipes";
28
- import * as i3$2 from "@angular/forms";
28
+ import * as i3$1 from "@angular/forms";
29
29
  import { FormsModule, ReactiveFormsModule, UntypedFormBuilder, Validators } from "@angular/forms";
30
- import * as i4 from "primeng/select";
30
+ import * as i4$1 from "primeng/select";
31
31
  import * as i1 from "@posiwise/common-services";
32
32
  import { PERMISSION_NAMES } from "@posiwise/common-utilities";
33
33
  import { AreaExtensions, AreaPlugin } from "rete-area-plugin";
@@ -230,6 +230,12 @@ function toFlowWorkflowFields(rows) {
230
230
  ran: list.length > 0
231
231
  };
232
232
  }
233
+ const FLOWS_RUNS_IDLE_POLL_INTERVAL_MS = 15e3;
234
+ const FLOWS_POLL_BACKOFF_MS = 3e4;
235
+ const FLOWS_POLL_MAX_BACKOFF_MS = 12e4;
236
+ function flowsPollDelay(intervalMs, failures) {
237
+ return failures ? Math.min(FLOWS_POLL_BACKOFF_MS * 2 ** (failures - 1), FLOWS_POLL_MAX_BACKOFF_MS) : intervalMs;
238
+ }
233
239
  var FlowsRunService = class FlowsRunService {
234
240
  constructor(api) {
235
241
  this.api = api;
@@ -252,13 +258,34 @@ var FlowsRunService = class FlowsRunService {
252
258
  });
253
259
  }
254
260
  watchRuns(subscriptionId, query = {}, paging) {
255
- return timer(0, FLOWS_RUN_POLL_INTERVAL_MS).pipe(exhaustMap(() => this.getRuns(subscriptionId, query, paging)), takeWhile((response) => this.hasUnsettledRun(response), true));
261
+ return defer(() => {
262
+ let unsettled = false;
263
+ let failures = 0;
264
+ return defer(() => this.getRuns(subscriptionId, query, paging)).pipe(tap((response) => {
265
+ unsettled = this.hasUnsettledRun(response);
266
+ failures = 0;
267
+ }), catchError(() => {
268
+ failures += 1;
269
+ return of(null);
270
+ }), repeat({ delay: () => timer(flowsPollDelay(unsettled ? FLOWS_RUN_POLL_INTERVAL_MS : FLOWS_RUNS_IDLE_POLL_INTERVAL_MS, failures)) }));
271
+ });
256
272
  }
257
273
  watchRun(id, subscriptionId, paging) {
258
- return timer(0, FLOWS_RUN_POLL_INTERVAL_MS).pipe(exhaustMap(() => forkJoin({
259
- run: this.getRun(id, subscriptionId),
260
- steps: this.getRunSteps(id, subscriptionId, paging)
261
- })), map((detail) => detail), takeWhile((detail) => !isFlowRunTerminal(detail.run), true));
274
+ return defer(() => {
275
+ let loaded = false;
276
+ let failures = 0;
277
+ return defer(() => forkJoin({
278
+ run: this.getRun(id, subscriptionId),
279
+ steps: this.getRunSteps(id, subscriptionId, paging)
280
+ })).pipe(tap(() => {
281
+ loaded = true;
282
+ failures = 0;
283
+ }), catchError((error) => {
284
+ if (!loaded) return throwError(() => error);
285
+ failures += 1;
286
+ return EMPTY;
287
+ }), map((detail) => detail), repeat({ delay: () => timer(flowsPollDelay(FLOWS_RUN_POLL_INTERVAL_MS, failures)) }), takeWhile((detail) => !isFlowRunTerminal(detail.run), true));
288
+ });
262
289
  }
263
290
  hasUnsettledRun(response) {
264
291
  return (response?.flow_runs ?? []).some((run) => !isFlowRunTerminal(run));
@@ -812,7 +839,7 @@ var FlowsRunInspectorComponent = class FlowsRunInspectorComponent extends AppBas
812
839
  dependencies: [
813
840
  {
814
841
  kind: "component",
815
- type: i4$1.AppLoaderComponent,
842
+ type: i4$2.AppLoaderComponent,
816
843
  selector: "pw-loader",
817
844
  inputs: [
818
845
  "isVisible",
@@ -1154,12 +1181,12 @@ var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
1154
1181
  dependencies: [
1155
1182
  {
1156
1183
  kind: "directive",
1157
- type: i3$2.NgControlStatus,
1184
+ type: i3$1.NgControlStatus,
1158
1185
  selector: "[formControlName],[ngModel],[formControl]"
1159
1186
  },
1160
1187
  {
1161
1188
  kind: "directive",
1162
- type: i3$2.NgModel,
1189
+ type: i3$1.NgModel,
1163
1190
  selector: "[ngModel]:not([formControlName]):not([formControl])",
1164
1191
  inputs: [
1165
1192
  "name",
@@ -1172,7 +1199,7 @@ var FlowsRunsFiltersComponent = class FlowsRunsFiltersComponent {
1172
1199
  },
1173
1200
  {
1174
1201
  kind: "component",
1175
- type: i4.Select,
1202
+ type: i4$1.Select,
1176
1203
  selector: "p-select",
1177
1204
  inputs: [
1178
1205
  "id",
@@ -1341,17 +1368,13 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
1341
1368
  page: this.page,
1342
1369
  page_size: this.PAGE_SIZE
1343
1370
  };
1344
- this.watch = this.flowsRunService.watchRuns(this.subscriptionId, this.query, paging).pipe(takeUntil(this.destroy$)).subscribe({
1345
- next: (response) => {
1371
+ this.watch = this.flowsRunService.watchRuns(this.subscriptionId, this.query, paging).pipe(takeUntil(this.destroy$)).subscribe((response) => {
1372
+ if (response) {
1346
1373
  this.runs = response.flow_runs ?? [];
1347
1374
  this.totalRecords = response.object_count ?? 0;
1348
1375
  this.totalRecordsUnFilter = response.unfiltered_count ?? 0;
1349
- this.settle();
1350
- },
1351
- error: () => {
1352
- this.runs = [];
1353
- this.settle();
1354
1376
  }
1377
+ this.settle();
1355
1378
  });
1356
1379
  }
1357
1380
  settle() {
@@ -1386,7 +1409,7 @@ var FlowsRunsComponent = class FlowsRunsComponent extends AppBaseComponent {
1386
1409
  dependencies: [
1387
1410
  {
1388
1411
  kind: "component",
1389
- type: i4$1.SkeletonTableComponent,
1412
+ type: i4$2.SkeletonTableComponent,
1390
1413
  selector: "pw-skeleton-table",
1391
1414
  inputs: [
1392
1415
  "rows",
@@ -1869,38 +1892,43 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
1869
1892
  selector: "pw-flows-workflow-form",
1870
1893
  usesInheritance: true,
1871
1894
  ngImport: i0,
1872
- 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",
1895
+ 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 <pw-sticky-actions>\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 </pw-sticky-actions>\n</form>\n}\n}\n",
1873
1896
  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"],
1874
1897
  dependencies: [
1898
+ {
1899
+ kind: "component",
1900
+ type: i6$1.PwStickyActionsComponent,
1901
+ selector: "pw-sticky-actions"
1902
+ },
1875
1903
  {
1876
1904
  kind: "directive",
1877
- type: i3$2.ɵNgNoValidate,
1905
+ type: i3$1.ɵNgNoValidate,
1878
1906
  selector: "form:not([ngNoForm]):not([ngNativeValidate])"
1879
1907
  },
1880
1908
  {
1881
1909
  kind: "directive",
1882
- type: i3$2.DefaultValueAccessor,
1910
+ type: i3$1.DefaultValueAccessor,
1883
1911
  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]"
1884
1912
  },
1885
1913
  {
1886
1914
  kind: "directive",
1887
- type: i3$2.NgControlStatus,
1915
+ type: i3$1.NgControlStatus,
1888
1916
  selector: "[formControlName],[ngModel],[formControl]"
1889
1917
  },
1890
1918
  {
1891
1919
  kind: "directive",
1892
- type: i3$2.NgControlStatusGroup,
1920
+ type: i3$1.NgControlStatusGroup,
1893
1921
  selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
1894
1922
  },
1895
1923
  {
1896
1924
  kind: "directive",
1897
- type: i3$2.MaxLengthValidator,
1925
+ type: i3$1.MaxLengthValidator,
1898
1926
  selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
1899
1927
  inputs: ["maxlength"]
1900
1928
  },
1901
1929
  {
1902
1930
  kind: "directive",
1903
- type: i3$2.FormGroupDirective,
1931
+ type: i3$1.FormGroupDirective,
1904
1932
  selector: "[formGroup]",
1905
1933
  inputs: ["formGroup"],
1906
1934
  outputs: ["ngSubmit"],
@@ -1908,7 +1936,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
1908
1936
  },
1909
1937
  {
1910
1938
  kind: "directive",
1911
- type: i3$2.FormControlName,
1939
+ type: i3$1.FormControlName,
1912
1940
  selector: "[formControlName]",
1913
1941
  inputs: [
1914
1942
  "formControlName",
@@ -1919,12 +1947,12 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
1919
1947
  },
1920
1948
  {
1921
1949
  kind: "directive",
1922
- type: i3$1.TrackDirtyFormDirective,
1950
+ type: i4.TrackDirtyFormDirective,
1923
1951
  selector: "[formGroup]:not([formGroupSkipDirty])"
1924
1952
  },
1925
1953
  {
1926
1954
  kind: "component",
1927
- type: i4$1.AppLoaderComponent,
1955
+ type: i4$2.AppLoaderComponent,
1928
1956
  selector: "pw-loader",
1929
1957
  inputs: [
1930
1958
  "isVisible",
@@ -1934,7 +1962,7 @@ var FlowsWorkflowFormComponent = class FlowsWorkflowFormComponent extends AppBas
1934
1962
  },
1935
1963
  {
1936
1964
  kind: "component",
1937
- type: i4.Select,
1965
+ type: i4$1.Select,
1938
1966
  selector: "p-select",
1939
1967
  inputs: [
1940
1968
  "id",
@@ -2091,7 +2119,7 @@ i0.ɵɵngDeclareClassMetadata({
2091
2119
  args: [{
2092
2120
  selector: "pw-flows-workflow-form",
2093
2121
  standalone: false,
2094
- 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",
2122
+ 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 <pw-sticky-actions>\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 </pw-sticky-actions>\n</form>\n}\n}\n",
2095
2123
  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"]
2096
2124
  }]
2097
2125
  }],
@@ -3656,52 +3684,52 @@ var FlowsCronFieldComponent = class FlowsCronFieldComponent {
3656
3684
  dependencies: [
3657
3685
  {
3658
3686
  kind: "directive",
3659
- type: i3$2.NgSelectOption,
3687
+ type: i3$1.NgSelectOption,
3660
3688
  selector: "option",
3661
3689
  inputs: ["ngValue", "value"]
3662
3690
  },
3663
3691
  {
3664
3692
  kind: "directive",
3665
- type: i3$2.ɵNgSelectMultipleOption,
3693
+ type: i3$1.ɵNgSelectMultipleOption,
3666
3694
  selector: "option",
3667
3695
  inputs: ["ngValue", "value"]
3668
3696
  },
3669
3697
  {
3670
3698
  kind: "directive",
3671
- type: i3$2.DefaultValueAccessor,
3699
+ type: i3$1.DefaultValueAccessor,
3672
3700
  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]"
3673
3701
  },
3674
3702
  {
3675
3703
  kind: "directive",
3676
- type: i3$2.NumberValueAccessor,
3704
+ type: i3$1.NumberValueAccessor,
3677
3705
  selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
3678
3706
  },
3679
3707
  {
3680
3708
  kind: "directive",
3681
- type: i3$2.SelectControlValueAccessor,
3709
+ type: i3$1.SelectControlValueAccessor,
3682
3710
  selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]",
3683
3711
  inputs: ["compareWith"]
3684
3712
  },
3685
3713
  {
3686
3714
  kind: "directive",
3687
- type: i3$2.NgControlStatus,
3715
+ type: i3$1.NgControlStatus,
3688
3716
  selector: "[formControlName],[ngModel],[formControl]"
3689
3717
  },
3690
3718
  {
3691
3719
  kind: "directive",
3692
- type: i3$2.MinValidator,
3720
+ type: i3$1.MinValidator,
3693
3721
  selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
3694
3722
  inputs: ["min"]
3695
3723
  },
3696
3724
  {
3697
3725
  kind: "directive",
3698
- type: i3$2.MaxValidator,
3726
+ type: i3$1.MaxValidator,
3699
3727
  selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",
3700
3728
  inputs: ["max"]
3701
3729
  },
3702
3730
  {
3703
3731
  kind: "directive",
3704
- type: i3$2.NgModel,
3732
+ type: i3$1.NgModel,
3705
3733
  selector: "[ngModel]:not([formControlName]):not([formControl])",
3706
3734
  inputs: [
3707
3735
  "name",
@@ -3796,12 +3824,12 @@ var FlowsTimezoneFieldComponent = class FlowsTimezoneFieldComponent {
3796
3824
  dependencies: [
3797
3825
  {
3798
3826
  kind: "directive",
3799
- type: i3$2.NgControlStatus,
3827
+ type: i3$1.NgControlStatus,
3800
3828
  selector: "[formControlName],[ngModel],[formControl]"
3801
3829
  },
3802
3830
  {
3803
3831
  kind: "directive",
3804
- type: i3$2.NgModel,
3832
+ type: i3$1.NgModel,
3805
3833
  selector: "[ngModel]:not([formControlName]):not([formControl])",
3806
3834
  inputs: [
3807
3835
  "name",
@@ -3814,7 +3842,7 @@ var FlowsTimezoneFieldComponent = class FlowsTimezoneFieldComponent {
3814
3842
  },
3815
3843
  {
3816
3844
  kind: "component",
3817
- type: i4.Select,
3845
+ type: i4$1.Select,
3818
3846
  selector: "p-select",
3819
3847
  inputs: [
3820
3848
  "id",
@@ -4001,17 +4029,17 @@ var FlowsJsonFieldComponent = class FlowsJsonFieldComponent {
4001
4029
  dependencies: [
4002
4030
  {
4003
4031
  kind: "directive",
4004
- type: i3$2.DefaultValueAccessor,
4032
+ type: i3$1.DefaultValueAccessor,
4005
4033
  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]"
4006
4034
  },
4007
4035
  {
4008
4036
  kind: "directive",
4009
- type: i3$2.NgControlStatus,
4037
+ type: i3$1.NgControlStatus,
4010
4038
  selector: "[formControlName],[ngModel],[formControl]"
4011
4039
  },
4012
4040
  {
4013
4041
  kind: "directive",
4014
- type: i3$2.NgModel,
4042
+ type: i3$1.NgModel,
4015
4043
  selector: "[ngModel]:not([formControlName]):not([formControl])",
4016
4044
  inputs: [
4017
4045
  "name",
@@ -4318,29 +4346,29 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
4318
4346
  dependencies: [
4319
4347
  {
4320
4348
  kind: "directive",
4321
- type: i3$2.NgSelectOption,
4349
+ type: i3$1.NgSelectOption,
4322
4350
  selector: "option",
4323
4351
  inputs: ["ngValue", "value"]
4324
4352
  },
4325
4353
  {
4326
4354
  kind: "directive",
4327
- type: i3$2.ɵNgSelectMultipleOption,
4355
+ type: i3$1.ɵNgSelectMultipleOption,
4328
4356
  selector: "option",
4329
4357
  inputs: ["ngValue", "value"]
4330
4358
  },
4331
4359
  {
4332
4360
  kind: "directive",
4333
- type: i3$2.DefaultValueAccessor,
4361
+ type: i3$1.DefaultValueAccessor,
4334
4362
  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]"
4335
4363
  },
4336
4364
  {
4337
4365
  kind: "directive",
4338
- type: i3$2.NgControlStatus,
4366
+ type: i3$1.NgControlStatus,
4339
4367
  selector: "[formControlName],[ngModel],[formControl]"
4340
4368
  },
4341
4369
  {
4342
4370
  kind: "directive",
4343
- type: i3$2.NgModel,
4371
+ type: i3$1.NgModel,
4344
4372
  selector: "[ngModel]:not([formControlName]):not([formControl])",
4345
4373
  inputs: [
4346
4374
  "name",
@@ -4381,7 +4409,7 @@ var FlowsConditionFieldComponent = class FlowsConditionFieldComponent {
4381
4409
  },
4382
4410
  {
4383
4411
  kind: "component",
4384
- type: i4.Select,
4412
+ type: i4$1.Select,
4385
4413
  selector: "p-select",
4386
4414
  inputs: [
4387
4415
  "id",
@@ -4599,17 +4627,17 @@ var FlowsPairsFieldComponent = class FlowsPairsFieldComponent {
4599
4627
  dependencies: [
4600
4628
  {
4601
4629
  kind: "directive",
4602
- type: i3$2.DefaultValueAccessor,
4630
+ type: i3$1.DefaultValueAccessor,
4603
4631
  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]"
4604
4632
  },
4605
4633
  {
4606
4634
  kind: "directive",
4607
- type: i3$2.NgControlStatus,
4635
+ type: i3$1.NgControlStatus,
4608
4636
  selector: "[formControlName],[ngModel],[formControl]"
4609
4637
  },
4610
4638
  {
4611
4639
  kind: "directive",
4612
- type: i3$2.NgModel,
4640
+ type: i3$1.NgModel,
4613
4641
  selector: "[ngModel]:not([formControlName]):not([formControl])",
4614
4642
  inputs: [
4615
4643
  "name",
@@ -4842,12 +4870,12 @@ var FlowsMemberFieldComponent = class FlowsMemberFieldComponent {
4842
4870
  dependencies: [
4843
4871
  {
4844
4872
  kind: "directive",
4845
- type: i3$2.NgControlStatus,
4873
+ type: i3$1.NgControlStatus,
4846
4874
  selector: "[formControlName],[ngModel],[formControl]"
4847
4875
  },
4848
4876
  {
4849
4877
  kind: "directive",
4850
- type: i3$2.NgModel,
4878
+ type: i3$1.NgModel,
4851
4879
  selector: "[ngModel]:not([formControlName]):not([formControl])",
4852
4880
  inputs: [
4853
4881
  "name",
@@ -5021,34 +5049,34 @@ var FlowsRetryFieldComponent = class FlowsRetryFieldComponent {
5021
5049
  dependencies: [
5022
5050
  {
5023
5051
  kind: "directive",
5024
- type: i3$2.DefaultValueAccessor,
5052
+ type: i3$1.DefaultValueAccessor,
5025
5053
  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]"
5026
5054
  },
5027
5055
  {
5028
5056
  kind: "directive",
5029
- type: i3$2.NumberValueAccessor,
5057
+ type: i3$1.NumberValueAccessor,
5030
5058
  selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
5031
5059
  },
5032
5060
  {
5033
5061
  kind: "directive",
5034
- type: i3$2.NgControlStatus,
5062
+ type: i3$1.NgControlStatus,
5035
5063
  selector: "[formControlName],[ngModel],[formControl]"
5036
5064
  },
5037
5065
  {
5038
5066
  kind: "directive",
5039
- type: i3$2.MinValidator,
5067
+ type: i3$1.MinValidator,
5040
5068
  selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
5041
5069
  inputs: ["min"]
5042
5070
  },
5043
5071
  {
5044
5072
  kind: "directive",
5045
- type: i3$2.MaxValidator,
5073
+ type: i3$1.MaxValidator,
5046
5074
  selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]",
5047
5075
  inputs: ["max"]
5048
5076
  },
5049
5077
  {
5050
5078
  kind: "directive",
5051
- type: i3$2.NgModel,
5079
+ type: i3$1.NgModel,
5052
5080
  selector: "[ngModel]:not([formControlName]):not([formControl])",
5053
5081
  inputs: [
5054
5082
  "name",
@@ -5572,17 +5600,17 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
5572
5600
  dependencies: [
5573
5601
  {
5574
5602
  kind: "directive",
5575
- type: i3$2.DefaultValueAccessor,
5603
+ type: i3$1.DefaultValueAccessor,
5576
5604
  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]"
5577
5605
  },
5578
5606
  {
5579
5607
  kind: "directive",
5580
- type: i3$2.NgControlStatus,
5608
+ type: i3$1.NgControlStatus,
5581
5609
  selector: "[formControlName],[ngModel],[formControl]"
5582
5610
  },
5583
5611
  {
5584
5612
  kind: "directive",
5585
- type: i3$2.NgModel,
5613
+ type: i3$1.NgModel,
5586
5614
  selector: "[ngModel]:not([formControlName]):not([formControl])",
5587
5615
  inputs: [
5588
5616
  "name",
@@ -5623,7 +5651,7 @@ var FlowsNodeInspectorComponent = class FlowsNodeInspectorComponent {
5623
5651
  },
5624
5652
  {
5625
5653
  kind: "component",
5626
- type: i4.Select,
5654
+ type: i4$1.Select,
5627
5655
  selector: "p-select",
5628
5656
  inputs: [
5629
5657
  "id",
@@ -6027,7 +6055,7 @@ var FlowsVersionEditorComponent = class FlowsVersionEditorComponent {
6027
6055
  dependencies: [
6028
6056
  {
6029
6057
  kind: "component",
6030
- type: i4$1.AppLoaderComponent,
6058
+ type: i4$2.AppLoaderComponent,
6031
6059
  selector: "pw-loader",
6032
6060
  inputs: [
6033
6061
  "isVisible",
@@ -6359,7 +6387,7 @@ var FlowsWorkflowVersionsComponent = class FlowsWorkflowVersionsComponent extend
6359
6387
  dependencies: [
6360
6388
  {
6361
6389
  kind: "component",
6362
- type: i4$1.SkeletonTableComponent,
6390
+ type: i4$2.SkeletonTableComponent,
6363
6391
  selector: "pw-skeleton-table",
6364
6392
  inputs: [
6365
6393
  "rows",
@@ -6767,12 +6795,12 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
6767
6795
  dependencies: [
6768
6796
  {
6769
6797
  kind: "directive",
6770
- type: i3$2.NgControlStatus,
6798
+ type: i3$1.NgControlStatus,
6771
6799
  selector: "[formControlName],[ngModel],[formControl]"
6772
6800
  },
6773
6801
  {
6774
6802
  kind: "directive",
6775
- type: i3$2.NgModel,
6803
+ type: i3$1.NgModel,
6776
6804
  selector: "[ngModel]:not([formControlName]):not([formControl])",
6777
6805
  inputs: [
6778
6806
  "name",
@@ -6785,7 +6813,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
6785
6813
  },
6786
6814
  {
6787
6815
  kind: "component",
6788
- type: i4$1.SkeletonTableComponent,
6816
+ type: i4$2.SkeletonTableComponent,
6789
6817
  selector: "pw-skeleton-table",
6790
6818
  inputs: [
6791
6819
  "rows",
@@ -6939,7 +6967,7 @@ var FlowsWorkflowsComponent = class FlowsWorkflowsComponent extends AppBaseCompo
6939
6967
  },
6940
6968
  {
6941
6969
  kind: "component",
6942
- type: i4.Select,
6970
+ type: i4$1.Select,
6943
6971
  selector: "p-select",
6944
6972
  inputs: [
6945
6973
  "id",
@@ -7273,6 +7301,7 @@ var FlowsPrivateModule = class FlowsPrivateModule {
7273
7301
  FlowWorkflowBadgePipe
7274
7302
  ],
7275
7303
  imports: [
7304
+ PwStickyActionsComponent,
7276
7305
  CommonModule,
7277
7306
  FormsModule,
7278
7307
  ReactiveFormsModule,
@@ -7306,6 +7335,7 @@ var FlowsPrivateModule = class FlowsPrivateModule {
7306
7335
  }
7307
7336
  }],
7308
7337
  imports: [
7338
+ PwStickyActionsComponent,
7309
7339
  CommonModule,
7310
7340
  FormsModule,
7311
7341
  ReactiveFormsModule,
@@ -7334,6 +7364,7 @@ i0.ɵɵngDeclareClassMetadata({
7334
7364
  type: NgModule,
7335
7365
  args: [{
7336
7366
  imports: [
7367
+ PwStickyActionsComponent,
7337
7368
  CommonModule,
7338
7369
  FormsModule,
7339
7370
  ReactiveFormsModule,