verben-workflow-ui 0.7.0 → 0.7.1

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.
@@ -367,12 +367,12 @@ class WorkflowStageComponent /* implements DoCheck */ {
367
367
  return stripped.length > 0;
368
368
  }
369
369
  async loadNextActors(stageCode) {
370
- if (!this.taskCode || !stageCode) {
370
+ if (!this.task || !stageCode) {
371
371
  this.nextActors = [];
372
372
  return;
373
373
  }
374
374
  this.utilService.sendBI(true);
375
- const res = await this.server.get(`GetNextActors/${this.taskCode}/false/${stageCode}`);
375
+ const res = await this.server.get(`GetNextActors/${this.task.Code}/false/${stageCode}`);
376
376
  this.utilService.sendBI(false);
377
377
  if (res instanceof ErrorResponse) {
378
378
  this.nextActors = [];
@@ -407,6 +407,9 @@ class WorkflowStageComponent /* implements DoCheck */ {
407
407
  });
408
408
  }
409
409
  completeAction(action) {
410
+ if (this.task) {
411
+ this.task.Comment = this.commentText;
412
+ }
410
413
  this.onActionCompleted.emit({
411
414
  action: action,
412
415
  comment: this.commentText,
@@ -548,11 +551,11 @@ class WorkflowStageComponent /* implements DoCheck */ {
548
551
  });
549
552
  }
550
553
  async loadFormIfExists(stage) {
551
- if (!this.taskCode || !stage) {
554
+ if (!this.task || !stage) {
552
555
  return;
553
556
  }
554
557
  this.utilService.sendBI(true);
555
- const res = await this.server.get(`GetCurrentFormsForTask/${this.taskCode}/${stage}`);
558
+ const res = await this.server.get(`GetCurrentFormsForTask/${this.task.Code}/${stage}`);
556
559
  this.utilService.sendBI(false);
557
560
  if (res instanceof ErrorResponse) {
558
561
  this.utilService.showInfo('Could not load form for selected stage');
@@ -602,7 +605,7 @@ class WorkflowStageComponent /* implements DoCheck */ {
602
605
  }
603
606
  }
604
607
  async searchActors(data, event) {
605
- const res = await this.server.get(`GetActorsWithParam/${data}/${event.loadTimes * this.pageSize}/${this.pageSize}`);
608
+ const res = await this.server.get(`GetActorsWithParam/${data}/${event.loadTimes * this.pageSize}/${this.pageSize}/CreatedAt/${SortDirection.Desc}`);
606
609
  if (res instanceof ErrorResponse) {
607
610
  return [];
608
611
  }
@@ -672,19 +675,25 @@ class WorkflowStageComponent /* implements DoCheck */ {
672
675
  if (!actor)
673
676
  return '';
674
677
  if (actor.Tags && Array.isArray(actor.Tags) && actor.Tags.length > 0) {
675
- return actor.Tags.map((t) => t.Name || t).filter(Boolean).join(', ');
678
+ return actor.Tags.map((t) => t.Name || t)
679
+ .filter(Boolean)
680
+ .join(', ');
676
681
  }
677
- if (actor.ActorTags && Array.isArray(actor.ActorTags) && actor.ActorTags.length > 0) {
678
- return actor.ActorTags.map((t) => t.Name || t).filter(Boolean).join(', ');
682
+ if (actor.ActorTags &&
683
+ Array.isArray(actor.ActorTags) &&
684
+ actor.ActorTags.length > 0) {
685
+ return actor.ActorTags.map((t) => t.Name || t)
686
+ .filter(Boolean)
687
+ .join(', ');
679
688
  }
680
689
  return '';
681
690
  }
682
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 });
683
- 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\"\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=\"taskCode && 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 [(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" }] });
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" }] });
684
693
  }
685
694
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStageComponent /* implements DoCheck */, decorators: [{
686
695
  type: Component,
687
- 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\"\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=\"taskCode && 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 [(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"] }]
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"] }]
688
697
  }], ctorParameters: () => [{ type: i1.UtilService }, { type: i1.HttpWebRequestService }, { type: i0.ChangeDetectorRef }, { type: i0.IterableDiffers }], propDecorators: { pageSize: [{
689
698
  type: Input
690
699
  }], historyToDate: [{