verben-workflow-ui 0.5.88 → 0.5.90

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.
@@ -3,20 +3,20 @@ import { Injectable, EventEmitter, Component, Input, Output, input, NgModule } f
3
3
  import { SortDirection, ErrorResponse, ResourceModel, DataType, Status, TaskStatus, ObjectState } from 'verben-workflow-ui/src/lib/models';
4
4
  import { BaseDataViewComponent, SharedModule } from 'verben-workflow-ui/src/lib/shared';
5
5
  import { BehaviorSubject, Subject, debounceTime, distinctUntilChanged, takeUntil, lastValueFrom } from 'rxjs';
6
- import * as i1 from 'verben-workflow-ui/src/lib/services';
7
- import * as i3 from '@angular/common';
6
+ import * as i3 from 'verben-workflow-ui/src/lib/services';
7
+ import * as i4 from '@angular/common';
8
8
  import { CommonModule } from '@angular/common';
9
- import * as i4 from 'verben-ng-ui';
9
+ import * as i4$1 from 'verben-ng-ui';
10
10
  import { TooltipModule } from 'verben-ng-ui';
11
- import * as i5$1 from '@angular/router';
11
+ import * as i5 from '@angular/router';
12
12
  import { RouterLink } from '@angular/router';
13
13
  import * as i6$1 from 'verben-workflow-ui/src/lib/components/operation-popup';
14
14
  import { OperationPopupComponent } from 'verben-workflow-ui/src/lib/components/operation-popup';
15
- import * as i1$1 from '@angular/forms';
15
+ import * as i1 from '@angular/forms';
16
16
  import { Validators } from '@angular/forms';
17
- import * as i5 from 'verben-workflow-ui/src/lib/components/form-control';
17
+ import * as i6 from 'verben-workflow-ui/src/lib/components/form-control';
18
18
  import { FormControlerModule } from 'verben-workflow-ui/src/lib/components/form-control';
19
- import * as i6 from 'verben-workflow-ui/src/lib/components/form-timer';
19
+ import * as i7 from 'verben-workflow-ui/src/lib/components/form-timer';
20
20
  import { FormTimerModule } from 'verben-workflow-ui/src/lib/components/form-timer';
21
21
  import { TaskFormModule } from 'verben-workflow-ui/src/lib/components/task-form';
22
22
 
@@ -153,7 +153,7 @@ class TasksService {
153
153
  const url = `GetPossibleTasksForUser/${skip}/${limit}/${sortParam}/${sortOrder}/${user}`;
154
154
  return this.httpService.get(url);
155
155
  }
156
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksService, deps: [{ token: i1.HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
156
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksService, deps: [{ token: i3.HttpWebRequestService }], target: i0.ɵɵFactoryTarget.Injectable });
157
157
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksService, providedIn: 'root' });
158
158
  }
159
159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksService, decorators: [{
@@ -161,7 +161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
161
161
  args: [{
162
162
  providedIn: 'root', // 👈 Add this line
163
163
  }]
164
- }], ctorParameters: () => [{ type: i1.HttpWebRequestService }] });
164
+ }], ctorParameters: () => [{ type: i3.HttpWebRequestService }] });
165
165
 
166
166
  class TaskState {
167
167
  updating$ = new BehaviorSubject(false);
@@ -615,7 +615,7 @@ class TaskFacade {
615
615
  this.taskState.setUpdating(false);
616
616
  }
617
617
  }
618
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TaskFacade, deps: [{ token: TasksService }, { token: TaskState }, { token: i1.UtilService }], target: i0.ɵɵFactoryTarget.Injectable });
618
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TaskFacade, deps: [{ token: TasksService }, { token: TaskState }, { token: i3.UtilService }], target: i0.ɵɵFactoryTarget.Injectable });
619
619
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TaskFacade, providedIn: 'root' });
620
620
  }
621
621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TaskFacade, decorators: [{
@@ -623,7 +623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
623
623
  args: [{
624
624
  providedIn: 'root', // 👈 Add this line
625
625
  }]
626
- }], ctorParameters: () => [{ type: TasksService }, { type: TaskState }, { type: i1.UtilService }] });
626
+ }], ctorParameters: () => [{ type: TasksService }, { type: TaskState }, { type: i3.UtilService }] });
627
627
 
628
628
  class TaskModel extends ResourceModel {
629
629
  }
@@ -631,6 +631,7 @@ class TaskModel extends ResourceModel {
631
631
  class TasksFormComponent {
632
632
  fb;
633
633
  taskFacade;
634
+ utilService;
634
635
  get currentData() {
635
636
  return this._currentData;
636
637
  }
@@ -660,9 +661,10 @@ class TasksFormComponent {
660
661
  loadingTaskForm = false;
661
662
  taskFormView = false;
662
663
  // active: boolean = false;
663
- constructor(fb, taskFacade) {
664
+ constructor(fb, taskFacade, utilService) {
664
665
  this.fb = fb;
665
666
  this.taskFacade = taskFacade;
667
+ this.utilService = utilService;
666
668
  this.taskFacade.getWorkflow$().subscribe((workflows) => {
667
669
  this.workflows = workflows;
668
670
  });
@@ -747,13 +749,23 @@ class TasksFormComponent {
747
749
  else
748
750
  return this.form.invalid;
749
751
  }
750
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksFormComponent, deps: [{ token: i1$1.FormBuilder }, { token: TaskFacade }], target: i0.ɵɵFactoryTarget.Component });
751
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksFormComponent, selector: "tasks-form", inputs: { currentData: "currentData" }, outputs: { onTaskFormSave: "onTaskFormSave", onSave: "onSave" }, ngImport: i0, template: "@if (taskFormView && taskForm) {\n<div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n>\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg': active === index\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n</div>\n\n<div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n</div>\n\n<!-- Empty state template -->\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\n} @else {\n<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n</form>\n}\n", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i4.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { 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", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i5.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i6.FormTimerComponent, selector: "app-form-timer", inputs: ["expiryDate"] }] });
752
+ getRoute(item) {
753
+ const workflow = this.workflows.find((x) => x.Code == item.WorkflowCode);
754
+ if (workflow) {
755
+ return workflow.Route || null;
756
+ }
757
+ return null;
758
+ }
759
+ viewSource(item, route) {
760
+ this.utilService.openRelativeRouteInNewWindow(`${route}/${item.Code}`);
761
+ }
762
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksFormComponent, deps: [{ token: i1.FormBuilder }, { token: TaskFacade }, { token: i3.UtilService }], target: i0.ɵɵFactoryTarget.Component });
763
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksFormComponent, selector: "tasks-form", inputs: { currentData: "currentData" }, outputs: { onTaskFormSave: "onTaskFormSave", onSave: "onSave" }, ngImport: i0, template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\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} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <div>\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n </div>\n\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i4$1.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i4$1.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", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i6.FormControlComponent, selector: "form-control", inputs: ["dataType", "value", "boolInputType", "formProperties", "disabled"] }, { kind: "component", type: i7.FormTimerComponent, selector: "app-form-timer", inputs: ["expiryDate"] }] });
752
764
  }
753
765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksFormComponent, decorators: [{
754
766
  type: Component,
755
- args: [{ selector: 'tasks-form', template: "@if (taskFormView && taskForm) {\n<div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n>\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg': active === index\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n</div>\n\n<div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n</div>\n\n<!-- Empty state template -->\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\n} @else {\n<form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n>\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n</form>\n}\n" }]
756
- }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: TaskFacade }], propDecorators: { currentData: [{
767
+ args: [{ selector: 'tasks-form', template: "@if (taskFormView && taskForm) {\n <div\n *ngIf=\"taskForm.Entities[active]\"\n class=\"flex flex-wrap bg-[#9A9FBF80] rounded-xl px-3 py-2 w-full relative gap-6\"\n >\n <app-form-timer></app-form-timer>\n <div *ngFor=\"let group of taskForm.Entities; let index = index\">\n <p\n (click)=\"active = index\"\n [ngClass]=\"{\n 'bg-[var(--vbn-color-surface)] text-primary rounded-lg shadow-lg':\n active === index,\n }\"\n class=\"px-6 py-2 cursor-pointer\"\n >\n {{ group.Name }}group\n </p>\n </div>\n </div>\n\n <div *ngIf=\"taskForm.Entities[active]; else emptyState\" class=\"mt-4\">\n <form-control\n [dataType]=\"dataType\"\n [formProperties]=\"taskForm.Entities[active].Properties\"\n ></form-control>\n\n <div class=\"flex gap-3 justify-end\">\n <verbena-button\n (click)=\"areRequiredPropertiesFilled()\"\n text=\"CHECK\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n (click)=\"taskFormView = false\"\n text=\"Close task form\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n\n <verbena-button\n class=\"verben-primary-button\"\n (click)=\"sendTaskForm()\"\n [disable]=\"!areRequiredPropertiesFilled()\"\n text=\"Save\"\n ></verbena-button>\n </div>\n </div>\n\n <!-- Empty state template -->\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} @else {\n <form\n [formGroup]=\"form\"\n class=\"flex flex-col px-3 pb-3 rounded-xl h-full w-full relative space-y-4\"\n (ngSubmit)=\"handleSubmit()\"\n >\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n <verbena-input\n name=\"Description\"\n label=\"Description\"\n formControlName=\"Description\"\n placeHolder=\"Enter Description\"\n />\n\n <div class=\"space-y-1\">\n <label for=\"workflow\">Workflow</label>\n\n <verben-drop-down\n label=\"Workflow\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select\"\n [options]=\"workflows\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n id=\"workflow\"\n formControlName=\"WorkflowCode\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"status\">Status</label>\n\n <verben-drop-down\n label=\"Status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n [showClear]=\"true\"\n placeholder=\"Null\"\n [(options)]=\"statuses\"\n id=\"status\"\n formControlName=\"Status\"\n class=\"form-control\"\n >\n </verben-drop-down>\n </div>\n\n <!-- buttons -->\n <div class=\"flex justify-between gap-4 my-2\">\n <!-- <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button> -->\n <div>\n <div *ngIf=\"currentData && getRoute(currentData.data) as workflowRoute\">\n <ng-container\n *ngIf=\"\n currentData && workflowRoute && workflowRoute.trim().length > 0\n \"\n >\n <verbena-button\n *ngIf=\"currentData.data.DataState !== 'New'\"\n class=\"verben-switch-button\"\n (click)=\"viewSource(currentData.data, workflowRoute)\"\n text=\"View Source Data\"\n ></verbena-button>\n </ng-container>\n </div>\n </div>\n\n <!-- <verbena-button\n [disable]=\"!taskForm || loadingTaskForm\"\n (click)=\"taskFormView = true\"\n [text]=\"loadingTaskForm ? 'Checking for form' : 'Fill task form'\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button> -->\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n [disable]=\"disableProcessing()\"\n ></verbena-button>\n </div>\n </form>\n}\n" }]
768
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: TaskFacade }, { type: i3.UtilService }], propDecorators: { currentData: [{
757
769
  type: Input
758
770
  }], onTaskFormSave: [{
759
771
  type: Output
@@ -867,7 +879,7 @@ class TasksComponent extends BaseDataViewComponent {
867
879
  await this.taskFacade.addRequest(payload);
868
880
  }
869
881
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: TaskState }, { token: TaskFacade }], target: i0.ɵɵFactoryTarget.Component });
870
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksComponent, selector: "lib-tasks", inputs: { pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TasksService, TaskFacade, TaskState], usesInheritance: true, ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view #vdv [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle: true,\n }\" [buttonClass]=\"'my-custom-button-class'\" [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\" [selectedColumnCount]=\"0\" [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\" (viewChange)=\"onViewChange($event)\" (stateChange)=\"onStateChange($event)\"\n (onSearchChange)=\"handleSearch($event)\">\n <div table-content>\n <lib-data-table [data]=\"data()\" [columns]=\"config.columns\" [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\">\n <ng-container libColumn=\"history\">\n <ng-template #cell let-value>\n <a [routerLink]=\"['/workflow/task-history', value]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)]\">view history</a>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"workflow\">\n <ng-template #cell let-value>\n <a [routerLink]=\"['/workflow/workflows', value]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)]\">view Workflow</a>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-row=\"row\">\n <lib-operation-popup [user]=\"user()\" [task]=\"row\" [allowedActions]=\"getActionNamesForTask(row)\"\n (actionComplete)=\"loadInitialData()\">\n <div trigger class=\"cursor-pointer p-2 -m-2 inline-flex items-center justify-center\">\n <verben-svg icon=\"dots\" [width]=\"3\" [height]=\"18\" class=\"w-auto\"></verben-svg>\n </div>\n </lib-operation-popup>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n\n <div card-content>\n <verben-card-data-view borderRadius=\"12px\" (loadMoreClick)=\"loadMore()\" #vdcv dataId=\"Id\" border=\"5px\"\n [cardDataList]=\"cardData()\" rbgColor=\"var(--vbn-color-surface-alt)\" mg=\"20px\">\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data #vlcd [parent]=\"vdcv\" dataId=\"Code\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\" [cardDataList]=\"cardData()\">\n <ng-template #card let-cardItem>\n <div (click)=\"currentData = vdcv.onItemClick(cardItem)\" class=\"flex\">\n <div (click)=\"currentData = vdcv.onItemClick(cardItem)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\">\n <div class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\" [ngClass]=\"\n cardItem.selected ? 'bg-primary' : 'bg-secondary-200'\n \"></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[var(--vbn-color-on-primary)]\">{{\n cardItem.title\n }}</span>\n <p class=\"flex items-center\">\n <!-- <label for=\"phone\" class=\"text-[10px] font-light\">Current Actors:</label> -->\n @if (cardItem.data.CurrentActors && cardItem.data.CurrentActors.length > 0) {\n @if (cardItem.data.CurrentActors.length === 1) {\n <span id=\"phone\" class=\"text-sm\">{{ cardItem.data.CurrentActors[0].Identifier }}</span>\n } @else {\n <verben-tooltip [top]=\"'0px'\" [textColor]=\"'var(--vbn-color-text)'\" [backgroundColor]=\"'var(--vbn-color-border)'\" [left]=\"'0'\"\n [tooltipContent]=\"actorsTooltipTemplate\" #actorsTooltip>\n <span id=\"phone\" class=\"text-sm cursor-pointer\">\n {{ cardItem.data.CurrentActors[0].Identifier }} and {{ cardItem.data.CurrentActors.length\n - 1 }} others\n </span>\n </verben-tooltip>\n\n <ng-template #actorsTooltipTemplate>\n <div class=\"p-2\">\n <p class=\"text-xs font-semibold mb-1\">Current Actors:</p>\n <ul class=\"list-disc list-inside\">\n @for (actor of cardItem.data.CurrentActors; track actor.Identifier) {\n <li class=\"text-xs\">{{ actor.Identifier }}</li>\n }\n </ul>\n </div>\n </ng-template>\n }\n } @else {\n <span id=\"phone\" class=\"text-sm text-gray-400\">No actors assigned</span>\n }\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <span for=\"role\" class=\"font-light\">{{\n cardItem.data.Code\n }}</span>\n\n <div (click)=\"$event.stopPropagation();\" class=\"flex items-end gap-4\">\n <a [routerLink]=\"[\n '/workflow/task-history',\n cardItem.data.Code\n ]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)] text-xs relative z-10\">view\n history</a>\n\n <lib-operation-popup [user]=\"user()\" [task]=\"cardItem.data\"\n [allowedActions]=\"getActionNamesForTask(cardItem.data)\" (actionComplete)=\"loadInitialData()\">\n <div trigger class=\"cursor-pointer p-2 -m-2 inline-flex items-center justify-center\">\n <verben-svg icon=\"dots\" [width]=\"3\" [height]=\"18\" class=\"w-auto\"></verben-svg>\n </div>\n </lib-operation-popup>\n </div>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <!-- <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form> -->\n <tasks-form [currentData]=\"currentData\" (switchView)=\"vdv.toggleView()\"\n (onSave)=\"onSave($event)\"></tasks-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"w-full\">\n <div [ngClass]=\"{\n 'flex gap-2 items-center': true,\n 'justify-end': true\n }\">\n <!-- <verbena-button\n *ngIf=\"!vdcv.hasCurrentItem()\"\n [fontWeight]=\"'bold'\"\n [bgColor]=\"'var(--vbn-color-text-muted)'\"\n [borderRadius]=\"'4px'\"\n [textColor]=\"'var(--vbn-color-surface)'\"\n [pd]=\"'9.79px 37.28px'\"\n [text]=\"'Delete'\"\n >\n </verbena-button> -->\n <div class=\"flex {{\n vdcv.hasCurrentItem() ? 'flex-1' : ''\n }} justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData().length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links text-[var(--vbn-color-border-focus)] underline\">\n Load more\n </button>\n </div>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <lib-data-columns [columns]=\"config.columns\" (columnsUpdated)=\"onColumnsUpdated($event)\"></lib-data-columns>\n </div>\n <div filter-content>\n <verben-table-filter [border]=\"'1px solid var(--vbn-color-primary)'\" borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\" bgColor=\"white\" width=\"420px\" textColor=\"black\" pd=\"1rem\"\n primaryColor=\"var(--vbn-color-primary)\" secondaryColor=\"var(--vbn-color-border-focus)\" tertiaryColor=\"var(--vbn-color-on-primary)\" [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"></verben-table-filter>\n </div>\n <div sort-content>\n <lib-data-sort [columns]=\"config.columns\" [data]=\"data()\" (sortApplied)=\"onSortUpdated($event)\"></lib-data-sort>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n\n <div *ngIf=\"vdv.isTableView\" class=\"flex gap-2 justify-between\">\n <div class=\"message-log-button-container flex justify-between\">\n <!-- <verbena-button\n [fontWeight]=\"'bold'\"\n [bgColor]=\"'var(--vbn-color-text-muted)'\"\n [borderRadius]=\"'4px'\"\n [textColor]=\"'var(--vbn-color-surface)'\"\n [pd]=\"'9.79px 37.28px'\"\n [text]=\"'Delete'\"\n >\n </verbena-button> -->\n </div>\n <div class=\"flex justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData().length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links text-[var(--vbn-color-border-focus)] underline\">\n Load more\n </button>\n </div>\n </div>\n</div>\n", styles: [".view-links{color:var(--vbn-color-border-focus);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "dataKey", "formGroupConfig", "groupBy", "useVirtualScroll", "virtualScrollItemSize", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowRevert", "rowDelete", "selectionChange"] }, { kind: "directive", type: i4.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i4.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "component", type: i4.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "extendCustomClass", "exportCustomClass", "selectCustomClass", "importCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "importTemplate", "columnTemplate", "extendTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "milliseconds", "showColumnChild", "showSortChild", "showFilterChild", "showImportChild", "showExportChild", "showExtendChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i4.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "showEditIcon", "useVirtualScroll", "virtualScrollItemSize", "onItemClick", "onCardChildClick"], outputs: ["editClicked", "loadMoreClick"] }, { kind: "component", type: i4.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "useVirtualScroll", "virtualScrollItemSize", "dataId"] }, { kind: "component", type: i4.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i4.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i4.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i4.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "savedFilters", "tooltip", "saveCallback"], outputs: ["filtersApplied", "resetSortData"] }, { kind: "component", type: i4.DataExportComponent, selector: "lib-data-export", inputs: ["columns", "data", "dataFetchUrl", "dataQueryParameters"], outputs: ["exportDataEvent"] }, { kind: "component", type: i4.DataColumnsComponent, selector: "lib-data-columns", inputs: ["columns", "enableDragAndDrop", "maxVisibleItems", "selectedColumns"], outputs: ["columnsUpdated"] }, { kind: "component", type: i4.DataSortComponent, selector: "lib-data-sort", inputs: ["columns", "data", "enableDragAndDrop"], outputs: ["sortApplied", "resetFilter"] }, { kind: "directive", type: i5$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { 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: i6$1.OperationPopupComponent, selector: "lib-operation-popup", inputs: ["user", "task", "allowedActions"], outputs: ["actionComplete"] }, { kind: "component", type: TasksFormComponent, selector: "tasks-form", inputs: ["currentData"], outputs: ["onTaskFormSave", "onSave"] }] });
882
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TasksComponent, selector: "lib-tasks", inputs: { pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TasksService, TaskFacade, TaskState], usesInheritance: true, ngImport: i0, template: "<div class=\"space-y-8\">\n <verben-data-view #vdv [viewState]=\"{\n isSearch: true,\n isColumn: true,\n isFilter: true,\n isSort: true,\n isExport: true,\n isSelect: true,\n isCreate: true,\n isToggle: true,\n }\" [buttonClass]=\"'my-custom-button-class'\" [iconClass]=\"'my-icon-class'\"\n [activeIconClass]=\"'my-active-icon-class'\" [selectedColumnCount]=\"0\" [selectedSortCount]=\"0\"\n [selectedFilterTableCount]=\"0\" (viewChange)=\"onViewChange($event)\" (stateChange)=\"onStateChange($event)\"\n (onSearchChange)=\"handleSearch($event)\">\n <div table-content>\n <lib-data-table [data]=\"data()\" [columns]=\"config.columns\" [styleConfig]=\"styles\"\n (selectionChange)=\"onSelectionChange($event)\">\n <ng-container libColumn=\"history\">\n <ng-template #cell let-value>\n <a [routerLink]=\"['/workflow/task-history', value]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)]\">view history</a>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"workflow\">\n <ng-template #cell let-value>\n <a [routerLink]=\"['/workflow/workflows', value]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)]\">view Workflow</a>\n </ng-template>\n </ng-container>\n\n <ng-container libColumn=\"actions\">\n <ng-template #cell let-row=\"row\">\n <lib-operation-popup [user]=\"user()\" [task]=\"row\" [allowedActions]=\"getActionNamesForTask(row)\"\n (actionComplete)=\"loadInitialData()\">\n <div trigger class=\"cursor-pointer p-2 -m-2 inline-flex items-center justify-center\">\n <verben-svg icon=\"dots\" [width]=\"3\" [height]=\"18\" class=\"w-auto\"></verben-svg>\n </div>\n </lib-operation-popup>\n </ng-template>\n <ng-template #header>\n <strong>Actions</strong>\n </ng-template>\n </ng-container>\n </lib-data-table>\n </div>\n\n <div card-content>\n <verben-card-data-view borderRadius=\"12px\" (loadMoreClick)=\"loadMore()\" #vdcv dataId=\"Id\" border=\"5px\"\n [cardDataList]=\"cardData()\" rbgColor=\"var(--vbn-color-surface-alt)\" mg=\"20px\">\n <verben-left-card-data-view class=\"space-y-7\">\n <verben-left-card-data #vlcd [parent]=\"vdcv\" dataId=\"Code\"\n class=\"bg-secondary-100 rounded-xl border-primary border-[1px]\" [cardDataList]=\"cardData()\">\n <ng-template #card let-cardItem>\n <div (click)=\"currentData = vdcv.onItemClick(cardItem)\" class=\"flex\">\n <div (click)=\"currentData = vdcv.onItemClick(cardItem)\"\n class=\"flex cursor-pointer w-full bg-secondary rounded-xl\">\n <div class=\"w-3 rounded-xl rounded-tr-none rounded-br-none\" [ngClass]=\"\n cardItem.selected ? 'bg-primary' : 'bg-secondary-200'\n \"></div>\n <div class=\"flex flex-col py-2 px-4 w-full\">\n <div class=\"flex items-center gap-4 justify-between\">\n <div class=\"grid gap-y-2\">\n <span class=\"font-semibold text-[var(--vbn-color-on-primary)]\">{{\n cardItem.title\n }}</span>\n <p class=\"flex items-center\">\n <!-- <label for=\"phone\" class=\"text-[10px] font-light\">Current Actors:</label> -->\n @if (cardItem.data.CurrentActors && cardItem.data.CurrentActors.length > 0) {\n @if (cardItem.data.CurrentActors.length === 1) {\n <span id=\"phone\" class=\"text-sm\">{{ cardItem.data.CurrentActors[0].Identifier }}</span>\n } @else {\n <verben-tooltip [top]=\"'0px'\" [textColor]=\"'var(--vbn-color-text)'\" [backgroundColor]=\"'var(--vbn-color-border)'\" [left]=\"'0'\"\n [tooltipContent]=\"actorsTooltipTemplate\" #actorsTooltip>\n <span id=\"phone\" class=\"text-sm cursor-pointer\">\n {{ cardItem.data.CurrentActors[0].Identifier }} and {{ cardItem.data.CurrentActors.length\n - 1 }} others\n </span>\n </verben-tooltip>\n\n <ng-template #actorsTooltipTemplate>\n <div class=\"p-2\">\n <p class=\"text-xs font-semibold mb-1\">Current Actors:</p>\n <ul class=\"list-disc list-inside\">\n @for (actor of cardItem.data.CurrentActors; track actor.Identifier) {\n <li class=\"text-xs\">{{ actor.Identifier }}</li>\n }\n </ul>\n </div>\n </ng-template>\n }\n } @else {\n <span id=\"phone\" class=\"text-sm text-gray-400\">No actors assigned</span>\n }\n </p>\n </div>\n\n <div class=\"grid gap-y-2\">\n <span for=\"role\" class=\"font-light\">{{\n cardItem.data.Code\n }}</span>\n\n <div (click)=\"$event.stopPropagation();\" class=\"flex items-end gap-4\">\n <a [routerLink]=\"[\n '/workflow/task-history',\n cardItem.data.Code\n ]\" routerLinkActive=\"router-link-active\"\n class=\"underline text-[var(--vbn-color-border-focus)] text-xs relative z-10\">view\n history</a>\n\n <lib-operation-popup [user]=\"user()\" [task]=\"cardItem.data\"\n [allowedActions]=\"getActionNamesForTask(cardItem.data)\" (actionComplete)=\"loadInitialData()\">\n <div trigger class=\"cursor-pointer p-2 -m-2 inline-flex items-center justify-center\">\n <verben-svg icon=\"dots\" [width]=\"3\" [height]=\"18\" class=\"w-auto\"></verben-svg>\n </div>\n </lib-operation-popup>\n </div>\n </div>\n </div>\n\n <!-- <div class=\"flex\">\n <span class=\"font-normal text-sm\">{{ item.title }}</span>\n </div>\n @for (ciItem of item.body; track ciItem.value) {\n <div class=\"\">\n <span class=\"text-muted font-light text-xs\"\n >{{ ciItem.title }}:</span\n >\n <span class=\"text-black\">{{ ciItem.value }}</span>\n </div>\n } -->\n </div>\n </div>\n </div>\n </ng-template>\n </verben-left-card-data>\n </verben-left-card-data-view>\n\n <verben-right-card-data-view>\n <ng-template #parent>\n <!-- <lib-user-request-form\n [currentData]=\"currentData\"\n (switchView)=\"vdv.toggleView()\"\n (onApproval)=\"onApprove($event)\"\n ></lib-user-request-form> -->\n <tasks-form [currentData]=\"currentData\" (switchView)=\"vdv.toggleView()\"\n (onSave)=\"onSave($event)\"></tasks-form>\n </ng-template>\n </verben-right-card-data-view>\n\n <verben-card-data-view-footer class=\"w-full\">\n <div [ngClass]=\"{\n 'flex gap-2 items-center': true,\n 'justify-end': true\n }\">\n <!-- <verbena-button\n *ngIf=\"!vdcv.hasCurrentItem()\"\n [fontWeight]=\"'bold'\"\n [bgColor]=\"'var(--vbn-color-text-muted)'\"\n [borderRadius]=\"'4px'\"\n [textColor]=\"'var(--vbn-color-surface)'\"\n [pd]=\"'9.79px 37.28px'\"\n [text]=\"'Delete'\"\n >\n </verbena-button> -->\n <div class=\"flex {{\n vdcv.hasCurrentItem() ? 'flex-1' : ''\n }} justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData().length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links text-[var(--vbn-color-border-focus)] underline\">\n Load more\n </button>\n </div>\n </div>\n </verben-card-data-view-footer>\n </verben-card-data-view>\n </div>\n <div column-content>\n <lib-data-columns [columns]=\"config.columns\" (columnsUpdated)=\"onColumnsUpdated($event)\"></lib-data-columns>\n </div>\n <div filter-content>\n <verben-table-filter [border]=\"'1px solid var(--vbn-color-primary)'\" borderRadius=\"10px\"\n boxShadow=\"2px 2px 2px 0px silver\" bgColor=\"white\" width=\"420px\" textColor=\"black\" pd=\"1rem\"\n primaryColor=\"var(--vbn-color-primary)\" secondaryColor=\"var(--vbn-color-border-focus)\" tertiaryColor=\"var(--vbn-color-on-primary)\" [filterOptions]=\"filterArray\"\n [maxFilterLength]=\"3\"></verben-table-filter>\n </div>\n <div sort-content>\n <lib-data-sort [columns]=\"config.columns\" [data]=\"data()\" (sortApplied)=\"onSortUpdated($event)\"></lib-data-sort>\n </div>\n <div export-content>\n <lib-data-export [data]=\"data()\" (exportDataEvent)=\"handleExport($event)\">\n </lib-data-export>\n </div>\n </verben-data-view>\n\n <div *ngIf=\"vdv.isTableView\" class=\"flex gap-2 justify-between\">\n <div class=\"message-log-button-container flex justify-between\">\n <!-- <verbena-button\n [fontWeight]=\"'bold'\"\n [bgColor]=\"'var(--vbn-color-text-muted)'\"\n [borderRadius]=\"'4px'\"\n [textColor]=\"'var(--vbn-color-surface)'\"\n [pd]=\"'9.79px 37.28px'\"\n [text]=\"'Delete'\"\n >\n </verbena-button> -->\n </div>\n <div class=\"flex justify-end items-center gap-5\">\n <span class=\"paginator-text\">{{ cardData().length }} records loaded</span>\n <button (click)=\"loadMore()\" class=\"load-more view-links text-[var(--vbn-color-border-focus)] underline\">\n Load more\n </button>\n </div>\n </div>\n</div>\n", styles: [".view-links{color:var(--vbn-color-border-focus);cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.DataTableComponent, selector: "lib-data-table", inputs: ["data", "columns", "dataKey", "formGroupConfig", "groupBy", "useVirtualScroll", "virtualScrollItemSize", "styleConfig"], outputs: ["rowEdit", "rowSave", "rowRevert", "rowDelete", "selectionChange"] }, { kind: "directive", type: i4$1.ColumnDirective, selector: "[libColumn]", inputs: ["libColumn"] }, { kind: "component", type: i4$1.SvgComponent, selector: "verben-svg", inputs: ["icon", "width", "height", "fill", "stroke", "type", "size"] }, { kind: "component", type: i4$1.DataViewComponent, selector: "verben-data-view", inputs: ["buttonClass", "iconClass", "activeIconClass", "columnCustomClass", "filterCustomClass", "sortCustomClass", "extendCustomClass", "exportCustomClass", "selectCustomClass", "importCustomClass", "zIndex", "createCustomClass", "tableIcon", "cardIcon", "cardClass", "tableClass", "searchKey", "searchValue", "viewState", "searchTemplate", "importTemplate", "columnTemplate", "extendTemplate", "filterTemplate", "sortTemplate", "children", "exportTemplate", "createTemplate", "selectedColumnCount", "selectedSortCount", "selectedFilterTableCount", "inputWidth", "milliseconds", "showColumnChild", "showSortChild", "showFilterChild", "showImportChild", "showExportChild", "showExtendChild", "create", "showSelected", "isTableView"], outputs: ["viewChange", "stateChange", "onSearchChange"] }, { kind: "component", type: i4$1.CardDataViewComponent, selector: "verben-card-data-view", inputs: ["pd", "mg", "lHeight", "rHeight", "rWidth", "lWidth", "textColor", "lbgColor", "rbgColor", "border", "display", "borderRadius", "activeCss", "inActiveCss", "displayAsRow", "cardDataList", "dataId", "totalRecords", "footer", "noOfVisibleChildren", "showEditIcon", "useVirtualScroll", "virtualScrollItemSize", "onItemClick", "onCardChildClick"], outputs: ["editClicked", "loadMoreClick"] }, { kind: "component", type: i4$1.LeftCardDataComponent, selector: "verben-left-card-data", inputs: ["pd", "mg", "height", "weight", "activeCss", "inActiveCss", "cardDataList", "iconCollapse", "iconExpanded", "parent", "useVirtualScroll", "virtualScrollItemSize", "dataId"] }, { kind: "component", type: i4$1.LeftCardDataViewComponent, selector: "verben-left-card-data-view", inputs: ["cardDataList"] }, { kind: "component", type: i4$1.RightCardDataViewComponent, selector: "verben-right-card-data-view", inputs: ["parentData", "chilData", "meth"] }, { kind: "component", type: i4$1.CardDataViewFooterComponent, selector: "verben-card-data-view-footer" }, { kind: "component", type: i4$1.TableFilterComponent, selector: "verben-table-filter", inputs: ["filterOptions", "pd", "mg", "height", "width", "bgColor", "boxShadow", "textColor", "primaryColor", "secondaryColor", "tertiaryColor", "border", "borderRadius", "selectWidth", "maxFilterLength", "savedFilters", "tooltip", "saveCallback"], outputs: ["filtersApplied", "resetSortData"] }, { kind: "component", type: i4$1.DataExportComponent, selector: "lib-data-export", inputs: ["columns", "data", "dataFetchUrl", "dataQueryParameters"], outputs: ["exportDataEvent"] }, { kind: "component", type: i4$1.DataColumnsComponent, selector: "lib-data-columns", inputs: ["columns", "enableDragAndDrop", "maxVisibleItems", "selectedColumns"], outputs: ["columnsUpdated"] }, { kind: "component", type: i4$1.DataSortComponent, selector: "lib-data-sort", inputs: ["columns", "data", "enableDragAndDrop"], outputs: ["sortApplied", "resetFilter"] }, { kind: "directive", type: i5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i4$1.TooltipComponent, selector: "verben-tooltip", inputs: ["tooltipContent", "customClass", "backgroundColor", "textColor", "padding", "borderRadius", "zIndex", "border", "width", "top", "bottom", "left", "right"] }, { kind: "component", type: i6$1.OperationPopupComponent, selector: "lib-operation-popup", inputs: ["user", "task", "allowedActions"], outputs: ["actionComplete"] }, { kind: "component", type: TasksFormComponent, selector: "tasks-form", inputs: ["currentData"], outputs: ["onTaskFormSave", "onSave"] }] });
871
883
  }
872
884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TasksComponent, decorators: [{
873
885
  type: Component,