verben-workflow-ui 0.7.1 → 0.7.2

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.
@@ -1,18 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, ViewChildren, HostListener, NgModule } from '@angular/core';
3
- import * as i4 from 'verben-ng-ui';
3
+ import * as i5 from 'verben-ng-ui';
4
4
  import { DataType, DataTableModule, SvgModule, VerbenPopUpModule, DataViewModule, VerbenaButtonModule, CardDataViewModule, DropDownModule, VerbenaSwitchModule, TableFilterModule, VisibleColumnModule, SortTableModule, DataExportModule, TooltipModule, VerbenDialogueModule, VerbenaInputModule, VerbenaTextareaModule } from 'verben-ng-ui';
5
- import * as i5 from 'verben-reporting-ui';
5
+ import * as i6 from 'verben-reporting-ui';
6
6
  import { EditorMode, EditorModule } from 'verben-reporting-ui';
7
7
  import { ObjectState, ErrorResponse, SortDirection } from 'verben-workflow-ui/src/lib/models';
8
8
  import * as i1 from 'verben-workflow-ui/src/lib/services';
9
- import * as i2 from '@angular/common';
9
+ import * as i2 from '@angular/platform-browser';
10
+ import * as i3 from '@angular/common';
10
11
  import { CommonModule } from '@angular/common';
11
- import * as i3 from '@angular/forms';
12
+ import * as i4 from '@angular/forms';
12
13
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
13
- import * as i6 from 'verben-workflow-ui/src/lib/components/form-control';
14
+ import * as i7 from 'verben-workflow-ui/src/lib/components/form-control';
14
15
  import { FormControlerModule } from 'verben-workflow-ui/src/lib/components/form-control';
15
- import * as i7 from 'verben-workflow-ui/src/lib/components/form-viewer';
16
+ import * as i8 from 'verben-workflow-ui/src/lib/components/form-viewer';
16
17
  import { FormViewerLibModule } from 'verben-workflow-ui/src/lib/components/form-viewer';
17
18
 
18
19
  class WorkflowStageComponent /* implements DoCheck */ {
@@ -20,6 +21,7 @@ class WorkflowStageComponent /* implements DoCheck */ {
20
21
  server;
21
22
  cdr;
22
23
  differs;
24
+ sanitizer;
23
25
  pageSize = 50;
24
26
  historyToDate = [];
25
27
  taskCode = null;
@@ -47,6 +49,15 @@ class WorkflowStageComponent /* implements DoCheck */ {
47
49
  transform: '',
48
50
  showAbove: true,
49
51
  };
52
+ isViewCommentModalOpen = false;
53
+ viewCommentStage = null;
54
+ viewCommentDecoded = '';
55
+ isViewCommentHtml = false;
56
+ viewCommentFormatted = '';
57
+ viewCommentCopyStatus = 'Copy';
58
+ decodedCommentCache = new Map();
59
+ isHtmlCache = new Map();
60
+ formattedCommentCache = new Map();
50
61
  currentActors = [];
51
62
  user = null;
52
63
  userName = null;
@@ -170,11 +181,12 @@ class WorkflowStageComponent /* implements DoCheck */ {
170
181
  historyDiffer;
171
182
  actionsDiffer;
172
183
  lastTaskCode = null;
173
- constructor(utilService, server, cdr, differs) {
184
+ constructor(utilService, server, cdr, differs, sanitizer) {
174
185
  this.utilService = utilService;
175
186
  this.server = server;
176
187
  this.cdr = cdr;
177
188
  this.differs = differs;
189
+ this.sanitizer = sanitizer;
178
190
  this.historyDiffer = this.differs.find([]).create(this.trackByStage);
179
191
  this.actionsDiffer = this.differs.find([]).create(this.trackByAction);
180
192
  this.getActors().then((res) => {
@@ -688,13 +700,130 @@ class WorkflowStageComponent /* implements DoCheck */ {
688
700
  }
689
701
  return '';
690
702
  }
691
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStageComponent /* implements DoCheck */, deps: [{ token: i1.UtilService }, { token: i1.HttpWebRequestService }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
692
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: WorkflowStageComponent /* implements DoCheck */, selector: "app-workflow-stage", inputs: { pageSize: "pageSize", historyToDate: "historyToDate", taskCode: "taskCode", forms: "forms", isVisible: "isVisible", readOnly: "readOnly", currentActors: "currentActors", user: "user", userName: "userName", nextActions: "nextActions", task: "task" }, outputs: { onActionCompleted: "onActionCompleted", onPickCompleted: "onPickCompleted", onCommentCompleted: "onCommentCompleted", onFormCompleted: "onFormCompleted", onOpen: "onOpen", onClose: "onClose" }, host: { listeners: { "window:scroll": "onWindowScroll()" } }, viewQueries: [{ propertyName: "popUps", predicate: ["popup"], descendants: true }, { propertyName: "popUp2s", predicate: ["popup2"], descendants: true }, { propertyName: "popUp3s", predicate: ["popup3"], descendants: true }, { propertyName: "popUp4s", predicate: ["popup4"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n (scroll)=\"onStageMouseLeave()\"\n class=\"flex overflow-x-auto items-start min-h-max overflow-y-clip pt-3 pb-3 px-1\"\n>\n <div\n *ngFor=\"\n let stage of localHistoryToDate;\n trackBy: trackByStage;\n let i = index\n \"\n >\n <div class=\"flex items-center\">\n <!-- Stage circle with hover actor tooltip and click stage form popup -->\n <div\n class=\"w-[30px] h-[30px] flex cursor-pointer justify-center items-center rounded-full bg-primary text-white shadow-xs hover:ring-2 hover:ring-primary/30 transition-all duration-150\"\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n >\n <!-- In task mode: Stage Form popup on click -->\n <ng-container *ngIf=\"taskCode; else plainStageCircle\">\n <verben-pop-Up\n #popup3\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"onStageClick()\"\n class=\"flex items-center justify-center w-full h-full\"\n >\n <!-- Clean modern checkmark -->\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n (click)=\"loadFormIfExists(stage.ToStage)\"\n class=\"pop-up-value cursor-pointer\"\n >\n Load Stage Form\n </div>\n </div>\n </verben-pop-Up>\n </ng-container>\n\n <!-- Plain checkmark when not in task mode -->\n <ng-template #plainStageCircle>\n <div class=\"flex items-center justify-center w-full h-full\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n </ng-template>\n </div>\n\n <ng-container\n *ngIf=\"\n localHistoryToDate[i + 1] ||\n (i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly)\n \"\n >\n <div\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n <div\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly\n \"\n class=\"relative inline-flex\"\n >\n <verben-pop-Up\n #popup2\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"passOnPositions\"\n >\n <div dropdown-trigger class=\"inline-flex\">\n <p\n (click)=\"\n openCommentFor(selectedAction || localNextActions[0], $event)\n \"\n [ngClass]=\"{\n 'cursor-not-allowed opacity-50 pointer-events-none':\n disableNotActor(),\n 'cursor-pointer': !disableNotActor(),\n }\"\n class=\"text-center min-w-max rounded-md h-[30px] text-[white] text-sm flex justify-center items-center py-1 max-w-fit px-2 bg-primary\"\n >\n {{\n selectedAction?.Name ||\n selectedAction?.ToStageName ||\n localNextActions[0]?.Name ||\n localNextActions[0]?.ToStageName\n }}\n </p>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"p-4 transition-all duration-200 max-h-[45vh] overflow-y-auto\"\n [style.width]=\"isRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ getActionCaption(selectedAction) || \"Add Comment\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp2()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Send To -->\n <div\n class=\"flex flex-col gap-1.5\"\n *ngIf=\"nextActors.length > 0\"\n >\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Send To\n </label>\n <span class=\"text-[11px] text-gray-400\">Optional</span>\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Send to (optional)\"\n [options]=\"nextActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [filter]=\"true\"\n [filterBy]=\"'Name'\"\n [(ngModel)]=\"selectedRecipient\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Copy -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Copy\n </label>\n <span class=\"text-[11px] text-gray-400\">Notify actors</span>\n </div>\n <verben-drop-down\n selectKey=\"Code\"\n display=\"chip\"\n width=\"100%\"\n placeholder=\"Select Actors\"\n [showClear]=\"true\"\n [filter]=\"true\"\n (onChange)=\"onCopyChanged($event)\"\n [load]=\"this.loadMoreActors.bind(this)\"\n [search]=\"this.searchActors.bind(this)\"\n [(options)]=\"actors\"\n optionLabel=\"Name\"\n [multiselect]=\"true\"\n [(ngModel)]=\"copy\"\n [lazyLoad]=\"true\"\n [asyncLabel]=\"this.getAsyncLabel.bind(this)\"\n >\n </verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"commentText\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"commentText\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp2()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"completeAction(selectedAction)\"\n [disable]=\"!isCommentValid()\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n\n <div *ngIf=\"canPick()\" class=\"absolute -top-2 -right-2 z-10\">\n <verben-pop-Up\n #popup4\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"reassignPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"openPickPopup($event)\"\n [title]=\"\n isReassign()\n ? 'Reassign task to yourself to act on this stage'\n : 'Pick task to act on this stage'\n \"\n class=\"w-[18px] h-[18px] rounded-full bg-[#FFE681] ring-2 ring-white shadow flex items-center justify-center cursor-pointer\"\n >\n <verben-svg\n icon=\"user\"\n fill=\"#404040\"\n [width]=\"12\"\n [height]=\"12\"\n ></verben-svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"p-4 transition-all duration-200\"\n [style.width]=\"isPickRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ isReassign() ? \"Reassign Task\" : \"Pick Task\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp4()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Stage (if not reassign) -->\n <div class=\"flex flex-col gap-1.5\" *ngIf=\"!isReassign()\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Stage</span>\n <span class=\"text-red-500\">*</span>\n </label>\n <verben-drop-down\n width=\"100%\"\n label=\"Stage\"\n [options]=\"task?.FullStages || []\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [(ngModel)]=\"selectedStageCode\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Assign To -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Assign to\n </label>\n <span class=\"text-[11px] text-gray-400\"\n >Current Actor</span\n >\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Assign to\"\n [options]=\"pickActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [(ngModel)]=\"pickRecipient\"\n [disabled]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(false)\"\n [ngClass]=\"\n !isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(true)\"\n [ngClass]=\"\n isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isPickRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"pickComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isPickRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"pickComment\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp4()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"submitPick()\"\n [disable]=\"\n !isPickCommentValid() ||\n !pickRecipient ||\n (!isReassign() && !selectedStageCode)\n \"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n </div>\n </div>\n\n <ng-container>\n <div\n *ngIf=\"localHistoryToDate[i + 1]?.ActionName\"\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n localNextActions.length !== 1 &&\n !readOnly\n \"\n >\n <div>\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div dropdown-trigger class=\"flex items-center\">\n <div class=\"w-[20px] h-[2px] bg-[#D4A007]\"></div>\n <div class=\"mt-2\">\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n stroke=\"#D4A007\"\n icon=\"chevron\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-3 py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >Actions</span\n >\n </div>\n <ul class=\"flex flex-col py-1\">\n <li\n *ngFor=\"\n let action of localNextActions;\n trackBy: trackByAction\n \"\n >\n <button\n [disabled]=\"disableNotActor()\"\n class=\"w-full text-left px-3 py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors disabled:cursor-not-allowed disabled:opacity-40 cursor-pointer flex items-center justify-between\"\n (click)=\"openCommentFor(action, $event); closePopUp()\"\n >\n <span>{{\n action.Name || action.ToStageName || \"Unnamed\"\n }}</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </div>\n </ng-container>\n </div>\n <ng-container\n *ngIf=\"\n stage.ToStageName && stage.ToStageName.length > 20;\n else plainStageName\n \"\n >\n <verben-tooltip\n [top]=\"'0px'\"\n [textColor]=\"'#000'\"\n [backgroundColor]=\"'#D3D3D3'\"\n [left]=\"'0'\"\n [tooltipContent]=\"tooltipTemplate2\"\n #tooltip\n >\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName | slice: 0 : 20 }}...\n </p>\n </verben-tooltip>\n <ng-template #tooltipTemplate2>\n <div>\n <p class=\"text-xs\">{{ stage.ToStageName }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #plainStageName>\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName || \"\" }}\n </p>\n </ng-template>\n </div>\n</div>\n<verben-dialogue\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [mode]=\"'drawer'\"\n [padding]=\"'0px'\"\n [drawerWidth]=\"'500px'\"\n position=\"right\"\n [disableFooter]=\"false\"\n [isVisible]=\"isVisible\"\n [modalData]=\"taskForms\"\n (openModal)=\"onModalOpen($event)\"\n (closeModal)=\"onModalClose($event)\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [showCloseIcon]=\"true\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n <h1>{{ forms[0]?.Name }}</h1>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div class=\"p-3\">\n <div *ngIf=\"forms?.[active]?.Entities?.length; else emptyState\">\n <div\n *ngFor=\"let entity of forms[active]?.Entities; let j = index\"\n class=\"mb-6 pb-4\"\n >\n <form-control\n [formProperties]=\"entity?.Properties || []\"\n ></form-control>\n <div class=\"flex gap-3 justify-end mt-4\">\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"submitForm(active)\"\n [disable]=\"!areRequiredPropertiesFilled(entity?.Properties)\"\n text=\"Proceed\"\n ></verbena-button>\n </div>\n </div>\n </div>\n\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n </div>\n</ng-template>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n\n<!-- Floating Actor Tooltip with Edge Detection -->\n<div\n *ngIf=\"\n hoveredStage && (hoveredStage.Actor?.Identifier || hoveredStage.Actor?.Name)\n \"\n class=\"fixed z-[9999] pointer-events-none transition-opacity duration-150 ease-out\"\n [style.top.px]=\"stageTooltipPos.top\"\n [style.left.px]=\"stageTooltipPos.left\"\n [style.transform]=\"stageTooltipPos.transform\"\n>\n <div\n class=\"bg-gray-800 text-white text-xs rounded-md px-2.5 py-1 shadow-md whitespace-nowrap relative flex items-center gap-1.5\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'user'\"\n stroke=\"#cbd5e1\"\n ></verben-svg>\n <span class=\"font-medium text-[12px]\">{{\n hoveredStage.Actor?.Name || hoveredStage.Actor?.Identifier\n }}</span>\n <!-- <span\n *ngIf=\"\n hoveredStage.Actor?.Name &&\n hoveredStage.Actor?.Identifier &&\n hoveredStage.Actor.Name !== hoveredStage.Actor.Identifier\n \"\n class=\"text-gray-300 text-[11px]\"\n >\n ({{ hoveredStage.Actor.Identifier }})\n </span> -->\n\n <!-- Arrow pointing toward circle -->\n <div\n *ngIf=\"stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -bottom-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-t-[4px] border-t-gray-800\"\n ></div>\n <div\n *ngIf=\"!stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -top-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-b-[4px] border-b-gray-800\"\n ></div>\n </div>\n</div>\n", styles: [".workflow-container{position:relative}.dialog{position:absolute;top:100%;left:0;background:var(--vbn-color-surface);border:1px solid var(--vbn-color-border);padding:1rem}.completed{text-decoration:line-through;color:var(--vbn-color-text-muted)}.pop-up-content{border-radius:8px;background-color:var(--vbn-color-surface, #ffffff);border:1px solid #e2e8f0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d}.pop-up-value{padding:10px 20px}.workflow-comment-editor{border:1px solid #cbd5e1;border-radius:6px;background-color:#fff;display:flex;flex-direction:column;height:250px;max-height:300px;overflow:visible!important;position:relative}::ng-deep .workflow-comment-editor lib-editor{display:flex!important;flex-direction:column!important;height:100%!important;width:100%!important;overflow:visible!important}::ng-deep .workflow-comment-editor lib-editor>div{gap:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:visible!important}::ng-deep .workflow-comment-editor .editor-menu{flex-shrink:0!important;padding:4px 6px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;gap:4px;overflow:visible!important;border-top-left-radius:5px;border-top-right-radius:5px;position:relative;z-index:50}::ng-deep .workflow-comment-editor .editor-menu-group{overflow:visible!important}::ng-deep .workflow-comment-editor .color-picker-popover{max-height:240px!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:1050!important;box-shadow:0 10px 25px -5px #00000040,0 8px 10px -6px #00000026!important;border:1px solid #cbd5e1!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar{width:5px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-track{background:transparent!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:3px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb:hover{background:#94a3b8!important}::ng-deep .workflow-comment-editor .color-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .font-family-popover,::ng-deep .workflow-comment-editor .font-size-popover{z-index:1050!important}::ng-deep .workflow-comment-editor .font-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .editor-menu-item{width:26px;height:26px;border-radius:4px;background:transparent;transition:background-color .15s ease}::ng-deep .workflow-comment-editor .editor-menu-item:hover{background-color:#e2e8f0}::ng-deep .workflow-comment-editor .font-family-trigger{height:26px;width:110px;font-size:11px}::ng-deep .workflow-comment-editor .font-size-group{height:26px}::ng-deep .workflow-comment-editor .font-size-step-btn{height:24px;width:18px}::ng-deep .workflow-comment-editor .font-size-combobox{height:24px}::ng-deep .workflow-comment-editor .font-size-input{font-size:11px}::ng-deep .workflow-comment-editor .editor-container{flex:1 1 0!important;min-height:0!important;height:100%!important;gap:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}::ng-deep .workflow-comment-editor lib-editor-designer{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:100%!important;overflow:hidden!important}::ng-deep .workflow-comment-editor .editable-div-wrapper{flex:1 1 0!important;min-height:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important;background-color:#fff}::ng-deep .workflow-comment-editor .editable{flex:1 1 0!important;min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:auto!important;padding:10px 12px 40px!important;outline:none;font-size:13px;line-height:1.5;box-sizing:border-box!important}::ng-deep .workflow-comment-editor [title=\"Code View\"]{display:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "component", type: i4.VerbenPopUpComponent, selector: "verben-pop-Up", inputs: ["dropdownOpen", "dropdownWidth", "color", "customStyles", "popUpClass", "border", "borderRadius", "enableMouseLeave", "cdkPosition"], outputs: ["dropdownOpenChange", "close"] }, { kind: "component", type: i4.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "styleType", "size", "block", "disable", "disabled", "isLoading", "spinnerSize", "spinnerColor", "svg", "svgPosition", "svgWidth", "svgHeight", "svgSize", "svgColor", "icon", "useIcon", "iconPosition", "iconColor", "variant", "weight", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i4.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "autoScrollToCurrentItem", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i4.TooltipComponent, selector: "verben-tooltip", inputs: ["tooltipContent", "customClass", "backgroundColor", "textColor", "padding", "borderRadius", "zIndex", "border", "width", "top", "bottom", "left", "right"] }, { kind: "component", type: i4.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "component", type: i4.VerbenaTextareaComponent, selector: "verbena-textarea", inputs: ["disabled", "label", "required", "rows", "cols", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "value", "errorMessageColor"], outputs: ["valueChange"] }, { kind: "component", type: i5.EditorComponent, selector: "lib-editor", inputs: ["themeColor", "disabled", "editorMode", "editorConfig", "content"], outputs: ["editorModeChange", "onImageEdit", "onSortEdit"] }, { kind: "component", type: i6.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i7.FormViewerComponent, selector: "app-form-viewer", inputs: ["form", "isVisible"], outputs: ["onOpen", "onClose"] }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }] });
703
+ openViewComment(stage) {
704
+ this.closePopUp3();
705
+ this.onStageMouseLeave();
706
+ this.viewCommentStage = stage;
707
+ const raw = stage?.Description || stage?.Comment || '';
708
+ this.viewCommentDecoded = this.decodeComment(raw);
709
+ this.isViewCommentHtml = this.isHtml(raw);
710
+ this.viewCommentFormatted = this.isViewCommentHtml
711
+ ? this.getFormattedComment(raw)
712
+ : '';
713
+ this.viewCommentCopyStatus = 'Copy';
714
+ this.isViewCommentModalOpen = true;
715
+ this.cdr.markForCheck();
716
+ }
717
+ closeViewComment() {
718
+ this.isViewCommentModalOpen = false;
719
+ this.viewCommentStage = null;
720
+ this.viewCommentDecoded = '';
721
+ this.isViewCommentHtml = false;
722
+ this.viewCommentFormatted = '';
723
+ this.cdr.markForCheck();
724
+ }
725
+ onEscape() {
726
+ if (this.isViewCommentModalOpen) {
727
+ this.closeViewComment();
728
+ }
729
+ }
730
+ decodeComment(content) {
731
+ if (!content)
732
+ return '';
733
+ const cached = this.decodedCommentCache.get(content);
734
+ if (cached !== undefined)
735
+ return cached;
736
+ let result = content;
737
+ try {
738
+ while (/%[0-9A-Fa-f]{2}/.test(result)) {
739
+ const decoded = decodeURIComponent(result);
740
+ if (decoded === result)
741
+ break;
742
+ result = decoded;
743
+ }
744
+ }
745
+ catch {
746
+ try {
747
+ result = result.replace(/%([0-9A-Fa-f]{2})/g, (_, hex) => {
748
+ try {
749
+ return decodeURIComponent('%' + hex);
750
+ }
751
+ catch {
752
+ return '%' + hex;
753
+ }
754
+ });
755
+ }
756
+ catch {
757
+ result = content;
758
+ }
759
+ }
760
+ this.decodedCommentCache.set(content, result);
761
+ return result;
762
+ }
763
+ isHtml(content) {
764
+ if (!content)
765
+ return false;
766
+ const cached = this.isHtmlCache.get(content);
767
+ if (cached !== undefined)
768
+ return cached;
769
+ const decoded = this.decodeComment(content).trim();
770
+ const res = /<\s*(p|div|span|table|tr|td|th|tbody|thead|tfoot|strong|em|b|i|u|s|strike|ul|ol|li|h[1-6]|br|hr|img|a|blockquote|pre|code)(\s+[^>]*)?>/i.test(decoded);
771
+ this.isHtmlCache.set(content, res);
772
+ return res;
773
+ }
774
+ getFormattedComment(content) {
775
+ if (!content)
776
+ return '';
777
+ const cached = this.formattedCommentCache.get(content);
778
+ if (cached !== undefined)
779
+ return cached;
780
+ const decoded = this.decodeComment(content);
781
+ const safe = this.sanitizer.bypassSecurityTrustHtml(decoded);
782
+ this.formattedCommentCache.set(content, safe);
783
+ return safe;
784
+ }
785
+ async copyViewCommentText() {
786
+ if (!this.viewCommentDecoded)
787
+ return;
788
+ const textToCopy = this.isViewCommentHtml
789
+ ? this.viewCommentDecoded
790
+ .replace(/<[^>]*>/g, '')
791
+ .replace(/&nbsp;/g, ' ')
792
+ .trim()
793
+ : this.viewCommentDecoded;
794
+ try {
795
+ if (navigator.clipboard && navigator.clipboard.writeText) {
796
+ await navigator.clipboard.writeText(textToCopy);
797
+ }
798
+ else {
799
+ const textarea = document.createElement('textarea');
800
+ textarea.value = textToCopy;
801
+ document.body.appendChild(textarea);
802
+ textarea.select();
803
+ document.execCommand('copy');
804
+ document.body.removeChild(textarea);
805
+ }
806
+ this.viewCommentCopyStatus = 'Copied!';
807
+ setTimeout(() => {
808
+ this.viewCommentCopyStatus = 'Copy';
809
+ this.cdr.markForCheck();
810
+ }, 2000);
811
+ }
812
+ catch {
813
+ this.viewCommentCopyStatus = 'Failed';
814
+ setTimeout(() => {
815
+ this.viewCommentCopyStatus = 'Copy';
816
+ this.cdr.markForCheck();
817
+ }, 2000);
818
+ }
819
+ }
820
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStageComponent /* implements DoCheck */, deps: [{ token: i1.UtilService }, { token: i1.HttpWebRequestService }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
821
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: WorkflowStageComponent /* implements DoCheck */, selector: "app-workflow-stage", inputs: { pageSize: "pageSize", historyToDate: "historyToDate", taskCode: "taskCode", forms: "forms", isVisible: "isVisible", readOnly: "readOnly", currentActors: "currentActors", user: "user", userName: "userName", nextActions: "nextActions", task: "task" }, outputs: { onActionCompleted: "onActionCompleted", onPickCompleted: "onPickCompleted", onCommentCompleted: "onCommentCompleted", onFormCompleted: "onFormCompleted", onOpen: "onOpen", onClose: "onClose" }, host: { listeners: { "window:scroll": "onWindowScroll()", "document:keydown.escape": "onEscape()" } }, viewQueries: [{ propertyName: "popUps", predicate: ["popup"], descendants: true }, { propertyName: "popUp2s", predicate: ["popup2"], descendants: true }, { propertyName: "popUp3s", predicate: ["popup3"], descendants: true }, { propertyName: "popUp4s", predicate: ["popup4"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n (scroll)=\"onStageMouseLeave()\"\n class=\"flex overflow-x-auto items-start min-h-max overflow-y-clip pt-3 pb-3 px-1\"\n>\n <div\n *ngFor=\"\n let stage of localHistoryToDate;\n trackBy: trackByStage;\n let i = index\n \"\n >\n <div class=\"flex items-center\">\n <!-- Stage circle with hover actor tooltip and click stage options popup -->\n <ng-container *ngIf=\"taskCode; else plainStageCircle\">\n <verben-pop-Up\n #popup3\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"onStageClick()\"\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n class=\"w-[30px] h-[30px] flex cursor-pointer justify-center items-center rounded-full bg-primary text-white shadow-xs hover:ring-2 hover:ring-primary/30 transition-all duration-150\"\n >\n <!-- Clean modern checkmark -->\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-[18px] py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >\n {{ stage.ToStageName || stage.ActionName || \"Stage Options\" }}\n </span>\n </div>\n <ul class=\"flex flex-col py-1\">\n <li>\n <button\n type=\"button\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors cursor-pointer flex items-center gap-2\"\n (click)=\"openViewComment(stage)\"\n >\n <svg\n width=\"13\"\n height=\"13\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"\n ></path>\n </svg>\n <span>View Comment</span>\n </button>\n </li>\n <li>\n <button\n type=\"button\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors cursor-pointer flex items-center gap-2\"\n (click)=\"loadFormIfExists(stage.ToStage); closePopUp3()\"\n >\n <svg\n width=\"13\"\n height=\"13\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"\n ></path>\n <polyline points=\"14 2 14 8 20 8\"></polyline>\n <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n <polyline points=\"10 9 9 9 8 9\"></polyline>\n </svg>\n <span>Load Stage Form</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </ng-container>\n\n <!-- Plain checkmark when not in task mode -->\n <ng-template #plainStageCircle>\n <div\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n class=\"w-[30px] h-[30px] flex justify-center items-center rounded-full bg-primary text-white shadow-xs\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n </ng-template>\n\n <ng-container\n *ngIf=\"\n localHistoryToDate[i + 1] ||\n (i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly)\n \"\n >\n <div\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n <div\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly\n \"\n class=\"relative inline-flex\"\n >\n <verben-pop-Up\n #popup2\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"passOnPositions\"\n >\n <div dropdown-trigger class=\"inline-flex\">\n <p\n (click)=\"\n openCommentFor(selectedAction || localNextActions[0], $event)\n \"\n [ngClass]=\"{\n 'cursor-not-allowed opacity-50 pointer-events-none':\n disableNotActor(),\n 'cursor-pointer': !disableNotActor(),\n }\"\n class=\"text-center min-w-max rounded-md h-[30px] text-[white] text-sm flex justify-center items-center py-1 max-w-fit px-2 bg-primary\"\n >\n {{\n selectedAction?.Name ||\n selectedAction?.ToStageName ||\n localNextActions[0]?.Name ||\n localNextActions[0]?.ToStageName\n }}\n </p>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"py-4 px-[18px] transition-all duration-200 max-h-[45vh] overflow-y-auto\"\n [style.width]=\"isRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ getActionCaption(selectedAction) || \"Add Comment\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp2()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Send To -->\n <div\n class=\"flex flex-col gap-1.5\"\n *ngIf=\"nextActors.length > 0\"\n >\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Send To\n </label>\n <span class=\"text-[11px] text-gray-400\">Optional</span>\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Send to (optional)\"\n [options]=\"nextActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [filter]=\"true\"\n [filterBy]=\"'Name'\"\n [(ngModel)]=\"selectedRecipient\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Copy -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Copy\n </label>\n <span class=\"text-[11px] text-gray-400\">Notify actors</span>\n </div>\n <verben-drop-down\n selectKey=\"Code\"\n display=\"chip\"\n width=\"100%\"\n placeholder=\"Select Actors\"\n [showClear]=\"true\"\n [filter]=\"true\"\n (onChange)=\"onCopyChanged($event)\"\n [load]=\"this.loadMoreActors.bind(this)\"\n [search]=\"this.searchActors.bind(this)\"\n [(options)]=\"actors\"\n optionLabel=\"Name\"\n [multiselect]=\"true\"\n [(ngModel)]=\"copy\"\n [lazyLoad]=\"true\"\n [asyncLabel]=\"this.getAsyncLabel.bind(this)\"\n >\n </verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"commentText\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"commentText\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp2()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"completeAction(selectedAction)\"\n [disable]=\"!isCommentValid()\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n\n <div *ngIf=\"canPick()\" class=\"absolute -top-2 -right-2 z-10\">\n <verben-pop-Up\n #popup4\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"reassignPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"openPickPopup($event)\"\n [title]=\"\n isReassign()\n ? 'Reassign task to yourself to act on this stage'\n : 'Pick task to act on this stage'\n \"\n class=\"w-[18px] h-[18px] rounded-full bg-[#FFE681] ring-2 ring-white shadow flex items-center justify-center cursor-pointer\"\n >\n <verben-svg\n icon=\"user\"\n fill=\"#404040\"\n [width]=\"12\"\n [height]=\"12\"\n ></verben-svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"py-4 px-[18px] transition-all duration-200\"\n [style.width]=\"isPickRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ isReassign() ? \"Reassign Task\" : \"Pick Task\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp4()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Stage (if not reassign) -->\n <div class=\"flex flex-col gap-1.5\" *ngIf=\"!isReassign()\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Stage</span>\n <span class=\"text-red-500\">*</span>\n </label>\n <verben-drop-down\n width=\"100%\"\n label=\"Stage\"\n [options]=\"task?.FullStages || []\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [(ngModel)]=\"selectedStageCode\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Assign To -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Assign to\n </label>\n <span class=\"text-[11px] text-gray-400\"\n >Current Actor</span\n >\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Assign to\"\n [options]=\"pickActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [(ngModel)]=\"pickRecipient\"\n [disabled]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(false)\"\n [ngClass]=\"\n !isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(true)\"\n [ngClass]=\"\n isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isPickRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"pickComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isPickRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"pickComment\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp4()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"submitPick()\"\n [disable]=\"\n !isPickCommentValid() ||\n !pickRecipient ||\n (!isReassign() && !selectedStageCode)\n \"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n </div>\n </div>\n\n <ng-container>\n <div\n *ngIf=\"localHistoryToDate[i + 1]?.ActionName\"\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n localNextActions.length !== 1 &&\n !readOnly\n \"\n >\n <div>\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div dropdown-trigger class=\"flex items-center\">\n <div class=\"w-[20px] h-[2px] bg-[#D4A007]\"></div>\n <div class=\"mt-2\">\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n stroke=\"#D4A007\"\n icon=\"chevron\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-[18px] py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >Actions</span\n >\n </div>\n <ul class=\"flex flex-col py-1\">\n <li\n *ngFor=\"\n let action of localNextActions;\n trackBy: trackByAction\n \"\n >\n <button\n [disabled]=\"disableNotActor()\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors disabled:cursor-not-allowed disabled:opacity-40 cursor-pointer flex items-center justify-between\"\n (click)=\"openCommentFor(action, $event); closePopUp()\"\n >\n <span>{{\n action.Name || action.ToStageName || \"Unnamed\"\n }}</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </div>\n </ng-container>\n </div>\n <ng-container\n *ngIf=\"\n stage.ToStageName && stage.ToStageName.length > 20;\n else plainStageName\n \"\n >\n <verben-tooltip\n [top]=\"'0px'\"\n [textColor]=\"'#000'\"\n [backgroundColor]=\"'#D3D3D3'\"\n [left]=\"'0'\"\n [tooltipContent]=\"tooltipTemplate2\"\n #tooltip\n >\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName | slice: 0 : 20 }}...\n </p>\n </verben-tooltip>\n <ng-template #tooltipTemplate2>\n <div>\n <p class=\"text-xs\">{{ stage.ToStageName }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #plainStageName>\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName || \"\" }}\n </p>\n </ng-template>\n </div>\n</div>\n<verben-dialogue\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [mode]=\"'drawer'\"\n [padding]=\"'0px'\"\n [drawerWidth]=\"'500px'\"\n position=\"right\"\n [disableFooter]=\"false\"\n [isVisible]=\"isVisible\"\n [modalData]=\"taskForms\"\n (openModal)=\"onModalOpen($event)\"\n (closeModal)=\"onModalClose($event)\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [showCloseIcon]=\"true\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n <h1>{{ forms[0]?.Name }}</h1>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div class=\"py-3 px-[18px]\">\n <div *ngIf=\"forms?.[active]?.Entities?.length; else emptyState\">\n <div\n *ngFor=\"let entity of forms[active]?.Entities; let j = index\"\n class=\"mb-6 pb-4\"\n >\n <form-control\n [formProperties]=\"entity?.Properties || []\"\n ></form-control>\n <div class=\"flex gap-3 justify-end mt-4\">\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"submitForm(active)\"\n [disable]=\"!areRequiredPropertiesFilled(entity?.Properties)\"\n text=\"Proceed\"\n ></verbena-button>\n </div>\n </div>\n </div>\n\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n </div>\n</ng-template>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n\n<!-- Floating Actor Tooltip with Edge Detection -->\n<div\n *ngIf=\"\n hoveredStage && (hoveredStage.Actor?.Identifier || hoveredStage.Actor?.Name)\n \"\n class=\"fixed z-[9999] pointer-events-none transition-opacity duration-150 ease-out\"\n [style.top.px]=\"stageTooltipPos.top\"\n [style.left.px]=\"stageTooltipPos.left\"\n [style.transform]=\"stageTooltipPos.transform\"\n>\n <div\n class=\"bg-gray-800 text-white text-xs rounded-md px-2.5 py-1 shadow-md whitespace-nowrap relative flex items-center gap-1.5\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'user'\"\n stroke=\"#cbd5e1\"\n ></verben-svg>\n <span class=\"font-medium text-[12px]\">{{\n hoveredStage.Actor?.Name || hoveredStage.Actor?.Identifier\n }}</span>\n <!-- <span\n *ngIf=\"\n hoveredStage.Actor?.Name &&\n hoveredStage.Actor?.Identifier &&\n hoveredStage.Actor.Name !== hoveredStage.Actor.Identifier\n \"\n class=\"text-gray-300 text-[11px]\"\n >\n ({{ hoveredStage.Actor.Identifier }})\n </span> -->\n\n <!-- Arrow pointing toward circle -->\n <div\n *ngIf=\"stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -bottom-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-t-[4px] border-t-gray-800\"\n ></div>\n <div\n *ngIf=\"!stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -top-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-b-[4px] border-b-gray-800\"\n ></div>\n </div>\n</div>\n\n<!-- View Stage Comment Dialogue -->\n<verben-dialogue\n [showCloseIcon]=\"false\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [dialogueWidth]=\"'580px'\"\n [mode]=\"'dialogue'\"\n [padding]=\"'16px 18px'\"\n [customClass]=\"'show-form max-w-[92vw]'\"\n [disableFooter]=\"true\"\n [isVisible]=\"isViewCommentModalOpen\"\n [bodyTemplate]=\"commentDialogBody\"\n (closeModal)=\"closeViewComment()\"\n>\n <ng-template #commentDialogBody>\n <div class=\"dialog-body flex flex-col gap-4\">\n <!-- Header with Title, Copy, Close X -->\n <div\n class=\"flex items-center justify-between pb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span class=\"w-2 h-2 rounded-full bg-primary inline-block\"></span>\n <h3 class=\"text-sm font-semibold text-gray-800 tracking-tight\">\n {{ viewCommentStage?.ToStageName || viewCommentStage?.ActionName || 'Stage' }} - Comment\n </h3>\n </div>\n <div class=\"flex items-center gap-2\">\n <!-- Copy Button -->\n <button\n *ngIf=\"viewCommentDecoded\"\n type=\"button\"\n (click)=\"copyViewCommentText()\"\n class=\"text-xs px-2.5 py-1 rounded bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer flex items-center gap-1.5 border border-gray-200 select-none\"\n title=\"Copy comment to clipboard\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect>\n <path\n d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n ></path>\n </svg>\n <span>{{ viewCommentCopyStatus }}</span>\n </button>\n\n <!-- Close button -->\n <button\n type=\"button\"\n (click)=\"closeViewComment()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n </div>\n\n <!-- Scrollable Content: max-height similar to comment popup (45vh) -->\n <div class=\"max-h-[45vh] overflow-y-auto select-text pr-1\">\n <!-- Actor & Date Metadata -->\n <div\n *ngIf=\"viewCommentStage?.Actor?.Name || viewCommentStage?.CreatedAt\"\n class=\"flex items-center justify-between text-xs text-gray-500 mb-3 pb-2 border-b border-gray-100\"\n >\n <span *ngIf=\"viewCommentStage?.Actor?.Name\" class=\"font-medium text-gray-700\">\n By: {{ viewCommentStage?.Actor?.Name }}\n </span>\n <span *ngIf=\"viewCommentStage?.CreatedAt\">\n {{ viewCommentStage?.CreatedAt | date: 'medium' }}\n </span>\n </div>\n\n <!-- Comment body: HTML or plain text -->\n <div\n *ngIf=\"isViewCommentHtml; else plainViewComment\"\n class=\"comment-html-content w-full overflow-x-auto text-sm text-gray-800 leading-relaxed\"\n [innerHTML]=\"viewCommentFormatted\"\n ></div>\n\n <ng-template #plainViewComment>\n <p\n *ngIf=\"viewCommentDecoded; else emptyViewComment\"\n class=\"whitespace-pre-wrap break-words text-sm leading-relaxed text-gray-800\"\n >\n {{ viewCommentDecoded }}\n </p>\n <ng-template #emptyViewComment>\n <p class=\"text-xs italic text-gray-400 py-6 text-center\">\n No comment recorded for this stage.\n </p>\n </ng-template>\n </ng-template>\n </div>\n\n <!-- Footer button matching form-viewer -->\n <div class=\"dialog-button-container flex justify-end gap-2 pt-2 border-t border-gray-100\">\n <verbena-button\n width=\"100%\"\n class=\"verben-primary-button\"\n [text]=\"'Close'\"\n (click)=\"closeViewComment()\"\n >\n </verbena-button>\n </div>\n </div>\n </ng-template>\n</verben-dialogue>\n", styles: [".workflow-container{position:relative}.dialog{position:absolute;top:100%;left:0;background:var(--vbn-color-surface);border:1px solid var(--vbn-color-border);padding:1rem}.completed{text-decoration:line-through;color:var(--vbn-color-text-muted)}.pop-up-content{border-radius:8px;background-color:var(--vbn-color-surface, #ffffff);border:1px solid #e2e8f0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d}.dialog-body{padding:0;height:100%}.pop-up-value{padding:10px 20px}.workflow-comment-editor{border:1px solid #cbd5e1;border-radius:6px;background-color:#fff;display:flex;flex-direction:column;height:250px;max-height:300px;overflow:visible!important;position:relative}::ng-deep .workflow-comment-editor lib-editor{display:flex!important;flex-direction:column!important;height:100%!important;width:100%!important;overflow:visible!important}::ng-deep .workflow-comment-editor lib-editor>div{gap:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:visible!important}::ng-deep .workflow-comment-editor .editor-menu{flex-shrink:0!important;padding:4px 6px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;gap:4px;overflow:visible!important;border-top-left-radius:5px;border-top-right-radius:5px;position:relative;z-index:50}::ng-deep .workflow-comment-editor .editor-menu-group{overflow:visible!important}::ng-deep .workflow-comment-editor .color-picker-popover{max-height:240px!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:1050!important;box-shadow:0 10px 25px -5px #00000040,0 8px 10px -6px #00000026!important;border:1px solid #cbd5e1!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar{width:5px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-track{background:transparent!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:3px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb:hover{background:#94a3b8!important}::ng-deep .workflow-comment-editor .color-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .font-family-popover,::ng-deep .workflow-comment-editor .font-size-popover{z-index:1050!important}::ng-deep .workflow-comment-editor .font-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .editor-menu-item{width:26px;height:26px;border-radius:4px;background:transparent;transition:background-color .15s ease}::ng-deep .workflow-comment-editor .editor-menu-item:hover{background-color:#e2e8f0}::ng-deep .workflow-comment-editor .font-family-trigger{height:26px;width:110px;font-size:11px}::ng-deep .workflow-comment-editor .font-size-group{height:26px}::ng-deep .workflow-comment-editor .font-size-step-btn{height:24px;width:18px}::ng-deep .workflow-comment-editor .font-size-combobox{height:24px}::ng-deep .workflow-comment-editor .font-size-input{font-size:11px}::ng-deep .workflow-comment-editor .editor-container{flex:1 1 0!important;min-height:0!important;height:100%!important;gap:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}::ng-deep .workflow-comment-editor lib-editor-designer{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:100%!important;overflow:hidden!important}::ng-deep .workflow-comment-editor .editable-div-wrapper{flex:1 1 0!important;min-height:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important;background-color:#fff}::ng-deep .workflow-comment-editor .editable{flex:1 1 0!important;min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:auto!important;padding:10px 12px 40px!important;outline:none;font-size:13px;line-height:1.5;box-sizing:border-box!important}::ng-deep .workflow-comment-editor [title=\"Code View\"]{display:none!important}::ng-deep .comment-html-content table{width:100%;border-collapse:collapse;margin:.75rem 0;font-size:.8125rem}::ng-deep .comment-html-content th,::ng-deep .comment-html-content td{border:1px solid #cbd5e1;padding:8px 12px;text-align:left}::ng-deep .comment-html-content th{background-color:#f8fafc;font-weight:600}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "component", type: i5.VerbenPopUpComponent, selector: "verben-pop-Up", inputs: ["dropdownOpen", "dropdownWidth", "color", "customStyles", "popUpClass", "border", "borderRadius", "enableMouseLeave", "cdkPosition"], outputs: ["dropdownOpenChange", "close"] }, { kind: "component", type: i5.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "styleType", "size", "block", "disable", "disabled", "isLoading", "spinnerSize", "spinnerColor", "svg", "svgPosition", "svgWidth", "svgHeight", "svgSize", "svgColor", "icon", "useIcon", "iconPosition", "iconColor", "variant", "weight", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "buttonClass", "buttonTextClass"] }, { kind: "component", type: i5.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "autoScrollToCurrentItem", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i5.TooltipComponent, selector: "verben-tooltip", inputs: ["tooltipContent", "customClass", "backgroundColor", "textColor", "padding", "borderRadius", "zIndex", "border", "width", "top", "bottom", "left", "right"] }, { kind: "component", type: i5.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "component", type: i5.VerbenaTextareaComponent, selector: "verbena-textarea", inputs: ["disabled", "label", "required", "rows", "cols", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "value", "errorMessageColor"], outputs: ["valueChange"] }, { kind: "component", type: i6.EditorComponent, selector: "lib-editor", inputs: ["themeColor", "disabled", "editorMode", "editorConfig", "content"], outputs: ["editorModeChange", "onImageEdit", "onSortEdit"] }, { kind: "component", type: i7.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i8.FormViewerComponent, selector: "app-form-viewer", inputs: ["form", "isVisible"], outputs: ["onOpen", "onClose"] }, { kind: "pipe", type: i3.SlicePipe, name: "slice" }, { kind: "pipe", type: i3.DatePipe, name: "date" }] });
693
822
  }
694
823
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStageComponent /* implements DoCheck */, decorators: [{
695
824
  type: Component,
696
- args: [{ selector: 'app-workflow-stage', template: "<div\n (scroll)=\"onStageMouseLeave()\"\n class=\"flex overflow-x-auto items-start min-h-max overflow-y-clip pt-3 pb-3 px-1\"\n>\n <div\n *ngFor=\"\n let stage of localHistoryToDate;\n trackBy: trackByStage;\n let i = index\n \"\n >\n <div class=\"flex items-center\">\n <!-- Stage circle with hover actor tooltip and click stage form popup -->\n <div\n class=\"w-[30px] h-[30px] flex cursor-pointer justify-center items-center rounded-full bg-primary text-white shadow-xs hover:ring-2 hover:ring-primary/30 transition-all duration-150\"\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n >\n <!-- In task mode: Stage Form popup on click -->\n <ng-container *ngIf=\"taskCode; else plainStageCircle\">\n <verben-pop-Up\n #popup3\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"onStageClick()\"\n class=\"flex items-center justify-center w-full h-full\"\n >\n <!-- Clean modern checkmark -->\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n (click)=\"loadFormIfExists(stage.ToStage)\"\n class=\"pop-up-value cursor-pointer\"\n >\n Load Stage Form\n </div>\n </div>\n </verben-pop-Up>\n </ng-container>\n\n <!-- Plain checkmark when not in task mode -->\n <ng-template #plainStageCircle>\n <div class=\"flex items-center justify-center w-full h-full\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n </ng-template>\n </div>\n\n <ng-container\n *ngIf=\"\n localHistoryToDate[i + 1] ||\n (i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly)\n \"\n >\n <div\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n <div\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly\n \"\n class=\"relative inline-flex\"\n >\n <verben-pop-Up\n #popup2\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"passOnPositions\"\n >\n <div dropdown-trigger class=\"inline-flex\">\n <p\n (click)=\"\n openCommentFor(selectedAction || localNextActions[0], $event)\n \"\n [ngClass]=\"{\n 'cursor-not-allowed opacity-50 pointer-events-none':\n disableNotActor(),\n 'cursor-pointer': !disableNotActor(),\n }\"\n class=\"text-center min-w-max rounded-md h-[30px] text-[white] text-sm flex justify-center items-center py-1 max-w-fit px-2 bg-primary\"\n >\n {{\n selectedAction?.Name ||\n selectedAction?.ToStageName ||\n localNextActions[0]?.Name ||\n localNextActions[0]?.ToStageName\n }}\n </p>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"p-4 transition-all duration-200 max-h-[45vh] overflow-y-auto\"\n [style.width]=\"isRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ getActionCaption(selectedAction) || \"Add Comment\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp2()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Send To -->\n <div\n class=\"flex flex-col gap-1.5\"\n *ngIf=\"nextActors.length > 0\"\n >\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Send To\n </label>\n <span class=\"text-[11px] text-gray-400\">Optional</span>\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Send to (optional)\"\n [options]=\"nextActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [filter]=\"true\"\n [filterBy]=\"'Name'\"\n [(ngModel)]=\"selectedRecipient\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Copy -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Copy\n </label>\n <span class=\"text-[11px] text-gray-400\">Notify actors</span>\n </div>\n <verben-drop-down\n selectKey=\"Code\"\n display=\"chip\"\n width=\"100%\"\n placeholder=\"Select Actors\"\n [showClear]=\"true\"\n [filter]=\"true\"\n (onChange)=\"onCopyChanged($event)\"\n [load]=\"this.loadMoreActors.bind(this)\"\n [search]=\"this.searchActors.bind(this)\"\n [(options)]=\"actors\"\n optionLabel=\"Name\"\n [multiselect]=\"true\"\n [(ngModel)]=\"copy\"\n [lazyLoad]=\"true\"\n [asyncLabel]=\"this.getAsyncLabel.bind(this)\"\n >\n </verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"commentText\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"commentText\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp2()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"completeAction(selectedAction)\"\n [disable]=\"!isCommentValid()\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n\n <div *ngIf=\"canPick()\" class=\"absolute -top-2 -right-2 z-10\">\n <verben-pop-Up\n #popup4\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"reassignPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"openPickPopup($event)\"\n [title]=\"\n isReassign()\n ? 'Reassign task to yourself to act on this stage'\n : 'Pick task to act on this stage'\n \"\n class=\"w-[18px] h-[18px] rounded-full bg-[#FFE681] ring-2 ring-white shadow flex items-center justify-center cursor-pointer\"\n >\n <verben-svg\n icon=\"user\"\n fill=\"#404040\"\n [width]=\"12\"\n [height]=\"12\"\n ></verben-svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"p-4 transition-all duration-200\"\n [style.width]=\"isPickRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ isReassign() ? \"Reassign Task\" : \"Pick Task\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp4()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Stage (if not reassign) -->\n <div class=\"flex flex-col gap-1.5\" *ngIf=\"!isReassign()\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Stage</span>\n <span class=\"text-red-500\">*</span>\n </label>\n <verben-drop-down\n width=\"100%\"\n label=\"Stage\"\n [options]=\"task?.FullStages || []\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [(ngModel)]=\"selectedStageCode\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Assign To -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Assign to\n </label>\n <span class=\"text-[11px] text-gray-400\"\n >Current Actor</span\n >\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Assign to\"\n [options]=\"pickActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [(ngModel)]=\"pickRecipient\"\n [disabled]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(false)\"\n [ngClass]=\"\n !isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(true)\"\n [ngClass]=\"\n isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isPickRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"pickComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isPickRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"pickComment\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp4()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"submitPick()\"\n [disable]=\"\n !isPickCommentValid() ||\n !pickRecipient ||\n (!isReassign() && !selectedStageCode)\n \"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n </div>\n </div>\n\n <ng-container>\n <div\n *ngIf=\"localHistoryToDate[i + 1]?.ActionName\"\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n localNextActions.length !== 1 &&\n !readOnly\n \"\n >\n <div>\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div dropdown-trigger class=\"flex items-center\">\n <div class=\"w-[20px] h-[2px] bg-[#D4A007]\"></div>\n <div class=\"mt-2\">\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n stroke=\"#D4A007\"\n icon=\"chevron\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-3 py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >Actions</span\n >\n </div>\n <ul class=\"flex flex-col py-1\">\n <li\n *ngFor=\"\n let action of localNextActions;\n trackBy: trackByAction\n \"\n >\n <button\n [disabled]=\"disableNotActor()\"\n class=\"w-full text-left px-3 py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors disabled:cursor-not-allowed disabled:opacity-40 cursor-pointer flex items-center justify-between\"\n (click)=\"openCommentFor(action, $event); closePopUp()\"\n >\n <span>{{\n action.Name || action.ToStageName || \"Unnamed\"\n }}</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </div>\n </ng-container>\n </div>\n <ng-container\n *ngIf=\"\n stage.ToStageName && stage.ToStageName.length > 20;\n else plainStageName\n \"\n >\n <verben-tooltip\n [top]=\"'0px'\"\n [textColor]=\"'#000'\"\n [backgroundColor]=\"'#D3D3D3'\"\n [left]=\"'0'\"\n [tooltipContent]=\"tooltipTemplate2\"\n #tooltip\n >\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName | slice: 0 : 20 }}...\n </p>\n </verben-tooltip>\n <ng-template #tooltipTemplate2>\n <div>\n <p class=\"text-xs\">{{ stage.ToStageName }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #plainStageName>\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName || \"\" }}\n </p>\n </ng-template>\n </div>\n</div>\n<verben-dialogue\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [mode]=\"'drawer'\"\n [padding]=\"'0px'\"\n [drawerWidth]=\"'500px'\"\n position=\"right\"\n [disableFooter]=\"false\"\n [isVisible]=\"isVisible\"\n [modalData]=\"taskForms\"\n (openModal)=\"onModalOpen($event)\"\n (closeModal)=\"onModalClose($event)\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [showCloseIcon]=\"true\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n <h1>{{ forms[0]?.Name }}</h1>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div class=\"p-3\">\n <div *ngIf=\"forms?.[active]?.Entities?.length; else emptyState\">\n <div\n *ngFor=\"let entity of forms[active]?.Entities; let j = index\"\n class=\"mb-6 pb-4\"\n >\n <form-control\n [formProperties]=\"entity?.Properties || []\"\n ></form-control>\n <div class=\"flex gap-3 justify-end mt-4\">\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"submitForm(active)\"\n [disable]=\"!areRequiredPropertiesFilled(entity?.Properties)\"\n text=\"Proceed\"\n ></verbena-button>\n </div>\n </div>\n </div>\n\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n </div>\n</ng-template>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n\n<!-- Floating Actor Tooltip with Edge Detection -->\n<div\n *ngIf=\"\n hoveredStage && (hoveredStage.Actor?.Identifier || hoveredStage.Actor?.Name)\n \"\n class=\"fixed z-[9999] pointer-events-none transition-opacity duration-150 ease-out\"\n [style.top.px]=\"stageTooltipPos.top\"\n [style.left.px]=\"stageTooltipPos.left\"\n [style.transform]=\"stageTooltipPos.transform\"\n>\n <div\n class=\"bg-gray-800 text-white text-xs rounded-md px-2.5 py-1 shadow-md whitespace-nowrap relative flex items-center gap-1.5\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'user'\"\n stroke=\"#cbd5e1\"\n ></verben-svg>\n <span class=\"font-medium text-[12px]\">{{\n hoveredStage.Actor?.Name || hoveredStage.Actor?.Identifier\n }}</span>\n <!-- <span\n *ngIf=\"\n hoveredStage.Actor?.Name &&\n hoveredStage.Actor?.Identifier &&\n hoveredStage.Actor.Name !== hoveredStage.Actor.Identifier\n \"\n class=\"text-gray-300 text-[11px]\"\n >\n ({{ hoveredStage.Actor.Identifier }})\n </span> -->\n\n <!-- Arrow pointing toward circle -->\n <div\n *ngIf=\"stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -bottom-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-t-[4px] border-t-gray-800\"\n ></div>\n <div\n *ngIf=\"!stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -top-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-b-[4px] border-b-gray-800\"\n ></div>\n </div>\n</div>\n", styles: [".workflow-container{position:relative}.dialog{position:absolute;top:100%;left:0;background:var(--vbn-color-surface);border:1px solid var(--vbn-color-border);padding:1rem}.completed{text-decoration:line-through;color:var(--vbn-color-text-muted)}.pop-up-content{border-radius:8px;background-color:var(--vbn-color-surface, #ffffff);border:1px solid #e2e8f0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d}.pop-up-value{padding:10px 20px}.workflow-comment-editor{border:1px solid #cbd5e1;border-radius:6px;background-color:#fff;display:flex;flex-direction:column;height:250px;max-height:300px;overflow:visible!important;position:relative}::ng-deep .workflow-comment-editor lib-editor{display:flex!important;flex-direction:column!important;height:100%!important;width:100%!important;overflow:visible!important}::ng-deep .workflow-comment-editor lib-editor>div{gap:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:visible!important}::ng-deep .workflow-comment-editor .editor-menu{flex-shrink:0!important;padding:4px 6px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;gap:4px;overflow:visible!important;border-top-left-radius:5px;border-top-right-radius:5px;position:relative;z-index:50}::ng-deep .workflow-comment-editor .editor-menu-group{overflow:visible!important}::ng-deep .workflow-comment-editor .color-picker-popover{max-height:240px!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:1050!important;box-shadow:0 10px 25px -5px #00000040,0 8px 10px -6px #00000026!important;border:1px solid #cbd5e1!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar{width:5px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-track{background:transparent!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:3px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb:hover{background:#94a3b8!important}::ng-deep .workflow-comment-editor .color-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .font-family-popover,::ng-deep .workflow-comment-editor .font-size-popover{z-index:1050!important}::ng-deep .workflow-comment-editor .font-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .editor-menu-item{width:26px;height:26px;border-radius:4px;background:transparent;transition:background-color .15s ease}::ng-deep .workflow-comment-editor .editor-menu-item:hover{background-color:#e2e8f0}::ng-deep .workflow-comment-editor .font-family-trigger{height:26px;width:110px;font-size:11px}::ng-deep .workflow-comment-editor .font-size-group{height:26px}::ng-deep .workflow-comment-editor .font-size-step-btn{height:24px;width:18px}::ng-deep .workflow-comment-editor .font-size-combobox{height:24px}::ng-deep .workflow-comment-editor .font-size-input{font-size:11px}::ng-deep .workflow-comment-editor .editor-container{flex:1 1 0!important;min-height:0!important;height:100%!important;gap:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}::ng-deep .workflow-comment-editor lib-editor-designer{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:100%!important;overflow:hidden!important}::ng-deep .workflow-comment-editor .editable-div-wrapper{flex:1 1 0!important;min-height:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important;background-color:#fff}::ng-deep .workflow-comment-editor .editable{flex:1 1 0!important;min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:auto!important;padding:10px 12px 40px!important;outline:none;font-size:13px;line-height:1.5;box-sizing:border-box!important}::ng-deep .workflow-comment-editor [title=\"Code View\"]{display:none!important}\n"] }]
697
- }], ctorParameters: () => [{ type: i1.UtilService }, { type: i1.HttpWebRequestService }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }], propDecorators: { pageSize: [{
825
+ args: [{ selector: 'app-workflow-stage', template: "<div\n (scroll)=\"onStageMouseLeave()\"\n class=\"flex overflow-x-auto items-start min-h-max overflow-y-clip pt-3 pb-3 px-1\"\n>\n <div\n *ngFor=\"\n let stage of localHistoryToDate;\n trackBy: trackByStage;\n let i = index\n \"\n >\n <div class=\"flex items-center\">\n <!-- Stage circle with hover actor tooltip and click stage options popup -->\n <ng-container *ngIf=\"taskCode; else plainStageCircle\">\n <verben-pop-Up\n #popup3\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"onStageClick()\"\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n class=\"w-[30px] h-[30px] flex cursor-pointer justify-center items-center rounded-full bg-primary text-white shadow-xs hover:ring-2 hover:ring-primary/30 transition-all duration-150\"\n >\n <!-- Clean modern checkmark -->\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-[18px] py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >\n {{ stage.ToStageName || stage.ActionName || \"Stage Options\" }}\n </span>\n </div>\n <ul class=\"flex flex-col py-1\">\n <li>\n <button\n type=\"button\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors cursor-pointer flex items-center gap-2\"\n (click)=\"openViewComment(stage)\"\n >\n <svg\n width=\"13\"\n height=\"13\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"\n ></path>\n </svg>\n <span>View Comment</span>\n </button>\n </li>\n <li>\n <button\n type=\"button\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors cursor-pointer flex items-center gap-2\"\n (click)=\"loadFormIfExists(stage.ToStage); closePopUp3()\"\n >\n <svg\n width=\"13\"\n height=\"13\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path\n d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"\n ></path>\n <polyline points=\"14 2 14 8 20 8\"></polyline>\n <line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n <line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n <polyline points=\"10 9 9 9 8 9\"></polyline>\n </svg>\n <span>Load Stage Form</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </ng-container>\n\n <!-- Plain checkmark when not in task mode -->\n <ng-template #plainStageCircle>\n <div\n (mouseenter)=\"onStageMouseEnter(stage, $event)\"\n (mouseleave)=\"onStageMouseLeave()\"\n class=\"w-[30px] h-[30px] flex justify-center items-center rounded-full bg-primary text-white shadow-xs\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </div>\n </ng-template>\n\n <ng-container\n *ngIf=\"\n localHistoryToDate[i + 1] ||\n (i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly)\n \"\n >\n <div\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n <div\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n !readOnly\n \"\n class=\"relative inline-flex\"\n >\n <verben-pop-Up\n #popup2\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"passOnPositions\"\n >\n <div dropdown-trigger class=\"inline-flex\">\n <p\n (click)=\"\n openCommentFor(selectedAction || localNextActions[0], $event)\n \"\n [ngClass]=\"{\n 'cursor-not-allowed opacity-50 pointer-events-none':\n disableNotActor(),\n 'cursor-pointer': !disableNotActor(),\n }\"\n class=\"text-center min-w-max rounded-md h-[30px] text-[white] text-sm flex justify-center items-center py-1 max-w-fit px-2 bg-primary\"\n >\n {{\n selectedAction?.Name ||\n selectedAction?.ToStageName ||\n localNextActions[0]?.Name ||\n localNextActions[0]?.ToStageName\n }}\n </p>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"py-4 px-[18px] transition-all duration-200 max-h-[45vh] overflow-y-auto\"\n [style.width]=\"isRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ getActionCaption(selectedAction) || \"Add Comment\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp2()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Send To -->\n <div\n class=\"flex flex-col gap-1.5\"\n *ngIf=\"nextActors.length > 0\"\n >\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Send To\n </label>\n <span class=\"text-[11px] text-gray-400\">Optional</span>\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Send to (optional)\"\n [options]=\"nextActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [filter]=\"true\"\n [filterBy]=\"'Name'\"\n [(ngModel)]=\"selectedRecipient\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Copy -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Copy\n </label>\n <span class=\"text-[11px] text-gray-400\">Notify actors</span>\n </div>\n <verben-drop-down\n selectKey=\"Code\"\n display=\"chip\"\n width=\"100%\"\n placeholder=\"Select Actors\"\n [showClear]=\"true\"\n [filter]=\"true\"\n (onChange)=\"onCopyChanged($event)\"\n [load]=\"this.loadMoreActors.bind(this)\"\n [search]=\"this.searchActors.bind(this)\"\n [(options)]=\"actors\"\n optionLabel=\"Name\"\n [multiselect]=\"true\"\n [(ngModel)]=\"copy\"\n [lazyLoad]=\"true\"\n [asyncLabel]=\"this.getAsyncLabel.bind(this)\"\n >\n </verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setEditorMode(false)\"\n [ngClass]=\"\n !isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setEditorMode(true)\"\n [ngClass]=\"\n isRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"commentText\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"commentText\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp2()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"completeAction(selectedAction)\"\n [disable]=\"!isCommentValid()\"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n\n <div *ngIf=\"canPick()\" class=\"absolute -top-2 -right-2 z-10\">\n <verben-pop-Up\n #popup4\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"reassignPositions\"\n >\n <div\n dropdown-trigger\n (click)=\"openPickPopup($event)\"\n [title]=\"\n isReassign()\n ? 'Reassign task to yourself to act on this stage'\n : 'Pick task to act on this stage'\n \"\n class=\"w-[18px] h-[18px] rounded-full bg-[#FFE681] ring-2 ring-white shadow flex items-center justify-center cursor-pointer\"\n >\n <verben-svg\n icon=\"user\"\n fill=\"#404040\"\n [width]=\"12\"\n [height]=\"12\"\n ></verben-svg>\n </div>\n\n <div class=\"pop-up-content flex flex-col\" dropdown-content>\n <div\n class=\"py-4 px-[18px] transition-all duration-200\"\n [style.width]=\"isPickRichEditor ? '580px' : '420px'\"\n >\n <!-- Coherent Header -->\n <div\n class=\"flex items-center justify-between pb-3 mb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2 h-2 rounded-full bg-primary inline-block\"\n ></span>\n <h3\n class=\"text-sm font-semibold text-gray-800 tracking-tight\"\n >\n {{ isReassign() ? \"Reassign Task\" : \"Pick Task\" }}\n </h3>\n </div>\n <button\n type=\"button\"\n (click)=\"closePopUp4()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"flex flex-col gap-3\">\n <!-- Stage (if not reassign) -->\n <div class=\"flex flex-col gap-1.5\" *ngIf=\"!isReassign()\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Stage</span>\n <span class=\"text-red-500\">*</span>\n </label>\n <verben-drop-down\n width=\"100%\"\n label=\"Stage\"\n [options]=\"task?.FullStages || []\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [(ngModel)]=\"selectedStageCode\"\n [showClear]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Assign To -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase\"\n >\n Assign to\n </label>\n <span class=\"text-[11px] text-gray-400\"\n >Current Actor</span\n >\n </div>\n <verben-drop-down\n width=\"100%\"\n label=\"Assign to\"\n [options]=\"pickActors\"\n optionLabel=\"Name\"\n optionValue=\"Identifier\"\n [(ngModel)]=\"pickRecipient\"\n [disabled]=\"true\"\n ></verben-drop-down>\n </div>\n\n <!-- Comment with Mode Switcher -->\n <div class=\"flex flex-col gap-1.5\">\n <div class=\"flex items-center justify-between mb-0.5\">\n <label\n class=\"text-xs font-semibold text-gray-700 tracking-wide uppercase flex items-center gap-1\"\n >\n <span>Comment</span>\n <span class=\"text-red-500\">*</span>\n </label>\n\n <!-- Mode Switch Pill -->\n <div\n class=\"inline-flex items-center bg-gray-100 p-0.5 rounded-md border border-gray-200\"\n >\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(false)\"\n [ngClass]=\"\n !isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Simple textarea\"\n >\n <span>Simple</span>\n </button>\n <button\n type=\"button\"\n (click)=\"setPickEditorMode(true)\"\n [ngClass]=\"\n isPickRichEditor\n ? 'bg-white text-gray-800 shadow-xs font-medium'\n : 'text-gray-500 hover:text-gray-700'\n \"\n class=\"px-2 py-0.5 text-xs rounded transition-all cursor-pointer flex items-center gap-1\"\n title=\"Rich text editor with formatting & tables\"\n >\n <svg\n width=\"11\"\n height=\"11\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M4 7V4h16v3M9 20h6M12 4v16\" />\n </svg>\n <span>Rich / Tables</span>\n </button>\n </div>\n </div>\n\n <!-- Simple Textarea Mode -->\n <div *ngIf=\"!isPickRichEditor\" class=\"w-full\">\n <verbena-textarea\n [(ngModel)]=\"pickComment\"\n [rows]=\"4\"\n width=\"100%\"\n border=\"1px solid #cbd5e1\"\n borderRadius=\"6px\"\n ></verbena-textarea>\n </div>\n\n <!-- Rich Reporting Editor Mode -->\n <div\n *ngIf=\"isPickRichEditor\"\n class=\"workflow-comment-editor w-full\"\n >\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"pickComment\"\n ></lib-editor>\n </div>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"flex justify-end gap-3 mt-4 pt-2\">\n <verbena-button\n (click)=\"closePopUp4()\"\n text=\"Cancel\"\n ></verbena-button>\n <verbena-button\n class=\"verben-primary-button\"\n text=\"OK\"\n (click)=\"submitPick()\"\n [disable]=\"\n !isPickCommentValid() ||\n !pickRecipient ||\n (!isReassign() && !selectedStageCode)\n \"\n ></verbena-button>\n </div>\n </div>\n </div>\n </verben-pop-Up>\n </div>\n </div>\n\n <ng-container>\n <div\n *ngIf=\"localHistoryToDate[i + 1]?.ActionName\"\n class=\"border-primary border-b-2 w-[50px] relative px-2 text-xs text-primary font-medium\"\n ></div>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n i === localHistoryToDate.length - 1 &&\n localNextActions.length > 0 &&\n localNextActions.length !== 1 &&\n !readOnly\n \"\n >\n <div>\n <verben-pop-Up\n #popup\n [customStyles]=\"{ 'z-index': '99' }\"\n [enableMouseLeave]=\"false\"\n [cdkPosition]=\"popupPositions\"\n >\n <div dropdown-trigger class=\"flex items-center\">\n <div class=\"w-[20px] h-[2px] bg-[#D4A007]\"></div>\n <div class=\"mt-2\">\n <verben-svg\n class=\"cursor-pointer actions-icon\"\n stroke=\"#D4A007\"\n icon=\"chevron\"\n ></verben-svg>\n </div>\n </div>\n\n <div\n class=\"pop-up-content flex flex-col py-1.5 min-w-[170px]\"\n dropdown-content\n >\n <div\n class=\"px-[18px] py-1.5 border-b border-gray-100 flex items-center gap-1.5\"\n >\n <span\n class=\"w-1.5 h-1.5 rounded-full bg-primary inline-block\"\n ></span>\n <span\n class=\"text-[11px] font-semibold text-gray-500 uppercase tracking-wider\"\n >Actions</span\n >\n </div>\n <ul class=\"flex flex-col py-1\">\n <li\n *ngFor=\"\n let action of localNextActions;\n trackBy: trackByAction\n \"\n >\n <button\n [disabled]=\"disableNotActor()\"\n class=\"w-full text-left px-[18px] py-2 text-xs font-medium text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors disabled:cursor-not-allowed disabled:opacity-40 cursor-pointer flex items-center justify-between\"\n (click)=\"openCommentFor(action, $event); closePopUp()\"\n >\n <span>{{\n action.Name || action.ToStageName || \"Unnamed\"\n }}</span>\n </button>\n </li>\n </ul>\n </div>\n </verben-pop-Up>\n </div>\n </ng-container>\n </div>\n <ng-container\n *ngIf=\"\n stage.ToStageName && stage.ToStageName.length > 20;\n else plainStageName\n \"\n >\n <verben-tooltip\n [top]=\"'0px'\"\n [textColor]=\"'#000'\"\n [backgroundColor]=\"'#D3D3D3'\"\n [left]=\"'0'\"\n [tooltipContent]=\"tooltipTemplate2\"\n #tooltip\n >\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName | slice: 0 : 20 }}...\n </p>\n </verben-tooltip>\n <ng-template #tooltipTemplate2>\n <div>\n <p class=\"text-xs\">{{ stage.ToStageName }}</p>\n </div>\n </ng-template>\n </ng-container>\n <ng-template #plainStageName>\n <p\n class=\"text-xs min-w-max left-0 text-primary mt-1 font-semibold capitalize\"\n >\n {{ stage.ToStageName || \"\" }}\n </p>\n </ng-template>\n </div>\n</div>\n<verben-dialogue\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [mode]=\"'drawer'\"\n [padding]=\"'0px'\"\n [drawerWidth]=\"'500px'\"\n position=\"right\"\n [disableFooter]=\"false\"\n [isVisible]=\"isVisible\"\n [modalData]=\"taskForms\"\n (openModal)=\"onModalOpen($event)\"\n (closeModal)=\"onModalClose($event)\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [showCloseIcon]=\"true\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div class=\"bg-[#FFE681] px-6 py-4 flex justify-between items-center\">\n <h1>{{ forms[0]?.Name }}</h1>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div class=\"py-3 px-[18px]\">\n <div *ngIf=\"forms?.[active]?.Entities?.length; else emptyState\">\n <div\n *ngFor=\"let entity of forms[active]?.Entities; let j = index\"\n class=\"mb-6 pb-4\"\n >\n <form-control\n [formProperties]=\"entity?.Properties || []\"\n ></form-control>\n <div class=\"flex gap-3 justify-end mt-4\">\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"submitForm(active)\"\n [disable]=\"!areRequiredPropertiesFilled(entity?.Properties)\"\n text=\"Proceed\"\n ></verbena-button>\n </div>\n </div>\n </div>\n\n <ng-template #emptyState>\n <p class=\"mt-4 p-4 text-gray-600 text-center\">\n No entries available for the selected form group.\n </p>\n </ng-template>\n </div>\n</ng-template>\n\n<app-form-viewer\n [form]=\"activeForm\"\n [isVisible]=\"isFormViewerVisible\"\n (onOpen)=\"onFormViewerOpen()\"\n (onClose)=\"onFormViewerClose()\"\n></app-form-viewer>\n\n<!-- Floating Actor Tooltip with Edge Detection -->\n<div\n *ngIf=\"\n hoveredStage && (hoveredStage.Actor?.Identifier || hoveredStage.Actor?.Name)\n \"\n class=\"fixed z-[9999] pointer-events-none transition-opacity duration-150 ease-out\"\n [style.top.px]=\"stageTooltipPos.top\"\n [style.left.px]=\"stageTooltipPos.left\"\n [style.transform]=\"stageTooltipPos.transform\"\n>\n <div\n class=\"bg-gray-800 text-white text-xs rounded-md px-2.5 py-1 shadow-md whitespace-nowrap relative flex items-center gap-1.5\"\n >\n <verben-svg\n [width]=\"12\"\n [height]=\"12\"\n [icon]=\"'user'\"\n stroke=\"#cbd5e1\"\n ></verben-svg>\n <span class=\"font-medium text-[12px]\">{{\n hoveredStage.Actor?.Name || hoveredStage.Actor?.Identifier\n }}</span>\n <!-- <span\n *ngIf=\"\n hoveredStage.Actor?.Name &&\n hoveredStage.Actor?.Identifier &&\n hoveredStage.Actor.Name !== hoveredStage.Actor.Identifier\n \"\n class=\"text-gray-300 text-[11px]\"\n >\n ({{ hoveredStage.Actor.Identifier }})\n </span> -->\n\n <!-- Arrow pointing toward circle -->\n <div\n *ngIf=\"stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -bottom-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-t-[4px] border-t-gray-800\"\n ></div>\n <div\n *ngIf=\"!stageTooltipPos.showAbove\"\n class=\"absolute left-1/2 -top-[4px] -translate-x-1/2 w-0 h-0 border-x-4 border-x-transparent border-b-[4px] border-b-gray-800\"\n ></div>\n </div>\n</div>\n\n<!-- View Stage Comment Dialogue -->\n<verben-dialogue\n [showCloseIcon]=\"false\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [dialogueWidth]=\"'580px'\"\n [mode]=\"'dialogue'\"\n [padding]=\"'16px 18px'\"\n [customClass]=\"'show-form max-w-[92vw]'\"\n [disableFooter]=\"true\"\n [isVisible]=\"isViewCommentModalOpen\"\n [bodyTemplate]=\"commentDialogBody\"\n (closeModal)=\"closeViewComment()\"\n>\n <ng-template #commentDialogBody>\n <div class=\"dialog-body flex flex-col gap-4\">\n <!-- Header with Title, Copy, Close X -->\n <div\n class=\"flex items-center justify-between pb-3 border-b border-gray-200\"\n >\n <div class=\"flex items-center gap-2\">\n <span class=\"w-2 h-2 rounded-full bg-primary inline-block\"></span>\n <h3 class=\"text-sm font-semibold text-gray-800 tracking-tight\">\n {{ viewCommentStage?.ToStageName || viewCommentStage?.ActionName || 'Stage' }} - Comment\n </h3>\n </div>\n <div class=\"flex items-center gap-2\">\n <!-- Copy Button -->\n <button\n *ngIf=\"viewCommentDecoded\"\n type=\"button\"\n (click)=\"copyViewCommentText()\"\n class=\"text-xs px-2.5 py-1 rounded bg-gray-100 hover:bg-gray-200 text-gray-700 transition-colors cursor-pointer flex items-center gap-1.5 border border-gray-200 select-none\"\n title=\"Copy comment to clipboard\"\n >\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect>\n <path\n d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n ></path>\n </svg>\n <span>{{ viewCommentCopyStatus }}</span>\n </button>\n\n <!-- Close button -->\n <button\n type=\"button\"\n (click)=\"closeViewComment()\"\n class=\"text-gray-400 hover:text-gray-600 transition-colors p-1 rounded-md hover:bg-gray-100 cursor-pointer\"\n title=\"Close\"\n >\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n </div>\n\n <!-- Scrollable Content: max-height similar to comment popup (45vh) -->\n <div class=\"max-h-[45vh] overflow-y-auto select-text pr-1\">\n <!-- Actor & Date Metadata -->\n <div\n *ngIf=\"viewCommentStage?.Actor?.Name || viewCommentStage?.CreatedAt\"\n class=\"flex items-center justify-between text-xs text-gray-500 mb-3 pb-2 border-b border-gray-100\"\n >\n <span *ngIf=\"viewCommentStage?.Actor?.Name\" class=\"font-medium text-gray-700\">\n By: {{ viewCommentStage?.Actor?.Name }}\n </span>\n <span *ngIf=\"viewCommentStage?.CreatedAt\">\n {{ viewCommentStage?.CreatedAt | date: 'medium' }}\n </span>\n </div>\n\n <!-- Comment body: HTML or plain text -->\n <div\n *ngIf=\"isViewCommentHtml; else plainViewComment\"\n class=\"comment-html-content w-full overflow-x-auto text-sm text-gray-800 leading-relaxed\"\n [innerHTML]=\"viewCommentFormatted\"\n ></div>\n\n <ng-template #plainViewComment>\n <p\n *ngIf=\"viewCommentDecoded; else emptyViewComment\"\n class=\"whitespace-pre-wrap break-words text-sm leading-relaxed text-gray-800\"\n >\n {{ viewCommentDecoded }}\n </p>\n <ng-template #emptyViewComment>\n <p class=\"text-xs italic text-gray-400 py-6 text-center\">\n No comment recorded for this stage.\n </p>\n </ng-template>\n </ng-template>\n </div>\n\n <!-- Footer button matching form-viewer -->\n <div class=\"dialog-button-container flex justify-end gap-2 pt-2 border-t border-gray-100\">\n <verbena-button\n width=\"100%\"\n class=\"verben-primary-button\"\n [text]=\"'Close'\"\n (click)=\"closeViewComment()\"\n >\n </verbena-button>\n </div>\n </div>\n </ng-template>\n</verben-dialogue>\n", styles: [".workflow-container{position:relative}.dialog{position:absolute;top:100%;left:0;background:var(--vbn-color-surface);border:1px solid var(--vbn-color-border);padding:1rem}.completed{text-decoration:line-through;color:var(--vbn-color-text-muted)}.pop-up-content{border-radius:8px;background-color:var(--vbn-color-surface, #ffffff);border:1px solid #e2e8f0;box-shadow:0 10px 25px -5px #0000001a,0 8px 10px -6px #0000000d}.dialog-body{padding:0;height:100%}.pop-up-value{padding:10px 20px}.workflow-comment-editor{border:1px solid #cbd5e1;border-radius:6px;background-color:#fff;display:flex;flex-direction:column;height:250px;max-height:300px;overflow:visible!important;position:relative}::ng-deep .workflow-comment-editor lib-editor{display:flex!important;flex-direction:column!important;height:100%!important;width:100%!important;overflow:visible!important}::ng-deep .workflow-comment-editor lib-editor>div{gap:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:visible!important}::ng-deep .workflow-comment-editor .editor-menu{flex-shrink:0!important;padding:4px 6px;background-color:#f8fafc;border-bottom:1px solid #e2e8f0;gap:4px;overflow:visible!important;border-top-left-radius:5px;border-top-right-radius:5px;position:relative;z-index:50}::ng-deep .workflow-comment-editor .editor-menu-group{overflow:visible!important}::ng-deep .workflow-comment-editor .color-picker-popover{max-height:240px!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:1050!important;box-shadow:0 10px 25px -5px #00000040,0 8px 10px -6px #00000026!important;border:1px solid #cbd5e1!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar{width:5px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-track{background:transparent!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb{background:#cbd5e1!important;border-radius:3px!important}::ng-deep .workflow-comment-editor .color-picker-popover::-webkit-scrollbar-thumb:hover{background:#94a3b8!important}::ng-deep .workflow-comment-editor .color-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .font-family-popover,::ng-deep .workflow-comment-editor .font-size-popover{z-index:1050!important}::ng-deep .workflow-comment-editor .font-picker-backdrop{z-index:1040!important}::ng-deep .workflow-comment-editor .editor-menu-item{width:26px;height:26px;border-radius:4px;background:transparent;transition:background-color .15s ease}::ng-deep .workflow-comment-editor .editor-menu-item:hover{background-color:#e2e8f0}::ng-deep .workflow-comment-editor .font-family-trigger{height:26px;width:110px;font-size:11px}::ng-deep .workflow-comment-editor .font-size-group{height:26px}::ng-deep .workflow-comment-editor .font-size-step-btn{height:24px;width:18px}::ng-deep .workflow-comment-editor .font-size-combobox{height:24px}::ng-deep .workflow-comment-editor .font-size-input{font-size:11px}::ng-deep .workflow-comment-editor .editor-container{flex:1 1 0!important;min-height:0!important;height:100%!important;gap:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}::ng-deep .workflow-comment-editor lib-editor-designer{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:100%!important;overflow:hidden!important}::ng-deep .workflow-comment-editor .editable-div-wrapper{flex:1 1 0!important;min-height:0!important;height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:0!important;background-color:#fff}::ng-deep .workflow-comment-editor .editable{flex:1 1 0!important;min-height:0!important;height:100%!important;overflow-y:auto!important;overflow-x:auto!important;padding:10px 12px 40px!important;outline:none;font-size:13px;line-height:1.5;box-sizing:border-box!important}::ng-deep .workflow-comment-editor [title=\"Code View\"]{display:none!important}::ng-deep .comment-html-content table{width:100%;border-collapse:collapse;margin:.75rem 0;font-size:.8125rem}::ng-deep .comment-html-content th,::ng-deep .comment-html-content td{border:1px solid #cbd5e1;padding:8px 12px;text-align:left}::ng-deep .comment-html-content th{background-color:#f8fafc;font-weight:600}\n"] }]
826
+ }], ctorParameters: () => [{ type: i1.UtilService }, { type: i1.HttpWebRequestService }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }, { type: i2.DomSanitizer }], propDecorators: { pageSize: [{
698
827
  type: Input
699
828
  }], historyToDate: [{
700
829
  type: Input
@@ -743,6 +872,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
743
872
  }], onWindowScroll: [{
744
873
  type: HostListener,
745
874
  args: ['window:scroll']
875
+ }], onEscape: [{
876
+ type: HostListener,
877
+ args: ['document:keydown.escape']
746
878
  }] } });
747
879
 
748
880
  class WorkFlowStageLibModule {